- SignalDesk1小时前
Original Summary
All software makes decisions. Code handles the deterministic ones. Decision models like Jev handle the judgement calls.<p>A decision model takes context and questions with a fixed set of choices, and returns answers with a calibrated probability. No prose, nothing to parse. Decision models are 200x faster and 400x cheaper than LLMs making comparable judgements.<p>I wanted to play around with decision models in more places and without writing code or manually calling APIs. I wanted scripts to read like natural language and agents to be able to pick up the tool and use it after simply reading the help output.<p><pre><code> $ brew install vsekhar/tap/decide $ decide --set-config --model typesafe:jev-latest --api-key API key: <paste your API key> $ decide "Is Atlanta the capital of Georgia?" yes # Choose from among options $ decide "What kind of weather is typical in Florida?" \ --option rainy \ --option sunny \ --option snowy sunny # Provide context (32k context window) $ decide --context @ticket.txt \ "Which team handles this ticket?" \ --option shipping \ --option billing \ --option returns billing # Pick a level, least to most, explain each to the model $ decide --context @ticket.txt \ "How urgent is this ticket?" \ --level not_urgent="Customer feedback or feature request" \ --level somewhat_urgent="Customer problem, not blocked" \ --level urgent="Customer blocked" somewhat_urgent # Multiple questions in one call, name questions for easier parsing $ decide --context @ticket.txt \ "Which team handles this ticket?" \ --name team \ --option shipping \ --option billing \ --option returns \ "How urgent is this ticket?" \ --level not_urgent \ --level somewhat_urgent \ --level urgent \ "Should we issue a refund?" team=billing somewhat_urgent yes # Script-friendly exit codes if decide --context "$body" "Is this message spam?" -q; then mv "$file" spam/ fi </code></pre> Other features:<p>- Confidence: gate on the model's confidence in its answer with --min-confidence and --fallback<p>- Question files: load questions from a file, useful for detailed questionnaires under version control<p>- Scriptable: 0 is decided or yes, 1 is no, 2 is unsure, 10 is your mistake, 11 is network/model problem<p>- Agent skill: agents can get cursory information about files quickly and cheaply before or instead of reading them (example skill included in the repo) - token efficient, no MCP<p>- Statistics and distribution: output the model's confidence and probabilities across your choices<p>- JSON: read context as JSON objects, write decisions as JSON objects<p>- Streaming: decide once per line from stdin using --each (for JSONL pipelines)<p>- Economical: two orders of magnitude cheaper than LLMs (Jev: $0.042/Mtok input, free output)<p>- Fast: typical latency of 200ms end-to-end (400 token context with 5 questions)<p>- Scalable: unlimited questions per call, processed in parallel<p>Limitations:<p>- Typesafe or OpenRouter API key required<p>- macOS 26+ pre-built via Homebrew; macOS 15 and Linux build from source (requires Swift 6.2)<p>- Jev only (so far the only publicly available decision model)<p>See also:<p>- DecisionModels (<a href="https://github.com/vsekhar/DecisionModels" rel="nofollow">https://github.com/vsekhar/DecisionModels</a>): Swift library for static and dynamic decision model calls, inspired by Apple's FoundationModels library, and powering decide.<p>- llm-typesafe (<a href="https://github.com/simonw/llm-typesafe" rel="nofollow">https://github.com/simonw/llm-typesafe</a>): JSON-oriented input and output, integrated into the general purpose (and very popular) llm command by simonw which is written in Python and has 14 runtime dependencies.<p>Swift 6.2, Apache 2.0<p>What do you think about the command line model? How are you plugging decision models into your systems?
- 情报分类:技术学习与提效
- 分类依据:内容涉及技术、AI、软件工具或工程实践
- 信息来源:Hacker News 新项目
- 发布时间:2026/9/28 22:23:59
- 暂无回复