Testing how well LLMs handle messy bank statement text — can they turn noisy transaction descriptions into clean JSON?
Beethoven Marhone
CAP 6640 – NLP, University of Central Florida
Bank statements are messy. Merchants show up as "Rmtly* Fffe7" instead of "Remitly." Store numbers, phone numbers, and state codes get mixed in. This project takes 74 real transactions like that, feeds them to Claude (Haiku, Sonnet, and Opus), and checks how well each model extracts merchant names, dates, amounts, categories, and cities.
Get an API key from console.anthropic.com, then:
export ANTHROPIC_API_KEY=sk-ant-your-key-here
python3 pipeline.pyAfter it finishes, copy ground_truth_template.json to ground_truth.json, fix any wrong labels, then:
python3 pipeline.py --evaluateThat prints accuracy numbers and saves results to metrics.json, results.csv, and error_analysis.json.
pipeline.py— runs extraction and evaluationground_truth.json— manually labeled correct answersmetrics.json— accuracy results per modelresults.csv— per-transaction breakdownerror_analysis.json— what went wrong and wherefigures/— pipeline diagram and bar chart for the paper
All three models got 100% on JSON validity, amounts, dates, and cities. Semantic fields were harder — merchant normalization peaked at 51.4% with Opus, category hit 78.4%, and transaction type hit 74.3% with Haiku. Bigger model does not always mean better.