All projects

Governance Tools · 2025

Aweh

AI-powered immigration guidance for F-1 students — hybrid RAG with personalized answers grounded in USCIS policy documents and user profiles.

PythonFastAPILangChainSupabasepgvectorClaudeStreamlit

Problem

F-1 immigration guidance is fragmented across dense primary sources, while generic chat answers can sound confident without being grounded or appropriately limited.

Why I built it

I wanted to explore whether retrieval, citations, and explicit escalation could make a domain-specific assistant more useful without pretending it replaces legal counsel.

Architecture

  • Official immigration PDFs (USCIS policy manual, 8 CFR, SEVP guidance) are chunked and embedded into Supabase pgvector for semantic retrieval.
  • Hybrid retrieval merges dense vector search with keyword matching, then Cohere rerank selects the most relevant spans before the agent composes an answer.
  • User profile context rewrites queries for personalization; the agent is instructed to cite sources and flag when a question needs human legal counsel.

Implementation

  • Official documents are chunked and embedded into Supabase with pgvector.
  • Dense and keyword retrieval are combined, then reranked before context reaches the model.
  • Profile-aware query rewriting personalizes retrieval while answer rules require citations and escalation for ambiguous cases.

Experiments

  • Representative student questions test retrieval relevance across OPT, CPT, travel, and employment scenarios.
  • Grounded answers are reviewed for citation support and appropriate uncertainty.

What I learned

  • Retrieval quality, not response fluency, is the first bottleneck in high-stakes assistants.
  • A useful system needs a visible boundary between information and individualized advice.

Next questions

  • How should conflicting or superseded source documents be represented?
  • What evaluation rubric best captures both usefulness and responsible escalation?