AI engineering glossary · Prompt context engineering
What is instructor library?
Instructor library: An open-source Python library that wraps model API clients so you can ask for a Pydantic model as the response type. It handles the schema, validation and automatic retries, making structured extraction a few lines of code.
Instructor library: an example
client.chat.completions.create(response_model=Invoice, ...) returns an Invoice object rather than raw text.
Related terms
More Prompt context engineering terms
- JSON mode
- Least-to-most prompting
- Logit bias
- Logprobs
- Long-context prompting
- Lost in the middle
- Maieutic prompting
- Majority label bias
Where you learn it
Instructor library is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.