<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/g8v7l2qd3" -->

---
title: LLM Structured Outputs Always Parse Now. They Can Still...
description: Schema-enforced LLM outputs always parse now, but parsing doesn't mean the values are true. A hallucinated employeeId or an invented package name passes every...
canonical: https://daily.dev/posts/g8v7l2qd3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: LLM Structured Outputs Always Parse Now. They Can Still Be Wrong. | daily.dev
og:description: Schema-enforced LLM outputs always parse now, but parsing doesn't mean the values are true. A hallucinated employeeId or an invented package name passes every...
og:url: https://daily.dev/posts/g8v7l2qd3
og:image: https://api.daily.dev/og/posts/G8V7L2qd3.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM Structured Outputs Always Parse Now. They Can Still Be Wrong.

**[AI](https://daily.dev/sources/ai)** · [@petarivanovv9](https://daily.dev/petarivanovv9) · 9 upvotes · 0 comments

## Summary

Schema-enforced LLM outputs always parse now, but parsing doesn't mean the values are true. A hallucinated employeeId or an invented package name passes every schema check. Anthropic's TypeScript SDK (1.6.0) only partially enforces Zod rules: things like .positive() and z.enum() get moved into description text that the decoder never checks. Research cited found that on average at least 5.2% of packages from commercial models and 21.7% from open-source models in code samples didn't exist. The fix: call messages.create() instead of parse() to read stop_reason first, then validate the schema's lost rules, then check IDs against your own data.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://petarivanov.tech/blog/llm-structured-outputs-schema-valid-still-wrong>

## Similar posts on daily.dev

- [Your JSON Is Valid but Your Data Is Wrong: Five Failure Modes LLM Structured Outputs Won't Catch](https://daily.dev/posts/your-json-is-valid-but-your-data-is-wrong-five-failure-modes-llm-structured-outputs-won-t-catch-ilmoiq1ob) · Towards Data Science · 1 upvotes · 1 comments
- [LLM Structured Output with JSON Schema in TypeScript](https://daily.dev/posts/llm-structured-output-with-json-schema-in-typescript-wj1wernyh) · SitePoint · 5 upvotes · 2 comments
- [Your LLM Can Return Perfect JSON and Still Be Wrong](https://daily.dev/posts/your-llm-can-return-perfect-json-and-still-be-wrong-o3ogkexgv) · Towards Data Science · 1 upvotes · 0 comments
- [Structured Output Reliability at Scale: When JSON Schema Validity Breaks Down Under Concurrency](https://daily.dev/posts/structured-output-reliability-at-scale-when-json-schema-validity-breaks-down-under-concurrency-vhkoljwe3) · DigitalOcean Community · 1 upvotes · 0 comments
- [LLM Tool Use in Production: Why Function Calling Is Harder Than It Looks](https://daily.dev/posts/llm-tool-use-in-production-why-function-calling-is-harder-than-it-looks-xb9hyjcyp) · Medium · 0 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript), [#anthropic](https://daily.dev/tags/anthropic), [#zod](https://daily.dev/tags/zod)

[View this post on daily.dev](https://daily.dev/posts/g8v7l2qd3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/g8v7l2qd3","headline":"LLM Structured Outputs Always Parse Now. They Can Still Be Wrong.","text":"Shared: LLM Structured Outputs Always Parse Now. They Can Still Be Wrong.","url":"https://daily.dev/posts/g8v7l2qd3","datePublished":"2026-11-15T12:19:23.263Z","dateModified":"2026-11-15T12:19:23.266Z","author":{"@type":"Person","name":"Petar Ivanov","url":"https://daily.dev/petarivanovv9","image":"https://media.daily.dev/image/upload/s--wKref-so--/f_auto,q_auto/v1703256469/avatars/avatar_7Gt6fIspQR8UFOCBJBaf3","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":2800}},"image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/cb5dvsrqS"},"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/ai","name":"AI"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"AI","item":"https://daily.dev/squads/ai"},{"@type":"ListItem","position":3,"name":"LLM Structured Outputs Always Parse Now. They Can Still Be Wrong."}]}
```

