Updated

Published

Jevflake puts Jev in Snowflake: noul, choice, and score as SQL functions

Luke Kranz published Jevflake, a dbt package (and a Terraform module) that lets Snowflake call TypeSafe's Jev API from SQL. Answers are stored once, reused, and tested like any other model. Version 0.1, run against one live account. Row content leaves Snowflake.

Luke Kranz posted on September 20 that he had made Jev available in Snowflake. The code is KranzL/Jevflake. A short blog post sits next to it. The README is the spec.

Jevflake is a dbt package, with a Terraform module for teams that already manage Snowflake that way. It is not affiliated with TypeSafe AI, Snowflake, or dbt Labs. Setup stores the TypeSafe key as a Snowflake secret, opens a network rule to api.typesafe.ai only, and creates SQL functions: jev_noul, jev_choice, jev_score, and jev_ask. Callers can use the functions without seeing the secret. Trial accounts have external access off by default.

A noul returns a probability. A choice or score returns a variant you can pull choice, score, confidence, and probabilities from. jev_ask sends several named questions about the same row in one API call. The recommended path is a dbt “judgments” model: one stored row per key and question, resent only if the content, the questions, or jevflake_model change. Default model is jev-1.13.0, pinned, and the name is part of the cache key. Tests (no_errors, noul_between, confidence_at_least) read stored answers and do not call Jev.

Version 0.1. It has been run against one live Snowflake account with a real Jev key, on dbt 1.12.5 with dbt-snowflake 1.12.1. The example project sends ten sample support tickets, “a fraction of a cent.” Large tables and rate-limit behaviour at volume are untested. Packing several rows into one call (jevflake_rows_per_request) is experimental and has not been run inside Snowflake. A three-row API test stayed within 0.01 of the single-row answers and used about half the tokens.

Author cost notes, at TypeSafe’s $0.042 per million input tokens: one sentence plus one short question used about 290 input tokens; a short ticket with three questions about 470, which the README prices at roughly $20 per million rows. TypeSafe’s 1,200 calls per minute is the speed cap at one row per call, about 72,000 rows per hour. A bigger warehouse does not raise that cap.

Row content is sent to TypeSafe. It leaves Snowflake. In testing, adding an extra column to state changed probabilities on the same question, which matches TypeSafe’s jaggedness note that unrelated material lowers accuracy. The same question moved by a point or two depending on which other questions shared the call. Running the identical call twice gave identical answers; TypeSafe’s docs do not promise that.

This site's reading

Editorial notes evaluating claims against primary sources, contextualizing findings alongside related implementations, and defining technical terms.

Verify

The September 20 post points at github.com/KranzL/Jevflake and lkranz.com/blog/running-jev-in-snowflake. The README is the spec we used; the blog page did not return article text when fetched. Jevflake is a dbt package plus a Terraform module. It is not affiliated with TypeSafe AI, Snowflake, or dbt Labs. Setup creates a network rule to api.typesafe.ai only, an external access integration, and SQL functions jev_noul, jev_choice, jev_score, and jev_ask. Default model jev-1.13.0, pinned. Version 0.1, run against one live Snowflake account with a real Jev key, dbt 1.12.5 and dbt-snowflake 1.12.1. The example project sends ten sample tickets. Author cost notes: one sentence plus one short question about 290 input tokens; a short ticket with three questions about 470, roughly $20 per million rows at $0.042 per million input tokens. TypeSafe's 1,200 calls per minute is about 72,000 rows per hour at one row per call. Packing several rows into one call is marked experimental and has not been run inside Snowflake; a three-row API test stayed within 0.01 of single-row answers. Extra columns changed probabilities in testing. We did not run it.

Compare

Access on this desk lists TypeSafe, Vercel, Cloudflare, Netlify, OpenRouter, and Venice as public doors. Jevflake calls TypeSafe's API from warehouse SQL, closer to Hono's semantic router than to a gateway. Hono matches an HTTP request against descriptions. Jevflake matches a row against named questions and stores the answers. Kumar's production gates also store judgments and skip a later classifier. TypeSafe's jaggedness page already says unrelated material in state lowers accuracy, which is the extra-column note in the README.

Terms

Jevflake
Luke Kranz's dbt package (and Terraform module) that creates Snowflake SQL functions for Jev's noul, choice, and score questions. Default model jev-1.13.0.
jev_ask
A Snowflake function that sends several named questions about one row in a single TypeSafe call, so the row is billed once.
Judgments model
Jevflake's recommended dbt table: one stored answer per key and question, resent only when the row, the questions, or jevflake_model change.

Sources

  1. Luke Kranz, Jev in Snowflake
  2. KranzL/Jevflake
  3. Running Jev in Snowflake