Filing Intelligence RAG
Evidence-first financial research across filings, earnings decks, and transcripts, with page-level source verification and highlighted PDF citations.
- Org
- Independent project
- Role
- Product and RAG engineering
- Period
- 2026
- Status
- live
- Stack
- Next.js · React · TypeScript · FastAPI · ChromaDB · Vertex AI · GCP Cloud Run
- Links
- Live demo ↗GitHub ↗
The problem
Analysts and investors spend hours moving between filings, earnings decks, and call transcripts to extract performance, risk, and management commentary. The documents are dense, structurally inconsistent, and difficult to compare across companies and reporting periods.
The goal: a research workspace that answers natural-language questions with source-grounded responses and makes every conclusion easy to verify against the original page.
The constraints
- Financial documents have complex nested structure — tables, footnotes, cross-references — that naive chunking destroys
- Financial data demands exact numbers; approximations are unacceptable
- Relevant information spans multiple documents and sections, but context windows are finite
- The system must handle both quantitative queries ("What was Q3 revenue?") and qualitative ones ("What are the main risk factors?")
- Every response must cite its sources, or it can't be trusted or audited
The loop
A provenance-first RAG architecture where retrieval and verification do the heavy lifting:
- Structure-aware ingestion — parsers preserve document, page, line, section, table, and source provenance instead of splitting blindly
- Scoped retrieval — ticker and fiscal-period parsing constrain a 384-dimensional Chroma index before dense and lexical ranking
- Evidence assembly — duplicate suppression and bounded context construction retain only the strongest source passages
- Citation validation — generated answers map back to an evidence ledger whose links open the exact PDF page and search the cited passage
The build
- FastAPI backend — validated query contracts, provider boundaries, retrieval, citation selection, and source delivery
- ChromaDB + Sentence Transformers — versioned local embeddings with deterministic company and period filters
- Vertex AI generation — bounded production inference behind Google-authenticated frontend-to-backend calls
- Next.js + React workspace — typed scope controls, a same-origin backend-for-frontend, evidence inspector, and responsive research history
- PDF evidence viewer — product-consistent cited-page layout, byte-range rendering, robust text highlighting, and a native fallback for scanned or reformatted documents
- Cloud Run deployment — isolated frontend and API services with readiness, smoke, and freshness checks
Evidence
Trust in a RAG system is a verification problem, so provenance is part of the data contract:
- Every indexed chunk carries page and line provenance, with section and table identifiers where available
- Answers expose an evidence ledger rather than hiding retrieved context behind a confidence score
- Citation links open the source on the relevant page and highlight the matched passage when the PDF text layer supports it
- Automated tests cover retrieval scope, citation integrity, auth boundaries, document delivery, and deployment configuration
What changed in operating margin?
Retrieved filing passage with the reported margin and period comparison.
The change is explained only from the retrieved passage [1].
Impact
- Searches 4,967 indexed passages across a 15-ticker production corpus
- Automatic ticker and period parsing narrows the research universe before retrieval
- Source-linked answers make the supporting page, lines, and excerpt immediately inspectable
- Deployed as isolated frontend and API services on Cloud Run
Questions about this project? Press ⌘K — the chat answers from these case studies and cites them.