FinRAG Agent v1.0.0
Course: JHU BU.520.710 AI Essentials for Business — Spring 2026 Final Project (Team 5)
What is FinRAG Agent?
A production-grade Retrieval-Augmented Generation (RAG) system for analyzing SEC 10-K annual filings of Alphabet (Google), Amazon, and Microsoft. Built with a hierarchical dual-chunk pipeline, multi-provider LLM support, and a zero-dependency browser frontend.
✨ Key Features
RAG Pipeline
- Hierarchical chunking: fine (500 chars) + coarse (2000 chars) with overlap
- Automatic 10-K section detection (Items 1, 1A, 2, 6, 7, 7A, 8)
- MMR (Maximal Marginal Relevance) retrieval via FAISS for relevance + diversity balance
- Fine-to-coarse chunk expansion for context-rich answers
Multi-Provider LLM Support
- OpenAI: GPT-4o, GPT-4o-mini, GPT-3.5-turbo
- Google: Gemini 2.0 Flash, 1.5 Flash, 1.5 Pro
- Anthropic: Claude Sonnet, Claude Haiku
- Local: Ollama (Llama 3.1, Mistral, Phi-3, any installed model)
Conversation Memory
- Sliding-window: last 6 turns verbatim + LLM-generated rolling summary of older history
- JSON-persisted sessions across server restarts
Agent Tools
- file_read / file_write / file_list
- pdf_read (PyPDF-based)
- code_execute (sandboxed Python)
- data_analysis (pandas/numpy sandbox)
- web_search (DuckDuckGo)
Frontend
- Pure HTML/CSS/JS — no build step, no npm
- Dark mode, session management, source chunk panel, quick-question shortcuts
- SSE streaming for real-time token-by-token responses
Citation Quality
- System prompt enforces inline citations: company name, 10-K section, and page number for every financial figure
📁 Included 10-K Documents
| Company | Filing |
|---|---|
| Alphabet (Google) | 10-K Annual Report 2024 |
| Amazon | 10-K Annual Report 2024 |
| Microsoft | 10-K Annual Report 2024 |
🚀 Quick Start
git clone https://github.com/zeron-G/FinRAG-Agent.git
cd FinRAG-Agent
conda env create -f environment.yml
conda activate rag-agent
cp .env.example .env # fill in your API key(s)
python run.pyThen open http://localhost:8000 and click Re-index Documents to build the FAISS index.
🔧 Changes in This Release
- Initial public release
- Fixed: removed non-existent
api/directory reference from README - Fixed: removed
claude_oauth_provider.pystub reference from project structure - Fixed: aligned
DEFAULT_EMBEDDING_MODELacross config.py and documentation - Fixed: copyright year updated to 2026
- Security:
demand/OpenAI_API_key.pdfexcluded via .gitignore