Skip to content

Subscribe to our Newsletter for Updates and Tips

If you want to get updates on new features and tips on how to use Instructor, you can subscribe to our newsletter below to get notified when we publish new content.

Advanced Topics

  1. What's new in Instructor v2?
  2. Unified Provider Interface in Instructor
  3. Instructor Implements llms.txt
  4. Query Understanding: Beyond Embeddings
  5. Achieving GPT-4 Level Summaries with GPT-3.5-turbo
  6. Basics of Guardrails and Validation in AI Models
  7. Validating Citations in AI-Generated Content
  8. Fine-tuning and Distillation in AI Models
  9. Enhancing OpenAI Client Observability with LangSmith
  10. Logfire Integration with Pydantic

AI Development and Optimization

Language Models and Prompting Techniques

Integrations and Tools

Media and Resources

What's new in Instructor v2?

Instructor's public job is simple: pass a Pydantic model to an LLM client and get validated Python data back. Instructor v2 keeps that API, but changes how the library implements it. Provider packages, or an explicitly shared wire-compatible implementation, now own the SDK construction, wire format, streaming events, tool schema, and validation reask payload.

This is not only a directory move. It changes the unit of correctness. In v2, support for a feature is declared for a provider, registered by that provider's handlers, and exercised by tests generated from the same declaration.

Understanding Semantic Validation with Structured Outputs

Semantic validation uses LLMs to evaluate content against complex, subjective, and contextual criteria that would be difficult to implement with traditional rule-based validation approaches.

As LLMs become increasingly integrated into production systems, ensuring the quality and safety of their outputs is paramount. Traditional validation methods relying on explicit rules can't keep up with the complexity and nuance of natural language. With the release of Instructor's semantic validation capabilities, we now have a powerful way to validate structured outputs against sophisticated criteria.

Announcing Responses API support

We're excited to announce Instructor's integration with OpenAI's new Responses API. This integration brings a more streamlined approach to working with structured outputs from OpenAI models. Let's see what makes this integration special and how it can improve your LLM applications.

Announcing unified provider interface

We are pleased to introduce a significant enhancement to Instructor: the from_provider() function. While Instructor has always focused on providing robust structured outputs, we've observed that many users work with multiple LLM providers. This often involves repetitive setup for each client.

The from_provider() function aims to simplify this process, making it easier to initialize clients and experiment across different models.

This new feature offers a streamlined, string-based method to initialize an Instructor-enhanced client for a variety of popular LLM providers.

Using Anthropic's Web Search with Instructor for Real-Time Data

Anthropic's new web search tool, when combined with Instructor, provides a powerful way to get real-time, structured data from the web. This allows you to build applications that can answer questions and provide information that is up-to-date, going beyond the knowledge cut-off of large language models.

In this post, we'll explore how to use the web_search tool with Instructor to fetch the latest information and structure it into a Pydantic model. Even a simple structure can be very effective for clarity and further processing.