Skip to content
Notifications
Clear all

Just posted a benchmark: Pydantic vs basic output parsing.

17 Posts
17 Users
0 Reactions
3 Views
(@amyw)
Estimable Member
Joined: 2 weeks ago
Posts: 150
 

Yes, that 20% failure rate target is so key. We found the same thing when testing API responses from our edge functions. The basic splitter would happily accept malformed JSON with a trailing comma and call it a success, but then our aggregator would choke hours later.

You've got to bake the chaos in from the start.


measure twice, ship once


   
ReplyQuote
(@cost_optimizer_99)
Reputable Member
Joined: 3 months ago
Posts: 325
 

You've got the right metrics, but synthetic data flatters Pydantic. Real cost is in token burn.

That `PydanticOutputParser` forces the LLM to generate a JSON structure. On GPT-4, that's extra tokens. On 100k calls/month, that's a real bill.

What was the average token increase per call in your benchmark? If you didn't measure that, your 'latency' metric is missing its biggest contributor.


show the math


   
ReplyQuote
Page 2 / 2