Financial LLM benchmark design: checking accuracy and sourcing

For companies4 min read

A Nigerian financial analyst comparing a printed annual report with figures on a laptop in a Lagos office, pencil behind her ear, afternoon light.

A financial LLM benchmark has to test two things at once: whether the number is right and whether the answer points to the page it came from. A fluent reply with the wrong ratio or an invented source is worse than no reply. This guide covers how to build the test, using FinanceBench as a worked example.

What FinanceBench measured

FinanceBench is described by its authors as a test suite for open-book financial question answering. It holds 10,231 questions about publicly traded companies, and every question comes with an answer and evidence strings. The questions are meant to be clear and straightforward, so that the benchmark works as a minimum standard, not an exam of the hardest cases.

The authors tested 16 model configurations, including GPT-4-Turbo, Llama 2 and Claude 2, with vector stores and with long-context prompts. They manually reviewed 2,400 answers. Their headline finding was that GPT-4-Turbo with a retrieval system incorrectly answered or refused to answer 81% of questions.

Source: FinanceBench: A New Benchmark for Financial Question Answering (arXiv:2311.11944)(opens in a new tab)

That figure belongs to specific systems tested in 2023, so do not treat it as the state of any product today. What it shows is the method: simple, checkable questions with evidence can expose a wide gap, and human review of the answers made the result credible.

Why finance needs two scores, not one

An answer can be right and unsourced, or sourced and wrong, or right for the wrong year. Score the answer and the evidence separately, then report both. A reader who audits your product will ask for the second.

CheckWhat it catchesWho can grade it
Number matches the filingArithmetic and extraction errorsAnalyst or accountant
Right period and entityWrong year, wrong subsidiaryAnalyst
Cited page contains the figureInvented or misplaced sourcesTrained reviewer with the document
Method suits the questionWrong ratio definition, wrong basisFinance professional
Refusal is justifiedRefusing when the answer is in the fileAnalyst

Build the financial LLM benchmark question set

Start with documents your users really read: annual reports, quarterly filings, loan agreements, central bank notices, fund factsheets. For African markets, that may include local exchange filings and regulator circulars, and some will be scans with poor text. Test the extraction step on those, since a model cannot answer from a page it cannot read.

Ask finance professionals to write questions at three levels. Lookup questions have a single figure in the document. Calculation questions need two or three figures and a formula. Judgement questions ask whether a trend is a concern, and have no single answer. Grade them differently.

  • Lookup: what was the reported revenue for the year, and on which page?
  • Calculation: what was the change in operating margin between two years, with the basis stated?
  • Judgement: does the note on contingent liabilities change how you read this balance sheet?
  • Trap: a question about a year the document does not cover, where the right answer is to say so.

Write references with the evidence attached

Each reference answer should contain the final figure, the page or table where it sits, and the working. The working matters because many wrong answers come from correct figures put into the wrong formula. Tell graders which definition applies, since net debt, EBITDA and free cash flow are defined differently by different firms and standards.

State the accounting basis in the reference. If the document is prepared under one set of reporting standards and the question assumes another, the grader should mark the question as unclear and send it back to be rewritten.

Plan the grading

  1. Have the question writer and a second finance expert each solve every item blind, and fix items where they differ.
  2. Run the models, saving the answer, the cited source and any retrieval log.
  3. Ask graders to mark number, period, source and method on separate lines.
  4. Double-grade a fifth of the items, and compare. Where graders differ, settle it with a written rule.
  5. Report results by question level, and show the failed refusals and wrong sources as their own results.

Retrieval versus long context

The FinanceBench authors note that longer context windows improve performance, yet they call them unrealistic for enterprises because of latency and because they cannot hold larger financial documents. If your product will search over a library of filings, test the retrieval step by itself. Log what chunks the model saw, and count the answers that were wrong because the right passage never reached the model.

That split tells your engineers where to work. If most errors come from retrieval, a better prompt will not help. If the passage was present and the model still erred, the problem lies in reasoning or arithmetic.

Keep the benchmark fresh

Filings change every quarter, and published test questions end up in training data over time. Hold back a private set that you never publish, and refresh it with newly released documents on a schedule. Keep a record of which questions came from which documents and dates.

Curatrain vets finance and maths specialists with graded skill tests, and companies get a shortlist of experts who already passed the tests their project needs. You approve each match through a secure link, and a project can start with a pilot, which is a sensible way to test a first grading scheme.