Skip to main content

Cloudflare/clef

@swamp/cloudflare/clefv2026.10.27.1· AGPL-3.0-or-later· 1d agoBEHAVIORS
01README

Cloudflare Clef decision models on Workers AI: typed Noul, Choice, and Score questions with calibrated answers

02Release Notes
  • Added: decision
03Behaviors1
@swamp/cloudflare/clef/decisionv2026.10.27.1decision.ts
fn ask(questions: preprocess)
Evaluate state against a map of typed questions in one request
ArgumentTypeDescription
questionspreprocessMap of question id to {type, instructions, criteria}; 1 to 64 questions. Pass with --input questions:json='{...}' or --input questions=@file.json.
fn noul()
Ask one yes/no question; stores the probability of yes
fn choice(criteria: preprocess)
Pick one option from a defined set; stores the choice, probabilities, and confidence
ArgumentTypeDescription
criteriapreprocessOptions mapped to descriptions (null for none); 2 to 255 options. Pass with --input criteria:json=\
fn score(criteria: preprocess)
Rate state along ordered levels; stores the weighted score, legend, probabilities, and confidence
ArgumentTypeDescription
criteriapreprocessOrdered level descriptions, lowest first; 2 to 10 levels. Pass with --input criteria:json=\

Resources

evaluation(infinite)— Answers to a batch of questions from the `ask` method
noul(infinite)— Yes/no probability from the `noul` method
choice(infinite)— Selected option and distribution from the `choice` method
score(infinite)— Weighted score and distribution from the `score` method
04Stats
A
100 / 100
Downloads
0
Archive size
20.5 KB
Verified by Swamp
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
05Platforms
06Labels