RAG + evaluation platform
SEC-RAG-Eval
May 2026 – present
A retrieval-augmented question-answering service over US SEC 10-K, 10-Q, and 8-K filings, and the evaluation harness that measures it. The RAG system is the subject under test; the harness is the point — it reports which design choice moved which metric, and how much of that was real rather than an artifact of how the answer was scored.
Results
| recall@5 (fuzzy) | 0.44 → 0.64V0 → V2 |
|---|---|
| recall@10 (fuzzy) | 0.54 → 0.74 |
| tables@5 (fuzzy) | 0.32 → 0.70 |
| faithfulness | 0.93 |
| answer accuracy (all 150) | 0.50 |
| cost / query | $0.009 |
The finding
Recall isn't a number — it's a bracket, and the clean validation was an artifact
Scoring the identical retrieval three ways gives 0.09 under strict substring matching, 0.64 under the shipped fuzzy overlap, and 0.81 under embedding similarity — an 8× spread from grading alone. Hand-labeling 50 query-chunk pairs then caught a bigger problem: an automated labeler had “validated” the shipped scorer at 0.67 agreement against a true 0.18. The clean validation was itself the artifact — so the repo shipped it once, then published the correction.
Honest limitations
- recall@5 = 0.64 is the generous end of the bracket. The same retrieval scores 0.09 under strict substring matching; the honest number sits between.
- About 20% of the recall gain was chunk size inflating the overlap metric, not the system improving — measured by crossing embedding model × chunk size × scorer.
- Answer accuracy is 0.50 over all 150 questions; the service declines about a third rather than guessing when the evidence isn't retrieved.
What got built
- Built cited search over SEC filings that raised top-5 retrieval hits from 44% to 64% on the same FinanceBench questions, run as a Dockerized FastAPI service on Cloud Run with pgvector and CI eval on every PR.
- Switched the deciding check to answer accuracy against gold answers, which rose from 36% to 47%, after hand-labeling 50 passages showed the automatic match behind the 64% overstated agreement with humans.
Stack
- FastAPI
- PostgreSQL / pgvector
- text-embedding-3-large
- Claude Haiku 4.5
- GCP Cloud Run
- Neon
- Docker
- CI/CD
- FinanceBench