{"slug": "instructor", "name": "Instructor", "category": "ai", "category_name": "AI tools and apps", "description": "", "recommenders": 3, "commenters": 6, "warners": 0, "score": 3.435, "rising": 0.35, "first": "2025-12-21", "latest": "2026-08-05", "why": "an explicit enough_context flag via Instructor + Pydantic", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 3, "compare": 0, "warn": 0}, "spark": [0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "an explicit enough_context flag via Instructor + Pydantic", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/jxnl/instructor", "official_url": "https://python.useinstructor.com/", "pricing": "", "aliases": ["Instructor"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 786973989, "item_id": 49185874, "url": "https://news.ycombinator.com/item?id=49185874", "by": "Gayithri2026", "date": "2026-08-05", "version": null, "stance": "recommend", "quote": "an explicit enough_context flag via Instructor + Pydantic", "excerpt": "Location: San Jose, CA (SF Bay Area) Remote: Yes Willing to relocate: No Technologies: Python, FastAPI, PostgreSQL/pgvector, RAG, LangChain, PydanticAI, Celery, Redis, Docker, AWS, Langfuse, Java, Spring Boot R\u00e9sum\u00e9/CV: https://github.com/Gayithri606/resume/blob/main/GayithriPonnapalli-Resume.pdf Email: gayithri@pojoai.com AI engineer building RAG chatbots and AI-driven workflow automation. Five years of production J", "context": "AI engineer building RAG chatbots", "use_case": "structured LLM outputs", "switched_from": "", "story": "Ask HN: Who wants to be hired? (August 2026)"}, {"id": 771195552, "item_id": 48199722, "url": "https://news.ycombinator.com/item?id=48199722", "by": "jimmySixDOF", "date": "2026-05-19", "version": null, "stance": "recommend", "quote": "Maybe similar to Instructor [1] which was a cool tool for json and structured output enforcement", "excerpt": "Maybe similar to Instructor [1] which was a cool tool for json and structured output enforcement combining pydandic with ai retry loops very handy for when models don't have that covered [1] https://github.com/567-labs/instructor", "context": "", "use_case": "", "switched_from": "", "story": null}, {"id": 746429825, "item_id": 46651864, "url": "https://news.ycombinator.com/item?id=46651864", "by": "ironbound", "date": "2026-01-16", "version": null, "stance": "recommend", "quote": "Use one of these structured output libraries:", "excerpt": "Use one of these structured output libraries: https://github.com/outlines-dev/outlines https://github.com/jxnl/instructor https://github.com/guardrails-ai/guardrails https://www.askmarvin.ai/docs/text/transformation/ Some of them allow a JSON schema, others a Pydantic model (which you can transform to/from JSON).", "context": "", "use_case": "", "switched_from": "", "story": "How to wrangle non-deterministic AI outputs into conventional software? (2025)"}]}], "caveats": [], "who": [{"by": "Gayithri2026", "context": "AI engineer building RAG chatbots", "url": "https://news.ycombinator.com/item?id=49185874", "date": "2026-08-05"}], "tags": [], "use_cases": ["structured llm output", "structured llm outputs", "llm output structuring"], "compared": [{"slug": "outlines", "name": "Outlines", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "pydantic", "name": "Pydantic", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=46643754", "title": "How to wrangle non-deterministic AI outputs into conventional software? (2025)", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49156682", "title": "Ask HN: Who wants to be hired? (August 2026)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48192383", "title": "item 48192383", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47268391", "title": "Labor Market Impacts of AI", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46345333", "title": "Structured outputs create false confidence", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"neutral": 1}, "2026-01": {"recommend": 1, "neutral": 1}, "2026-02": {}, "2026-03": {"neutral": 1}, "2026-04": {}, "2026-05": {"recommend": 1}, "2026-06": {}, "2026-07": {}, "2026-08": {"recommend": 1}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 786973989, "item_id": 49185874, "url": "https://news.ycombinator.com/item?id=49185874", "by": "Gayithri2026", "date": "2026-08-05", "version": null, "stance": "recommend", "quote": "an explicit enough_context flag via Instructor + Pydantic", "excerpt": "Location: San Jose, CA (SF Bay Area) Remote: Yes Willing to relocate: No Technologies: Python, FastAPI, PostgreSQL/pgvector, RAG, LangChain, PydanticAI, Celery, Redis, Docker, AWS, Langfuse, Java, Spring Boot R\u00e9sum\u00e9/CV: https://github.com/Gayithri606/resume/blob/main/GayithriPonnapalli-Resume.pdf Email: gayithri@pojoai.com AI engineer building RAG chatbots and AI-driven workflow automation. Five years of production J", "context": "AI engineer building RAG chatbots", "use_case": "structured LLM outputs", "switched_from": "", "story": "Ask HN: Who wants to be hired? (August 2026)"}, {"id": 771195552, "item_id": 48199722, "url": "https://news.ycombinator.com/item?id=48199722", "by": "jimmySixDOF", "date": "2026-05-19", "version": null, "stance": "recommend", "quote": "Maybe similar to Instructor [1] which was a cool tool for json and structured output enforcement", "excerpt": "Maybe similar to Instructor [1] which was a cool tool for json and structured output enforcement combining pydandic with ai retry loops very handy for when models don't have that covered [1] https://github.com/567-labs/instructor", "context": "", "use_case": "", "switched_from": "", "story": null}, {"id": 756460161, "item_id": 47278760, "url": "https://news.ycombinator.com/item?id=47278760", "by": "neya", "date": "2026-03-06", "version": null, "stance": "neutral", "quote": "I used Instructor and Ash framework with Phoenix", "excerpt": "I think a lot of people will not like to hear this but we use AI almost for everything internally. The noob way to go about this is just give it a couple of tasks and just give it complete root access to your life. That's always going to end up in disappointment. Instead, I realised, AI always needs an architect. Opinionated. Strategic. Authoritative. It is quite good at following most orders. Hence why you must ALWA", "context": "", "use_case": "LLM output structuring", "switched_from": "", "story": "Labor Market Impacts of AI"}, {"id": 746856257, "item_id": 46678516, "url": "https://news.ycombinator.com/item?id=46678516", "by": "johndough", "date": "2026-01-19", "version": null, "stance": "neutral", "quote": "", "excerpt": "To add to that, llama.cpp supports GBNF grammars, which allows generation of JSON, or even programming languages: https://github.com/ggml-org/llama.cpp/blob/master/grammars/README.md", "context": "", "use_case": "Structured LLM output", "switched_from": "", "story": "How to wrangle non-deterministic AI outputs into conventional software? (2025)"}, {"id": 746429825, "item_id": 46651864, "url": "https://news.ycombinator.com/item?id=46651864", "by": "ironbound", "date": "2026-01-16", "version": null, "stance": "recommend", "quote": "Use one of these structured output libraries:", "excerpt": "Use one of these structured output libraries: https://github.com/outlines-dev/outlines https://github.com/jxnl/instructor https://github.com/guardrails-ai/guardrails https://www.askmarvin.ai/docs/text/transformation/ Some of them allow a JSON schema, others a Pydantic model (which you can transform to/from JSON).", "context": "", "use_case": "", "switched_from": "", "story": "How to wrangle non-deterministic AI outputs into conventional software? (2025)"}, {"id": 741588928, "item_id": 46349308, "url": "https://news.ycombinator.com/item?id=46349308", "by": "hamasho", "date": "2025-12-21", "version": null, "stance": "neutral", "quote": "I used Python's Instructor[1], a package to force the model output to match the predefined Pydantic model.", "excerpt": "Story time. I used Python's Instructor[1], a package to force the model output to match the predefined Pydantic model. It's used like in the example below, and the output is guaranteed to fit the model. import instructor from pydantic import BaseModel class Person(BaseModel): name: str age: int client = instructor.from_provider(\"openai/gpt-5-nano\") person = client.create( response_model=Person, messages=[{\"role\": \"us", "context": "", "use_case": "structured LLM output", "switched_from": "", "story": "Structured outputs create false confidence"}]}