Project
PDF Documentation RAG
A retrieval-augmented generation API that ingests PDF documentation and answers questions from the retrieved passages, with citations.
- Python
- FastAPI
- Postgres
- sentence-transformers
- Docker
Built a retrieval-augmented generation (RAG) API in Python and FastAPI that ingests PDF documentation, embeds each chunk, and answers questions from retrieved passages with citations, exposed through REST and an OpenAI-compatible chat endpoint.
Designed a PostgreSQL and pgvector schema (HNSW vector index and full-text index) and a hybrid search pipeline that fuses cosine similarity with keyword search, then reranks with a cross-encoder so the language model sees only the top passages.
Evaluated retrieval and answer quality on FinanceBench (150 questions) and stored per-question scores in Postgres, reaching about 97% evidence recall and showing that the remaining misses were in generation, not search.