Repository navigation
Home
This wiki holds the long form documentation for smart-decisions, a TypeScript library that answers a decision question with a probability distribution over every option, using any LLM you already have running behind an OpenAI-compatible API.
Install, quick start and project status live in the README. This wiki is for the rest: detailed guides, examples and internals.
choice picks among options that are a fixed set with no order between them. The main feature of the library.
score rates where something lands on a spectrum you describe in ordered levels.
noul judges a single yes/no proposition and returns the probability that the answer is yes.
Both System 1 (fast, logit-based) and System 2 (deliberate, structured output) answer every question type; mode: 'auto' escalates from the low-confidence ones to the deliberate pass — read Auto mode before using it. The mechanics are in Under the hood.
Detailed examples of specific use cases:
Support ticket routing classifies incoming tickets into departments and shows how the confidence decides when software acts on its own and when it escalates to a human.
Under the hood - explains how the library works.
Documentation
Examples
Reference