vinibrl
Hi everyone ![]()
I released Gut 0.1.0. I wanted a small API for places where an application needs a concrete value, but the input needs subjective judgment. Gut asks an LLM to choose from a fixed set of options, then maps the answer back to the original Elixir value.
For example, you can route a support ticket:
Gut.feel(ticket, "Which team should handle this?",
billing: "Payments, invoices, and refunds",
technical: "Product defects and access problems",
other: "Anything else"
)
#=> {:ok, :billing}
Other examples include classifying sentiment:
Gut.feel(review, "What is the sentiment?", [:positive, :neutral, :negative])
#=> {:ok, :positive}
Scoring urgency or severity:
Gut.feel(messages, "How frustrated is the customer?", 1..5)
#=> {:ok, 4}
Or making a bounded yes-or-no decision:
Gut.feel(report, "Does this need manual review?", [true, false])
#=> {:ok, true}
Gut has a dedicated adapter for Jev, which is a good fit for this kind of evaluation:
config :gut,
adapter: {Gut.ReqLLM.Jev, model: "typesafe:jev-latest"}
It is not limited to Jev. You can use any model supported by ReqLLM:
config :gut,
adapter: {Gut.ReqLLM, model: "anthropic:claude-haiku-4-5"}
You can also implement Gut.Adapter to use another provider or evaluation system.
Link to the full source on GitHub:
I would appreciate feedback on the API and any use cases where this could help.
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #ai
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










