How does Instructor work?
For Python developers working with large language models (LLMs), instructor
has become a popular tool for structured data extraction. While its capabilities may seem complex, the underlying mechanism is surprisingly straightforward. In this article, we'll walk through a high level overview of how the library works and how we support the OpenAI Client.
We'll start by looking at
- Why should you care about Structured Extraction?
- What is the high level flow
- How does a request go from Pydantic Model to Validated Function Call?
By the end of this article, you'll have a good understand of how instructor
helps you get validated outputs from your LLM calls and a better understanding of how you might be able to contribute to the library yourself.