Fructose – LLM calls as strongly typed functions
Hi HN! Erik here from Banana (formerly the serverless GPU platform), excited to show you what we’ve been working on next: Fructose Fructose is a python package to call LLMs as strongly typed functions. It uses function type signatures to guide the generation and guarantee a correctly typed output, in whatever basic/complex python datatype requested. By guaranteeing output structure, we believe this will enable more complex applications to be built, interweaving code with LLMs with code. For now, we’ve shipped Fructose as a client-only library simply calling gpt-4 (by default) with json…
Fructose – LLM calls as strongly typed functions launched on March 6, 2024 with 218 votes, #216 of 4,270 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 2 years on.
In plain words
Fructose is a Python package that enables developers to call large language models as strongly typed functions. It uses function type signatures to guarantee that LLM outputs match requested data structures, whether simple or complex Python types. Currently working with GPT-4 via JSON mode, Fructose aims to make it easier to build complex applications that integrate LLM calls seamlessly with traditional code logic.
written from the facts on this page · September 2026
From the sources
Contribute to bananaml/fructose development by creating an account on GitHub.
In the maker’s words, at launch
Hi HN! Erik here from Banana (formerly the serverless GPU platform), excited to show you what we’ve been working on next: Fructose Fructose is a python package to call LLMs as strongly typed functions. It uses function type signatures to guide the generation and guarantee a correctly typed output, in whatever…
Does a similar job
all alternatives →
Magentic – Use LLMs as simple Python functions2023 · github.com · ▲283This 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…
LLMs can generate valid JSON 100% of the time2023 · github.com · ▲854Outlines is a Python library that focuses on text generation with large language models. Brandon and I are not LLM experts and started the project a few months ago because we wanted to understand better how the generation process works. Our original background is probabilistic, relational and symbolic programming. Recently we came up with a fast way to generate text that matches a regex (https://blog.normalcomputing.ai/posts/2023-07-27-regex-guide...). The basic idea is simple: regular expressions have an equivalent Deterministic-Finite Automaton (DFA) representation. We…
- ATAnything To JSON – a language model for structured extraction2024 · anythingtojson.com · ▲18
Hey HN! Erik here from banana.dev We’ve trained a small(ish) language model on structured extraction, and today we’re launching a playground for it at https://anythingtojson.com. Give it a try! This model continues our work on structured generation, following last week’s launch of Fructose[1], a python client for strongly-typed LLM responses. There seem to be two distinct halves of the problem intended to be solved by Fructose and structured generation: 1. the reasoning ability of the model, such as performing chain of thought, creative acts, and natural language tasks. In a way,…
GPT-JSON – Structured and typehinted GPT responses in Python2023 · github.com · ▲174Hey HN, I've been using GPT a lot lately in some side projects around data generation and benchmarking. During the course of prompt tuning I ended up with a pretty complicated request: the value that I was looking for, an explanation, a criticism, etc. JSON was the most natural output format for this but results would often be broken, have wrong types, or contain missing fields. There's been some positive movement in this space, like with jsonformer (https://github.com/1rgs/jsonformer) the other day. But nothing that was plug and play with GPT. This library consolidates…
MonkeyPatch – Cheap, fast and predictable LLM functions in Python2023 · github.com · ▲95Hi 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…
Python library for functional programming2017 · github.com · ▲129Python library for creating data pipelines with chain functional programming - EntilZha/PyFunctional
More ai this month
the category →



Paintings by AI models: programs run through a simulation of oil paint.
AI · 20d ago · stillwet.art

PixVerse R2▲381A real-time world model you can explore and change
AI · 28d ago · world.pixverse.video
Source: Show HN post ↗ · launch text quoted in part
Launched alongside, March 2024
the whole month →

🌐 The Internet Computer! Free, Open-Source, and Self-Hostable. - HeyPuter/puter
Dev tools · 2024 · github.com
Microlaunch▲1,115Launch and get feedback on both the idea and product
Dev tools · 2024 · microlaunch.net


