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
17•adocomplete•1h ago

Comments

barefootford•56m 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•40m 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•27m ago
Agree, it feels so fundamental. Any idea why? Gemini has also had it for a long time
veonik•21m 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•12m 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•36m 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•33m 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.
mkagenius•5m ago
Hmm, wouldn't it sacrifice a better answer in some cases (not sure how many though)?

I'll be surprised if they hadn't specifically trained for structured "correct" output for this, in addition to picking next token following the structure.

simonw•11m 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•15m 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•14m ago
makes sense

AI World Clocks

https://clocks.brianmoore.com/
187•waxpancake•1h ago•112 comments

A race condition in Aurora RDS

https://hightouch.com/blog/uncovering-a-race-condition-in-aurora-rds
108•theanomaly•2h ago•38 comments

Manganese is Lyme disease's double-edge sword

https://news.northwestern.edu/stories/2025/11/manganese-is-lyme-diseases-double-edge-sword
77•gmays•3h ago•16 comments

The disguised return of EU Chat Control

https://reclaimthenet.org/the-disguised-return-of-the-eus-private-message-scanning-plot
243•egorfine•2h ago•125 comments

Show HN: Tiny Diffusion – A character-level text diffusion model from scratch

https://github.com/nathan-barry/tiny-diffusion
29•nathan-barry•4d ago•4 comments

Minisforum Stuffs Entire Arm Homelab in the MS-R1

https://www.jeffgeerling.com/blog/2025/minisforum-stuffs-entire-arm-homelab-ms-r1
24•kencausey•1h ago•16 comments

Structured Outputs on the Claude Developer Platform (API)

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

Awk Technical Notes (2023)

https://maximullaris.com/awk_tech_notes.html
34•signa11•1w ago•5 comments

Bitchat for Gaza – messaging without internet

https://updates.techforpalestine.org/bitchat-for-gaza-messaging-without-internet/
164•ciconia•2h ago•70 comments

Incus-OS: Immutable Linux OS to run Incus as a hypervisor

https://linuxcontainers.org/incus-os/
114•_kb•1w ago•38 comments

US Tech Market Treemap

https://caplocus.com/
46•gwintrob•3h ago•18 comments

AGI fantasy is a blocker to actual engineering

https://www.tomwphillips.co.uk/2025/11/agi-fantasy-is-a-blocker-to-actual-engineering/
458•tomwphillips•6h ago•429 comments

RetailReady (YC W24) Is Hiring

https://www.ycombinator.com/companies/retailready/jobs/kGHAith-support-engineer
1•sarah74•3h ago

Meeting notes between Forgejo and the Dutch government via Git commits

https://codeberg.org/forgejo/sustainability/pulls/137/files
71•speckx•2h ago•28 comments

Honda: 2 years of ml vs 1 month of prompting - heres what we learned

https://www.levs.fyi/blog/2-years-of-ml-vs-1-month-of-prompting/
243•Ostatnigrosh•4d ago•88 comments

GPG and Me (2015)

https://moxie.org/2015/02/24/gpg-and-me.html
11•cl3misch•3d ago•1 comments

Magit manuals are available online again

https://github.com/magit/magit/issues/5472
94•vetronauta•8h ago•34 comments

Show HN: Chirp – Local Windows dictation with ParakeetV3 no executable required

https://github.com/Whamp/chirp
7•whamp•1h ago•2 comments

Germany to ban Huawei from future 6G network

https://www.bloomberg.com/news/articles/2025-11-13/germany-to-ban-huawei-from-future-6g-network-i...
105•teleforce•3h ago•83 comments

Winamp clone in Swift for macOS

https://github.com/mgreenwood1001/winamp
122•hyperbole•7h ago•93 comments

Linear Algebra Explains Why Some Words Are Effectively Untranslatable

https://aethermug.com/posts/linear-algebra-explains-why-some-words-are-effectively-untranslatable
74•mrcgnc•5h ago•52 comments

EDE: Small and Fast Desktop Environment (2014)

https://edeproject.org/
76•bradley_taunt•7h ago•30 comments

Operating Margins

https://fi-le.net/margin/
233•fi-le•5d ago•88 comments

Being poor vs. being broke

https://blog.ctms.me/posts/2025-11-14-being-poor-or-being-broke/
290•speckx•3h ago•321 comments

I think nobody wants AI in Firefox, Mozilla

https://manualdousuario.net/en/mozilla-firefox-window-ai/
1028•rpgbr•6h ago•632 comments

'No One Lives Forever' turns 25 and you still can't buy it legitimately

https://www.techdirt.com/2025/11/13/no-one-lives-forever-turns-25-you-still-cant-buy-it-legitimat...
103•speckx•3h ago•65 comments

Show HN: Dumbass Business Ideas

https://dumbassideas.com
15•elysionmind•2h ago•12 comments

Scientists Produce Powerhouse Pigment Behind Octopus Camouflage

https://today.ucsd.edu/story/scientists-produce-powerhouse-pigment-behind-octopus-camouflage
60•gmays•4d ago•5 comments

Nvidia is gearing up to sell servers instead of just GPUs and components

https://www.tomshardware.com/tech-industry/artificial-intelligence/jp-morgan-says-nvidia-is-geari...
150•giuliomagnifico•7h ago•64 comments

RegreSQL: Regression Testing for PostgreSQL Queries

https://boringsql.com/posts/regresql-testing-queries/
140•radimm•13h ago•31 comments