All work
RAG Engineering Handbook
Ask the 297-page NASA Systems Engineering Handbook a question and get a streamed answer whose citations open the exact highlighted passage in the PDF.
The problem
Long technical handbooks are where engineers lose hours. A chatbot that paraphrases without showing its source is worse than search, because nobody can check it.
What I built
- Docling parse
- Chunk
- Embed
- FAISS + BM25
- Rerank
- Stream with citations
- Layout-aware parsing with Docling, keeping tables and the bounding box of every passage, then structure-aware chunks of 100 to 700 tokens.
- Hybrid retrieval: FAISS dense search fused with BM25 through reciprocal rank fusion, then a cross-encoder reranker.
- Streaming answers from gpt-4o-mini with inline [C1] citations; each one jumps to the source page with the passage highlighted.
- Two modes: Quick (dense only, about 1.2 s) and Thorough (with reranking, about 2.2 s).
- Evaluated before shipping, with IR metrics on a ground-truth set and RAGAS with Gemini as the judge; deployed on Azure Container Apps.
Results
- Faithfulness
- 0.93
- Answer relevancy
- 0.88
- Hit@5 with reranking
- 0.95
- Time to first token, median
- 1.1 s
Measured on 20 ground-truth queries; RAGAS judged by Gemini 2.5 Flash
| Pipeline | Hit@3 | Hit@5 | MRR@3 | MRR@5 |
|---|---|---|---|---|
| Dense only | 0.85 | 0.85 | 0.71 | 0.71 |
| Dense and rerank | 0.90 | 0.95 | 0.79 | 0.80 |
More from the build


The Azure deployment has been taken down to avoid running costs; the code and evaluation results are in the repository.