Fordham University · QFGB 890R Machine Learning and LLMs · Spring 2026
Team: James and Robin. This author was in charge of the /earnings_analyst code, presentation, report and data gathering.
This project is a retrieval-augmented earnings call analyst for the supermarket sector. It ingests company filings and earnings-call material, retrieves the most relevant evidence for a question, and produces an analyst-oriented answer with citations back to the source chunks.
The bundled corpus covers five public companies:
- Albertsons Companies (
ACI) - Costco Wholesale (
COST) - Kroger (
KR) - Target (
TGT) - Walmart (
WMT)
PDF documents are loaded from data/, split into overlapping text chunks, and
indexed for semantic retrieval. Each retrieved chunk retains document metadata
so answers can cite the company, document type, period, and source chunk.
The application automatically routes a question to either single_company or
comparison mode. Company-specific questions retrieve evidence for one ticker;
questions involving multiple companies or comparison language retrieve each
entity separately and support like-for-like analysis.
Answer generation supports OpenAI, Anthropic, and Google providers through LangChain integrations. When no provider API key is configured, the tool uses a retrieval-only fallback that displays the relevant evidence without pretending to generate an unsupported synthesis.
pip install -r requirements.txt
streamlit run app.pyConfigure the provider key required for synthesis in the environment or in
.streamlit/secrets.toml. The application can still be inspected in
retrieval-only mode without an API key.
evaluate_sample_cases.py scores three fixed sample queries using expected-
keyword coverage (weighted 0.65) and citation count (weighted 0.35). Keyword
presence is a weak proxy for correctness, and three cases cannot separate
models. This is a prototype smoke test, not a benchmark.
Run it with:
python evaluate_sample_cases.pyapp.py- Streamlit interfaceearnings_analyst/- ingestion, retrieval, routing, and provider logicdata/- filings and earnings-call source documentsnotebooks/prototype_v0.ipynb- original exploratory prototypeevaluate_sample_cases.py- fixed smoke-test evaluation