r/Rag • u/Ok_Map_2690 • 16h ago
Showcase What we learned building RAG over 13,000 pages of Indian company filings (41% → 93% hit rate@10)
We want to answer questions about Indian listed companies from their own filings, eventually for thousands of companies. Before building at that scale, we ran a five-company pilot: 13K pages of annual reports, results, concall transcripts and investor decks. Every choice was tested on a frozen question set, one variable at a time.
Search that finds the right page went from 41% to 93% (hit rate@10, 250 questions).
Why not just let an agent search? An agent's search is only as good as the retriever under it. Good retrieval means the model reads ten relevant passages instead of whole 300-page reports: cheaper, faster, and every answer can point to its page.
What we learned:
- Parsing is the foundation. We picked the parser on number fidelity, checking every number it printed against the PDF's text layer. If a number doesn't survive parsing, no retriever can find it.
- Metadata beat models. Reading company, year and doc type out of the question, used as a soft filter, gave more than switching embedding models.
- One line of context per chunk (company · period · standalone or consolidated) was the biggest chunking win, and the returned text was unchanged.
- Hybrid BM25 + dense hurt. On filings that repeat every year, the two lists only agreed on look-alikes: last year's report, the same slide in the next deck.
- A reranker on the top 50 was the cheapest big gain: +10 questions, none lost.
- Multi-fact questions: split into sub-queries and merge round-robin. Reranking the merged list against the original question undid the gain.
- Open the output behind every score change. Our most convincing "improvements" were bugs.
Along the way we fixed two bugs in Docling's PDF parser, now merged upstream.
Full write-up with all the numbers and what failed:RAG from first principles