Add Decision-Judge and Decision-Structured columns with support for common decision APIs

未关闭
#1,180 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

Read the existing judge and structured column implementations, their rubric and response schemas, and extract_reasoning_content to understand the current integration points. Compare those paths with the provider request and response formats listed in the issue, paying particular attention to score normalization and optional explanations. Done means defining compatible column behavior and provider adapters, with validation and evaluation against existing LLM judges; the issue does not identify specific file paths or tests.

由索引模型根据 Issue 内容生成。

描述

enhancement needs-discussion
Priority Level

Medium (Nice to have)

Is your feature request related to a problem? Please describe.

Many dataset evaluation tasks only need a bounded judgment: a pass/fail result, a categorical label, or a score against a rubric. Using a general-purpose generative model for these tasks can add cost and latency, particularly when evaluating large datasets across several scoring dimensions.

I’d like to use decision models for:

  • Judge scoring — the primary use case: evaluate generated content for dimensions such as relevance, groundedness, or instruction adherence.
  • Simple structured objects: assign fields with predefined categorical values based on other columns—for example, {"intent": "refund", "urgency": "high", "requires_review": true}.

The goal is to select models appropriate to each column while retaining Data Designer’s declarative configuration and managed execution.

Describe the solution you'd like

Support the main decision API families, including OpenAI Decisions and the System One interfaces used by TypeSafe, Liquid, Fastino, and Perplexity. Provider adapters should handle differences in request structure, authentication, supported capabilities, and response semantics.

Introduce two column types:

  • Decision-Judge: evaluate other columns against named rubrics, returning scores or categorical judgments with available probability metadata.
  • Decision-Structured: populate a declared object from typed decisions, such as categorical choices, booleans, and ordered scores.

For example, the proposed Python API could look like this:

from typing import Literal

import data_designer.config as dd
from pydantic import BaseModel, Field

judge = dd.DecisionJudgeColumnConfig(
    name="quality",
    model_alias="decision-model",
    prompt="Question: {{ question }}\nResponse: {{ response }}",
    scores=[
        dd.Score(
            name="relevance",
            description="How directly does the response address the question?",
            options={
                1: "Does not address the question",
                2: "Partially addresses the question",
                3: "Directly and fully addresses the question",
            },
        ),
    ],
)


class TicketLabels(BaseModel):
    intent: Literal["refund", "technical_support", "other"]
    urgency: Literal["low", "medium", "high"]
    requires_review: bool = Field(
        description="Whether the ticket requires human review."
    )


labels = dd.DecisionStructuredColumnConfig(
    name="ticket_labels",
    model_alias="decision-model",
    prompt="Classify this support ticket: {{ ticket }}",
    output_format=TicketLabels,
)

The common APIs support categorical choices, binary probabilities, and ordered scoring.

Additional desired behavior:

  • Preserve available probabilities, confidence, model version, and usage metadata.
  • Support judgments without a written explanation, with explanation availability treated as a provider/model capability.
  • Reject unsupported field types and incompatible model settings before generation.
  • Group independent questions against shared input when supported, while respecting provider limits and billing behavior.
Describe alternatives you've considered

Continue using LLM-Judge and LLM-Structured columns, especially when explanations, open-ended fields, or more complex reasoning are important.

Agent Investigation

Codebase research identified several relevant integration points:

  • Existing judge rubrics already define named dimensions with finite integer or string options.
  • Judge and structured columns currently use chat-completion generation. Decision APIs require request/response adaptation beyond changing a provider URL.
  • The current judge response schema requires a reasoning string per score. Decision-Judge needs a result schema and analysis/reporting behavior that support absent explanations.
  • This explanation is separate from the optional provider reasoning_content captured by extract_reasoning_content.
  • Score normalization needs explicit semantics. Fastino returns a discrete winning index plus expected_level, whereas OpenAI’s decision score is a probability-weighted level index. Fastino scoring, OpenAI scoring

Validation should compare supported decision providers with existing LLM judges on representative rows, measuring quality against trusted labels, latency, token usage, and actual cost.

Additional context

The proposed adapters should cover these main interfaces:

Provider Endpoint Core request structure
TypeSafe Jev /v1/systemone Shared state; named questions
Liquid d1 /decisions/v1/systemone Core TypeSafe-compatible structure, with extensions
Fastino GLiDE /v1/systemone Shared state; named questions
Perplexity Decider /v1/decisions Shared state; named questions
OpenAI Decisions /v1/decisions input; questions array

These interfaces share concepts but differ in schemas and response semantics.

Nemotron Decision documents typed choice, binary, and rubric decisions with per-option probabilities; compatibility would depend on the selected serving interface.

Expected benefits: Potential cost savings and higher throughput. Decision models can avoid generating explanation text and full JSON responses.

Limitations and tradeoffs: Limited explanations and reasoning controls.

Checklist
  • I've reviewed existing issues and the documentation
  • This is a design proposal, not a "please build this" request
主要语言
Python
星标
2.4k
派生
253
平均合并
2 天 10 小时
30 天内合并 PR
28

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA-NeMo/DataDesigner 的其他 Issue

查看 NVIDIA-NeMo/DataDesigner 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。