Mo

MonkeyPatch – Cheap, fast and predictable LLM functions in Python

Hacker News

MonkeyPatch – Cheap, fast and predictable LLM functions in Python

Hi HN, Jack here! I'm one of the creators of MonkeyPatch, an easy tool that helps you build LLM-powered functions and apps that get cheaper and faster the more you use them. For example, if you need to classify PDFs, extract product feedback from tweets, or auto-generate synthetic data, you can spin up an LLM-powered Python function in <5 minutes to power your application. Unlike existing LLM clients, these functions generate well-typed outputs with guardrails to mitigate unexpected behavior. After about 200-300 calls, these functions will begin to get cheaper and faster. We've seen 8-10x reduction in cost and latency in some use-cases! This happens via progressive knowledge distillation - MonkeyPatch incrementally fine-tunes smaller, cheaper models in the background, tests them against the constraints defined by the developer, and retains the smallest model that meets accuracy requirements, which typically has significantly lower costs and latency. As an LLM researcher, I kept getting asked by startups and friends to build specific LLM features that they could embed into their applications. I realized that most developers have to either 1) use existing low-level LLM clients (GPT4/Claude), which can be unreliable, untyped, and pricey, or 2) pore through LangChain documentation for days to build something. We built MonkeyPatch to make it easy for developers to inject LLM-powered functions into their code and create tests to ensure they behave as intended. Our goal is to help developers easily build apps and functions without worrying about reliability, cost, and latency, while following best software engineering practices. We're only available in Python currently but actively working on a Typescript version. The repo has all the instructions you need to get up and running in a few minutes. The world of LLMs is changing by the day and so we're not 100% sure how MonkeyPatch will evolve. For now, I'm just excited to share what we've been working on with the HN community. Would love to know what you guys think! Open-source repo: https://github.com/monkeypatch/monkeypatch.py Sample use-cases: https://github.com/monkeypatch/monkeypatch.py/tree/master/ex... Benchmarks: https://github.com/monkeypatch/monkeypatch.py#scaling-and-fi...

Share card

Actual performance

95points
71comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
91%91% 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.
Product HuntOn track for Day 1 leaderboard · Strong signals: claude, model, apps · Missing: mac, agents, macos
88%88% predicted probability of success on Product Hunt, 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
74%74% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: apps · Missing: mobile apps, ios, personal
46%46% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: calls · Missing: plus, platform, intuitive
40%40% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: active · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · 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 Python module to steer LLM outputs43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Python module to steer LLM outputs

Hacker News2
Fa
Fast suffix arrays in Python61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fast suffix arrays in Python

Hacker News72
jp
jpegtran-cffi: Fast JPEG transformations with Python68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

jpegtran-cffi: Fast JPEG transformations with Python

Hacker News1
IC
ICortex: LLM Powered Python Interpreter55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

ICortex: LLM Powered Python Interpreter

Hacker News8
Pl
PlotAI – Create Plots in Python and Matplotlib with LLM53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PlotAI – Create Plots in Python and Matplotlib with LLM

Hacker News51
Cr
Crammut. Learn anything fast and cheap62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Crammut. Learn anything fast and cheap

Hacker News4
Ll
Llm.f90 fast, hackable transformer implementation in Fortran52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Llm.f90 fast, hackable transformer implementation in Fortran

Hacker News6
Fa
Fast and robust Auto Arima in Python39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fast and robust Auto Arima in Python

Hacker News2
Cu
CustomStringParser ( Python)54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CustomStringParser ( Python)

Hacker News1
Do
Do/While in Python55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Do/While in Python

Hacker News4