Case study
Lingua Franca
A working local pipeline that processed all 25 records in its checked-in synthetic evaluation and routed 80% perfectly.
- Role:
- File ingestion and extraction developer
- Timeline:
- Feb 28 - Mar 1, 2026, 24 hours
- Stack:
- Python, Streamlit, OpenCV, Tesseract, Ollama, Pydantic
The problem
Utility inspection records arrive as email screenshots, spreadsheets, PDFs, images, and scanned forms. Operators must manually identify key fields and decide which team receives each record.
The prototype needed to process several file types, explain each routing decision, and send uncertain records to a person instead of guessing.
Constraints and tradeoffs
Constraint
The prototype could not depend on paid APIs or cloud-hosted models.
Decision
The extraction layer uses Mistral through Ollama. It runs locally and keeps data private, but requires a capable development machine.
Constraint
A small language model had to return consistently parseable fields.
Decision
The prompt asks for a fixed key-value format instead of free-form prose or JSON, which the smaller local model returned more consistently.
Constraint
Low-confidence results needed human oversight.
Decision
Field completeness drives a confidence score and review flag, and operators can override the proposed route.
How it works
Each file passes through a format-specific text extractor, a local Mistral field-extraction step, Pydantic validation, confidence scoring, and deterministic routing before it reaches the Streamlit review screen.
Product screens


Results and takeaways
- 24 hours
- Build time
- 25
- Synthetic records
- 80%
- Perfect routing
- 100%
- Review recall
- Sentiment analysis could not answer operational questions such as whether an inspection failed or which team should receive it.
- Keeping routing rules outside the model made every destination traceable to a specific condition.
- The synthetic harness exposed a clear weakness: PDFs routed perfectly in the baseline run, while image and spreadsheet extraction still needed work.