confident-extract
An open-source Python library that turns model responses into schema-validated records using msgspec.

Inside the build
Define the record
A Python schema specifies the fields and types an extraction should produce. An invoice identifier, a decimal amount and a due date each have a different contract.
Validate the result
The library uses msgspec to check the structured output. This gives downstream Python code a defined boundary between a model response and a record it can use.