DocMind
2026A production-ready RAG pipeline that lets you upload any PDF and ask questions about it in natural language. Built with a focus on retrieval quality and verifiability — every answer cites the exact source chunk it came from.
Key Milestones & Technical Implementation
- Built a full ingest pipeline — PDF parsing, 500-token chunking with overlap, batched OpenAI embeddings, and vector storage in pgvector — designed so any document is queryable within seconds of upload.
- Implemented cosine similarity retrieval using pgvector's native <=> operator, with optional HNSW indexing for scale and per-document scoping for multi-tenant use.
- Engineered a streaming generation layer using GPT-4o-mini with citation parsing — the model references numbered sources in its answer, which are mapped back to real chunks and surfaced as clickable references in the UI.
- Built a Precision@3 evaluation script that scores retrieval quality against a test case suite — measuring whether the correct chunk appears in the top 3 results and logging citation rate across all test questions.
Technologies & Tools Used
Node.jsTypeScriptOpenAI APIpgvectorPostgreSQLPrismaDocker