Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I wanted `if` statements for fuzzy conditions, so I built askif

Description and use

A developer built askif to enable fuzzy condition branching using Jev, simplifying code and reducing costs.

Problem

Hard to express fuzzy conditions in code for branching logic, e.g., triaging support tickets for human agent requests.

Outcome

Reduced code complexity, improved maintainability, and achieved cost of ~$0.013 per 1,000 calls with ~250 ms latency.

Workflow

  • Install askif and @askif/jev via npm. Set TYPESAFE_API_KEY. Use ask.if to evaluate a condition string and provide callbacks for then, else, and unsure. Optionally use ask.switch for multi‑choice routing. Optionally use ask.score for severity scoring. Handle the returned probability or boolean as needed.

Evidence

"askif" lets you branch on fuzzy judgments (ask.if, ask.switch, ask.score) with typed results.

Source

Cost: about $0.013 per 1,000 calls.

Source

Latency: 72 ms inference + 175 ms network ≈ 250 ms.

Source

Node 22+, server-side only. TypeSafe's SDK refuses to run in a browser, since it would expose your API key.

Source

  • Record date: 2026-10-01T21:56:01.866Z