A retrieval-augmented assistant over RA 10173, its IRR and 20 NPC issuances currently in force (468 indexed sections). Every statement cites the section it came from, and it declines when its sources do not cover the question.
View case study ›
Problem
Small businesses need clear answers about the Data Privacy Act, but a chatbot that sounds confident and is wrong about the law does real harm. Answers had to be traceable to the exact source, and the system had to say so when it didn't know.
Approach
- Indexed the 22 documents in force (RA 10173, its IRR and 20 NPC issuances) as 468 sections in Supabase with pgvector; 20 of 22 parse by section marker, 2 by heading
- Kept 3 superseded issuances out of search so it can still answer whether a rule is in force
- Every claim carries a citation back to its section, and questions outside the sources are declined
- Tried hybrid search, measured it, and rejected it because accuracy dropped from 93.9% to 87.9%
- Falls back from Gemini to Groq, then to showing the source text itself, so users never see an error page
- Solo project built with heavy use of an AI coding assistant: I directed the design decisions, ran every test and benchmark, and verified the results
Result
93.9% retrieval accuracy on a 39-question benchmark whose questions don't name the issuance they need. All 78 citations in the benchmark answers resolve to real sections in the source PDFs, checked by a script with its own negative control. It refused 100% of out-of-corpus test questions. Covered by 47 unit tests; completed November 2026.