Skip to content

Gut

Elixir DSL (Gut.feel) that picks an Elixir value for a subject and question, with a Jev evaluation adapter among LLM options.

Projectbeta

Overview

Gut is a simple DSL for LLM decisions in Elixir. Gut.feel(subject, question, choices) picks one of the given choices, each with a description, and returns it as an Elixir value, for example routing a double-charge ticket to :billing. No agent framework is required.

Adapters connect Gut to a decision system. One option is Gut.ReqLLM.Jev, which uses a Jev evaluation model through ReqLLM with a TypeSafe key; others use any ReqLLM-supported model such as Claude Haiku, or local models through Ollama with no key; and custom adapters can be written. It is published on Hex. Gut passes the subject, question and choices to the adapter, which returns the ID of the selected choice, and Gut maps it back to the Elixir value; with the generic ReqLLM adapter, extra options pass through to text generation.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich team should handle this?billing · technical · other

How it works

  1. Add gut and req_llm to mix.exs
  2. Configure an adapter (Jev, other LLM, Ollama or custom)
  3. Call Gut.feel with subject, question and choices
  4. Pattern match on the returned value

Strengths

  • Tiny, idiomatic Elixir API
  • Swappable adapters including Jev
  • Local option via Ollama

Caveats

  • Early version (0.1)
  • LLM adapters return choices without Jev's calibrated probabilities

Getting started

Add {:gut, "~> 0.1.0"} and {:req_llm, "~> 1.24"} to deps, configure Gut.ReqLLM.Jev with TYPESAFE_API_KEY, then call Gut.feel/3.

At a glance

Type
Project
Status
beta
Language
Elixir
Runtime
library
Has code
yes

Use cases and integrations

How curated lists describe it

  • Elixir DSL that picks an Elixir value for a subject and a question, with a Jev backend among the LLM ones. On Hex.

    MrJev/awesome-jev

Frequently asked questions

What does Gut.feel return?

One of the provided choices as an Elixir value, e.g. {:ok, :billing}.

Can I use Jev?

Yes, through the Gut.ReqLLM.Jev adapter.

Can it run locally?

Yes, with Ollama via Gut.ReqLLM.

Related projects

  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython
  • Go integration bringing TypeSafe Choice, Score and Noul to Google's adk-go agents, with a typed client, routing agent and callbacks.

    ProjectbetaGo
  • Ruby gem for probabilistic conditionals like Feelings(msg).like?("urgent"), answered by Jev or other decision models.

    ProjectbetaRuby
  • Rust CLI and library that asks Jev typed questions via OpenRouter and combines the probabilities with fuzzy-logic rules into decisions.

    CLIbetaRust
  • Independent OpenClaw plugin exposing one explicitly invoked typesafe_decide tool that sends supplied state and typed questions to Jev.

    HookbetaTypeScript
  • Minimal Pi extension and TypeScript client registering a jev_evaluate tool for noul, choice and score across five Jev platforms.

    ProjectbetaTypeScript