Crivo
RAG for contract due diligence, with citations verified against the source text.
The problem
In contract analysis, an answer without a citation to the document, clause, and page is worth nothing — and an LLM will confidently make one up. Indexing a PDF is the easy part; the hard part is delivering proof that the system didn't hallucinate.
How I solved it — four barriers against hallucination
- Threshold-based abstention. If the score of the retrieved chunks doesn't clear the minimum, the system doesn't answer.
- Numbered context and a closed prompt. Each chunk enters with document, clause, and page; the prompt forbids outside knowledge.
- Literal citation verification. Fuzzy matching ≥ 0.90 between the cited passage and the source text — if it doesn't pass, it doesn't ship.
- Full trail. The interface shows the entire source text with the cited passage highlighted.
