CodePath




A retrieval-augmented generation system that answers questions about campus life from a corpus of unofficial student guides, housing documents, and FAQs. Rather than generating answers from a language model's general knowledge, it retrieves relevant passages from the corpus first and answers strictly from what it finds, citing the source of each answer and declining when the corpus does not cover the question.
I designed and built the Unofficial Guide as an end-to-end retrieval-augmented generation system in Python. The system answers questions about campus life from a corpus of student guides, housing documents, and FAQs, and is built to decline rather than guess when the corpus does not cover a question.
Because the corpus mixed prose, structured FAQ entries, and tabular data, I chose recursive content-aware chunking over fixed-size splitting, producing 263 chunks. Retrieval uses sentence-transformer embeddings with a persistent ChromaDB vector store configured for cosine distance.
Generation is grounded strictly against retrieved context, with a distance threshold that triggers a refusal when nothing relevant is found. I built source attribution programmatically from chunk metadata rather than having the model cite its own sources, so citations cannot be fabricated.
I evaluated the system on a labeled question set and traced two retrieval failures to their causes, fixing one by embedding metadata alongside chunk text and the other by splitting FAQ content per question. A third failure requiring aggregation across the corpus I documented rather than fixed, since it needs metadata pre-filtering ahead of semantic ranking.
Implementation was done with an AI coding assistant working from my specification. The chunking strategy, retrieval configuration, attribution design, and both fixes were my decisions.