Live data from Hacker News

Show HN: Fructose – LLM calls as strongly typed functions

github.com

11–20 of 105 posts

Re: Show HN: Fructose – LLM calls as strongly typed functions

#11
TGI just integrated Guidance in 1.4.3, that by itself can support both grammar/JSON/Pydantic & tool invocation/function calling.

Langchain & Llamaindex plus Fructose really need to skip the structure adherence work & move to chunking/KG generation since that's the next pain point to tackle.

Re: Show HN: Fructose – LLM calls as strongly typed functions

#12
post #8

I've done a lot of work over the last year wrangling LLM outputs - both from the OpenAI API as well as local LLMs. What are the benefits of using Fructose over LMQL, Guidance or OpenAI's function calling?

Still learning about the landscape so can't give informed opinions. LMQL is a new one for me, will check it out.

What we're mostly going for is composability vs abstraction. What's the smallest nugget of lift we can do for you, to make it feel natural to implement what you want? In this case it's treating the calls as functions and leaning on native python features like functions, docstrings, and types, so you can still use the python language like closures to do the weird things you need.

This is all handwavy, put on my wizard language design hat, so take it with a grain of salt. We're just trying things out.

Re: Show HN: Fructose – LLM calls as strongly typed functions

#17

TGI just integrated Guidance in 1.4.3, that by itself can support both grammar/JSON/Pydantic & tool invocation/function calling. Langchain & Llamaindex plus Fructose really need to skip the structure adherence work & move to chunking/KG generation since that's the next pain point to tackle.

What is TGI? Is that the huggingface Text Generation Inference project on GitHub?

Re: Show HN: Fructose – LLM calls as strongly typed functions

#18

Very Cool! Would it work for Pydantic out of the box? Or that's something coming along?

currently don't have pydantic support yet, but we're not too opinionated on that. I know it's seemed to emerge as a standard, and I imagine useful in the context of running fructose in a FastAPI handler, but we led with dataclasses because they're language native and achieve much of the same thing

Re: Show HN: Fructose – LLM calls as strongly typed functions

#19
Since you are going down this route, I would recommend you guys to build some sort of unit test driven fine tuning framework, where you may provide input output examples expressed as simple function calls. You could then let the LLM generate examples and check them using the unit tests and keep the valid results to build up a valid data set. For bonus points, the unit tests themselves could also call the LLM to check if the output passes criteria expressed in natural language or not.

Re: Show HN: Fructose – LLM calls as strongly typed functions

#20
post #2

I love the concept, but I'd really prefer being able to use it against local llms (localai, ollama, etc).

Seems like a great feature (and honestly allows us to do smarter things for strictly structured generation). I'm curious, what's your main motivation for local llms vs hosted APIs?

I'm pretty sure the primary reason is that you don't want an update of the hosted LLM to suddenly break your application without warning.
Post reply on HN