Instructor architecture: a typed answer from a language model

Scroll or pinch to zoom, drag to move, double-click to zoom in 100% SVG PNG Back to the post
Instructor architecture: Docling produces clean document text, such as an invoice, request or email. Instructor sends it to a model endpoint together with the schema, using a tool call or JSON mode. The model returns JSON, which Pydantic checks for types and custom rules; if it is invalid Instructor retries with the error. A valid object is saved as a draft record in the ERP service.