Ma

Marvin – build AI functions that use an LLM as a runtime

Hacker News

Marvin – build AI functions that use an LLM as a runtime

Hey HN! We're excited to share our new open-source project, Marvin. Marvin is a high-level library for building AI-powered software. We developed it to address the challenges of integrating LLMs into more traditional applications. One of the biggest issues is the fact that LLMs only deal with strings (and conversational strings at that), so using them to process structured data is especially difficult. Marvin introduces a new concept called AI Functions. These look and feel just like regular Python functions: you provide typed inputs, outputs, and docstrings. However, instead of relying on traditional source code, AI functions use LLMs like GPT-4 as a sort of “runtime” to generate outputs on-demand, based on the provided inputs and other details. The results are then parsed and converted back into native data types. This “functional prompt engineering” means you can seamlessly integrate AI functions with your existing codebase. You can chain them together with other functions to form sophisticated, AI-enabled pipelines. They’re particularly useful for tasks that are simple to describe yet challenging to code, such as entity extraction, semantic scraping, complex filtering, template-based data generation, and categorization. For example, you could extract terms from a contract as JSON, scrape websites for quotes that support an idea, or build a list of questions from a customer support request. All of these would yield structured data that you could immediately start to process. We initially created Marvin to tackle broad internal use cases in customer service and knowledge synthesis. AI Functions are just a piece of that, but have proven to be even more effective than we anticipated, and have quickly become one of our favorite features! We’re eager for you to try them out for yourself. We’d love to hear your thoughts, feedback, and any creative ways you could use Marvin in your own projects. Let’s discuss in the comments!

Share card

Actual performance

127points
44comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: new, tasks, using · Missing: mac, agents, macos
97%97% 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: created · Missing: supports, reddit linkedin, podcasting
89%89% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: excited, exist, existing · Missing: https docs, just released, lua
58%58% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
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.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
33%33% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
8%8% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: introduce · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

A
A container runtime implemented in x86_64 assembly55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A container runtime implemented in x86_64 assembly

Hacker News3
Su
Subverting Go's Runtime System47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Subverting Go's Runtime System

Hacker News2
To
Toggle Methods and Endpoints at Runtime48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Toggle Methods and Endpoints at Runtime

Hacker News2
Mi
Mixing C++ with Angelscript for runtime introspection and debugging59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Mixing C++ with Angelscript for runtime introspection and debugging

Hacker News1
Re
Restate, a Distributed Async Runtime55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Restate, a Distributed Async Runtime

Hacker News2
Ae
AegisBPF – Deterministic Runtime Enforcement via eBPF LSM35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AegisBPF – Deterministic Runtime Enforcement via eBPF LSM

Hacker News2
Ke
Kern – container and resource runtime in a 1.5 MB binary, no daemon43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kern – container and resource runtime in a 1.5 MB binary, no daemon

Hacker News70
Snack it
Snack it31%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Build AI moodboards from anything you see online 🍫

Product Hunt+293Chrome Extensions
Su
Sunlight, use an LLM to debias your content41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sunlight, use an LLM to debias your content

Hacker News5
Ca
Cadenya – An Agent Runtime34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Cadenya – An Agent Runtime

Hacker News1