Valid JSON is not enough when extracted values are wrong
A local analysis tool is being built for more than 200 past tender and pitch dossiers. Each dossier includes a tender brief, the agency’s proposal, and an award report, but the source files come from many public authorities and have very different formats, including score tables, long prose, , and sometimes damaged Word files.
The goal is to extract the same fixed JSON structure from every dossier: award criteria and weights, each participant’s score by criterion, total scores, ranking, and prices. The stack uses Python, SQLite, ChromaDB, and the , with local or EU-only processing because the data cannot be stored by outside services.
The hard part is not making valid JSON; it is making sure the values are actually right. Repeated errors include treating thing authority as a bidder, reading evaluation sentences as participant names, merging two companies with different VAT numbers, storing a score under 100 as if it were a price, mixing prices with and without tax, and producing parent-child criterion weights that add up to 175 instead of 100.
Key points
- The tool tries to turn inconsistent tender documents into one fixed JSON structure.
- The main failure is wrong meaning, not broken formatting.
- Common mistakes mix up authorities, bidders, criterion text, company identities, scores, and prices.
- VAT status and parent-child scoring weights need explicit checks.
- Cheap validation rules can reduce repeated and manual review.