✳flâneur — a map of the web's best reading
Implementing Self-Correction with LLM Validator - Instructor
python.useinstructor.com · 634 words · saved by 1 readers
Learn how to use llm_validator for self-healing in NLP applications and improve response accuracy with validation errors.
Self-Correction with llm_validator ¶ Introduction ¶ This guide demonstrates how to use llm_validator for implementing self-healing. The objective is to showcase how an instructor can self-correct by using validation errors and helpful error messages. from pydantic import BaseModel import instructor # Apply the patch to the OpenAI client # enables response_model keyword client = instructor . from_provider ( "openai/gpt-4.1-mini" ) class QuestionAnswer ( BaseModel ): question : str answer : str question = "What is the meaning of life?" context = "The according to the devil the meaning
Explore this link on the map →related reading
- Cookbookcookbook.openai.com
- GitHub - brexhq/prompt-engineering: Tips and tricks for working with Large Language Models like OpenAI's GPT-4. · GitHubgithub.com
- The Shape of AI | UX Patterns for Artificial Intelligence Designshapeof.ai
- Prompt generation | OpenAI APIplatform.openai.com
- GitHub - x1xhlol/system-prompts-and-models-of-ai-tools: FULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Tragithub.com
- Parsed | Custom, interpretable AI systems that continuously learnparsed.com
- OpenAI | Research & Deploymentopenai.com
- GitHub - google-gemini/cookbook: Examples and guides for using the Gemini API · GitHubgithub.com
- GitHub - f/prompts.chat: f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy. · GitHubgithub.com
- GitHub - guidance-ai/guidance: A guidance language for controlling large language models. · GitHubgithub.com
- API Overview | OpenAI API Referenceplatform.openai.com
- Prompt engineering | OpenAI APIplatform.openai.com