← All work
Academic2025ENSTA (Brest Campus), LLM course project

Accident Report LLM Extractor

Turns free-form accident reports into structured JSON, and benchmarks three LLMs on the task.

3models compared
3scenarios: English, French, missing fields
5–8 sGemini response time

The need

Accident reports arrive as free text, in different languages, with fields often missing. Insurers need that information as structured data. The real question is which model does this reliably, including when it has to admit that a value is missing.

What I owned

The pipeline, the prompts, the model integration and the comparison, in a team of two.

The solution

Input
Accident report PDF
Processing
Text extractionStrict system prompt
Models
Gemini 2.5 FlashCroissantLLMChatGemma 2 2B
Output
JSON parsing and validationOne saved file per report
The same pipeline runs with each model, so the comparison is fair.

How it was built

Each model faced three scenarios: an English report with all fields, a French report with all fields, and an English report with several fields missing.

The first open-source baseline, CroissantLLM, returned template-based outputs that did not reflect the reports, so we replaced it with Gemma. We also removed all example values from the system prompt, so the model could not copy them.

Results

ScenarioGemini 2.5 FlashCroissantLLMChatGemma 2 2B
English, all fields8.3 s20.0 s12.3 s
French, all fields5.5 s2.1 s12.7 s
English, missing fields5.9 s10.2 s9.9 s
  • Gemini 2.5 Flash gave the most accurate and consistent extractions and was the fastest overall.
  • Gemma 2 2B proved a solid open-source option, with correct JSON and controlled handling of missing fields.
  • CroissantLLMChat did not meet the requirements, and its fast French time came with wrong output.