AI · RAG · Next.js · 2025
DocPulse
Document Q&A for a legal-tech startup.
Client type
AI
Stack
Next.js · pgvector · OpenAI · Hybrid retrieval
Timeline
2025
Outcome
Citation accuracy on the eval set rose from about 60% with prompt-only tuning to 94% after retrie…
Case study
Problem
Problem
The team pasted contracts into ChatGPT and got hallucinated clause references. They needed grounded answers with page citations and a way to re-index when documents changed.
Solution
Solution
We built a RAG pipeline with PDF ingestion, hybrid vector and keyword retrieval, citation rendering, and a 20-question eval set that runs before every prompt change.
Implementation
Implementation
- PDF ingestion pipeline with chunking and metadata extraction
- pgvector store with hybrid retrieval and reranking
- Chat UI with inline citations linked to source pages
- Admin panel to upload, re-index, and review low-confidence chunks
- Eval harness with golden questions and regression alerts
Demo
Demo
>Want one like this?
Outcome
Outcome
Citation accuracy on the eval set rose from about 60% with prompt-only tuning to 94% after retrieval work. Legal review time per contract dropped from 45 minutes to under 10.
Engineering insight
Engineering insight
If you are building RAG, write evals before you tune prompts. Retrieval quality drove results more than model choice. Measure citations, not vibes.
Want something like DocPulse? Tell us on the intake form and we will scope your version.
Start a project