Role
Researcher
Context
Research under Dr. Belcaid · UH Mānoa
Stack
  • Python
  • Pydantic
  • Pydantic-AI
  • Claude Skills
Links
    • FormA generic PDF or an LLM-generated mock
    • Pydantic schemasStructured data validation
    • LLM-as-a-judgePydantic-AI matches each field to its input box, with a justification
How a form is checked.

Problem

Judicial forms have to be filled in correctly, and an LLM’s output can look right without being right. The research asked how to check a model’s output instead of trusting it.

Approach

  • Defined Pydantic schemas to validate the structure of generic PDF forms and LLM-generated mock forms.
  • Used Pydantic-AI to run a second model as a judge, recording a justification for each decision.

Outcome

  • Generated 10 mock forms with an LLM and validated each one against the Pydantic schema.
  • The judge matched each field to its input box on the form, with a justification for every match.