Magentic

Dev tools

python llm library

SHOW HN2023

283points
63comments
#165of 3,109 in 2023
Top 6%of 2023 by points

How HN took it

MixedNo clear lean

14 positive, 8 neutral or asking, 1 mixed, 4 critical, out of 27 comments about the project. Thread score +0.40.

Design: 9 for, 2 againstIdea: 4 for, 2 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, intuitive decorator-based API design

    From 4 comments
    • The API looks very clean. Today I learned about "..." in Python
      smilingemoji on HN
    • Really like how this is implemented with decorators. Everything just feels really smooth
      bogtog on HN
    • Just wanna say, that's pretty great API design :)
      pedrovhb on HN
    • Super cool! Looks quite intuitive, especially for function calls.
      retrovrv on HN
  • Fun examples and humor

    From 1 comment
    • This looks really useful. Langchain is not my idea of a fun time. Love the examples too. Low-effort humor is the best: > create_superhero("Garden Man") > # Superhero(name='Garden…
      jstarfish on HN
  • Useful for prototyping LLM logic in code

    From 2 comments
    • This is neat. It makes it easy to prototype, and then you can just remove the decorator and write a specific implementation if you need to.
      pphysch on HN
    • I am amazed that `...` is a valid syntax in Python, not a pseudo grammar. This library is impressive, I appreciate it and I will apply it to my project.
      hitori on HN

Objections

  • Only supports OpenAI-compatible chat models

    From 2 comments
  • Misuse of Ellipsis instead of pass in function bodies

    From 1 comment
    • It's a misuse of the Python Ellipsis, though PEP has no opinion on it. The Ellipsis is "Special value used mostly in conjunction with extended slicing syntax for user-defined…
      politelemon on HN
  • Framework may hinder chain-of-thought prompting

    From 1 comment
    • I've personally found frameworks like this to get in the way of quality COT: It's rare for a prompt that takes great advantage of the LLM's reasoning to fit in the format these…
      BoorishBears on HN

Requests

  • Support for other LLM backends

    From 2 comments
  • System prompt and chat message support

    From 1 comment
  • Few-shot examples in prompts

    From 1 comment
    • Awesome job with the simplicity, gonna play with it. Have you tried using yaml as the format with the models instead of JSOn? Feel like you'll use far fewer tokens to describe…
      ramraj07 on HN

Questions

  • Does it return actual code output or call OpenAI each time

    From 1 comment
    • Looks super cool! A few questions: 1) Can you get the actual code output or will this end up calling OpenAI each function call? 2) What latency does it add? What about token…
      conor_f on HN
  • Latency and token usage

    From 1 comment
    • Looks super cool! A few questions: 1) Can you get the actual code output or will this end up calling OpenAI each function call? 2) What latency does it add? What about token…
      conor_f on HN
  • Why a decorator instead of a function call

    From 1 comment
    • Curious as to why you chose to do it as a decorator instead of just a function call?
      jedberg on HN

Alternatives named

  • Marvin

    From 2 comments
    • Seems a lot like https://github.com/PrefectHQ/marvin? The prompting you do seems awfully similar to: https://www.askmarvin.ai/prompting/prompt_function/
      cosmonoot on HN
    • Are you familiar with https://github.com/PrefectHQ/marvin? This looks very similar
      bl00p on HN
  • Guidance

    From 2 comments
    • Looks great! I don't normally like these LLM libraries but this one sparks joy. I'll try it out on my next experiment. Could you highlight how you're parsing to structured…
      Difwif on HN
    • I tried out guidance. Encountered endless bugs
      AmazingTurtle on HN
  • LMQL

    From 1 comment
  • LocalAI

    From 1 comment
    • There's also LocalAI[0] which allows the use of local LLMs with an OpenAI compatible API. [0] https://github.com/go-skynet/LocalAI
      michaelmior 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/37661767)