Instructor
Trace Instructor structured LLM outputs with Respan.
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Use AI
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
What is Instructor?
Instructor is a Python library for getting structured data (JSON) from LLMs using Pydantic models. It patches OpenAI and other LLM clients to return validated, typed responses. The Respan integration uses respan-tracing auto-instrumentation to capture all LLM calls.
Check
Example project: GitHub Link
Setup
Configuration
Instructor uses the respan-tracing SDK. Instruments.OPENAI auto-captures all OpenAI calls made by Instructor.
See the Python Tracing SDK reference for configuration options.