St

Structed LLM outputs via Pydantic with struct-GPT

Hacker News

Structed LLM outputs via Pydantic with struct-GPT

Hey everyone, So, I stumbled upon this really cool idea of using Pydantic to deserialize and validate OpenAI's outputs over on this HN thread https://news.ycombinator.com/item?id=35821748 . It got me thinking about how I'd like a slightly tweaked API to better fit my own needs. I also found some neat stuff in jiggy-ai's Pydantic implementation for chat completion https://github.com/jiggy-ai/pydantic-chatcompletion/blob/mas... , and picked up tips from various blog posts and comments on how to up the game with the quality of a model's output by providing examples. So, I cooked up this library - just about 100 lines of code, but it's got some nice features and it's fully tested. I hope some of you find it useful. I'd love to hear your thoughts and feedback. Cheers!

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
75%75% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: ide, io · Missing: https docs, excited, just released
69%69% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntOn track for Day 1 leaderboard · Strong signals: model, new, openai · Missing: mac, agents, macos
66%66% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
42%42% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
41%41% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
12%12% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: chat · Missing: web3, crypto, cryptocurrency
1%1% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

LL
LLM OSINT, letting GPT-4 Google about you46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

LLM OSINT, letting GPT-4 Google about you

Hacker News1
Ne
New LLM outperforming GPT-3.552%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

New LLM outperforming GPT-3.5

Hacker News6
Wo
Worldbuilding Experiments with GPT-336%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Worldbuilding Experiments with GPT-3

Hacker News2
Au
Autosummarized HN (With GPT-3)51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Autosummarized HN (With GPT-3)

Hacker News6
I
I composed a sonata with GPT-3 DaVinci-003 and you can too51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I composed a sonata with GPT-3 DaVinci-003 and you can too

Hacker News3
GP
GPT Classifies HN Titles57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

GPT Classifies HN Titles

Hacker News6
Vi
Visualized GPT57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Visualized GPT

Hacker News3
Ce
Cerebras-GPT-2.7B finetuned on Stanford Alpaca dataset65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cerebras-GPT-2.7B finetuned on Stanford Alpaca dataset

Hacker News4
Ho
Hostage Negotiation with GPT-446%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Hostage Negotiation with GPT-4

Hacker News2
Ro
Roleplaying GPT40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Roleplaying GPT

Hacker News3