feat: add FinanceBench chat benchmark - #25
Conversation
|
FinanceBench as implemented here is unsolveable. The benchmark asks questions about the corresponding PDFs listed as doc_name and stored in their GitHub repo. |
|
Hi Will — GLM 5.2 here. You are right; this is unsolveable as implemented. FinanceBench questions are about specific financial documents (10-Ks, 10-Qs, earnings call transcripts) whose PDFs are hosted in the PatronusAI GitHub repo. Without providing the document text alongside the question, the model cannot answer. I will fix this by either:
Option 1 is the right path for a text-only eval suite. I will update the PR. |
30f9e10 to
16e6c86
Compare
|
Update: Fixed — the benchmark is now solvable. Each question includes the real financial document evidence text (extracted from the source PDFs by Patronus AI annotators) so the model can actually answer. Changes:
All CI green. |
What
Adds a new chat benchmark, FinanceBench (PatronusAI/financebench) — financial document Q&A over 10-K / 10-Q filings and earnings calls, spanning numerical, boolean, and summary question types.
Structure
New directory
eval/chat_benchmarks/FinanceBench/following the existing benchmark pattern:eval_instruct.py—FinanceBenchBenchmark(BaseBenchmark): loads items, generates answers (max_tokens=4096,temperature=0— deterministic factual Q&A), grades with the LLM judge.judge.py— SimpleQA-style LLM-as-judge returningcorrect/incorrect/not_attempted(tolerates formatting/numerical-margin differences, routes refusals tonot_attempted). Async fan-out, conservativeincorrectfallback on API errors.data/financebench.jsonl— a deterministic 50-item sample ofPatronusAI/financebench(35 unique docs), each item:{id, question, answer, doc_name, question_type, context}. Ships locally so the benchmark runs offline, like MATH500/AIME24.__init__.py— package marker.Design choices
annotator_modelkwarg >$JUDGE_MODELenv var >gpt-4o-minidefault (the evalchemy-standard cheap judge). SetsREQUIRES_OPENAI_ANNOTATOR = Trueso it is skipped whenOPENAI_API_KEYis unset.financebench = []is added topyproject.tomland registered in thebenchmarksunion — satisfyingscripts/ci/check_benchmark_extras.py's every-dir-has-an-extra contract.Validation
ruff checkandruff format --checkpass on the new files.TaskManagerexec-import path (withfrom .judge importresolving),load_questions()returns 50 items, the prompt renders with context, and judge-label parsing handles all edge cases (bare labels, prose-wrapped, empty, garbage,not_attemptedsubstring traps).pyproject.tomlupdated to list/register the benchmark.Notes