Ma

Magentic – Use LLMs as simple Python functions

Hacker News

Magentic – Use LLMs as simple Python functions

This is a Python package that allows you to write function signatures to define LLM queries. This makes it easy to mix regular code with calls to LLMs, which enables you to use the LLM for its creativity and reasoning while also enforcing structure/logic as necessary. LLM output is parsed for you according to the return type annotation of the function, including complex return types such as streaming an array of structured objects. I built this to show that we can think about using LLMs more fluidly than just chains and chats, i.e. more interchangeably with regular code, and to make it easy to do that. Please let me know what you think! Contributions welcome. https://github.com/jackmpcollins/magentic

Share card

Actual performance

283points
63comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: agent, agentic, using · Missing: mac, agents, macos
78%78% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: including · Missing: supports, reddit linkedin, podcasting
70%70% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: io, including · Missing: https docs, excited, just released
68%68% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoStrong fit for a featured deal · Strong signals: calls · Missing: plus, platform, intuitive
57%57% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
46%46% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: arr · Missing: mrr, revenue, profit
13%13% 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.

Correct prediction on native model

Similar products

Ho
How Not to Use Python52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

How Not to Use Python

Hacker News5
Sl
Slog, a simple logger for Python49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Slog, a simple logger for Python

Hacker News1
A
A Simple Nonlinear Autoencoder in Python51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Simple Nonlinear Autoencoder in Python

Hacker News4
Op
OpenCV Wrapper – A simple wrapper for opencv-Python36%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

OpenCV Wrapper – A simple wrapper for opencv-Python

Hacker News6
Ld
Ldapper – A simple, ergonomic Python ORM for interacting with LDAP64%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Ldapper – A simple, ergonomic Python ORM for interacting with LDAP

Hacker News9
Si
Simple Brainfuck Interpreter in Python77%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Simple Brainfuck Interpreter in Python

Hacker News1
Si
Simple text classification with python46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Simple text classification with python

Hacker News2
A
A simple Python abstraction for Llama2 Chat51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A simple Python abstraction for Llama2 Chat

Hacker News2
Sh
Show HN A simple script to use pug with any Python framework48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Show HN A simple script to use pug with any Python framework

Hacker News11
Us
Use libsqlite3 directly from Python with ctypes56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Use libsqlite3 directly from Python with ctypes

Hacker News5