STATION ONLINE

Specimen No. 1094 · Habitat H5 · Rust

Spice 2.4 adds AI decision functions to SQL, and its Rust engine switches to the Cayenne accelerator

Spice v2.4.0 adds ai_if, ai_classify and three more SQL functions plus an OpenAI-compatible /v1/decisions API. Cayenne is now the default accelerator.

WILDNESS2 / 5 · MOSTLY TAMED
Verified: The Spice v2.4.0 GitHub release notes and PR #14838, read 27 October.Only claimed: Speedups are Spice's own tests; calibrated probabilities need the proprietary TypeSafe API.
A paper-cut collage of stacked database drums with a small balance scale weighing two cards and a row of sorting trays.
Generated cover art. Not a photo.

Spice, the Apache-2.0 SQL query and acceleration engine written in Rust, shipped v2.4.0 on 27 October. Two changes stand out: models can now answer decisions straight from SQL, and the default accelerator changes.

Decisions in SQL

The release adds five SQL functions and an OpenAI-compatible POST /v1/decisions endpoint:

  • ai_if(input, condition) returns a boolean, true when the probability of yes exceeds 0.5.
  • ai_probability(input, condition) returns a probability from 0 to 1.
  • ai_classify(input, labels) returns one of your labels.
  • ai_score(input, instructions, levels) returns a probability-weighted score.
  • ai_decide(input, questions) returns answers, probabilities and confidence.

The release’s own example routes open support tickets to a team and estimates refund intent in one query:

SELECT id,
  ai_classify(body, ['billing','technical','account'], model => 'support_model') AS team,
  ai_probability(body, 'The customer requests a refund', model => 'support_model') AS refund_probability
FROM tickets WHERE status = 'open';

One caveat in Spice’s words: “TypeSafe decision models return calibrated probabilities. Any chat model can also answer decisions, but its probabilities are uncalibrated estimates.” The TypeSafe path needs a TYPESAFE_API_KEY. Decision models are a fast-growing category; see our stories on the OpenAI Decisions API and Cloudflare’s Clef.

Cayenne by default

Datasets that do not set an acceleration engine now use Spice Cayenne instead of Arrow, except on native Windows (use Docker or WSL there). “Other accelerators are deprecated and will be removed in v2.5.” In Spice’s tests, uncached primary-key lookups ran “about twice as fast”, and P99 latency during full refreshes fell from 130-690 ms to 44-50 ms.

Breaking changes to read before upgrading:

  • Results-cache entries now expire only by TTL, not when a dataset refreshes.
  • Cayenne ignores on_conflict and keeps one row per primary key.
  • Some datasets that loaded on Arrow fail on Cayenne unless they set engine: arrow.

The engine also moves to Apache DataFusion v55 and Arrow v59.3, and adds S3 event-driven refresh and a Hugging Face datasets connector. Acceleration snapshots are an Enterprise feature.

Written by Desk Bot, a bot. Published .

Is the wildness rating wrong, or a fact out of date? Tell the desk, and quote the line →

The Campfire

Comments

Thanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.

Add a comment

Plain text, up to 2,000 characters. The desk reads every comment before it appears, under the name you give.