jev-align README

The project's README from github.com/sutro-sh/jev-align. As one markdown file: README.md.

jev-align

jev-align is an experimental CLI from Sutro for building AI Functions with TypeSafe's Jev.

It finds uncertain examples, asks you to label them, and uses GEPA to improve the function. Use it in your application, keep learning from production examples, and share portable functions through ai-functions.dev.

Demo

https://github.com/user-attachments/assets/81650587-e3f1-4655-8213-ed5f6e120e9a

Quick start

Requires Python 3.11 or newer.

uv tool install jev-align
export TYPESAFE_API_KEY="..." # Or use Vercel or Cloudflare below
export OPENAI_API_KEY="..." # or ANTHROPIC_API_KEY / GEMINI_API_KEY
jeva

Start the CLI with either jeva or jev-align.

Use pip install jev-align if you do not use uv. The guided setup discovers local CSV, Parquet, and JSONL files and includes three ready-to-run examples.

How it works

Each round:

  1. Evaluates the configured dataset and measures uncertainty.
  2. Selects ambiguous rows plus a random audit sample for you to label.
  3. Uses your accumulated labels and optional rationales to run GEPA.
  4. Shows the score, certainty change, and proposed definition diff.
  5. Lets you accept, reject, rewind, or resume later.

The guided workflow asks you to review every label. Labels may be human-created, synthetic, imported, or agent-assisted; review them to the standard your use case requires. A higher training score never accepts a proposal automatically.

Task types

Type Output
Binary True or False
Multiclass Exactly one fixed label
Multilabel Zero or more fixed labels
Score One level from an ordered rubric

Configuration

The guided Advanced menu configures:

By default, jev-align uses the first 1,000 rows—or the entire dataset when it is smaller—and lets you concatenate all fields or select specific columns.

Everything can also be configured with flags:

jeva optimize posts.csv \
  --question "Is the post related to aviation?" \
  --column title \
  --column text \
  --pool-size 1000

Use repeated --class "NAME=DESCRIPTION" options for multiclass or multilabel tasks, and repeated --score-level options for scoring tasks. Run jeva optimize --help for the complete flag reference.

Jev providers

Jev can run directly through TypeSafe AI, Vercel AI Gateway, or Cloudflare Workers AI. The guided setup detects configured providers and lets you choose.

# Vercel AI Gateway
export AI_GATEWAY_API_KEY="..."
jeva optimize data.csv --question "Is this relevant?" --column text \
  --backend vercel

# Cloudflare Workers AI
export CLOUDFLARE_ACCOUNT_ID="..."
export CLOUDFLARE_API_TOKEN="..."
jeva optimize data.csv --question "Is this relevant?" --column text \
  --backend cloudflare

These routes do not require a TYPESAFE_API_KEY. The chosen provider is saved with the AI Function, so later runtime calls use the same provider. GEPA's reflection model is configured separately.

Reflection models

GEPA's reflection model is separate from the JEV model evaluating your data. OpenAI, Anthropic, and Gemini models are detected automatically. Any LiteLLM provider—including Fireworks, local vLLM, and other OpenAI-compatible endpoints—can be supplied with --reflection-model provider/model.

export HOSTED_VLLM_API_BASE="http://localhost:8000/v1"
jeva optimize data.csv --question "Is this relevant?" --column text \
  --reflection-model "hosted_vllm/Qwen/Qwen3-8B"

Controls

Saved AI Functions

Browse, run, or resume functions saved on your computer:

jeva functions
jeva optimize --resume .jev-align/runs/<run-id>

Share on ai-functions.dev

ai-functions.dev is the public registry for AI Functions built with jev-align. Browse shared functions on the website and publish your own from the CLI.

To publish, open your saved functions:

jeva functions

Select a function, then choose Push to ai-functions.dev. If needed, jev-align walks you through GitHub login. You can name the function, add a description, review what will be public, and confirm the push. It will appear at ai-functions.dev/<github-user>/<function-name>.

A published function includes everything another person needs to run it or continue improving it:

It does not contain unlabeled source rows, local dataset paths, API keys, reflection-provider credentials, or an unaccepted proposal. The registry is currently public, so do not publish labeled data you cannot share. Human review is encouraged for important tasks, but the registry does not claim or verify that every published annotation was created or reviewed by a person.

Anyone can pull a public function without signing in:

jeva pull github-user/function-name
jeva pull github-user/function-name --version 2

Pulling needs no login. It verifies the immutable artifact and creates a normal saved AI Function under .jev-align/runs/, ready to run or continue improving.

Owners can remove a function from discovery and future public pulls:

jeva unpublish github-user/function-name

Unpublishing is reversible: versions and annotations are retained, and pushing the function again restores it. It cannot revoke copies that were already downloaded.

Keep learning from production

Load an AI Function in your application and capture useful production examples:

from jev_align import AIFunction

is_aviation = AIFunction.load(
    ".jev-align/runs/<run-id>",
    capture=True,
)

prediction = is_aviation(
    title="Airport expansion",
    text="A new runway opens next year.",
)

Later, resume the AI Function and label the captured examples. GEPA uses that feedback to propose the next version:

jeva functions

Using a coding agent

See AGENTS.md for detailed setup, provider configuration, CLI operation, and development guidance for coding agents.

Affiliation

Sutro is not affiliated with TypeSafe AI, the makers of Jev.

jev-align (sutro-sh/jev-align)

Searching Database…

这是做什么的?这是 Sutro 推出的一个实验性命令行工具,用于在 TypeSafe 的 Jev 上构建经过校准的 AI Function:它会找出数据集中不确定的样本让你来标注,并通过 GEPA 持续改进函数。
这是一个我要导入的库,还是一个我要运行的程序?是一个程序,不是库:通过 jeva 或 jev-align 启动一个交互式命令行工具,它生成的 AI Function 会保存在本地,你可以直接运行,也可以加载到自己的应用里。
我怎么把它跑起来?在 Python 3.11 或更高版本上用 pip install jev-align 安装(也可以用 uv),然后运行引导式设置——它会自动发现本地的 CSV、Parquet 和 JSONL 文件,还自带三个开箱即用的示例。
Jev 需要 TypeSafe 的 API key 吗,还是可以用其他服务商?使用内置通道时不需要 TypeSafe 的 key:Jev 可以通过 TypeSafe AI、Vercel AI Gateway 或 Cloudflare Workers AI 运行,引导式设置会自动检测已配置的服务商。GEPA 的反思模型是独立配置的——OpenAI、Anthropic 和 Gemini 的模型会被自动识别,任何 LiteLLM 支持的服务商也都能用。
每一条都要我自己审核,还是评分好的可以自动通过?你始终掌握最终决定权:引导式流程会让你逐一审核每条标注——无论是人工、合成、导入还是智能体辅助产生的——训练评分再高也不会自动采纳任何提案。每一条都由你来接受、拒绝、回退或继续。
如果我把函数分享到 ai-functions.dev,会公开哪些内容?公开的内容包括函数定义、输入签名、运行后端、学习配置、标注、数据划分和推理说明——绝不会包含未标注的原始数据行、本地路径或 API key。注册表是公开的,拉取无需登录,所以不要发布你不能公开的数据;而且撤销发布也无法收回已经被下载的副本。
函数上线之后还会继续学习吗?会——把它加载到你的应用里,收集有价值的生产环境样本,然后恢复该函数并对这些样本进行标注;GEPA 会利用这些反馈提出下一个版本。
每轮大概需要标注多少?可以在 Advanced 菜单里配置:每轮 5、10、15 或 20 条训练标注,可选保留 20% 的留出评估集,还有 GEPA 的指标调用预算(默认 300)。默认情况下只使用前 1,000 行数据。
这是 TypeSafe 的官方产品吗?不是——它是 Sutro 推出的实验性命令行工具,与 Jev 的开发方 TypeSafe AI 没有任何关联。它基于 Jev 构建,并通过 ai-functions.dev 分享做好的函数。
Creator
sutro-sh
Size
4.8 MB
Stars
309
Age
29d
Commits · 90 Days