long PDFs blow past context windows, and an LLM answering from memory drifts from the source. i wanted answers grounded in the actual pages.
how it works
the PDF is split into 1,000-character chunks with 200 overlap, embedded with MiniLM into a ChromaDB store per user session, and the 3 closest chunks go to Gemini 2.0 Flash, which answers from that context only.
what i learned
chunk size and overlap mattered more to answer quality than which LLM wrote the answer.
results
served through a Flask app with a separate vector store per session, PDF-only uploads and a 16 MB size limit.
chunk size and overlap are still the main levers being tuned.