Live data from Hacker News

Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

github.com

31–40 of 74 posts

Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

#31
post #26

Earlier quoted context omitted.

(As I understand it) monkey-patch means to modify code in runtime. I thought the naming was relevant because by adding ‘@monkey.patch’ to an unimplemented function, this library gives it an implementation at runtime.

I feel like you're hijacking a term at least 15 to maybe 20 years old though. It's kind of a brilliant marketing idea, but you're just confounding the vocabulary. It's not to say this isn't a fucking great idea (because it is!). But you know, just don't piss in the community well. Further, PostgreSQL means one and only one thing. But Monkey Patch means 2 now, apparently! For reference: Here's the google ngram viewer…

The specific package name on GitHub and PyPi is ‘monkeypatch.py’ for the avoidance of doubt!

Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

#32

MonkeyPatch is a specific programming term that people have been using for decades. What would posses someone to name a programming tool "MonkeyPatch" when the tool doesn't even have something to do with patching?

Monkeypatch (as I understand it) means to modify code at runtime. This library modifies functions at runtime to use an LLM as an execution target - I thought it was an apt (if admittedly cheeky) name! Appreciate the critique regardless.

The package is called ‘monkeypatch.py’ on GitHub and PyPi.

Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

#36

Where in the codebase are you performing the distillation process?

Check out the ‘function_modeler’. Currently it’s OpenAI only, but local models are on the immediate roadmap.

https://github.com/monkeypatch/monkeypatch.py/blob/master/sr...

Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

#38

Hey Jack! Thanks for sharing this. The incremental fine-tuning of smaller and cheaper models for cost reduction is definitely a really interesting differentiator. I had a few questions regarding the reliability of the LLM-powered functions MonkeyPatch facilitates and the testing process. How does MonkeyPatch ensure the reliability of LLM-powered functions it helps developers create, and do the tests employed provide…

Heya, no worries - I’m glad to share it.

MonkeyPatch ensures reliability through what we call ‘test-driven alignment’, in which the tests that reference the patched functions are guaranteed to pass. The more align ‘tests’ you create, the more rigorous a contract that the functions have to fulfil.

The other way to increase consistency is using more constrained type annotations (i.e using pydantic field annotations), which is a similar concept to MarvinAI and Magentic.

Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

#39
post #37

This is like calling a python package "ListComprehension", that loops through a list and calls OpenAI's API on each item. Confusing and unproductive.

The python package (and repo) is called ‘monkeypatch.py’ for the avoidance of confusion.
Post reply on HN