frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Structured Outputs on the Claude Developer Platform (API)

https://www.claude.com/blog/structured-outputs-on-the-claude-developer-platform
15•adocomplete•1h ago

Comments

barefootford•47m ago
I switched from structured outputs on OpenAI apis to unstructured on Claude (haiku 4.5) and haven't had any issues (yet). But guarantees are always nice.
jascha_eng•31m ago
I feel like this is so core to any LLM automation it was crazy that anthropic is only adding it now.

I built a customized deep research internally earlier this year that is made up of multiple "agentic" steps, each focusing on specific information to find. And the outputs of those steps are always in json and then the input for the next step. Sure you can work you way around failures by doing retries but its just one less thing to think about if you can guarantee that the random LLM output adheres at least to some sort of structure.

sails•18m ago
Agree, it feels so fundamental. Any idea why? Gemini has also had it for a long time
veonik•12m ago
I have had fairly bad luck specifying the JSONSchema for my structured outputs with Gemini. It seems like describing the schema with natural language descriptions works much better, though I do admit to needing that retry hack at times. Do you have any tips on getting the most out of a schema definition?
simonw•3m ago
Prior to this it was possible to get the same effect by defining a tool with the schema that you wanted and then telling the Anthropic API to always use that tool.

I implemented structured outputs for Claude that way here: https://github.com/simonw/llm-anthropic/blob/500d277e9b4bec6...

mkagenius•27m ago
I always wondered how they achieved this - is it just retries while generating tokens and as soon as they find mismatch - they retry? Or the model itself is trained extremely well in this version of 4.5?
Kuinox•24m ago
The inference doesn't return a single token, but the probably for all tokens. You just select the token that is allowed according to the compiler.
simonw•2m ago
They're using the same trick OpenAI have been using for a while: they compile a grammar and then have that running as part of token inference, such that only tokens that fit the grammar are selected as the next-token.

This trick has also been in llama.cpp for a couple of years: https://til.simonwillison.net/llms/llama-cpp-python-grammars

jmathai•6m ago
I remember using Claude and including the start of the expected JSON output in the request to get the remainder in the response. I couldn't believe that was an actual recommendation from the company to get structured responses.

Like, you'd end your prompt like this: 'Provide the response in JSON: {"data":'

luke_walsh•5m ago
makes sense

All of My Employees Are AI Agents, and So Are My Executives

https://www.wired.com/story/all-my-employees-are-ai-agents-so-are-my-executives/
1•MattGrommes•1m ago•0 comments

Management Lessons Learned from Playing Factorio

https://weitz.blog/p/factorio-management-lessons
1•konne88•4m ago•0 comments

Houston, We Have a Problem: Anthropic Rides an Artificial Wave – BIML

https://berryvilleiml.com/2025/11/14/houston-we-have-a-problem-anthropic-rides-an-artificial-wave/
1•cratermoon•5m ago•0 comments

National security swallowed the Earth observation industry

https://www.fastcompany.com/91420453/maxar-vantor-ukraine-russia-intelligence-satellite
1•johnshades•6m ago•0 comments

Quantum computing: too much to handle

https://scottaaronson.blog/?p=9325
1•fuglede_•7m ago•0 comments

Ancient Hebrew Slaves Didn't Build the Giza Pyramids

https://www.juancole.com/2025/11/ancient-hebrew-pyramids.html
1•speckx•8m ago•0 comments

Pope Leo calls for academic excellence in the church

https://www.usccb.org/resources/pope-leo-calls-academic-excellence-church
2•lordleft•9m ago•0 comments

Exploring AI with Groovy

https://groovy.apache.org/blog/groovy-ai
2•andrewstetsenko•11m ago•0 comments

The New 2025 OWASP Top Ten

https://owasp.org/Top10/2025/0x00_2025-Introduction/
2•shehackspurple•15m ago•0 comments

All Praise to the Lunch Ladies

https://bittersoutherner.com/issue-no-12/all-praise-to-the-lunch-ladies
3•gmays•16m ago•0 comments

What's the difference between an artist and a creator?

https://www.ystrickler.com/whats-the-difference-between-an-artist-and-a-creator/
1•NaOH•17m ago•0 comments

Dredger-IoT: Ruby at the Edge – Open-Source Industrial Telemetry

https://dominickm.com/dredger-iot-ruby-at-the-edge-open-source-industrial-telemetry/
1•Kerrick•17m ago•0 comments

Why Your Audiobook Habit Might Be Sabotaging Deep Learning

https://zoia.org/posts/why-your-audiobook-habit-might-be-sabotaging-deep-learning/
1•freediver•19m ago•0 comments

I wont work for Google,Twitter, or Facebook (meta) (2011)

https://naildrivin5.com/blog/2011/08/01/why-i-wont-work-for-google-twitter-facebook.html
6•dzonga•20m ago•2 comments

Show HN: Epstein Files Organized and Searchable

https://searchepsteinfiles.com/
2•searchepstein•21m ago•0 comments

Show HN: Ouverture.py – Content-addressed storage for multilingual functions

https://github.com/amirouche/ouverture.py
1•amirouche•22m ago•0 comments

Upwork warned me to stop using browser extensions

https://chromewebstore.google.com/detail/upwork-search-enhancement/pgpkjpoepjjbamidgffmedelnpiiinkk
3•riamuu•23m ago•2 comments

Better pre-commit, re-engineered in Rust

https://prek.j178.dev/
1•nikolay•25m ago•1 comments

The Push for Better Evidence on Microplastics and Health

https://www.medscape.com/viewarticle/push-better-evidence-microplastics-and-health-2025a1000vbd
1•wjb3•26m ago•0 comments

An Italian Company Builds the First Known Propellantless Space-Propulsion System

https://www.satcom.digital/news/genergo-an-italian-company-builds-the-worlds-first-known-propella...
2•maremmano•28m ago•0 comments

"Learning how to learn" via distance running

https://the-nerve-blog.ghost.io/learning-from-running/
1•mprast•29m ago•0 comments

The Orgasm Cure

https://aeon.co/essays/delayed-orgasm-the-sexual-technique-thats-better-than-sex
2•Eridanus2•30m ago•1 comments

Show HN: Four Solutions to Valid Parenthesis (LeetCode #20)

https://medium.com/@mcsimpson/solving-leetcode-0020-valid-parentheses-in-four-different-ways-bf3c...
1•smatthewaf•31m ago•0 comments

Hermes – A self-hosted video downloader for 1000 sites

https://github.com/TechSquidTV/Hermes
2•handystudio•31m ago•1 comments

'GoldenEye' at 30

https://variety.com/2025/film/news/goldeneye-at-thirty-1236581765/
2•birriel•31m ago•0 comments

Is the Gut-Autism Hypothesis a 'Dead End'?

https://www.medscape.com/viewarticle/gut-autism-hypothesis-dead-end-2025a1000vjo
1•wjb3•32m ago•1 comments

Keeplinker – 1-click link saving with drag-drop collections and public sharing

https://keeplinker.com/
2•intotheabyss999•34m ago•0 comments

A Rigorous Approach to the Algorithmic Composition of Iannis Xenakis(2009) [pdf]

https://monoskop.org/images/3/38/Hoffmann_Peter_Music_Out_of_Nothing_A_Rigorous_Approach_to_Algor...
1•ofalkaed•35m ago•0 comments

StutterZero: Speech Conversion for Stuttering Transcription and Correction

https://arxiv.org/abs/2510.18938
1•internetguy•36m ago•0 comments

Lessons introductory to the modern higher algebra (1876)

https://archive.org/details/3rdedlessonintro00salmuoft
2•nigelvr•38m ago•0 comments