Live Demo: Click here to view the live app on Streamlit Cloud
An institutional-grade Retrieval-Augmented Generation (RAG) agent designed to perform multi-document financial synthesis across SEC 10-K filings. Built to overcome the limitations of standard vector search, this engine utilizes system-level computer vision for tabular data extraction and a two-stage neural re-ranking pipeline to achieve precise financial comparisons without hallucinations.
- Multi-Document Global Indexing: Utilizes
FAISSto store and query vectorized chunks across multiple competitor filings simultaneously. - Tabular Data Ingestion: Implements
unstructuredparsers backed by system-levelpopplerengines to accurately extract complex GAAP vs. Non-GAAP side-by-side financial tables. - Two-Stage Neural Re-Ranking: Overcomes "vector crowding" by retrieving a wide pool of candidate chunks (Stage 1) and utilizing a HuggingFace MS-MARCO
Cross-Encoderto mathematically re-rank context based on exact semantic relevance (Stage 2). - Enterprise Rate-Limiting: Built-in adaptive backoff logic to handle API throttling when indexing massive 150+ page regulatory documents.
- Deterministic Financial Extraction: LLM temperature is strategically clamped at
0.0for quantitative metrics, preventing generative hallucinations and ensuring strict source attribution.
- Frontend UI: Streamlit
- LLM & Embeddings: Google Gemini (Gemini 1.5 Flash / Gemini Embeddings)
- Orchestration: LangChain
- Vector Store: FAISS (CPU)
- Re-Ranker:
sentence-transformers(Cross-Encoder/ms-marco-MiniLM-L-6-v2) - Document Parsing: PyPDF / Unstructured
If you wish to run this architecture locally (macOS/Linux), follow these steps:
1. Install System Dependencies (macOS via Homebrew):
brew install poppler