Extracting clean data from old SEC filings with small models
What they built
u/luvs_spaniels studies financial bubbles. The useful filings are late-1990s and early-2000s text files with little metadata, and a small local LLM turns them into clean, usable data.
They also strip company names and tickers before asking about red flags, so the model isn't biased by knowing it's Enron.
How it works
- Break the target information into small components (a single table or paragraph)
- Use many narrow prompts per table, sometimes ten
- Strip identifying names and tickers before analysis
Results & numbers
- Tabular extraction/matching around 97% on the latest random sample
- Some 7B-13B models hallucinated less on this task than larger ones
Gotchas
- Broad prompts like 'summarize file x' don't work
- Assigning meaning to abnormal wording is the hard part
“You might end up with 10 prompts for a single table. That's okay because you're not paying by the token.”— u/luvs_spaniels
Do it yourself
- Chunk each filing so one prompt sees one table or paragraph
- Ask for one field or table at a time, in JSON
- Remove company names and tickers first
- Spot-check a random sample to measure accuracy
Source: Reddit r/LocalLLaMA · 2025-08-17 · Added 2026-10-18. This write-up summarizes the original source; see it for full details.
Related
Receipt extraction and bank matching with PaperCortex
An open-source local AI layer for Paperless-ngx. It answers plain-English questions, extracts receipt line items, matches bank transactions and exports to DATEV.
Offline LLM on a Raspberry Pi 5 for classification and extraction
Phi-3 mini at Q4_K_M runs at 4-6 tokens per second on an 8 GB Pi 5 with no network at all. Under GDPR, data that never leaves the board isn't transferred anywhere.