{"by":"edunteman","descendants":99,"id":39619053,"kids":[39620062,39619533,39624066,39620241,39621318,39620221,39620015,39620749,39620566,39619485,39619684,39621612,39626701,39624479,39624693,39620313,39622631,39619444,39624954,39619568,39619798,39619468,39625368,39620248,39619783,39619499,39623659,39619879,39620710,39619796],"score":218,"text":"Hi HN! Erik here from Banana (formerly the serverless GPU platform), excited to show you what we’ve been working on next:<p>Fructose<p>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&#x2F;complex python datatype requested.<p>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 mode, pretty simple and not unlike other packages such as marvin and instructor, but we’re also working on our own lightweight formatting model that we’ll host and&#x2F;or distribute to the client, to help reduce token burn and increase accuracy.<p>We figure, no time like the present to show y’all what we’re working on! Questions, compliments, and roasts welcomed.","time":1709749062,"title":"Show HN: Fructose – LLM calls as strongly typed functions","type":"story","url":"https://github.com/bananaml/fructose"}