feelings
Probabilistic conditionals for Ruby.
A decision model answers a typed question about a value, with a calibrated probability attached to the answer. feelings lets a Ruby conditional ask one directly.
Feelings(email).like?("genuinely urgent")
Branch on the answer instead of a boolean:
Feelings(ticket).like("this customer is about to churn") do |mood|
mood.yes { escalate(ticket) }
mood.maybe { flag_for_review(ticket) }
mood.no { close(ticket) }
end
Or pick the closest match out of a small label set:
Feelings(support_message).most_like(:billing, :bug_report, :feature_request, :spam)
# => :bug_report
gem install feelings
The family
- ruby_decision_model: the provider-neutral client the other two sit on. It talks to Jev through OpenRouter or Typesafe's own API, and to any other decision model that ships. RubyGems
- decide: named policy decisions with floors, fail modes, and verdicts. RubyGems
- feelings: this gem, for the questions you would otherwise write as an
if. RubyGems
feelings is inspired by Probably, a small language for LLM workflows that showed what code reads like when an if can ask a decision model a question.