← work

Filing Intelligence RAG

Evidence-first financial research across filings, earnings decks, and transcripts, with page-level source verification and highlighted PDF citations.

My contribution
Built the research product and retrieval workflow, including scoped search, evidence assembly, citation verification, and the PDF reading experience.
Key decision
Preserve page and line provenance during ingestion, constrain retrieval by company and period, and keep the source evidence visible alongside each answer.
Result
A deployed research workspace searches 4,967 passages from 128 documents across 15 companies, backed by 72 automated verification checks.
Current limitation
Corpus size and passing checks describe coverage and engineering verification, not measured answer accuracy. PDF highlighting also depends on the document's text layer.
Org
Independent project
Role
Product and RAG engineering
Period
2026
Status
live
Stack
Python · Next.js · TypeScript · FastAPI · ChromaDB · Vertex AI · GCP Cloud Run

4,967

indexed source passages

Corpus scope

packaged corpus spanning 128 documents and 15 companies

Corpus & verification notes

128

source documents

Corpus scope

filings, earnings decks, and call transcripts across a 15-company corpus

Corpus & verification notes

72

automated verification checks

Verification coverage

64 Python checks and 8 frontend checks across retrieval, auth, APIs, and builds

Verification scope notes
01/ CONTEXT

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.

02/ CONSTRAINT

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
03/ APPROACH

The loop

A provenance-first RAG architecture where retrieval and verification do the heavy lifting:

  1. Structure-aware ingestion — parsers preserve document, page, line, section, table, and source provenance instead of splitting blindly
  2. Scoped retrieval — ticker and fiscal-period parsing constrain a 384-dimensional Chroma index before dense and lexical ranking
  3. Evidence assembly — duplicate suppression and bounded context construction retain only the strongest source passages
  4. Citation validation — generated answers map back to an evidence ledger whose links open the exact PDF page and search the cited passage
04/ SYSTEM

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
05/ EVIDENCE

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
  • 72 automated checks — 64 Python and 8 frontend — cover retrieval scope, citation integrity, auth boundaries, API contracts, document delivery, and production builds
Question

What changed in operating margin?

10-Q · lines 418–426
Retrieved filing passage with the reported margin and period comparison.
Grounded answer

The change is explained only from the retrieved passage [1].

A grounded-answer contract: the response is assembled only from retrieved filing passages and retains a line-level trail back to each source.
06/ IMPACT

Impact

  • Searches 4,967 indexed passages across 128 source documents and 15 companies
  • Automatic ticker and period parsing narrows the research universe before retrieval
  • Source-linked answers make the supporting page, lines, and excerpt immediately inspectable in one click
  • A 72-check verification baseline protects retrieval, authentication, API, and build contracts
  • Deployed as isolated frontend and API services on Cloud Run

Questions about this project? The chat answers from these case studies and links back to them.