All projects

Technical assignment2026

Diagnostic Fact Extractor

A Python CLI that turns mechanics’ free-form notes in Ukrainian, Russian, English or a mix of them into structured facts with verbatim quotes, checked against a fixed JSON schema.

Type
Technical assignment
Year
2026
Status
Completed
Source
Private repository

How data moves through it

  1. Notes
  2. Extraction
  3. Source review
  4. Schema and quote checks
  5. Facts

The problem

Repair notes are messy, multilingual and full of shorthand. Systems further down the line need facts they can trust, each tied to the exact words in the note.

What I built

  • A two-pass pipeline on Gemini: the first call extracts facts, the second reviews them against the source.
  • Checks in code for the schema, quotes, fault-code format, numbers, and consistency of polarity and confidence.
  • A shared rate limiter, retries that respect Retry-After, per-request timeouts and an explicit failure reason for every input line.
  • Raw responses kept apart from operational logs, and a retry file to re-run only the records that failed.
  • Evaluation on a labelled dev set with a written report and notes on taking it to production.

Architecture

A thin CLI with no application framework. The Gemini SDK does the model calls, jsonschema validates the contract, and the rest is plain Python that reads and writes files. The model decides meaning; code decides whether the output is acceptable.

Result

On the labelled dev set: 24 of 24 records processed, 44 of 46 strict matches, F1 of 95.65%. Built as a technical assignment.