Fructose

AI

llm function calling library

SHOW HN2024

218points
99comments
#355of 3,515 in 2024
Top 11%of 2024 by points

How HN took it

CuriousMostly questions and neutral comments

4 positive, 22 neutral or asking, 1 mixed, 11 critical, out of 38 comments about the project. Thread score -0.16.

Idea: 2 for, 8 againstDesign: 2 for, 2 againstExecution: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Clean, neat aesthetics of the API

    From 1 comment
    • This is much nicer than calling GPT in the middle of my code. Honestly the aesthetics of Fructose just make the code so much neater
      AmanKishore on HN
  • Functional programming feel fits generative programming

    From 2 comments
    • Yeah, functional programming and pure functions seem perfect for generative programming. Granted, I think they're perfect in general, but as long as human programmers are still…
      ravenstine on HN
    • yeah I had a moment working with fructose where I realized "oh this is more like functional programming than I expected"
      edunteman on HN

Objections

  • Too similar to Marvin and other existing libraries

    From 3 comments
    • > not unlike other packages such as marvin This feels pretty much identical to Marvin? Like the entire API? From a genuine place of curiosity: I get that your prompts are…
      itfollowsthen on HN
    • yeah this seems to be pretty much the same interface as `fn` from marvin, except w/o pydantic (see…
      nate_nowack on HN
    • Wait. So why not just contribute to an existing open source project if you’re going to implement an identical API? If you run your own models as a part of it, surely you could…
      lefttoreader on HN
  • Relies on prompt-and-parse JSON rather than native function calling or grammar constraints

    From 2 comments
    • This approach may be too high-level "magic" to the point of being difficult to work with and iterate upon. Looking at the prompt templates…
      minimaxir on HN
    • Big proponent of guaranteed outputs for LLMs. I wrote a library awhile back (gpt-json) that did something similar by querying the OpenAI API. At the end of the day though while…
      icyfox on HN
  • Output structure not guaranteed; parse failures throw exceptions

    From 1 comment
    • It's not 100% yet. Route to that: 1. Clientside, retry strategy on failed parse. Not yet implemented, we throw an exception on parse fail right now, but soon to be implemented.…
      edunteman on HN
  • Only works with OpenAI models despite LLM framing

    From 1 comment
    • I find it grating that all of these types of things say "LLMs" when in fact they literally only work with OpenAI. There are hundreds of variations of LLM models. When it works…
      ilaksh on HN

Requests

  • Support for local LLMs like Ollama and LocalAI

    From 2 comments
    • I love the concept, but I'd really prefer being able to use it against local llms (localai, ollama, etc).
      jsight on HN
    • fyi: LM Studio can host a server that uses the OpenAI api to whatever model you are using locally So as long as this library can be directed to localhost or configured, it can…
      yieldcrv on HN
  • Support for Claude, Llama2 and other models

    From 1 comment
  • Pydantic support

    From 1 comment
    • Very Cool! Would it work for Pydantic out of the box? Or that's something coming along?
      jonathan-adly on HN

Questions

  • How does it compare to Instructor, Marvin, Outlines, LMQL, Guidance

    From 3 comments
    • How does Fructose relate or compare to Instructor (https://github.com/jxnl/instructor)?
      hedgehog on HN
    • 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…
      biddit on HN
    • Obvious question - how is this better than marvin, instructor, outlines.
      justanotheratom on HN
  • Why not contribute to existing open source projects instead

    From 2 comments
    • > not unlike other packages such as marvin This feels pretty much identical to Marvin? Like the entire API? From a genuine place of curiosity: I get that your prompts are…
      itfollowsthen on HN
    • Wait. So why not just contribute to an existing open source project if you’re going to implement an identical API? If you run your own models as a part of it, surely you could…
      lefttoreader on HN

Alternatives named

  • Instructor

    From 2 comments
    • Good stuff. How does this compare to Instructor? I’ve been using this extensively https://jxnl.github.io/instructor/
      mattew on HN
    • How does Fructose relate or compare to Instructor (https://github.com/jxnl/instructor)?
      hedgehog on HN
  • Marvin

    From 2 comments
    • > not unlike other packages such as marvin This feels pretty much identical to Marvin? Like the entire API? From a genuine place of curiosity: I get that your prompts are…
      itfollowsthen on HN
    • yeah this seems to be pretty much the same interface as `fn` from marvin, except w/o pydantic (see…
      nate_nowack on HN
  • Outlines

    From 1 comment
    • This approach may be too high-level "magic" to the point of being difficult to work with and iterate upon. Looking at the prompt templates…
      minimaxir on HN
  • LMQL

    From 1 comment
    • 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…
      biddit on HN
  • Guidance

    From 1 comment
    • 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…
      iAkashPaul on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/39619053)