Jev + DeepSeek V4 Flash:AI 论文批量打标流水线 · 干货攻略

  • 链接: https://x.com/omarsar0/status/2102066232383979749
  • 分类: x-tips
  • 来源: X @omarsar0
  • 作者: Jay
  • 更新: 2026-09-24

这是什么

这是一个生产级论文分类流水线,使用 Jev(TypeSafe AI 出品的 System One 模型)对 DAIR-AI 维护的 ~2.3K 篇 AI 论文进行重新打标。总成本仅 $0.14,耗时约 83 秒

核心思路:用便宜的 DeepSeek V4 Flash 先生成初稿标签,再用 Jev 做高质量核验与修正——这是 System One(快思考)+ System Two(慢思考)模型组合的实战典范。

为什么值得关注

谁分享的: @omarsar0(elvis,DAIR-AI 核心贡献者),2026-09-21 发布。

解决什么问题: 用 LLM 做分类有两个常见困境——(1)few-shot 调参费时费力,成本高;(2)直接用 LLM 打标缺乏置信度标定,不知道什么时候该信它的判断。

Jev 正好填补这个空白:它是一个只做决策的模型(不生成文本),每次输出都带校准过的置信度分数,能以极低成本批量做高可靠分类。

Pipeline 过程(原帖描述): 1. 论文已有旧标签,先用 DeepSeek V4 Flash($0.14/MTok input)跑一遍 → 生成初稿标签 2. 对初稿不放心(few-shot 调参太麻烦,成本不可持续) 3. 换 Jev 对全量 2.3K 论文重新打标 4. Jev 与旧标签一致率约 75%,发现 579 条高置信度主题变更 5. 人工抽检 30 条分歧,全部接受 → 质量可信 6. 全量应用变更到 production

作者结论: System One(Jev)+ System Two(LLM)组合,远比单独用 LLM 做分类更高效、更便宜。

核验过程

官方来源 1 — TypeSafe AI 官方博客

URL: https://typesafe.ai/blog/introducing-system-one-models-and-jev

  • Jev 于 2026-09-15 正式发布(early access)
  • 创始人:Diogo Almeida(前 OpenAI,参与 ChatGPT 研究)
  • 定价:$0.042/MTok 输入,输出免费("too cheap to meter")
  • 延迟:70ms–500ms 端到端响应
  • 训练方法:RLCD(Reinforcement Learning for Calibrated Decisions)
  • 三种原语:Choice(选择)、Score(评分)、Noul(真假判断)
  • 核心保证:Schema 安全,永不产生类型错误,永不幻觉
  • 质量参考:TypeSafe 内部 workflow eval 中 Jev 平均准确率约 67.8%,对比参照模型(GPT-6 Astra + Fable 5.1 平均)约 74.1%(数据来自第三方分析,原帖主张,未独立核验)

官方来源 2 — TypeSafe AI 文档(Quick Start + API Reference)

URL: https://docs.typesafe.ai/introduction/quickstart

  • API 端点:POST https://api.typesafe.ai/v1/systemone
  • 模型名:jev-latest(当前版本 jev-1.13.0)
  • Python SDK:pip install typesafe-sdk
  • 可在一次请求中混用 Choice / Score / Noul,所有问题并行评估
  • 每个答案返回 confidence(置信度)和 probabilities(各类别概率分布)
  • API Key 在 https://console.typesafe.ai/keys 获取

交叉验证 — 第三方定价分析

多个来源交叉确认 Jev 定价为 $0.042/MTok 输入、免费输出: - Developers Digest:"Jev costs $0.042 per million input tokens and nothing for output"(2026-09-13) - Layer3Labs:"TypeSafe AI charges $0.042 per million input tokens and nothing for output"(2026-09-22) - Eesel AI:"TypeSafe Jev pricing: $0.042 input, output free"(2026-09-22)

DeepSeek V4 Flash 定价(用于初稿标签生成阶段): - 官方价:$0.14/MTok 输入,$0.28/MTok 输出(Hugging Face 官方 provider)

原帖数字核验结论

数字 原帖值 核验情况
论文数量 ~2.3K 来自 X 帖子,无官方数据交叉,但数量级合理
总成本 $0.14 多个来源确认 Jev 输入 $0.042/MTok,按 2.3K 篇论文每篇约 1-2KB 输入Token 估算,数量级吻合
耗时 83 秒 原帖主张,未找到独立验证
标签一致率 75% 原帖主张,未找到独立验证
高置信变更数 579 条 原帖主张,未找到独立验证
人工抽检分歧数 30 条(全部接受) 原帖主张,未找到独立验证

上手步骤

环境准备

# 安装 Python SDK
pip install typesafe-sdk
# 或
uv add typesafe-sdk

# 设置 API Key
export TYPESAFE_API_KEY="your_key_here"

基础用法:单条论文分类

from typesafe_sdk import Choice, TypeSafeClient

client = TypeSafeClient()

paper = """
Attention Is All You Need
We propose a new network architecture, the Transformer, based solely on attention mechanisms.
"""

response = client.system_one(
    state=paper,
    questions={
        "topic": Choice(
            instructions="What is the primary research topic of this paper?",
            criteria={
                "NLP": "Natural language processing or language modeling",
                "Computer Vision": "Image or video understanding",
                "Reinforcement Learning": "RL or decision making",
                "Theory": "Theoretical analysis or optimization",
            },
        ),
        " novelty_level": Choice(
            instructions="Rate the likely novelty level",
            criteria={
                "high": "Introduces new architecture or paradigm",
                "medium": "Significant improvement to existing methods",
                "low": "Incremental or application paper",
            },
        ),
    },
)

print(response.answers["topic"].choice)        # e.g. "NLP"
print(response.answers["topic"].confidence)   # e.g. 0.82
print(response.answers["novelty_level"].choice)

批量流水线:复刻原帖案例

import time
from typesafe_sdk import Choice, TypeSafeClient

client = TypeSafeClient()

TOPICS = {
    "NLP": "Natural language processing",
    "Vision": "Computer vision or image understanding",
    "RL": "Reinforcement learning",
    "Theory": "Theoretical ML",
    "Multimodal": "Multimodal learning",
    "Audio": "Speech or audio",
}

papers = [...]  # 从 DAIR-AI papers 列表加载

results = []
start = time.time()

for paper in papers:
    try:
        resp = client.system_one(
            state=paper["abstract"],
            questions={
                "topic": Choice(
                    instructions="Primary research topic of this paper",
                    criteria=TOPICS,
                ),
                "confidence": Choice(
                    instructions="How confident is the topic classification?",
                    criteria={
                        "high": "Topic clearly matches one of the options",
                        "medium": "Topic partially matches, could be borderline",
                        "low": "Topic is ambiguous or out-of-distribution",
                    },
                ),
            },
        )
        results.append({
            "paper_id": paper["id"],
            "topic": resp.answers["topic"].choice,
            "topic_confidence": resp.answers["topic"].confidence,
            "eval_confidence": resp.answers["confidence"].choice,
        })
    except Exception as e:
        print(f"Error on {paper['id']}: {e}")

elapsed = time.time() - start
print(f"Classified {len(results)} papers in {elapsed:.1f}s")

# 过滤高置信变更(Jev topic != 旧标签)
changes = [r for r in results if r["topic_confidence"] > 0.8]
print(f"High-confidence topic changes: {len(changes)}")

成本估算

# 按 Jev 官方定价:$0.042 / MTok 输入
# 假设平均每篇论文 1.5KB 输入
per_paper_tokens = 1500 / 1000  # = 1.5 KTok
cost_per_paper = per_paper_tokens * 0.042 / 1000  # $0.000063/paper
# 2.3K papers → ~$0.145,与原帖 $0.14 吻合

System One + System Two 两阶段流水线

# Stage 1: System Two — DeepSeek V4 Flash 做初稿(便宜但可能粗糙)
import openai

ds_client = openai.OpenAI(api_key=..., base_url="https://api.deepseek.com")
draft_response = ds_client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V4-Flash",
    messages=[
        {"role": "system", "content": "Classify this paper into one of: NLP, Vision, RL, Theory, Multimodal, Audio"},
        {"role": "user", "content": paper["abstract"]},
    ],
)
draft_tag = parse_draft_tag(draft_response)

# Stage 2: System One — Jev 做置信度评估(快且带校准概率)
resp = client.system_one(
    state=paper["abstract"],
    questions={
        "topic": Choice(
            instructions="Primary research topic",
            criteria={"NLP": "...", "Vision": "...", "RL": "...", "Theory": "...", "Multimodal": "...", "Audio": "..."},
        ),
        "change_needed": Choice(
            instructions=f"Does the proposed tag '{draft_tag}' need to change?",
            criteria={
                "keep": "Draft tag is likely correct",
                "change": "Draft tag is likely wrong",
            },
        ),
    },
)

if resp.answers["change_needed"].choice == "change":
    final_tag = resp.answers["topic"].choice
else:
    final_tag = draft_tag

坑与适用边界

  1. Jev 目前只有 early access:需在 https://console.typesafe.ai/keys 申请 API Key,不是完全开放的自助服务。

  2. 定价可能补贴:TypeSafe 官方说明价格"可能受补贴",长期能否维持存疑。但按当前定价,分类成本极低。

  3. Jev 准确率有上限:TypeSafe 内部 eval 约 67.8%,对比最强 LLM 约 74.1%。对分类质量要求极高的场景,Jev 可能需要搭配 System Two 模型做二次确认。

  4. Schema 限制:Jev 输出只能是预定义的 Choice/Score/Noul,超出预定义范围的任务不适用。

  5. 幻觉率 0 ≠ 正确率 100%:Jev 不会产生类型错误或超出 Schema 的输出,但这只保证格式安全,不保证判断正确。置信度是参考,须结合业务逻辑使用。

  6. 并行批量有 QPS 限制:生产环境批量调用需注意 API 限速,原帖 83 秒处理 2.3K 篇说明 TypeSafe 端支持不错的吞吐量,但未公开具体 QPS 上限。

  7. 论文场景的特殊性:DAIR-AI 论文有摘要+元数据,输入 Token 规模可控。如果输入是全论文 PDF(而非摘要),成本和延迟会显著增加。

一句话结论

用 DeepSeek V4 Flash 打初稿 + Jev 做高速置信度评估的组合,是目前成本最低(~$0.14/2.3K 篇)且带概率校准的论文打标方案;System One 快思考模型填补了 LLM 分类成本高、置信度不透明的空白,但质量上限仍由 System Two 模型决定,两者配合才是最优解。