Update README + evals for 18-company EDGAR corpus; add capability eval (100%) alongside FinanceBench (20%)
Browse files- README.md +55 -48
- eval/gold_results.md +185 -0
- eval/gold_set.py +61 -84
- eval/results.md +346 -183
- eval/run_gold.py +125 -0
README.md
CHANGED
|
@@ -32,8 +32,8 @@ citations** — instead of making things up.
|
|
| 32 |
question is about and searches *only* that company's filings via metadata
|
| 33 |
filtering, with graceful semantic fallback when the company is ambiguous.
|
| 34 |
- **Refuses to hallucinate** — if the answer isn't in the filings, it says so.
|
| 35 |
-
- **Benchmarked** — an LLM-as-judge
|
| 36 |
-
|
| 37 |
- **100% free stack** — local embeddings + a free LLM API. No paid keys.
|
| 38 |
|
| 39 |
---
|
|
@@ -42,7 +42,7 @@ citations** — instead of making things up.
|
|
| 42 |
|
| 43 |
```
|
| 44 |
INGESTION (once)
|
| 45 |
-
10-
|
| 46 |
──► embed (local model) ──► store vectors + metadata in ChromaDB
|
| 47 |
|
| 48 |
QUERY (per question)
|
|
@@ -57,12 +57,13 @@ QUERY (per question)
|
|
| 57 |
| Vector store | ChromaDB (persisted locally) |
|
| 58 |
| LLM | Llama 3.3 70B via Groq (free) |
|
| 59 |
| UI | Streamlit |
|
| 60 |
-
| Data |
|
| 61 |
-
| Evaluation |
|
| 62 |
|
| 63 |
-
**
|
| 64 |
-
|
| 65 |
-
|
|
|
|
| 66 |
|
| 67 |
---
|
| 68 |
|
|
@@ -84,58 +85,63 @@ pip install -r requirements.txt
|
|
| 84 |
## 🛠️ Usage
|
| 85 |
|
| 86 |
```bash
|
| 87 |
-
python -m src.ingest
|
| 88 |
-
python -m src.ingest # build the vector store (run once)
|
| 89 |
streamlit run app.py # launch the chatbot
|
| 90 |
-
python -m eval.
|
|
|
|
| 91 |
```
|
| 92 |
|
| 93 |
---
|
| 94 |
|
| 95 |
## 📊 Evaluation
|
| 96 |
|
| 97 |
-
FinChat is graded by an **LLM-as-judge**
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
*
|
| 121 |
-
|
| 122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
---
|
| 125 |
|
| 126 |
## ☁️ Deployment
|
| 127 |
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
|
|
|
| 131 |
|
| 132 |
---
|
| 133 |
|
| 134 |
## ⚠️ Limitations
|
| 135 |
|
| 136 |
-
-
|
| 137 |
-
|
| 138 |
-
- The corpus is scoped to
|
| 139 |
- Not financial advice — a portfolio/educational project.
|
| 140 |
|
| 141 |
---
|
|
@@ -146,13 +152,14 @@ load, so no prebuilt index is required.
|
|
| 146 |
.
|
| 147 |
├── app.py # Streamlit chat UI
|
| 148 |
├── src/
|
| 149 |
-
│ ├── config.py # all tunable settings
|
| 150 |
-
│ ├── ingest.py #
|
| 151 |
│ └── rag.py # retrieval + generation + query routing
|
| 152 |
├── eval/
|
| 153 |
-
│ ├── gold_set.py #
|
| 154 |
-
│ ├──
|
| 155 |
-
│
|
|
|
|
| 156 |
├── .streamlit/config.toml # Streamlit settings
|
| 157 |
├── requirements.txt
|
| 158 |
├── .env.example # template for your API key
|
|
|
|
| 32 |
question is about and searches *only* that company's filings via metadata
|
| 33 |
filtering, with graceful semantic fallback when the company is ambiguous.
|
| 34 |
- **Refuses to hallucinate** — if the answer isn't in the filings, it says so.
|
| 35 |
+
- **Benchmarked** — evaluated by an LLM-as-judge on a capability gold set
|
| 36 |
+
(100%) and the external FinanceBench benchmark (see [Evaluation](#-evaluation)).
|
| 37 |
- **100% free stack** — local embeddings + a free LLM API. No paid keys.
|
| 38 |
|
| 39 |
---
|
|
|
|
| 42 |
|
| 43 |
```
|
| 44 |
INGESTION (once)
|
| 45 |
+
fetch recent 10-Ks from SEC EDGAR ──► split into chunks
|
| 46 |
──► embed (local model) ──► store vectors + metadata in ChromaDB
|
| 47 |
|
| 48 |
QUERY (per question)
|
|
|
|
| 57 |
| Vector store | ChromaDB (persisted locally) |
|
| 58 |
| LLM | Llama 3.3 70B via Groq (free) |
|
| 59 |
| UI | Streamlit |
|
| 60 |
+
| Data | Recent SEC 10-K filings via `edgartools` (EDGAR) |
|
| 61 |
+
| Evaluation | Capability gold set + FinanceBench, LLM-as-judge |
|
| 62 |
|
| 63 |
+
**Corpus — 18 recognizable companies (FY2021–2023 10-Ks):** AMD, American
|
| 64 |
+
Express, Boeing, PepsiCo, Amcor, 3M, Johnson & Johnson, CVS Health, Pfizer,
|
| 65 |
+
AES, Verizon, Best Buy, Adobe, Ulta Beauty, Coca-Cola, Microsoft, Nike, and
|
| 66 |
+
Corning. Edit the list in [`src/config.py`](src/config.py).
|
| 67 |
|
| 68 |
---
|
| 69 |
|
|
|
|
| 85 |
## 🛠️ Usage
|
| 86 |
|
| 87 |
```bash
|
| 88 |
+
python -m src.ingest # fetch filings from EDGAR + build the index (once)
|
|
|
|
| 89 |
streamlit run app.py # launch the chatbot
|
| 90 |
+
python -m eval.run_gold # capability eval (qualitative Q&A)
|
| 91 |
+
python -m eval.run_eval # FinanceBench eval
|
| 92 |
```
|
| 93 |
|
| 94 |
---
|
| 95 |
|
| 96 |
## 📊 Evaluation
|
| 97 |
|
| 98 |
+
FinChat is graded by an **LLM-as-judge** two ways: on the task it's built for,
|
| 99 |
+
and against a hard external benchmark.
|
| 100 |
+
|
| 101 |
+
**1. Capability — qualitative document Q&A**
|
| 102 |
+
([`eval/gold_results.md`](eval/gold_results.md))
|
| 103 |
+
|
| 104 |
+
A 12-question gold set (business, segments, products) across the corpus, with
|
| 105 |
+
reference answers from the filings.
|
| 106 |
+
|
| 107 |
+
| CORRECT | PARTIAL | INCORRECT | Accuracy |
|
| 108 |
+
|---|---|---|---|
|
| 109 |
+
| 12 | 0 | 0 | **100%** |
|
| 110 |
+
|
| 111 |
+
**2. FinanceBench — hard external benchmark**
|
| 112 |
+
([`eval/results.md`](eval/results.md))
|
| 113 |
+
|
| 114 |
+
Scored on [FinanceBench](https://huggingface.co/datasets/PatronusAI/financebench)
|
| 115 |
+
questions whose company + fiscal year is in the corpus.
|
| 116 |
+
|
| 117 |
+
| Accuracy | By question type |
|
| 118 |
+
|---|---|
|
| 119 |
+
| **20%** (6/30) | domain-relevant 24% · novel-generated 14% · metrics-generated 0% |
|
| 120 |
+
|
| 121 |
+
**What the gap means:** FinanceBench is dominated by *numeric financial-analysis*
|
| 122 |
+
questions (quick ratios, margin trends, EBITDA) that require computation over
|
| 123 |
+
statement tables — beyond text-retrieval RAG. FinChat's 20% is in line with the
|
| 124 |
+
benchmark's known difficulty (GPT-4 in a naive RAG setup scores ~19%). FinChat
|
| 125 |
+
is reliable at the qualitative retrieval it's designed for (100% above); closing
|
| 126 |
+
the numeric gap would need a financial-statement **calculation layer** — noted
|
| 127 |
+
as future work.
|
| 128 |
|
| 129 |
---
|
| 130 |
|
| 131 |
## ☁️ Deployment
|
| 132 |
|
| 133 |
+
Deployed to Hugging Face Spaces (free) — see **[DEPLOY.md](DEPLOY.md)**. The
|
| 134 |
+
~16k-chunk vector store is prebuilt and shipped with the repo via **git-lfs**,
|
| 135 |
+
so the Space starts instantly with no rebuild; `config.py` auto-detects the
|
| 136 |
+
committed index.
|
| 137 |
|
| 138 |
---
|
| 139 |
|
| 140 |
## ⚠️ Limitations
|
| 141 |
|
| 142 |
+
- **Numeric/analytical** questions (ratios, margins) require computation over
|
| 143 |
+
financial-statement tables — the main gap (see Evaluation).
|
| 144 |
+
- The corpus is scoped to 18 companies' recent 10-Ks to stay laptop-friendly.
|
| 145 |
- Not financial advice — a portfolio/educational project.
|
| 146 |
|
| 147 |
---
|
|
|
|
| 152 |
.
|
| 153 |
├── app.py # Streamlit chat UI
|
| 154 |
├── src/
|
| 155 |
+
│ ├── config.py # all tunable settings (target companies, models)
|
| 156 |
+
│ ├── ingest.py # fetch 10-Ks from EDGAR → chunk → embed → store
|
| 157 |
│ └── rag.py # retrieval + generation + query routing
|
| 158 |
├── eval/
|
| 159 |
+
│ ├── gold_set.py # capability questions + reference answers
|
| 160 |
+
│ ├── run_gold.py # capability eval (qualitative Q&A)
|
| 161 |
+
│ ├── run_eval.py # FinanceBench eval harness
|
| 162 |
+
│ └── *_results.md # evaluation reports
|
| 163 |
├── .streamlit/config.toml # Streamlit settings
|
| 164 |
├── requirements.txt
|
| 165 |
├── .env.example # template for your API key
|
eval/gold_results.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FinChat Evaluation — Qualitative Capability Gold Set
|
| 2 |
+
|
| 3 |
+
FinChat is graded by an LLM-as-judge on document-Q&A questions (business, segments, products) across the 18-company corpus -- the task it is designed for. Reference answers are drawn from the 10-K filings.
|
| 4 |
+
|
| 5 |
+
- **Questions:** 12
|
| 6 |
+
- **CORRECT:** 12 **PARTIAL:** 0 **INCORRECT:** 0
|
| 7 |
+
- **Accuracy (CORRECT=1.0, PARTIAL=0.5):** 100%
|
| 8 |
+
|
| 9 |
+
| # | Company | Verdict | Question |
|
| 10 |
+
|---|---------|---------|----------|
|
| 11 |
+
| 1 | Boeing | CORRECT | What are Boeing's business segments? |
|
| 12 |
+
| 2 | Microsoft | CORRECT | What are Microsoft's reportable segments? |
|
| 13 |
+
| 3 | AMD | CORRECT | What products does AMD design and sell? |
|
| 14 |
+
| 4 | Verizon | CORRECT | What are Verizon's reportable segments? |
|
| 15 |
+
| 5 | Nike | CORRECT | What products and brands does Nike sell? |
|
| 16 |
+
| 6 | Coca-Cola | CORRECT | What is Coca-Cola's business? |
|
| 17 |
+
| 7 | Pfizer | CORRECT | What is Pfizer's primary business? |
|
| 18 |
+
| 8 | PepsiCo | CORRECT | What kinds of products does PepsiCo sell? |
|
| 19 |
+
| 9 | American Express | CORRECT | What is American Express's primary business? |
|
| 20 |
+
| 10 | Best Buy | CORRECT | What is Best Buy's business and where does it operate? |
|
| 21 |
+
| 11 | Johnson & Johnson | CORRECT | What are Johnson & Johnson's business segments? |
|
| 22 |
+
| 12 | Amcor | CORRECT | What does Amcor make and what industry is it in? |
|
| 23 |
+
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
## Detailed results
|
| 27 |
+
|
| 28 |
+
### 1. What are Boeing's business segments?
|
| 29 |
+
- **Company:** Boeing | **Routed to:** BA | **Verdict:** CORRECT
|
| 30 |
+
- **Judge:** The system answer accurately lists Boeing's four business segments with their respective abbreviations, matching the reference answer.
|
| 31 |
+
- **Reference:** Boeing operates through four segments: Commercial Airplanes; Defense, Space & Security; Global Services; and Boeing Capital.
|
| 32 |
+
- **FinChat:** Boeing's business segments are:
|
| 33 |
+
1. Commercial Airplanes (BCA)
|
| 34 |
+
2. Defense, Space & Security (BDS)
|
| 35 |
+
3. Global Services (BGS)
|
| 36 |
+
4. Boeing Capital (BCC)
|
| 37 |
+
Boeing (FY2022)
|
| 38 |
+
Sources:
|
| 39 |
+
[1] Boeing 10-K (FY2022)
|
| 40 |
+
[5] Boeing 10-K (FY2022)
|
| 41 |
+
|
| 42 |
+
### 2. What are Microsoft's reportable segments?
|
| 43 |
+
- **Company:** Microsoft | **Routed to:** MSFT | **Verdict:** CORRECT
|
| 44 |
+
- **Judge:** The system answer accurately conveys the key facts of the reference, including the segment names and the source (Microsoft 10-K FY2023).
|
| 45 |
+
- **Reference:** Microsoft reports in three segments: Productivity and Business Processes; Intelligent Cloud; and More Personal Computing.
|
| 46 |
+
- **FinChat:** Microsoft's reportable segments are:
|
| 47 |
+
1. Productivity and Business Processes,
|
| 48 |
+
2. Intelligent Cloud, and
|
| 49 |
+
3. More Personal Computing.
|
| 50 |
+
Microsoft, FY2023.
|
| 51 |
+
Sources:
|
| 52 |
+
[1] Microsoft 10-K (FY2023),
|
| 53 |
+
[2] Microsoft 10-K (FY2023),
|
| 54 |
+
[4] Microsoft 10-K (FY2023)
|
| 55 |
+
|
| 56 |
+
### 3. What products does AMD design and sell?
|
| 57 |
+
- **Company:** AMD | **Routed to:** AMD | **Verdict:** CORRECT
|
| 58 |
+
- **Judge:** The system answer accurately conveys the key products designed and sold by AMD, including CPUs, GPUs, APUs, and semi-custom SoCs, with specific product lines and brands mentioned.
|
| 59 |
+
- **Reference:** AMD designs and sells microprocessors (CPUs), graphics processors (GPUs), accelerated processing units (APUs), adaptive/FPGA products (from Xilinx), and semi-custom System-on-Chip products. Brands include Ryzen, EPYC, Radeon, and Instinct.
|
| 60 |
+
- **FinChat:** Advanced Micro Devices (FY2022) designs and sells a variety of products, including:
|
| 61 |
+
- Client processors (e.g. AMD Ryzen, AMD Ryzen PRO, Ryzen Threadripper, Ryzen Threadripper PRO, AMD Athlon, AMD Athlon PRO, and AMD PRO A-Series)
|
| 62 |
+
- Graphics products (e.g. AMD Radeon graphics, AMD Radeon PRO graphics, Radeon Instinct, Radeon PRO V-series)
|
| 63 |
+
- Server microprocessors (e.g. AMD EPYC processors)
|
| 64 |
+
- Embedded processor solutions (e.g. low-power versions of AMD Athlon, AMD Geode, AMD Ryzen, AMD EPYC)
|
| 65 |
+
- FPGA products (e.g. Virtex-6, Virtex-7, Virtex UltraScale+, Kintex-7, Kintex UltraScale)
|
| 66 |
+
- Adaptive SoCs (e.g. Zynq-7000, Zynq UltraScale+ MPSoC, Versal HBM, Versal Premium)
|
| 67 |
+
- Commercial CPUs (e.g. AMD PRO Mobile, AMD PRO desktop processors with Radeon graphics)
|
| 68 |
+
- Professional GPUs (e.g. AMD Radeon PRO family)
|
| 69 |
+
- Discrete Desktop and Notebook GPUs (e.g. AMD Radeon series)
|
| 70 |
+
|
| 71 |
+
Sources:
|
| 72 |
+
[1] Advanced Micro Devices 10-K (FY2022)
|
| 73 |
+
[2] Advanced Micro Devices 10-K (FY2022)
|
| 74 |
+
[4] Advanced Micro Devices 10-K (FY2022)
|
| 75 |
+
[5] Advanced Micro Devices 10-K (FY2022)
|
| 76 |
+
[6] Advanced Micro Devices 10-K (FY2022)
|
| 77 |
+
[7] Advanced Micro Devices 10-K (FY2022)
|
| 78 |
+
[8] Advanced Micro Devices 10-K (FY2022)
|
| 79 |
+
|
| 80 |
+
### 4. What are Verizon's reportable segments?
|
| 81 |
+
- **Company:** Verizon | **Routed to:** VZ | **Verdict:** CORRECT
|
| 82 |
+
- **Judge:** The system answer accurately conveys the key facts of the reference, including the number and names of Verizon's reportable segments.
|
| 83 |
+
- **Reference:** Verizon reports in two segments: Consumer and Business.
|
| 84 |
+
- **FinChat:** Verizon has two reportable segments. According to Note 13, the segments are:
|
| 85 |
+
1. Verizon Consumer Group
|
| 86 |
+
2. Verizon Business segment.
|
| 87 |
+
|
| 88 |
+
Sources:
|
| 89 |
+
[4] Verizon 10-K (FY2022)
|
| 90 |
+
[2] Verizon 10-K (FY2022)
|
| 91 |
+
[5] Verizon 10-K (FY2022)
|
| 92 |
+
|
| 93 |
+
### 5. What products and brands does Nike sell?
|
| 94 |
+
- **Company:** Nike | **Routed to:** NKE | **Verdict:** CORRECT
|
| 95 |
+
- **Judge:** The system answer accurately conveys the key facts of the reference, including the types of products and brands sold by Nike.
|
| 96 |
+
- **Reference:** Nike sells athletic footwear, apparel, equipment, and accessories. Its brands include NIKE, Jordan, and Converse.
|
| 97 |
+
- **FinChat:** Nike sells athletic footwear, apparel, equipment, accessories, and services under the NIKE Brand, Jordan Brand, and Converse. Specifically, their products include:
|
| 98 |
+
|
| 99 |
+
- Performance athletic footwear, apparel, equipment, and accessories
|
| 100 |
+
- Sport-inspired lifestyle products
|
| 101 |
+
- Bags, socks, sport balls, eyewear, timepieces, digital devices, bats, gloves, and protective equipment
|
| 102 |
+
- Jordan Brand products focused on basketball performance and culture
|
| 103 |
+
|
| 104 |
+
Company: Nike, Fiscal Year: 2023
|
| 105 |
+
Sources:
|
| 106 |
+
[1] Nike 10-K (FY2023)
|
| 107 |
+
[2] Nike 10-K (FY2023)
|
| 108 |
+
[5] Nike 10-K (FY2023)
|
| 109 |
+
|
| 110 |
+
### 6. What is Coca-Cola's business?
|
| 111 |
+
- **Company:** Coca-Cola | **Routed to:** KO | **Verdict:** CORRECT
|
| 112 |
+
- **Judge:** The system answer accurately conveys the key facts of Coca-Cola's business as a total beverage company with various beverage categories.
|
| 113 |
+
- **Reference:** Coca-Cola is a total beverage company that manufactures and sells nonalcoholic beverage concentrates, syrups, and finished beverages. Its brands include Coca-Cola, Sprite, and Fanta.
|
| 114 |
+
- **FinChat:** The Coca-Cola Company is a total beverage company, owning or licensing and marketing numerous beverage brands, grouped into categories such as Trademark Coca-Cola, sparkling flavors, water, sports, coffee and tea, juice, value-added dairy and plant-based beverages, and emerging beverages.
|
| 115 |
+
Coca-Cola, FY2022
|
| 116 |
+
Sources:
|
| 117 |
+
[1] Coca-Cola 10-K (FY2022)
|
| 118 |
+
[2] Coca-Cola 10-K (FY2022)
|
| 119 |
+
[4] Coca-Cola 10-K (FY2022)
|
| 120 |
+
|
| 121 |
+
### 7. What is Pfizer's primary business?
|
| 122 |
+
- **Company:** Pfizer | **Routed to:** PFE | **Verdict:** CORRECT
|
| 123 |
+
- **Judge:** The system answer accurately conveys Pfizer's primary business as a research-based biopharmaceutical company, including its key activities of discovery, development, and distribution of medicines and vaccines.
|
| 124 |
+
- **Reference:** Pfizer is a research-based biopharmaceutical company that discovers, develops, manufactures, and sells medicines and vaccines, including the Comirnaty COVID-19 vaccine and Paxlovid.
|
| 125 |
+
- **FinChat:** Pfizer Inc. is a research-based, global biopharmaceutical company that applies science and global resources to bring therapies to people, through the discovery, development, manufacture, marketing, sale, and distribution of biopharmaceutical products worldwide.
|
| 126 |
+
Pfizer, FY2021
|
| 127 |
+
Sources:
|
| 128 |
+
[1] Pfizer 10-K (FY2021)
|
| 129 |
+
|
| 130 |
+
### 8. What kinds of products does PepsiCo sell?
|
| 131 |
+
- **Company:** PepsiCo | **Routed to:** PEP | **Verdict:** CORRECT
|
| 132 |
+
- **Judge:** The system answer accurately conveys the key facts of the reference, including the types of products PepsiCo sells (beverages and convenient foods) and some of its notable brands.
|
| 133 |
+
- **Reference:** PepsiCo makes and sells convenient foods (snacks) and beverages. Its brands include Pepsi, Lay's, Gatorade, Quaker, and Tropicana, sold across North America and international markets.
|
| 134 |
+
- **FinChat:** PepsiCo sells a wide variety of beverages and convenient foods, including brands such as Lay’s, Doritos, Cheetos, Gatorade, Pepsi-Cola, Mountain Dew, Quaker, and SodaStream. Specifically, their beverage brands include 7UP, Diet Pepsi, Pepsi, and Pepsi Max, among others. They also sell snack foods like PopCorners, Ruffles, and SunChips, as well as other products like Rice-A-Roni and Quaker oats.
|
| 135 |
+
PepsiCo, FY2022
|
| 136 |
+
Sources:
|
| 137 |
+
[1] PepsiCo 10-K (FY2022)
|
| 138 |
+
[2] PepsiCo 10-K (FY2022)
|
| 139 |
+
[5] PepsiCo 10-K (FY2022)
|
| 140 |
+
[8] PepsiCo 10-K (FY2022)
|
| 141 |
+
|
| 142 |
+
### 9. What is American Express's primary business?
|
| 143 |
+
- **Company:** American Express | **Routed to:** AXP | **Verdict:** CORRECT
|
| 144 |
+
- **Judge:** The system answer accurately conveys American Express's primary business as a globally integrated payments company, including its issuance of credit and charge cards and provision of merchant acquiring and card-network services.
|
| 145 |
+
- **Reference:** American Express is a globally integrated payments company. It issues charge and credit cards and provides merchant acquiring and card-network services.
|
| 146 |
+
- **FinChat:** American Express is a globally integrated payments company, providing customers with access to products, insights, and experiences, and is a leader in providing credit and charge cards to consumers, small businesses, mid-sized companies, and large corporations.
|
| 147 |
+
Company: American Express, Fiscal Year: 2022
|
| 148 |
+
Sources:
|
| 149 |
+
[1] American Express 10-K (FY2022)
|
| 150 |
+
|
| 151 |
+
### 10. What is Best Buy's business and where does it operate?
|
| 152 |
+
- **Company:** Best Buy | **Routed to:** BBY | **Verdict:** CORRECT
|
| 153 |
+
- **Judge:** The system answer accurately conveys the key facts of Best Buy's business and its operating segments, matching the reference answer.
|
| 154 |
+
- **Reference:** Best Buy is a retailer of technology products -- consumer electronics, computing, mobile phones, and appliances -- operating through a Domestic (U.S.) segment and an International (Canada) segment.
|
| 155 |
+
- **FinChat:** Best Buy's business is driven by its purpose to enrich lives through technology, and it operates in the U.S. and Canada. The company is comprised of two reportable segments: Domestic (U.S. and Best Buy Health) and International (Canada).
|
| 156 |
+
|
| 157 |
+
Sources:
|
| 158 |
+
[1] Best Buy 10-K (FY2023)
|
| 159 |
+
[3] Best Buy 10-K (FY2023)
|
| 160 |
+
[4] Best Buy 10-K (FY2023)
|
| 161 |
+
[5] Best Buy 10-K (FY2023)
|
| 162 |
+
|
| 163 |
+
### 11. What are Johnson & Johnson's business segments?
|
| 164 |
+
- **Company:** Johnson & Johnson | **Routed to:** JNJ | **Verdict:** CORRECT
|
| 165 |
+
- **Judge:** The system answer accurately conveys the key facts of the reference, including the three business segments and the source.
|
| 166 |
+
- **Reference:** Johnson & Johnson operates through three segments: Consumer Health, Pharmaceutical, and MedTech (Medical Devices).
|
| 167 |
+
- **FinChat:** Johnson & Johnson's business segments are:
|
| 168 |
+
1. Consumer Health,
|
| 169 |
+
2. Pharmaceutical, and
|
| 170 |
+
3. Medical Devices.
|
| 171 |
+
Johnson & Johnson (FY2022)
|
| 172 |
+
|
| 173 |
+
Sources:
|
| 174 |
+
[4] Johnson & Johnson 10-K (FY2022)
|
| 175 |
+
|
| 176 |
+
### 12. What does Amcor make and what industry is it in?
|
| 177 |
+
- **Company:** Amcor | **Routed to:** AMCR | **Verdict:** CORRECT
|
| 178 |
+
- **Judge:** The system answer accurately conveys the key facts of the reference, including the types of products Amcor makes and the industry it is in.
|
| 179 |
+
- **Reference:** Amcor is a global packaging company that develops and produces flexible and rigid packaging for food, beverage, pharmaceutical, medical, and home and personal care products.
|
| 180 |
+
- **FinChat:** Amcor makes responsible packaging for food, beverage, pharmaceutical, medical, home and personal-care, and other consumer goods end markets. It is in the packaging industry.
|
| 181 |
+
Amcor plc (FY2023)
|
| 182 |
+
Sources:
|
| 183 |
+
[1] Amcor 10-K (FY2023)
|
| 184 |
+
[2] Amcor 10-K (FY2023)
|
| 185 |
+
[3] Amcor 10-K (FY2023)
|
eval/gold_set.py
CHANGED
|
@@ -1,137 +1,114 @@
|
|
| 1 |
-
"""
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
reference with an LLM-as-judge.
|
| 7 |
|
| 8 |
-
This
|
| 9 |
-
|
| 10 |
-
meaningful accuracy number.
|
| 11 |
"""
|
| 12 |
|
| 13 |
GOLD_SET = [
|
| 14 |
{
|
| 15 |
-
"company": "
|
| 16 |
-
"question": "What
|
| 17 |
"reference": (
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"integrate CPUs with graphics, discrete graphics processing units "
|
| 21 |
-
"(GPUs), and semi-custom System-on-Chip (SoC) products. Brands "
|
| 22 |
-
"include Ryzen and Threadripper CPUs, EPYC server processors, and "
|
| 23 |
-
"Radeon graphics."
|
| 24 |
),
|
| 25 |
},
|
| 26 |
{
|
| 27 |
-
"company": "
|
| 28 |
-
"question": "
|
| 29 |
"reference": (
|
| 30 |
-
"
|
| 31 |
-
"
|
| 32 |
-
"notably GlobalFoundries (with which it has a wafer supply "
|
| 33 |
-
"agreement) and TSMC, to manufacture its microprocessor, APU, and "
|
| 34 |
-
"GPU products."
|
| 35 |
),
|
| 36 |
},
|
| 37 |
{
|
| 38 |
"company": "AMD",
|
| 39 |
-
"question": "What
|
| 40 |
"reference": (
|
| 41 |
-
"
|
| 42 |
-
"
|
| 43 |
-
"
|
| 44 |
-
"
|
| 45 |
-
"customers and third-party products, and general economic and "
|
| 46 |
-
"market conditions."
|
| 47 |
),
|
| 48 |
},
|
| 49 |
{
|
| 50 |
-
"company": "
|
| 51 |
-
"question": "
|
| 52 |
-
"reference":
|
| 53 |
-
"Yes. AMD designs and sells semi-custom SoC products, including "
|
| 54 |
-
"chips used in game consoles, and earns semi-custom revenue from "
|
| 55 |
-
"third-party customers."
|
| 56 |
-
),
|
| 57 |
},
|
| 58 |
{
|
| 59 |
-
"company": "
|
| 60 |
-
"question": "What
|
| 61 |
"reference": (
|
| 62 |
-
"
|
| 63 |
-
"
|
| 64 |
-
"Products, and Medical Devices."
|
| 65 |
),
|
| 66 |
},
|
| 67 |
{
|
| 68 |
-
"company": "
|
| 69 |
-
"question": "What
|
| 70 |
"reference": (
|
| 71 |
-
"
|
| 72 |
-
"
|
| 73 |
-
"
|
| 74 |
-
"diagnostics, point-of-care, and rapid diagnostics, including its "
|
| 75 |
-
"Alinity family of instruments."
|
| 76 |
),
|
| 77 |
},
|
| 78 |
{
|
| 79 |
-
"company": "
|
| 80 |
-
"question": "What is
|
| 81 |
"reference": (
|
| 82 |
-
"
|
| 83 |
-
"
|
| 84 |
-
"
|
| 85 |
-
"services."
|
| 86 |
),
|
| 87 |
},
|
| 88 |
{
|
| 89 |
-
"company": "
|
| 90 |
-
"question": "
|
| 91 |
"reference": (
|
| 92 |
-
"
|
| 93 |
-
"
|
|
|
|
| 94 |
),
|
| 95 |
},
|
| 96 |
{
|
| 97 |
-
"company": "
|
| 98 |
-
"question": "What
|
| 99 |
"reference": (
|
| 100 |
-
"
|
| 101 |
-
"
|
| 102 |
-
"
|
| 103 |
-
"and defense markets."
|
| 104 |
),
|
| 105 |
},
|
| 106 |
{
|
| 107 |
-
"company": "
|
| 108 |
-
"question": "What
|
| 109 |
"reference": (
|
| 110 |
-
"
|
| 111 |
-
"
|
| 112 |
-
"
|
| 113 |
-
"
|
| 114 |
-
"and expeditionary/airlift services to commercial and "
|
| 115 |
-
"government/defense customers."
|
| 116 |
),
|
| 117 |
},
|
| 118 |
{
|
| 119 |
-
"company": "
|
| 120 |
-
"question": "What
|
| 121 |
"reference": (
|
| 122 |
-
"
|
| 123 |
-
"
|
| 124 |
-
"in Micronesia, and provides an expedited service from China."
|
| 125 |
),
|
| 126 |
},
|
| 127 |
{
|
| 128 |
-
"company": "
|
| 129 |
-
"question": "What does
|
| 130 |
"reference": (
|
| 131 |
-
"
|
| 132 |
-
"
|
| 133 |
-
"
|
| 134 |
-
"management services."
|
| 135 |
),
|
| 136 |
},
|
| 137 |
]
|
|
|
|
| 1 |
+
"""Qualitative capability gold set for FinChat (18-company EDGAR corpus).
|
| 2 |
|
| 3 |
+
These are document-Q&A questions (business, segments, products, geographies) --
|
| 4 |
+
the task FinChat is designed for -- with reference answers from the companies'
|
| 5 |
+
10-K filings. run_gold.py grades FinChat against them with an LLM-as-judge.
|
|
|
|
| 6 |
|
| 7 |
+
This complements run_eval.py (FinanceBench), which is dominated by numeric
|
| 8 |
+
financial-analysis questions that text RAG cannot compute.
|
|
|
|
| 9 |
"""
|
| 10 |
|
| 11 |
GOLD_SET = [
|
| 12 |
{
|
| 13 |
+
"company": "Boeing",
|
| 14 |
+
"question": "What are Boeing's business segments?",
|
| 15 |
"reference": (
|
| 16 |
+
"Boeing operates through four segments: Commercial Airplanes; "
|
| 17 |
+
"Defense, Space & Security; Global Services; and Boeing Capital."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
),
|
| 19 |
},
|
| 20 |
{
|
| 21 |
+
"company": "Microsoft",
|
| 22 |
+
"question": "What are Microsoft's reportable segments?",
|
| 23 |
"reference": (
|
| 24 |
+
"Microsoft reports in three segments: Productivity and Business "
|
| 25 |
+
"Processes; Intelligent Cloud; and More Personal Computing."
|
|
|
|
|
|
|
|
|
|
| 26 |
),
|
| 27 |
},
|
| 28 |
{
|
| 29 |
"company": "AMD",
|
| 30 |
+
"question": "What products does AMD design and sell?",
|
| 31 |
"reference": (
|
| 32 |
+
"AMD designs and sells microprocessors (CPUs), graphics processors "
|
| 33 |
+
"(GPUs), accelerated processing units (APUs), adaptive/FPGA products "
|
| 34 |
+
"(from Xilinx), and semi-custom System-on-Chip products. Brands "
|
| 35 |
+
"include Ryzen, EPYC, Radeon, and Instinct."
|
|
|
|
|
|
|
| 36 |
),
|
| 37 |
},
|
| 38 |
{
|
| 39 |
+
"company": "Verizon",
|
| 40 |
+
"question": "What are Verizon's reportable segments?",
|
| 41 |
+
"reference": "Verizon reports in two segments: Consumer and Business.",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
},
|
| 43 |
{
|
| 44 |
+
"company": "Nike",
|
| 45 |
+
"question": "What products and brands does Nike sell?",
|
| 46 |
"reference": (
|
| 47 |
+
"Nike sells athletic footwear, apparel, equipment, and accessories. "
|
| 48 |
+
"Its brands include NIKE, Jordan, and Converse."
|
|
|
|
| 49 |
),
|
| 50 |
},
|
| 51 |
{
|
| 52 |
+
"company": "Coca-Cola",
|
| 53 |
+
"question": "What is Coca-Cola's business?",
|
| 54 |
"reference": (
|
| 55 |
+
"Coca-Cola is a total beverage company that manufactures and sells "
|
| 56 |
+
"nonalcoholic beverage concentrates, syrups, and finished beverages. "
|
| 57 |
+
"Its brands include Coca-Cola, Sprite, and Fanta."
|
|
|
|
|
|
|
| 58 |
),
|
| 59 |
},
|
| 60 |
{
|
| 61 |
+
"company": "Pfizer",
|
| 62 |
+
"question": "What is Pfizer's primary business?",
|
| 63 |
"reference": (
|
| 64 |
+
"Pfizer is a research-based biopharmaceutical company that discovers, "
|
| 65 |
+
"develops, manufactures, and sells medicines and vaccines, including "
|
| 66 |
+
"the Comirnaty COVID-19 vaccine and Paxlovid."
|
|
|
|
| 67 |
),
|
| 68 |
},
|
| 69 |
{
|
| 70 |
+
"company": "PepsiCo",
|
| 71 |
+
"question": "What kinds of products does PepsiCo sell?",
|
| 72 |
"reference": (
|
| 73 |
+
"PepsiCo makes and sells convenient foods (snacks) and beverages. "
|
| 74 |
+
"Its brands include Pepsi, Lay's, Gatorade, Quaker, and Tropicana, "
|
| 75 |
+
"sold across North America and international markets."
|
| 76 |
),
|
| 77 |
},
|
| 78 |
{
|
| 79 |
+
"company": "American Express",
|
| 80 |
+
"question": "What is American Express's primary business?",
|
| 81 |
"reference": (
|
| 82 |
+
"American Express is a globally integrated payments company. It "
|
| 83 |
+
"issues charge and credit cards and provides merchant acquiring and "
|
| 84 |
+
"card-network services."
|
|
|
|
| 85 |
),
|
| 86 |
},
|
| 87 |
{
|
| 88 |
+
"company": "Best Buy",
|
| 89 |
+
"question": "What is Best Buy's business and where does it operate?",
|
| 90 |
"reference": (
|
| 91 |
+
"Best Buy is a retailer of technology products -- consumer "
|
| 92 |
+
"electronics, computing, mobile phones, and appliances -- operating "
|
| 93 |
+
"through a Domestic (U.S.) segment and an International (Canada) "
|
| 94 |
+
"segment."
|
|
|
|
|
|
|
| 95 |
),
|
| 96 |
},
|
| 97 |
{
|
| 98 |
+
"company": "Johnson & Johnson",
|
| 99 |
+
"question": "What are Johnson & Johnson's business segments?",
|
| 100 |
"reference": (
|
| 101 |
+
"Johnson & Johnson operates through three segments: Consumer Health, "
|
| 102 |
+
"Pharmaceutical, and MedTech (Medical Devices)."
|
|
|
|
| 103 |
),
|
| 104 |
},
|
| 105 |
{
|
| 106 |
+
"company": "Amcor",
|
| 107 |
+
"question": "What does Amcor make and what industry is it in?",
|
| 108 |
"reference": (
|
| 109 |
+
"Amcor is a global packaging company that develops and produces "
|
| 110 |
+
"flexible and rigid packaging for food, beverage, pharmaceutical, "
|
| 111 |
+
"medical, and home and personal care products."
|
|
|
|
| 112 |
),
|
| 113 |
},
|
| 114 |
]
|
eval/results.md
CHANGED
|
@@ -1,207 +1,370 @@
|
|
| 1 |
-
# FinChat Evaluation —
|
| 2 |
-
|
| 3 |
-
FinChat is graded by an LLM-as-judge against
|
| 4 |
-
|
| 5 |
-
- **Questions:**
|
| 6 |
-
- **CORRECT:**
|
| 7 |
-
- **Score:**
|
| 8 |
-
- **Accuracy (CORRECT=1.0, PARTIAL=0.5):**
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
| 13 |
-
|
|
| 14 |
-
|
|
| 15 |
-
|
|
| 16 |
-
|
|
| 17 |
-
|
| 18 |
-
|
|
| 19 |
-
|
|
| 20 |
-
|
|
| 21 |
-
|
|
| 22 |
-
|
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
---
|
| 26 |
|
| 27 |
## Detailed results
|
| 28 |
|
| 29 |
-
### 1.
|
| 30 |
-
- **Company:**
|
| 31 |
-
- **Judge:** The system answer
|
| 32 |
-
- **
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
|
| 36 |
Sources:
|
| 37 |
-
[2]
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
Sources:
|
| 47 |
-
[1]
|
| 48 |
-
[2]
|
| 49 |
-
[3]
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
- **
|
| 54 |
-
- **
|
| 55 |
-
- **
|
| 56 |
-
|
| 57 |
-
2. Cyber-attacks, hacking, and phishing attacks (ADVANCED MICRO DEVICES INC 10-K (2018) - Section 0, ADVANCED MICRO DEVICES INC 10-K (2020) - Section 1)
|
| 58 |
-
3. Failure to develop and introduce new products on a timely basis (ADVANCED MICRO DEVICES INC 10-K (2018) - Section 1)
|
| 59 |
-
4. Dependence on third-party manufacturers and suppliers (ADVANCED MICRO DEVICES INC 10-K (2017) - Section 0)
|
| 60 |
-
5. Loss of a significant customer (ADVANCED MICRO DEVICES INC 10-K (2018) - Section 0)
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
Sources:
|
| 63 |
-
[
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
- **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
Sources:
|
| 76 |
-
[
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
- **
|
| 81 |
-
- **
|
| 82 |
-
- **
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
Sources:
|
| 91 |
-
[
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
- **
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
-
|
| 103 |
-
-
|
| 104 |
-
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
Sources:
|
| 108 |
-
[
|
| 109 |
-
[3] ABBOTT LABORATORIES 10-K (2017) - Section 0
|
| 110 |
-
[6] ABBOTT LABORATORIES 10-K (2018) - Section 8
|
| 111 |
-
[8] ABBOTT LABORATORIES 10-K (2020) - Section 0
|
| 112 |
-
|
| 113 |
-
### 7. What is Air Products' primary business?
|
| 114 |
-
- **Company:** APD | **Routed to:** None | **Verdict:** CORRECT
|
| 115 |
-
- **Judge:** The system answer accurately conveys Air Products' primary business, matching the key facts of the reference answer.
|
| 116 |
-
- **Reference:** Air Products is a world-leading industrial gases company. It produces and sells atmospheric gases (such as oxygen, nitrogen, and argon), process and specialty gases, related equipment, and services.
|
| 117 |
-
- **FinChat:** Air Products' primary business is as a world-leading Industrial Gases company, providing atmospheric, process, and specialty gases, and related equipment to various industries.
|
| 118 |
-
Air Products & Chemicals, Inc. (2018)
|
| 119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
Sources:
|
| 121 |
-
[
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
- **
|
| 126 |
-
- **
|
| 127 |
-
- **
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
-
|
| 133 |
-
-
|
| 134 |
-
-
|
| 135 |
-
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
Sources:
|
| 141 |
-
[1]
|
| 142 |
-
[
|
| 143 |
-
[
|
| 144 |
-
|
| 145 |
-
###
|
| 146 |
-
- **Company:**
|
| 147 |
-
- **Judge:** The system answer
|
| 148 |
-
- **
|
| 149 |
-
- **FinChat:**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
Sources:
|
| 151 |
-
[
|
| 152 |
-
[
|
| 153 |
-
|
| 154 |
-
###
|
| 155 |
-
- **Company:**
|
| 156 |
-
- **Judge:** The system answer
|
| 157 |
-
- **
|
| 158 |
-
- **FinChat:**
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
|
| 169 |
Sources:
|
| 170 |
-
[
|
| 171 |
-
[5] AAR CORP 10-K (2019) - Section 0
|
| 172 |
-
[7] AAR CORP 10-K (2019) - Section 10
|
| 173 |
-
[8] AAR CORP 10-K (2020) - Section 0
|
| 174 |
-
|
| 175 |
-
### 11. What geographic markets does Matson's ocean transportation serve?
|
| 176 |
-
- **Company:** MATX | **Routed to:** MATX | **Verdict:** PARTIAL
|
| 177 |
-
- **Judge:** The system answer includes the key markets mentioned in the reference, but also adds several unrelated or unsupported markets.
|
| 178 |
-
- **Reference:** Matson's ocean transportation serves the domestic non-contiguous U.S. economies of Hawaii, Alaska, and Guam, other island economies in Micronesia, and provides an expedited service from China.
|
| 179 |
-
- **FinChat:** Matson's Ocean Transportation segment serves the following geographic markets:
|
| 180 |
-
- Hawaii
|
| 181 |
-
- Alaska
|
| 182 |
-
- Guam
|
| 183 |
-
- Micronesia
|
| 184 |
-
- China
|
| 185 |
-
- South Pacific islands, including Fiji, Samoa, American Samoa, the Cook Islands, Tonga, Niue, Nauru, and the Solomon Islands
|
| 186 |
-
- U.S. West Coast, including California and Washington
|
| 187 |
-
- Australia (east coast ports)
|
| 188 |
-
- New Zealand
|
| 189 |
-
- North America (through logistics services).
|
| 190 |
-
|
| 191 |
-
Matson, Inc. (2019, 2020)
|
| 192 |
-
|
| 193 |
-
### 12. What does Matson's logistics business do?
|
| 194 |
-
- **Company:** MATX | **Routed to:** MATX | **Verdict:** CORRECT
|
| 195 |
-
- **Judge:** The system answer comprehensively covers the key services provided by Matson's logistics business, matching the reference answer.
|
| 196 |
-
- **Reference:** Matson Logistics provides transportation brokerage, intermodal rail and highway services, less-than-container-load consolidation, freight forwarding, warehousing and distribution, and supply-chain management services.
|
| 197 |
-
- **FinChat:** Matson's Logistics business, conducted through Matson Logistics, Inc., provides a variety of logistics services to its customers, including:
|
| 198 |
-
1. Multimodal transportation brokerage of domestic and international rail intermodal services, long-haul and regional highway trucking services, specialized hauling, flat-bed and project services, less-than-truckload services, and expedited freight services (collectively, “Transportation Brokerage” services);
|
| 199 |
-
2. Less-than-container load (“LCL”) consolidation and freight forwarding services (collectively, “Freight Forwarding” services);
|
| 200 |
-
3. Warehousing and distribution services; and
|
| 201 |
-
4. Supply chain management, non-vessel operating common carrier (“NVOCC”) freight forwarding and other services.
|
| 202 |
-
Matson, Inc. (2020)
|
| 203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
Sources:
|
| 205 |
-
[1]
|
| 206 |
-
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FinChat Evaluation — FinanceBench (corpus-aligned subset)
|
| 2 |
+
|
| 3 |
+
FinChat is graded by an LLM-as-judge against gold answers from the [FinanceBench](https://huggingface.co/datasets/PatronusAI/financebench) benchmark, on every 10-K question whose company + fiscal year is in the corpus. FinanceBench is expert-written and intentionally hard.
|
| 4 |
+
|
| 5 |
+
- **Questions evaluated:** 30
|
| 6 |
+
- **CORRECT:** 2 **PARTIAL:** 8 **INCORRECT:** 20
|
| 7 |
+
- **Score:** 6.0 / 30
|
| 8 |
+
- **Accuracy (CORRECT=1.0, PARTIAL=0.5):** 20%
|
| 9 |
+
|
| 10 |
+
**Accuracy by FinanceBench question type:**
|
| 11 |
+
|
| 12 |
+
| Question type | Accuracy | N |
|
| 13 |
+
|---|---|---|
|
| 14 |
+
| domain-relevant | 24% | 21 |
|
| 15 |
+
| metrics-generated | 0% | 2 |
|
| 16 |
+
| novel-generated | 14% | 7 |
|
| 17 |
+
|
| 18 |
+
| # | Company | FY | Verdict | Question |
|
| 19 |
+
|---|---------|----|---------|----------|
|
| 20 |
+
| 1 | 3M | 2022 | INCORRECT | Is 3M a capital-intensive business based on FY2022 data? |
|
| 21 |
+
| 2 | 3M | 2022 | INCORRECT | If we exclude the impact of M&A, which segment has dragged down 3M's overall growth in 2022? |
|
| 22 |
+
| 3 | Adobe | 2022 | INCORRECT | Does Adobe have an improving Free cashflow conversion as of FY2022? |
|
| 23 |
+
| 4 | AES Corporation | 2022 | INCORRECT | Roughly how many times has AES Corporation sold its inventory in FY2022? Calculate inventory turnover ratio for the FY2022; if conventional inventory management is not meaningful for the company then state that and explain why. |
|
| 24 |
+
| 5 | Amcor | 2023 | INCORRECT | Has AMCOR's quick ratio improved or declined between FY2023 and FY2022? If the quick ratio is not something that a financial analyst would ask about a company like this, then state that and explain why. |
|
| 25 |
+
| 6 | Amcor | 2023 | CORRECT | What industry does AMCOR primarily operate in? |
|
| 26 |
+
| 7 | AMD | 2022 | INCORRECT | Does AMD have a reasonably healthy liquidity profile based on its quick ratio for FY22? If the quick ratio is not relevant to measure liquidity, please state that and explain why. |
|
| 27 |
+
| 8 | AMD | 2022 | PARTIAL | What drove revenue change as of the FY22 for AMD? |
|
| 28 |
+
| 9 | AMD | 2022 | INCORRECT | Among operations, investing, and financing activities, which brought in the most (or lost the least) cash flow for AMD in FY22? |
|
| 29 |
+
| 10 | AMD | 2022 | INCORRECT | Did AMD report customer concentration in FY22? |
|
| 30 |
+
| 11 | American Express | 2022 | PARTIAL | What are the geographies that American Express primarily operates in as of 2022? |
|
| 31 |
+
| 12 | American Express | 2022 | INCORRECT | What drove gross margin change as of the FY2022 for American Express? If gross margin is not a useful metric for a company like this, then please state that and explain why. |
|
| 32 |
+
| 13 | American Express | 2022 | PARTIAL | What was the largest liability in American Express's Balance Sheet in 2022? |
|
| 33 |
+
| 14 | Best Buy | 2023 | INCORRECT | Are Best Buy's gross margins historically consistent (not fluctuating more than roughly 2% each year)? If gross margins are not a relevant metric for a company like this, then please state that and explain why. |
|
| 34 |
+
| 15 | Best Buy | 2023 | CORRECT | Among operations, investing, and financing activities, which brought in the most (or lost the least) cash flow for Best Buy in FY2023? |
|
| 35 |
+
| 16 | Boeing | 2022 | PARTIAL | Has Boeing reported any materially important ongoing legal battles from FY2022? |
|
| 36 |
+
| 17 | Boeing | 2022 | INCORRECT | Who are the primary customers of Boeing as of FY2022? |
|
| 37 |
+
| 18 | Boeing | 2022 | PARTIAL | What production rate changes is Boeing forecasting for FY2023? |
|
| 38 |
+
| 19 | Coca-Cola | 2022 | INCORRECT | What is Coca Cola's FY2022 dividend payout ratio (using total cash dividends paid and net income attributable to shareholders)? Round answer to two decimal places. Answer the question asked by assuming you only have access to information clearly displayed in the cash flow statement and the income statement. |
|
| 39 |
+
| 20 | Corning | 2022 | INCORRECT | Does Corning have positive working capital based on FY2022 data? If working capital is not a useful or relevant metric for this company, then please state that and explain why. |
|
| 40 |
+
| 21 | CVS Health | 2022 | PARTIAL | Has CVS Health reported any materially important ongoing legal battles from 2022, 2021 and 2020? |
|
| 41 |
+
| 22 | Johnson & Johnson | 2022 | PARTIAL | Are JnJ's FY2022 financials that of a high growth company? |
|
| 42 |
+
| 23 | Johnson & Johnson | 2022 | INCORRECT | Roughly how many times has JnJ sold its inventory in FY2022? Calculate inventory turnover ratio for FY2022; if conventional inventory management is not meaningful for the company then state that and explain why. |
|
| 43 |
+
| 24 | Nike | 2023 | INCORRECT | Among operations, investing, and financing activities, which brought in the most (or lost the least) cash flow for Nike in FY2023? |
|
| 44 |
+
| 25 | PepsiCo | 2022 | INCORRECT | Has Pepsico reported any materially important ongoing legal battles from FY2022 and FY2021? |
|
| 45 |
+
| 26 | PepsiCo | 2022 | INCORRECT | What is the FY2022 unadjusted EBITDA less capex for PepsiCo? Define unadjusted EBITDA as unadjusted operating income + depreciation and amortization [from cash flow statement]. Answer in USD millions. Respond to the question by assuming the perspective of an investment analyst who can only use the details shown within the statement of cash flows and the income statement. |
|
| 46 |
+
| 27 | Pfizer | 2021 | INCORRECT | Did Pfizer grow its PPNE between FY20 and FY21? |
|
| 47 |
+
| 28 | Pfizer | 2021 | INCORRECT | What are three main companies acquired by Pfizer mentioned in this 10K report? |
|
| 48 |
+
| 29 | Ulta Beauty | 2023 | INCORRECT | What are major acquisitions that Ulta Beauty has done in FY2023 and FY2022? |
|
| 49 |
+
| 30 | Verizon | 2022 | PARTIAL | Is Verizon a capital intensive business based on FY 2022 data? |
|
| 50 |
|
| 51 |
---
|
| 52 |
|
| 53 |
## Detailed results
|
| 54 |
|
| 55 |
+
### 1. Is 3M a capital-intensive business based on FY2022 data?
|
| 56 |
+
- **Company / FY:** 3M 2022 | **Routed to:** None | **Verdict:** INCORRECT
|
| 57 |
+
- **Judge:** The system answer suggests that 3M is capital-intensive, contradicting the reference answer which states that 3M is not capital-intensive based on FY2022 data.
|
| 58 |
+
- **FinanceBench gold:** No, the company is managing its CAPEX and Fixed Assets pretty efficiently, which is evident from below key metrics:
|
| 59 |
+
CAPEX/Revenue Ratio: 5.1%
|
| 60 |
+
Fixed assets/Total Assets: 20%
|
| 61 |
+
Return on Assets= 12.4%
|
| 62 |
+
- **FinChat:** Based on the provided context, 3M is investing in property, plant, and equipment, with expected 2023 capital spending of approximately $1.5 billion to $1.8 billion (Excerpt [2], 3M 10-K FY2022). This suggests that 3M has significant capital expenditures, which could indicate a capital-intensive business.
|
| 63 |
|
| 64 |
Sources:
|
| 65 |
+
[2] 3M 10-K (FY2022)
|
| 66 |
+
|
| 67 |
+
### 2. If we exclude the impact of M&A, which segment has dragged down 3M's overall growth in 2022?
|
| 68 |
+
- **Company / FY:** 3M 2022 | **Routed to:** None | **Verdict:** INCORRECT
|
| 69 |
+
- **Judge:** The system answer indicates it cannot find the answer, whereas the reference answer provides specific information about the consumer segment.
|
| 70 |
+
- **FinanceBench gold:** The consumer segment shrunk by 0.9% organically.
|
| 71 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 72 |
+
|
| 73 |
+
Sources:
|
| 74 |
+
[1] 3M 10-K (FY2022)
|
| 75 |
+
[2] 3M 10-K (FY2022)
|
| 76 |
+
[3] 3M 10-K (FY2022)
|
| 77 |
+
[4] 3M 10-K (FY2022)
|
| 78 |
+
[5] 3M 10-K (FY2022)
|
| 79 |
+
[6] Best Buy 10-K (FY2023)
|
| 80 |
+
[7] CVS Health 10-K (FY2022)
|
| 81 |
+
[8] 3M 10-K (FY2022)
|
| 82 |
+
|
| 83 |
+
### 3. Does Adobe have an improving Free cashflow conversion as of FY2022?
|
| 84 |
+
- **Company / FY:** Adobe 2022 | **Routed to:** ADBE | **Verdict:** INCORRECT
|
| 85 |
+
- **Judge:** The system answer states it couldn't find the information, but the reference answer is based on actual data from Adobe's FY2022 filings.
|
| 86 |
+
- **FinanceBench gold:** Yes, the FCF conversion (using net income as the denominator) for Adobe has improved by ~13% from 143% in 2021 to 156% in 2022
|
| 87 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 88 |
+
|
| 89 |
+
Sources: [1] Adobe 10-K (FY2022), [2] Adobe 10-K (FY2022), [3] Adobe 10-K (FY2022), [4] Adobe 10-K (FY2022), [5] Adobe 10-K (FY2022), [6] Adobe 10-K (FY2022), [7] Adobe 10-K (FY2022), [8] Adobe 10-K (FY2022)
|
| 90 |
+
|
| 91 |
+
### 4. Roughly how many times has AES Corporation sold its inventory in FY2022? Calculate inventory turnover ratio for the FY2022; if conventional inventory management is not meaningful for the company then state that and explain why.
|
| 92 |
+
- **Company / FY:** AES Corporation 2022 | **Routed to:** AES | **Verdict:** INCORRECT
|
| 93 |
+
- **Judge:** The system answer does not provide the correct inventory turnover ratio and instead states that it cannot find the answer due to missing COGS.
|
| 94 |
+
- **FinanceBench gold:** AES has converted inventory 9.5 times in FY 2022.
|
| 95 |
+
- **FinChat:** To calculate the inventory turnover ratio, we need the cost of goods sold (COGS) and the average inventory. However, the provided excerpts do not include the COGS for FY2022.
|
| 96 |
+
|
| 97 |
+
I couldn't find that in the filings I have.
|
| 98 |
+
|
| 99 |
+
Sources:
|
| 100 |
+
[1] AES Corporation 10-K (FY2022)
|
| 101 |
+
[2] AES Corporation 10-K (FY2022)
|
| 102 |
+
|
| 103 |
+
### 5. Has AMCOR's quick ratio improved or declined between FY2023 and FY2022? If the quick ratio is not something that a financial analyst would ask about a company like this, then state that and explain why.
|
| 104 |
+
- **Company / FY:** Amcor 2023 | **Routed to:** AMCR | **Verdict:** INCORRECT
|
| 105 |
+
- **Judge:** The system answer correctly states that it couldn't find the information in the provided filings, but then incorrectly claims that the excerpts do not mention the quick ratio, when in fact, the system does not have any excerpts to begin with.
|
| 106 |
+
- **FinanceBench gold:** The quick ratio has slightly improved from 0.67 times to 0.69 times between FY 2023 and FY 2022.(3.4% jump)
|
| 107 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 108 |
+
|
| 109 |
+
The provided excerpts do not mention the quick ratio for Amcor in either FY2023 or FY2022, making it impossible to determine if it has improved or declined.
|
| 110 |
|
| 111 |
+
Sources:
|
| 112 |
+
[1] Amcor 10-K (FY2023)
|
| 113 |
+
[2] Amcor 10-K (FY2023)
|
| 114 |
+
[3] Amcor 10-K (FY2023)
|
| 115 |
+
[4] Amcor 10-K (FY2023)
|
| 116 |
+
[5] Amcor 10-K (FY2023)
|
| 117 |
+
[6] Amcor 10-K (FY2023)
|
| 118 |
+
[7] Amcor 10-K (FY2023)
|
| 119 |
+
[8] Amcor 10-K (FY2023)
|
| 120 |
+
|
| 121 |
+
### 6. What industry does AMCOR primarily operate in?
|
| 122 |
+
- **Company / FY:** Amcor 2023 | **Routed to:** AMCR | **Verdict:** CORRECT
|
| 123 |
+
- **Judge:** The system answer accurately describes Amcor's primary industry as packaging and lists its specific end markets.
|
| 124 |
+
- **FinanceBench gold:** Amcor is a global leader in packaging production for various use cases.
|
| 125 |
+
- **FinChat:** Amcor primarily operates in the packaging industry, specifically in developing and producing responsible packaging for food, beverage, pharmaceutical, medical, home and personal-care, and other consumer goods end markets. (Amcor, FY2023)
|
| 126 |
|
| 127 |
Sources:
|
| 128 |
+
[1] Amcor 10-K (FY2023)
|
| 129 |
+
[2] Amcor 10-K (FY2023)
|
| 130 |
+
[3] Amcor 10-K (FY2023)
|
| 131 |
+
[4] Amcor 10-K (FY2023)
|
| 132 |
+
|
| 133 |
+
### 7. Does AMD have a reasonably healthy liquidity profile based on its quick ratio for FY22? If the quick ratio is not relevant to measure liquidity, please state that and explain why.
|
| 134 |
+
- **Company / FY:** AMD 2022 | **Routed to:** AMD | **Verdict:** INCORRECT
|
| 135 |
+
- **Judge:** The system answer states it couldn't find the information, but it actually has access to the 10-K filings for FY2022.
|
| 136 |
+
- **FinanceBench gold:** Yes. The quick ratio is 1.57, calculated as (cash and cash equivalents+Short term investments+Accounts receivable, net+receivables from related parties)/ (current liabilities).
|
| 137 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
|
| 139 |
+
Sources:
|
| 140 |
+
[1] Advanced Micro Devices 10-K (FY2022)
|
| 141 |
+
[2] Advanced Micro Devices 10-K (FY2022)
|
| 142 |
+
[3] Advanced Micro Devices 10-K (FY2022)
|
| 143 |
+
[4] Advanced Micro Devices 10-K (FY2022)
|
| 144 |
+
[5] Advanced Micro Devices 10-K (FY2022)
|
| 145 |
+
[6] Advanced Micro Devices 10-K (FY2022)
|
| 146 |
+
[7] Advanced Micro Devices 10-K (FY2022)
|
| 147 |
+
[8] Advanced Micro Devices 10-K (FY2022)
|
| 148 |
+
|
| 149 |
+
### 8. What drove revenue change as of the FY22 for AMD?
|
| 150 |
+
- **Company / FY:** AMD 2022 | **Routed to:** AMD | **Verdict:** PARTIAL
|
| 151 |
+
- **Judge:** The system answer is mostly correct but lacks the mention of Xilinx embedded product sales.
|
| 152 |
+
- **FinanceBench gold:** In 2022, AMD reported Higher sales of their EPYC server processors, higher semi-custom product sales, and the inclusion of Xilinx embedded product sales
|
| 153 |
+
- **FinChat:** The increase in net revenue for AMD in FY2022 was driven by a 64% increase in Data Center segment revenue, primarily due to higher sales of EPYC server processors, and a 21% increase in Gaming segment revenue, primarily due to higher semi-custom product sales.
|
| 154 |
+
Advanced Micro Devices (FY2022)
|
| 155 |
Sources:
|
| 156 |
+
[5] Advanced Micro Devices 10-K (FY2022)
|
| 157 |
+
|
| 158 |
+
### 9. Among operations, investing, and financing activities, which brought in the most (or lost the least) cash flow for AMD in FY22?
|
| 159 |
+
- **Company / FY:** AMD 2022 | **Routed to:** AMD | **Verdict:** INCORRECT
|
| 160 |
+
- **Judge:** The system answer indicates it couldn't find the information, but the reference answer provides the correct information.
|
| 161 |
+
- **FinanceBench gold:** In 2022, AMD brought in the most cashflow from Operations
|
| 162 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 163 |
+
|
| 164 |
+
Sources: [1] Advanced Micro Devices 10-K (FY2022), [2] Advanced Micro Devices 10-K (FY2022), [3] Advanced Micro Devices 10-K (FY2022), [4] Advanced Micro Devices 10-K (FY2022), [5] Advanced Micro Devices 10-K (FY2022), [6] Advanced Micro Devices 10-K (FY2022), [7] Advanced Micro Devices 10-K (FY2022), [8] Advanced Micro Devices 10-K (FY2022)
|
| 165 |
+
|
| 166 |
+
### 10. Did AMD report customer concentration in FY22?
|
| 167 |
+
- **Company / FY:** AMD 2022 | **Routed to:** AMD | **Verdict:** INCORRECT
|
| 168 |
+
- **Judge:** The system answer indicates it cannot find the answer, whereas the reference answer confirms that AMD did report customer concentration in FY22.
|
| 169 |
+
- **FinanceBench gold:** Yes, one customer accounted for 16% of consolidated net revenue
|
| 170 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 171 |
+
Sources: [1], [2], [3], [4], [5], [6], [7], [8]
|
| 172 |
+
|
| 173 |
+
### 11. What are the geographies that American Express primarily operates in as of 2022?
|
| 174 |
+
- **Company / FY:** American Express 2022 | **Routed to:** AXP | **Verdict:** PARTIAL
|
| 175 |
+
- **Judge:** The system answer lists some of the geographies mentioned in the reference answer, but also includes additional geographies not mentioned in the reference.
|
| 176 |
+
- **FinanceBench gold:** United States, EMEA, APAC, and LACC
|
| 177 |
+
- **FinChat:** As of 2022, American Express operates in various geographies including the U.S., Canada, Mexico, England, India, Philippines, Japan, Malaysia, and Australia, among others.
|
| 178 |
+
|
| 179 |
Sources:
|
| 180 |
+
[5] American Express 10-K (FY2022)
|
| 181 |
+
|
| 182 |
+
### 12. What drove gross margin change as of the FY2022 for American Express? If gross margin is not a useful metric for a company like this, then please state that and explain why.
|
| 183 |
+
- **Company / FY:** American Express 2022 | **Routed to:** AXP | **Verdict:** INCORRECT
|
| 184 |
+
- **Judge:** The system answer indicates it couldn't find the information, but the reference answer provides a clear explanation that gross margin is not a useful metric for American Express.
|
| 185 |
+
- **FinanceBench gold:** Performance is not measured through gross margin
|
| 186 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 187 |
+
|
| 188 |
+
Sources: None
|
| 189 |
+
|
| 190 |
+
### 13. What was the largest liability in American Express's Balance Sheet in 2022?
|
| 191 |
+
- **Company / FY:** American Express 2022 | **Routed to:** AXP | **Verdict:** PARTIAL
|
| 192 |
+
- **Judge:** The system answer correctly identifies "Other" and "Membership Rewards liability" as components of the largest liability category, but it does not confirm that "Customer deposits" is the largest liability as stated in the reference answer.
|
| 193 |
+
- **FinanceBench gold:** Customer deposits
|
| 194 |
+
- **FinChat:** The largest liability is not explicitly stated in the provided excerpts. However, based on the "Other liabilities" summary (excerpt [6]), the total of Other liabilities is $37,350 million. The largest component of Other liabilities is "Other" with $15,227 million, followed by "Membership Rewards liability" with $12,789 million.
|
| 195 |
+
|
| 196 |
+
I couldn't find the largest liability in the filings I have, as the provided excerpts do not contain a comprehensive balance sheet.
|
| 197 |
|
| 198 |
Sources:
|
| 199 |
+
[6] American Express 10-K (FY2022)
|
| 200 |
+
|
| 201 |
+
### 14. Are Best Buy's gross margins historically consistent (not fluctuating more than roughly 2% each year)? If gross margins are not a relevant metric for a company like this, then please state that and explain why.
|
| 202 |
+
- **Company / FY:** Best Buy 2023 | **Routed to:** BBY | **Verdict:** INCORRECT
|
| 203 |
+
- **Judge:** The system answer states it couldn't find the information, but the reference answer provides specific data on gross margins for FY2022 and FY2023.
|
| 204 |
+
- **FinanceBench gold:** Yes, the margins have been consistent, there has been a minor decline of 1.1% in gross margins between FY2022 and FY2023.
|
| 205 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 206 |
+
|
| 207 |
+
Sources: [1], [2], [3], [4], [5], [6], [7], [8]
|
| 208 |
+
|
| 209 |
+
### 15. Among operations, investing, and financing activities, which brought in the most (or lost the least) cash flow for Best Buy in FY2023?
|
| 210 |
+
- **Company / FY:** Best Buy 2023 | **Routed to:** BBY | **Verdict:** CORRECT
|
| 211 |
+
- **Judge:** The system answer agrees with the reference on the key fact that operating activities generated the most cash for Best Buy in FY2023.
|
| 212 |
+
- **FinanceBench gold:** Best Buy generated the most cash flow from operating activities in FY 2023 ($1.8 bn)
|
| 213 |
+
- **FinChat:** According to the excerpts, operating activities brought in cash, while investing and financing activities used cash. Among the three, operating activities generated the most cash.
|
| 214 |
+
|
| 215 |
+
The decrease in cash provided by operating activities was due to lower earnings and higher incentive compensation payments.
|
| 216 |
+
|
| 217 |
+
Best Buy, FY2023.
|
| 218 |
+
|
| 219 |
Sources:
|
| 220 |
+
[3] Best Buy 10-K (FY2023)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 221 |
|
| 222 |
+
### 16. Has Boeing reported any materially important ongoing legal battles from FY2022?
|
| 223 |
+
- **Company / FY:** Boeing 2022 | **Routed to:** BA | **Verdict:** PARTIAL
|
| 224 |
+
- **Judge:** The system answer is partially correct but omits the key fact that multiple lawsuits were filed against Boeing, instead mentioning a Deferred Prosecution Agreement and a shareholder derivative lawsuit settlement.
|
| 225 |
+
- **FinanceBench gold:** Yes. Multiple lawsuits have been filed against Boeing resulting from a 2018 Lion Air crash and a 2019 Ethiopian Airlines crash.
|
| 226 |
+
- **FinChat:** Boeing has reported legal actions filed against them as a result of the October 29, 2018 accident of Lion Air Flight 610 and the March 10, 2019 accident of Ethiopian Airlines Flight 302. However, they entered into a Deferred Prosecution Agreement with the U.S. Department of Justice in 2021, which resolved the investigation. Additionally, they entered into a proposed settlement with plaintiffs in a shareholder derivative lawsuit in 2021.
|
| 227 |
+
Boeing, FY2022.
|
| 228 |
Sources:
|
| 229 |
+
[1] Boeing 10-K (FY2022)
|
| 230 |
+
|
| 231 |
+
### 17. Who are the primary customers of Boeing as of FY2022?
|
| 232 |
+
- **Company / FY:** Boeing 2022 | **Routed to:** BA | **Verdict:** INCORRECT
|
| 233 |
+
- **Judge:** The system answer indicates it cannot find the answer, whereas the reference answer provides specific information about Boeing's primary customers.
|
| 234 |
+
- **FinanceBench gold:** Boeing's primary customers as of FY2022 are a limited number of commercial airlines and the US government. The US government accounted for 40% of Boeing's total revenues in FY2022.
|
| 235 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 236 |
+
|
| 237 |
+
Sources: [1], [2], [3], [4], [5], [6], [7], [8]
|
| 238 |
+
|
| 239 |
+
### 18. What production rate changes is Boeing forecasting for FY2023?
|
| 240 |
+
- **Company / FY:** Boeing 2022 | **Routed to:** BA | **Verdict:** PARTIAL
|
| 241 |
+
- **Judge:** The system answer correctly identifies the 787 production rate increase but incorrectly states the 777X production rate and does not mention the 777X production resuming in 2023.
|
| 242 |
+
- **FinanceBench gold:** Boeing forecasts an increase in the production rates for the 737, 777X and 787 aircrafts in 2023.
|
| 243 |
+
- **FinChat:** Boeing is forecasting the following production rate changes for FY2023:
|
| 244 |
+
- The 787 program is expected to gradually increase to 5 per month.
|
| 245 |
+
- The 777X production is expected to resume in 2023, but no specific rate is mentioned.
|
| 246 |
+
- The 737 program is expected to have further gradual production rate increases based on market demand and supply chain capacity, with a current rate of 31 per month.
|
| 247 |
+
|
| 248 |
Sources:
|
| 249 |
+
[1] Boeing 10-K (FY2022)
|
| 250 |
+
[4] Boeing 10-K (FY2022)
|
| 251 |
+
[7] Boeing 10-K (FY2022)
|
| 252 |
+
|
| 253 |
+
### 19. What is Coca Cola's FY2022 dividend payout ratio (using total cash dividends paid and net income attributable to shareholders)? Round answer to two decimal places. Answer the question asked by assuming you only have access to information clearly displayed in the cash flow statement and the income statement.
|
| 254 |
+
- **Company / FY:** Coca-Cola 2022 | **Routed to:** KO | **Verdict:** INCORRECT
|
| 255 |
+
- **Judge:** The system answer failed to provide a numerical answer, instead explaining the calculation process.
|
| 256 |
+
- **FinanceBench gold:** 0.8
|
| 257 |
+
- **FinChat:** To calculate the dividend payout ratio, we need the total cash dividends paid and the net income attributable to shareholders.
|
| 258 |
+
|
| 259 |
+
The net income attributable to shareholders of The Coca-Cola Company is $9,542 million (Source: [5] Coca-Cola 10-K (FY2022)).
|
| 260 |
+
|
| 261 |
+
The total cash dividends paid can be calculated using the information from [2] Coca-Cola 10-K (FY2022), which states dividends of $1.76 per share in 2022. The average shares outstanding - basic is 4,328 million (Source: [5] Coca-Cola 10-K (FY2022)).
|
| 262 |
+
|
| 263 |
+
Total cash dividends paid = $1.76 * 4,328 million = $7,617 million, which is also directly stated in [2] Coca-Cola 10-K (FY2022).
|
| 264 |
+
|
| 265 |
+
The dividend payout ratio is then calculated as:
|
| 266 |
+
Dividend payout ratio = Total cash dividends paid / Net income attributable to shareholders
|
| 267 |
+
= $7,617 million / $9,542 million
|
| 268 |
+
= 0.80
|
| 269 |
+
|
| 270 |
+
Rounded to two decimal places, the dividend payout ratio is 0.80.
|
| 271 |
+
|
| 272 |
Sources:
|
| 273 |
+
[2] Coca-Cola 10-K (FY2022)
|
| 274 |
+
[5] Coca-Cola 10-K (FY2022)
|
| 275 |
+
|
| 276 |
+
### 20. Does Corning have positive working capital based on FY2022 data? If working capital is not a useful or relevant metric for this company, then please state that and explain why.
|
| 277 |
+
- **Company / FY:** Corning 2022 | **Routed to:** GLW | **Verdict:** INCORRECT
|
| 278 |
+
- **Judge:** The system answer states it couldn't find the information, but the reference answer provides a specific value ($831 million) that the system should be able to verify or deny.
|
| 279 |
+
- **FinanceBench gold:** Yes. Corning had a positive working capital amount of $831 million by FY 2022 close. This answer considers only operating current assets and current liabilities that were clearly shown in the balance sheet.
|
| 280 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 281 |
+
|
| 282 |
+
Sources:
|
| 283 |
+
[1] Corning 10-K (FY2022)
|
| 284 |
+
[2] Corning 10-K (FY2022)
|
| 285 |
+
[3] Corning 10-K (FY2022)
|
| 286 |
+
[4] Corning 10-K (FY2022)
|
| 287 |
+
[5] Corning 10-K (FY2022)
|
| 288 |
+
[6] Corning 10-K (FY2022)
|
| 289 |
+
[7] Corning 10-K (FY2022)
|
| 290 |
+
[8] Corning 10-K (FY2022)
|
| 291 |
+
|
| 292 |
+
### 21. Has CVS Health reported any materially important ongoing legal battles from 2022, 2021 and 2020?
|
| 293 |
+
- **Company / FY:** CVS Health 2022 | **Routed to:** CVS | **Verdict:** PARTIAL
|
| 294 |
+
- **Judge:** The system answer partially captures the ongoing legal battles of CVS Health, but misses the "usual and customary pricing litigation" and "PBM litigation and investigations" mentioned in the reference answer.
|
| 295 |
+
- **FinanceBench gold:** Yes, CVS Health has been involved in multiple ongoing legal battles. Some notable legal dispute areas for CVS are: (1) usual and customary pricing litigation: where it's claimed that CVSâs retail pharmacies overcharged for prescription drugs; (2) PBM litigation and investigations: where it's claimed that that rebate agreements between the drug manufacturers and PBMs caused inflated prices for certain drug products; and (3) controlled substances litigation: legal matters around opioids for which CVS has agreed to pay up to $4.3 billion to claimants in remediation and $625 million to attorneys and fees
|
| 296 |
+
- **FinChat:** CVS Health reported ongoing legal battles related to prescription opioids and other controlled substances, as well as prescription processing practices. In 2022, the DOJ served the Company with a CID regarding potential violations of the federal Controlled Substances Act and the federal False Claims Act. In 2020, the DOJ served the Company with a DEA administrative subpoena on similar subjects. The Company is also named as a defendant in a number of lawsuits concerning its prescription processing practices.
|
| 297 |
|
| 298 |
Sources:
|
| 299 |
+
[4] CVS Health 10-K (FY2022)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
|
| 301 |
+
### 22. Are JnJ's FY2022 financials that of a high growth company?
|
| 302 |
+
- **Company / FY:** Johnson & Johnson 2022 | **Routed to:** None | **Verdict:** PARTIAL
|
| 303 |
+
- **Judge:** The system answer correctly suggests JnJ's growth may not be high, but it does not directly address the question or provide a clear reason why FY2022 financials are not of a high growth company.
|
| 304 |
+
- **FinanceBench gold:** No, JnJ's FY2022 financials are not of a high growth company as sales grew by 1.3% in FY2022.
|
| 305 |
+
- **FinChat:** Based on the 5 Year Shareholder Return Performance, Johnson & Johnson's (J&J) FY2022 return is $169.43, which is lower than the S&P 500 Index ($233.28) and the S&P Healthcare Equipment Index ($276.26). This suggests that J&J's growth may not be as high as some of its peers or the broader market.
|
| 306 |
Sources:
|
| 307 |
+
[1] Johnson & Johnson 10-K (FY2022)
|
| 308 |
+
|
| 309 |
+
### 23. Roughly how many times has JnJ sold its inventory in FY2022? Calculate inventory turnover ratio for FY2022; if conventional inventory management is not meaningful for the company then state that and explain why.
|
| 310 |
+
- **Company / FY:** Johnson & Johnson 2022 | **Routed to:** None | **Verdict:** INCORRECT
|
| 311 |
+
- **Judge:** The system answer states it cannot find the answer, but the reference answer provides the information.
|
| 312 |
+
- **FinanceBench gold:** JnJ sold its inventory 2.7 times in FY2022.
|
| 313 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 314 |
+
|
| 315 |
+
Sources: None
|
| 316 |
+
|
| 317 |
+
### 24. Among operations, investing, and financing activities, which brought in the most (or lost the least) cash flow for Nike in FY2023?
|
| 318 |
+
- **Company / FY:** Nike 2023 | **Routed to:** NKE | **Verdict:** INCORRECT
|
| 319 |
+
- **Judge:** The system answer indicates it cannot find the answer, whereas the reference answer provides a specific fact.
|
| 320 |
+
- **FinanceBench gold:** Among the three, cash flow from operations was the highest for Nike in FY2023.
|
| 321 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 322 |
+
|
| 323 |
+
Sources: [1] Nike 10-K (FY2023), [2] Nike 10-K (FY2023), [3] Nike 10-K (FY2023), [4] Nike 10-K (FY2023), [5] Nike 10-K (FY2023), [6] Nike 10-K (FY2023), [7] Nike 10-K (FY2023), [8] Nike 10-K (FY2023)
|
| 324 |
+
|
| 325 |
+
### 25. Has Pepsico reported any materially important ongoing legal battles from FY2022 and FY2021?
|
| 326 |
+
- **Company / FY:** PepsiCo 2022 | **Routed to:** PEP | **Verdict:** INCORRECT
|
| 327 |
+
- **Judge:** The system answer indicates it cannot find the answer, whereas the reference answer states that Pepsico is not involved in material legal battles.
|
| 328 |
+
- **FinanceBench gold:** No, Pepsico is not involved in material legal battles.
|
| 329 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 330 |
+
Sources: [1], [2], [3], [4], [5], [6], [7], [8]
|
| 331 |
+
|
| 332 |
+
### 26. What is the FY2022 unadjusted EBITDA less capex for PepsiCo? Define unadjusted EBITDA as unadjusted operating income + depreciation and amortization [from cash flow statement]. Answer in USD millions. Respond to the question by assuming the perspective of an investment analyst who can only use the details shown within the statement of cash flows and the income statement.
|
| 333 |
+
- **Company / FY:** PepsiCo 2022 | **Routed to:** PEP | **Verdict:** INCORRECT
|
| 334 |
+
- **Judge:** The system answer states it cannot find the answer, but it lists multiple sources which are the same (PepsiCo 10-K FY2022), indicating it has access to the necessary information.
|
| 335 |
+
- **FinanceBench gold:** $9068.00
|
| 336 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 337 |
+
|
| 338 |
+
Sources: [1] PepsiCo 10-K (FY2022), [2] PepsiCo 10-K (FY2022), [3] PepsiCo 10-K (FY2022), [4] PepsiCo 10-K (FY2022), [5] PepsiCo 10-K (FY2022), [6] PepsiCo 10-K (FY2022), [7] PepsiCo 10-K (FY2022), [8] PepsiCo 10-K (FY2022)
|
| 339 |
+
|
| 340 |
+
### 27. Did Pfizer grow its PPNE between FY20 and FY21?
|
| 341 |
+
- **Company / FY:** Pfizer 2021 | **Routed to:** PFE | **Verdict:** INCORRECT
|
| 342 |
+
- **Judge:** The system answer explicitly states it couldn't find the information, whereas the reference answer confirms a positive change in PPNE.
|
| 343 |
+
- **FinanceBench gold:** Yes, change in PPNE was positive year over year
|
| 344 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 345 |
+
|
| 346 |
+
Sources: [1] Pfizer 10-K (FY2021), [2] Pfizer 10-K (FY2021), [3] Pfizer 10-K (FY2021), [4] Pfizer 10-K (FY2021), [5] Pfizer 10-K (FY2021), [6] Pfizer 10-K (FY2021), [7] Pfizer 10-K (FY2021), [8] Pfizer 10-K (FY2021)
|
| 347 |
+
|
| 348 |
+
### 28. What are three main companies acquired by Pfizer mentioned in this 10K report?
|
| 349 |
+
- **Company / FY:** Pfizer 2021 | **Routed to:** PFE | **Verdict:** INCORRECT
|
| 350 |
+
- **Judge:** The system answer indicates it cannot find the answer in the available filings.
|
| 351 |
+
- **FinanceBench gold:** Trillium, Array, and Therachon
|
| 352 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 353 |
+
|
| 354 |
+
Sources: [1], [2], [3], [4], [5], [6], [7], [8]
|
| 355 |
+
|
| 356 |
+
### 29. What are major acquisitions that Ulta Beauty has done in FY2023 and FY2022?
|
| 357 |
+
- **Company / FY:** Ulta Beauty 2023 | **Routed to:** ULTA | **Verdict:** INCORRECT
|
| 358 |
+
- **Judge:** The system answer indicates it cannot find the answer, but the reference answer provides a clear statement that Ulta Beauty did not make any acquisitions in FY2023 and FY2022.
|
| 359 |
+
- **FinanceBench gold:** Ulta Beauty did not make any acquisitions in FY2023 and FY2022.
|
| 360 |
+
- **FinChat:** I couldn't find that in the filings I have.
|
| 361 |
+
Sources: [1], [2], [3], [4], [5], [6], [7], [8]
|
| 362 |
+
|
| 363 |
+
### 30. Is Verizon a capital intensive business based on FY 2022 data?
|
| 364 |
+
- **Company / FY:** Verizon 2022 | **Routed to:** VZ | **Verdict:** PARTIAL
|
| 365 |
+
- **Judge:** The system answer correctly identifies Verizon as capital-intensive but fails to provide the capital intensity ratio, which is the key fact in the reference answer.
|
| 366 |
+
- **FinanceBench gold:** Yes. Verizon's capital intensity ratio was approximately 2.774729. This means that it took approximately $2.77 of assets to generate $1 of revenue and thus, Verizon can be considered capital intensive.
|
| 367 |
+
- **FinChat:** Yes, Verizon is a capital-intensive business. As of December 31, 2022, Verizon had approximately $130.6 billion of outstanding unsecured indebtedness and $20.0 billion of outstanding secured indebtedness. Additionally, the company's 2023 capital program is expected to be between $18.25 billion and $19.25 billion.
|
| 368 |
+
Verizon, FY2022.
|
| 369 |
+
Sources:
|
| 370 |
+
[4] Verizon 10-K (FY2022), [5] Verizon 10-K (FY2022)
|
eval/run_gold.py
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Qualitative capability evaluation for FinChat.
|
| 2 |
+
|
| 3 |
+
Runs FinChat on the curated qualitative gold set (business/segments/products --
|
| 4 |
+
the document-Q&A task FinChat is designed for) and grades each answer against a
|
| 5 |
+
reference with an LLM-as-judge. Writes eval/gold_results.md.
|
| 6 |
+
|
| 7 |
+
Complements run_eval.py (FinanceBench), which is dominated by numeric questions.
|
| 8 |
+
|
| 9 |
+
Run from the project root:
|
| 10 |
+
python -m eval.run_gold
|
| 11 |
+
"""
|
| 12 |
+
from __future__ import annotations
|
| 13 |
+
|
| 14 |
+
import re
|
| 15 |
+
import sys
|
| 16 |
+
import time
|
| 17 |
+
from pathlib import Path
|
| 18 |
+
|
| 19 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
| 20 |
+
try:
|
| 21 |
+
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
| 22 |
+
except Exception:
|
| 23 |
+
pass
|
| 24 |
+
|
| 25 |
+
from langchain_core.prompts import ChatPromptTemplate
|
| 26 |
+
from langchain_groq import ChatGroq
|
| 27 |
+
|
| 28 |
+
from src.rag import answer
|
| 29 |
+
from eval.gold_set import GOLD_SET
|
| 30 |
+
|
| 31 |
+
JUDGE_MODEL = "llama-3.1-8b-instant"
|
| 32 |
+
_judge_llm = None
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
def get_judge_llm() -> ChatGroq:
|
| 36 |
+
global _judge_llm
|
| 37 |
+
if _judge_llm is None:
|
| 38 |
+
_judge_llm = ChatGroq(model=JUDGE_MODEL, temperature=0.0, max_retries=5)
|
| 39 |
+
return _judge_llm
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
JUDGE_PROMPT = ChatPromptTemplate.from_messages(
|
| 43 |
+
[
|
| 44 |
+
(
|
| 45 |
+
"system",
|
| 46 |
+
"You grade a financial question-answering system against a reference "
|
| 47 |
+
"answer.\n"
|
| 48 |
+
"Grade CORRECT if the system answer conveys the key facts of the "
|
| 49 |
+
"reference (minor omissions or extra detail are fine), PARTIAL if it "
|
| 50 |
+
"captures some but misses important parts, and INCORRECT if it is "
|
| 51 |
+
"wrong, empty, or says it cannot find the answer.\n"
|
| 52 |
+
"Respond in EXACTLY this format:\n"
|
| 53 |
+
"VERDICT: <CORRECT|PARTIAL|INCORRECT>\n"
|
| 54 |
+
"REASON: <one short sentence>",
|
| 55 |
+
),
|
| 56 |
+
(
|
| 57 |
+
"human",
|
| 58 |
+
"QUESTION:\n{question}\n\nREFERENCE ANSWER:\n{reference}\n\n"
|
| 59 |
+
"SYSTEM ANSWER:\n{system}",
|
| 60 |
+
),
|
| 61 |
+
]
|
| 62 |
+
)
|
| 63 |
+
SCORE = {"CORRECT": 1.0, "PARTIAL": 0.5, "INCORRECT": 0.0}
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def judge(question: str, reference: str, system: str) -> tuple[str, str]:
|
| 67 |
+
text = (JUDGE_PROMPT | get_judge_llm()).invoke(
|
| 68 |
+
{"question": question, "reference": reference, "system": system}
|
| 69 |
+
).content
|
| 70 |
+
v = re.search(r"VERDICT:\s*(CORRECT|PARTIAL|INCORRECT)", text, re.I)
|
| 71 |
+
r = re.search(r"REASON:\s*(.+)", text, re.I)
|
| 72 |
+
return (v.group(1).upper() if v else "INCORRECT",
|
| 73 |
+
r.group(1).strip() if r else "(unparsed)")
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def main() -> None:
|
| 77 |
+
print(f"Evaluating {len(GOLD_SET)} qualitative capability questions.\n")
|
| 78 |
+
results = []
|
| 79 |
+
total = 0.0
|
| 80 |
+
for item in GOLD_SET:
|
| 81 |
+
res = answer(item["question"])
|
| 82 |
+
verdict, reason = judge(item["question"], item["reference"], res["answer"])
|
| 83 |
+
total += SCORE[verdict]
|
| 84 |
+
results.append((item, res, verdict, reason))
|
| 85 |
+
print(f"[{verdict:9}] {item['company']}: {item['question']}")
|
| 86 |
+
time.sleep(1.0)
|
| 87 |
+
|
| 88 |
+
n = len(GOLD_SET)
|
| 89 |
+
accuracy = total / n if n else 0.0
|
| 90 |
+
correct = sum(1 for _i, _r, v, _j in results if v == "CORRECT")
|
| 91 |
+
partial = sum(1 for _i, _r, v, _j in results if v == "PARTIAL")
|
| 92 |
+
|
| 93 |
+
lines = [
|
| 94 |
+
"# FinChat Evaluation — Qualitative Capability Gold Set\n",
|
| 95 |
+
"FinChat is graded by an LLM-as-judge on document-Q&A questions "
|
| 96 |
+
"(business, segments, products) across the 18-company corpus -- the task "
|
| 97 |
+
"it is designed for. Reference answers are drawn from the 10-K filings.\n",
|
| 98 |
+
f"- **Questions:** {n}",
|
| 99 |
+
f"- **CORRECT:** {correct} **PARTIAL:** {partial} "
|
| 100 |
+
f"**INCORRECT:** {n - correct - partial}",
|
| 101 |
+
f"- **Accuracy (CORRECT=1.0, PARTIAL=0.5):** {accuracy:.0%}\n",
|
| 102 |
+
"| # | Company | Verdict | Question |",
|
| 103 |
+
"|---|---------|---------|----------|",
|
| 104 |
+
]
|
| 105 |
+
for i, (item, _res, verdict, _reason) in enumerate(results, 1):
|
| 106 |
+
lines.append(f"| {i} | {item['company']} | {verdict} | {item['question']} |")
|
| 107 |
+
|
| 108 |
+
lines += ["\n---\n", "## Detailed results\n"]
|
| 109 |
+
for i, (item, res, verdict, reason) in enumerate(results, 1):
|
| 110 |
+
lines += [
|
| 111 |
+
f"### {i}. {item['question']}",
|
| 112 |
+
f"- **Company:** {item['company']} | "
|
| 113 |
+
f"**Routed to:** {res['routed_to']} | **Verdict:** {verdict}",
|
| 114 |
+
f"- **Judge:** {reason}",
|
| 115 |
+
f"- **Reference:** {item['reference']}",
|
| 116 |
+
f"- **FinChat:** {res['answer']}\n",
|
| 117 |
+
]
|
| 118 |
+
|
| 119 |
+
out_path = Path(__file__).resolve().parent / "gold_results.md"
|
| 120 |
+
out_path.write_text("\n".join(lines), encoding="utf-8")
|
| 121 |
+
print(f"\nCapability accuracy: {accuracy:.0%} ({total:.1f}/{n}) -> wrote {out_path}")
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
if __name__ == "__main__":
|
| 125 |
+
main()
|