The calibration, rendered from the committed sweep: precision, recall, and F1 across 61 thresholds, one real cited answer, and one real refusal that missed the support line by 0.001.
Most RAG demos answer everything, which on legal text means inventing a section number. Here the system is allowed to say the corpus does not cover it, and where that line sits was decided by a calibration run with its working committed rather than by a number that felt right.
Who it serves
Anyone who has to answer from a fixed body of text and cannot afford a plausible invention.
Who it is for
Teams where a wrong citation costs more than no answer.
How it works
Ingest and chunkLabor Code, RA series and DOLE orders from the Official Gazette. 1,199 chunks across 6 documents, each carrying its citation label.
Index both ways at oncetext-embedding-3-large into halfvec(3072) with an HNSW index, beside a generated tsvector on the same row, so the two halves can never drift apart. halfvec because 3,072 dimensions at full precision exceeds pgvector's HNSW limit.
Retrieve and fuseDense search finds paraphrase, lexical finds the verbatim citation, reciprocal rank fusion combines them.
Answer or refuseBelow the calibrated support threshold it returns nothing rather than the nearest section. The threshold came from a sweep, not a guess.
Built with
TypeScriptPostgres + pgvector on Neontext-embedding-3-largehybrid vector + BM25promptfoo