Ask questions about any public US company and get answers straight from their SEC filings.
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.
- 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
Question → extract ticker → check cache → fetch from EDGAR if needed
→ chunk + embed → FAISS similarity search → grounded prompt → Llama 3 → answer
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 keysTerminal 1 — backend:
cd backend
uvicorn main:app --reload --port 8000Terminal 2 — frontend:
cd frontend
streamlit run app.pyOr with Docker:
docker-compose up --buildOpen http://localhost:8501
- 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?