Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Financial 10-K Q&A

Ask questions about any public US company and get answers straight from their SEC filings.

What it does

Type a question like "What are Apple's risk factors?" and the app will figure out which company you're asking about, pull their latest 10-K filing directly from SEC EDGAR, search through it semantically to find the relevant sections, and return a grounded answer with the exact source cited.

First query for a new company takes ~30 seconds (fetching + embedding). Every query after that is instant because the filing gets cached locally. The cache automatically detects when a new annual filing drops and re-fetches it.

Stack

  • LangChain — orchestrates the RAG pipeline
  • sentence-transformers — embeds document chunks locally (no API cost)
  • FAISS — vector similarity search
  • Groq + Llama 3.3 70B — LLM for answer generation
  • FastAPI — REST backend
  • Streamlit — chat UI
  • Docker — containerized deployment
  • SEC EDGAR API — live filing data

Architecture

Question → extract ticker → check cache → fetch from EDGAR if needed
→ chunk + embed → FAISS similarity search → grounded prompt → Llama 3 → answer

Setup

You need a free Groq API key from console.groq.com.

git clone https://github.com/MatthewMo520/rag-financial-qa.git
cd rag-financial-qa
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# fill in your keys

Terminal 1 — backend:

cd backend
uvicorn main:app --reload --port 8000

Terminal 2 — frontend:

cd frontend
streamlit run app.py

Or with Docker:

docker-compose up --build

Open http://localhost:8501

Example questions

  • What are Apple's biggest risk factors?
  • What is Amazon's largest business segment?
  • How much did Google's cloud revenue grow?
  • What are Tesla's main risks?
  • What products does Nvidia sell?

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages