📐 Instructor

2 guides covering common problems, patterns, and production issues in Instructor.

Instructor is a Python library that patches any LLM client to return validated Pydantic objects instead of raw text strings. When the model returns invalid output, Instructor automatically retries — sending the Pydantic validation error back to the model to self-correct.

  • Returns typed, validated Pydantic objects — not raw strings
  • Automatic retry loop feeds validation errors back to the model
  • Supports OpenAI, Anthropic, Gemini, LiteLLM, Cohere, and more
  • Partial streaming via create_partial() for lower perceived latency
  • Batch extraction via create_iterable() for multi-object documents
Visit official site →

Stay sharp as AI tools evolve

New guides drop regularly. Get them in your inbox — no noise, just signal.