ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

在 Arize 中使用 ax CLI 打造 LLM-as-judge 评估体系:Evaluator、Task 与持续监控实战指南

在 Arize 中使用 ax CLI 打造 LLM-as-judge 评估体系:Evaluator、Task 与持续监控实战指南 在 Arize 中使用 ax CLI 打造 LLM-as-judge 评估体系Evaluator、Task 与持续监控实战指南【免费下载链接】awesome-copilotCommunity-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.项目地址: https://gitcode.com/GitHub_Trending/aw/awesome-copilot本文以 arize-evaluator 技能 为核心系统讲解如何基于 Arize 的ax命令行工具完成LLM-as-judge 评估的完整闭环从理解 Evaluator 与 Task 的概念模型到创建评估器、配置列映射column mappings、触发回填/持续评估运行再到调试取消的运行任务。读完本文你将能够独立为一个线上 trace 项目或一个离线 experiment 实验设计、创建并运维可靠的自动评估流水线并掌握排查运行取消0 span 被评分等高频故障的系统化方法。前置概念Evaluator 与 Task 的分工在 Arize 的评估体系中两个核心概念需要首先厘清Evaluator评估器一个LLM-as-judge 定义。它描述用什么提示词、让哪个模型、按哪些可选标签去评判本身不触碰任何真实数据。Task任务把评估器运行到真实数据上的载体。Task 挂接在project实时 traces/spans或dataset实验运行结果上负责把评估器模板里的变量映射到实际字段并控制评分范围与运行方式。这种定义与运行分离的设计让同一个 Evaluator 可以跨项目、跨实验复用而项目特有的数据路径只存在于 Task 的列映射中。Evaluator 的组成字段字段说明Template评判提示词使用{variable}占位符如{input}、{output}、{context}运行时由 Task 的列映射填充Classification choices允许输出的标签集合如factual/hallucinated默认且最常用的是二分类每个标签可附带数值分数AI Integration存储的 LLM 提供商凭据OpenAI、Anthropic、Bedrock 等评估器用它调用评判模型Model具体评判模型如gpt-4o、claude-sonnet-4-5Invocation params可选的模型参数 JSON如{temperature: 0}低温有助于结果可复现Optimization direction分数是越高越好maximize还是越低越好minimize决定 UI 趋势渲染方向Data granularity评估器运行在span、trace还是session级别大多数评估器运行在 span 级别Evaluator 是版本化的——每次修改提示词或模型都会产生一个新的不可变版本最新版本处于激活状态。任何create操作都会同时创建评估器及其第一个版本。Task 的组成字段字段说明Evaluators要运行的评估器列表一个 Task 可同时运行多个评估器Column mappings将每个评估器模板变量映射到 span 或实验运行上的实际字段路径如input → attributes.input.value这是评估器可跨项目、跨实验移植的关键Query filterSQL 风格表达式用于筛选要评估的 spans/runs如span_kind LLM可选但对精确性很重要Continuous仅 project 任务是否自动为新到的 spans 评分Sampling rate仅持续型 project 任务对新 spans 的采样比例0–1环境准备与排障约定本技能要求axCLI版本0.14.0 或更高和一个已配置好 AI integration 的 Arize profile。运行环境问题参考 ax-setup 排障文档 与 ax-profile 配置文档ax未安装时macOS/Linux 可用uv tool install arize-ax-cli首选、pipx install arize-ax-cli或pip install arize-ax-cli安装Windows 用pip install arize-ax-cli。版本低于 0.14.0 时用uv tool install --force --reinstall arize-ax-cli升级很多子命令不存在错误源于版本过旧。401 Unauthorized或缺失 API key 时运行ax profiles show检查当前 profile按需用ax profiles create --api-key $ARIZE_API_KEY创建或用ax profiles update --api-key $ARIZE_API_KEY修正始终通过环境变量引用 key绝不内联明文。找不到 space 时运行ax spaces list按名称挑选。关于SPACE参数有两条贯穿全文的约定所有--space标志和ARIZE_SPACE环境变量都接受 space名称如my-workspace或 base64 的 spaceID如U3BhY2U6...此外ai-integrations create不接受--space——AI integrations 是账户级的--space只用于list、get、update、delete。两条不可逾越的安全与诚信红线凭据安全绝不读取.env文件或在文件系统中搜索凭据。Arize 凭据走ax profilesLLM 提供商 key 走ax ai-integrations。这些渠道拿不到凭据时直接询问用户。绝不伪造评估结果如果评估任务失败、被取消或未产出分数必须如实报告失败原因禁止手动评估、编造质量分数、估算百分比或把任何 agent 生成的分析伪装成 Arize 评估系统的输出。正确做法是(1) 修复问题后重试(2) 尝试从 Arize UI 运行(3) 用ax ai-integrations list核实集成凭据(4) 联系 https://arize.com/support。数据粒度Data Granularityspan、trace 与 session--data-granularity标志决定评估器对哪个数据单元打分默认span且只对 project 任务生效dataset/experiment 任务直接评估实验运行不适用此标志。级别评估对象适用场景结果列前缀span默认单个 spansQA 正确性、幻觉、相关性eval.{name}.label/.score/.explanationtrace同一 trace 内的所有 spans按context.trace_id分组Agent 轨迹、任务正确性——需要完整调用链的场景trace_eval.{name}.label/.score/.explanationsession同一 session 内的所有 traces按attributes.session.id分组并按开始时间排序多轮连贯性、整体语气、对话质量session_eval.{name}.label/.score/.explanationtrace 与 session 的聚合机制trace 粒度共享同一context.trace_id的 spans 被分到一组评估器模板用到的列值会被逗号拼接成单个字符串每个值截断到 100K 字符再交给评判模型。session 粒度先做 trace 级分组再按start_time排序、按attributes.session.id分组session 级值总计上限为 100K 字符。特殊的{conversation}模板变量在 session 粒度下{conversation}会被渲染为一个 JSON 数组包含 session 内所有 trace 的{input, output}轮次——input 侧来自attributes.input.value/attributes.llm.input_messagesoutput 侧来自attributes.output.value/attributes.llm.output_messages。而在 span 或 trace 粒度下{conversation}就是一个普通模板变量按常规列映射解析。多评估器任务一个 Task 可以包含不同粒度的评估器。运行时系统按最高粒度session trace span拉取数据并自动为每个评估器拆分成一个子运行。每个评估器 JSON 里独立的query_filter可进一步收窄包含哪些 spans例如只评估 session 内的 tool-call spans。基础 CRUD 操作AI IntegrationsLLM 提供商凭据AI integration 存储评估器调用评判模型所需的 LLM 提供商凭据。完整的增删改查OpenAI、Anthropic、Azure、Bedrock、Vertex、Gemini、NVIDIA NIM、custom 等全部提供商请参考 arize-ai-provider-integration 技能。最常见的 OpenAI 场景速查# 先检查是否已有集成 ax ai-integrations list --space SPACE # 没有则创建 ax ai-integrations create \ --name My OpenAI Integration \ --provider openAI \ --api-key $OPENAI_API_KEY记下返回的 integration ID——ax evaluators create --ai-integration-id必须要用到它。注意各提供商要求的额外标志不同azureOpenAI需要--api-key加--base-urlawsBedrock走 IAM 角色用--provider-metadata {role_arn: ...}vertexAI用--provider-metadata {project_id: ..., location: ...}nvidiaNim和custom需要--base-url。Evaluators# 列表 / 查询 ax evaluators list --space SPACE ax evaluators get ID # 接受名称或 ID ax evaluators get NAME --space SPACE # 用名称时必须带 --space ax evaluators list-versions NAME_OR_ID ax evaluators get-version VERSION_ID # 创建同时创建评估器及其第一个版本 ax evaluators create \ --name Answer Correctness \ --space SPACE \ --description Judges if the model answer is correct \ --template-name correctness \ --commit-message Initial version \ --ai-integration-id INT_ID \ --model-name gpt-4o \ --include-explanations \ --use-function-calling \ --classification-choices {correct: 1, incorrect: 0} \ --template You are an evaluator. Given the user question and the model response, decide if the response correctly answers the question. User question: {input} Model response: {output} Respond with exactly one of these labels: correct, incorrect # 创建新版本版本不可变提示词或模型变更即新版本 ax evaluators create-version NAME_OR_ID \ --commit-message Added context grounding \ --template-name correctness \ --ai-integration-id INT_ID \ --model-name gpt-4o \ --include-explanations \ --classification-choices {correct: 1, incorrect: 0} \ --template Updated prompt... {input} / {output} / {context} # 仅更新元数据名称、描述——不含提示词 ax evaluators update NAME_OR_ID \ --name New Name \ --description Updated description # 删除永久移除所有版本 ax evaluators delete NAME_OR_IDcreate的关键标志标志必填说明--name是评估器名称space 内唯一--space是在其中创建的 space 名称或 ID--template-name是评估列名——字母数字、空格、连字符、下划线均可--commit-message是本版本的描述--ai-integration-id是AI integration ID来自上文--model-name是评判模型如gpt-4o--template是带{variable}占位符的提示词bash 中用单引号--classification-choices是标签到数值分数的 JSON 映射如{correct: 1, incorrect: 0}--description否人类可读描述--include-explanations否在标签之外附带推理说明--use-function-calling否优先使用结构化 function-call 输出--invocation-params否模型参数 JSON如{temperature: 0}--data-granularity否span默认、trace或session仅对 project 任务有意义--direction否优化方向maximize或minimize--provider-params否提供商特定参数的 JSON 对象TasksPROJECT_NAME、DATASET_NAME和evaluator_id都接受名称或 base64 ID。# 列表 / 查询 ax tasks list --space SPACE ax tasks list --project PROJECT_NAME ax tasks list --dataset DATASET_NAME --space SPACE ax tasks get TASK_ID # 创建project——持续评估 ax tasks create \ --name Correctness Monitor \ --task-type template_evaluation \ --project PROJECT_NAME \ --evaluators [{evaluator_id: EVAL_ID, column_mappings: {input: attributes.input.value, output: attributes.output.value}}] \ --is-continuous \ --sampling-rate 0.1 # 创建project——一次性 / 回填 ax tasks create \ --name Correctness Backfill \ --task-type template_evaluation \ --project PROJECT_NAME \ --evaluators [{evaluator_id: EVAL_ID, column_mappings: {input: attributes.input.value, output: attributes.output.value}}] \ --no-continuous # 创建experiment / dataset ax tasks create \ --name Experiment Scoring \ --task-type template_evaluation \ --dataset DATASET_NAME --space SPACE \ --experiment-ids EXP_ID_1,EXP_ID_2 \ --evaluators [{evaluator_id: EVAL_ID, column_mappings: {output: output}}] \ --no-continuous # 触发运行project 任务——使用数据窗口 ax tasks trigger-run TASK_ID \ --data-start-time 2026-03-20T00:00:00 \ --data-end-time 2026-03-21T23:59:59 \ --wait # 触发运行experiment 任务——使用 experiment IDs ax tasks trigger-run TASK_ID \ --experiment-ids EXP_ID_1 \ --wait # 监控 ax tasks list-runs TASK_ID ax tasks get-run RUN_ID ax tasks wait-for-run RUN_ID --timeout 300 ax tasks cancel-run RUN_ID --force注意--experiment-ids需要的是 base64 ID可从ax experiments list --space SPACE -o json获取代码中的#注释仅为说明实际命令行中不要带上。trigger-run的时间格式为2026-03-21T09:00:00——不要带结尾的Z。更多 trigger-run 标志标志说明--max-spans限制处理的 spans 数默认 10,000--override-evaluations对已有标签的 spans 重新评分--wait/-w阻塞直到运行结束--timeout--wait时的等待秒数默认 600--poll-interval等待时的轮询间隔秒数默认 5运行状态速查状态含义completed, 0 spans评估索引滞后 1–2 小时——近期摄入的 spans 可能尚未被索引。把窗口移到至少 2 小时前的数据或扩大时间范围覆盖更多历史数据cancelled~1s集成凭据无效cancelled~3min找到了 spans 但 LLM 调用失败——检查模型名或 keycompleted, N 0成功——在 UI 中查看分数工作流 A为 project 创建评估器适用场景为我的 Playground Traces 项目创建一个评估器。Step 1确认项目名ax spans export直接接受项目名无需查 ID。不知道项目名时先列出ax projects list --space SPACE -o json找到name字段大小写不敏感匹配的条目后续命令用该名称作为PROJECT。若名称触发校验错误改用该项目的idbase64 字符串。Step 2明确要评估什么如果用户指定了评估器类型幻觉、正确性、相关性等→ 跳到 Step 3。否则先抽样最近的 spans基于真实数据设计评估器ax spans export PROJECT --space SPACE -l 10 --days 30 --stdout检查attributes.input、attributes.output、span kinds 及已有标注识别失败模式如幻觉事实、离题回答、缺失上下文提出1–3 个具体评估器方案让用户挑选。每个方案必须包含评估器名称加粗、一句话描述其评判内容、括号内的二分类标签对。格式如下Response Correctness— 评判 agent 的回复是否正确回答了用户的金融问题。correct/incorrectHallucination— 评判回复是否捏造了检索上下文中没有的事实。factual/hallucinatedStep 3确认或创建 AI integrationax ai-integrations list --space SPACE -o json有合适的集成就记下其 ID没有则用arize-ai-provider-integration技能创建。向用户确认评判模型用哪个提供商/模型。Step 4创建评估器遵循下文模板设计最佳实践。评估器名称和变量保持通用——项目相关的接线由 Step 6 的column_mappings负责ax evaluators create \ --name Hallucination \ --space SPACE \ --template-name hallucination \ --commit-message Initial version \ --ai-integration-id INT_ID \ --model-name gpt-4o \ --include-explanations \ --use-function-calling \ --classification-choices {factual: 1, hallucinated: 0} \ --template You are an evaluator. Given the user question and the model response, decide if the response is factual or contains unsupported claims. User question: {input} Model response: {output} Respond with exactly one of these labels: hallucinated, factualStep 5询问回填、持续还是两者都要推荐路径先用小规模回填约 100 条历史 spans验证评估器再开启持续监控。这样能在已知数据上尽早发现列映射错误、span kind 不匹配和模板问题避免给后续所有生产 spans 错误评分。创建任务前务必向用户确认您希望 (a) 对历史 spans 做一次回填一次性 (b) 对未来新 spans 设置持续评估 (c)两者都要——先回填验证再自动持续评分推荐Step 6从真实 span 数据确定列映射不要凭空猜测路径先拉样本检查实际存在的字段ax spans export PROJECT --space SPACE -l 5 --days 7 --stdout为每个模板变量{input}、{output}、{context}找到匹配的 JSON 路径。以下为常见起点——使用前务必在你的真实数据上验证模板变量LLM spanCHAIN spaninputattributes.input.valueattributes.input.valueoutputattributes.llm.output_messages.0.message.contentattributes.output.valuecontextattributes.retrieval.documents.contents—tool_outputattributes.input.value回退attributes.output.value两个关键陷阱验证 span kind 对齐如果评估器提示词假设的是 LLM 最终文本而任务却指向 CHAIN spans或反之运行会取消或评分到错误的文本。确保任务的query_filter与你映射的 span kind 一致。query_filter只作用于已索引属性评估器 JSON 里的query_filter是针对评估索引eval index求值的不是原始 span 存储。attributes.metadata.*或自定义 key 下的属性可能未被索引会静默匹配不到任何东西。优先用span_kind或attributes.llm.model_name这类公认的已索引属性过滤。若加了过滤器返回 0 spans 但数据明明存在试着移除过滤器做诊断。完整的--evaluatorsJSON 示例[ { evaluator_id: EVAL_ID, query_filter: span_kind LLM, column_mappings: { input: attributes.input.value, output: attributes.llm.output_messages.0.message.content, context: attributes.retrieval.documents.contents } } ]模板引用的每个变量都必须有对应的映射——漏掉任何一个都会导致运行产不出有效分数。Step 7创建任务仅回填 (a)ax tasks create \ --name Hallucination Backfill \ --task-type template_evaluation \ --project PROJECT \ --evaluators [{evaluator_id: EVAL_ID, column_mappings: {input: attributes.input.value, output: attributes.output.value}}] \ --no-continuous仅持续 (b)ax tasks create \ --name Hallucination Monitor \ --task-type template_evaluation \ --project PROJECT \ --evaluators [{evaluator_id: EVAL_ID, column_mappings: {input: attributes.input.value, output: attributes.output.value}}] \ --is-continuous \ --sampling-rate 0.1两者都要 (c)创建时用--is-continuous然后在 Step 8 再触发一次回填运行。Step 8触发回填运行如需要评估索引滞后评估索引从主 trace 存储异步构建可能滞后1–2 小时。首次测试运行的时间窗口终点至少要落在 2 小时之前。如果把--data-end-time设为现在而 spans 是最近一小时内摄入的运行会成功完成但只评分 0 个 spans。先确认哪个时间范围有数据ax spans export PROJECT --space SPACE -l 100 --days 1 --stdout # 先试最近 24h ax spans export PROJECT --space SPACE -l 100 --days 7 --stdout # 为空就扩大用真实 spans 的start_time/end_time字段设置窗口。首次验证运行把--max-spans限制在约 100快速获得反馈ax tasks trigger-run TASK_ID \ --data-start-time 2026-03-20T00:00:00 \ --data-end-time 2026-03-21T23:59:59 \ --max-spans 100 \ --wait在扩大到完整回填或开启持续评估之前先审阅分数和解释说明。工作流 B为 experiment 创建评估器适用场景为我的实验创建一个评估器或评估我的 dataset 运行。如果用户说dataset但没有 experiment任务必须针对 experiment不是裸 dataset运行。此时应询问评估任务运行在实验运行上而不是直接针对数据集。需要我先帮你在该数据集上创建一个实验吗如果用户同意用arize-experiment技能创建实验然后回到本流程。Step 1找到 dataset 和 experiment 名称ax datasets list --space SPACE ax experiments list --dataset DATASET_NAME --space SPACE -o json记下 dataset 名称和要评分的 experiment 名称。后续命令中名称和 ID 都接受——优先用名称。Step 2明确要评估什么用户指定了评估器类型就跳到 Step 3否则先检查一条最近的实验运行ax experiments export EXPERIMENT_NAME --dataset DATASET_NAME --space SPACE --stdout | python3 -c import sys,json; runsjson.load(sys.stdin); print(json.dumps(runs[0], indent2))查看output、input、evaluations、metadata字段找出用户关心但尚未覆盖的指标缺口提出1–3 个评估器方案格式同工作流 A 的 Step 2。Step 3–4确认 integration 并创建评估器同工作流 A 的 Step 3 与 Step 4变量保持通用。Step 5从真实运行数据确定列映射运行数据的形状与 span 数据不同。常见映射output→output每条运行上的顶层字段input→ 检查它是在运行上还是嵌在关联的 dataset examples 中若运行 JSON 上没有input导出 dataset examples 找路径ax datasets export DATASET_NAME --space SPACE --stdout | python3 -c import sys,json; exjson.load(sys.stdin); print(json.dumps(ex[0], indent2))Step 6创建任务ax tasks create \ --name Experiment Correctness \ --task-type template_evaluation \ --dataset DATASET_NAME --space SPACE \ --experiment-ids EXP_ID \ --evaluators [{evaluator_id: EVAL_ID, column_mappings: {output: output}}] \ --no-continuousStep 7触发并监控ax tasks trigger-run TASK_ID \ --experiment-ids EXP_ID \ --wait ax tasks list-runs TASK_ID ax tasks get-run RUN_ID模板设计最佳实践1. 使用通用、可移植的变量名使用{input}、{output}、{context}不要用绑定到特定项目或 span 属性的名字比如不要用{attributes_input_value}。评估器本身保持抽象任务的column_mappings才是把它接到具体项目或实验字段的地方。这样同一个评估器无需修改即可跨多个项目、多个实验运行。2. 默认使用二分类标签使用恰好两个清晰的字符串标签如hallucinated/factual、correct/incorrect、pass/fail。二分类的优势评判模型最容易稳定产出业界最常用在仪表盘中解释最简单如果用户坚持要多于两个选项也没问题——但先推荐二分类并解释权衡标签越多 → 歧义越多 → 评分者间一致性越低。3. 明确告诉模型必须返回什么模板必须要求评判模型只输出标签字符串除此之外别无他物。提示词中的标签字符串必须与--classification-choices中的标签完全一致拼写、大小写都一样。好的写法Respond with exactly one of these labels: hallucinated, factual不好的写法过于开放Is this hallucinated? Answer yes or no.4. 保持低 temperature传入--invocation-params {temperature: 0}以获得可复现的评分。更高的温度会给评估结果引入噪声。5. 用--include-explanations辅助调试初始搭建阶段始终开启解释说明这样在大规模信任标签之前可以验证评判模型推理是否正确。6. bash 中模板用单引号传递单引号防止 shell 插值{variable}占位符。双引号会出问题# 正确 --template Judge this: {input} → {output} # 错误——shell 可能解析 { } 或直接失败 --template Judge this: {input} → {output}7.--classification-choices必须与模板标签匹配--classification-choices里的标签必须与--template引用的标签完全一致拼写、大小写。省略--classification-choices会导致任务运行报 missing rails and classification choices 错误。故障排查问题解决方案ax: command not found见 ax-setup401 UnauthorizedAPI key 可能没有该 space 的访问权限在 https://app.arize.com/admin API Keys 验证Evaluator not foundax evaluators list --space SPACEIntegration not foundax ai-integrations list --space SPACETask not foundax tasks list --space SPACEproject and dataset-id are mutually exclusive创建任务时二选一experiment-ids required for dataset tasks在create和trigger-run上加上--experiment-idssampling-rate only valid for project tasks从 dataset 任务移除--sampling-rateax spans export校验错误项目名通常可用仍报错则用ax projects list --space SPACE -o json查 base64 项目 ID 并用id字段模板校验错误bash 中用单引号--template ...单花括号{var}不要双花括号{{var}}运行卡在pendingax tasks get-run RUN_ID然后ax tasks cancel-run RUN_ID运行cancelled~1s集成凭据无效——检查 AI integration运行cancelled~3min找到了 spans 但 LLM 调用失败——模型名错误或 key 失效运行completed, 0 spans扩大时间窗口评估索引可能未覆盖更早的数据UI 中无分数修正column_mappings以匹配 spans/runs 上的真实路径分数看起来不对加--include-explanations抽查几条评判推理评估器因 span kind 错误取消让query_filter和column_mappings对齐 LLM 与 CHAIN spanstrigger-run时间格式错误用2026-03-21T09:00:00——不带结尾Z运行失败missing rails and classification choices给ax evaluators create加上--classification-choices {label_a: 1, label_b: 0}——标签必须与模板一致运行completed, 全部 spans 被跳过query filter 匹配到了 spans 但列映射错误或模板变量解析不了——导出样本 span 核对路径设置了query_filter但 0 spans 被评分过滤属性在评估索引中可能未被索引。attributes.metadata.*和自定义属性经常不被索引。改用span_kind或attributes.llm.model_name或移除过滤器确认窗口内确实有 spans诊断已取消的运行cancelled当任务运行状态为cancelled时按下述顺序排查1. 检查集成凭据ax ai-integrations list --space SPACE -o json确认评估器使用的 integration ID 存在且凭据有效。如果集成被删除或 API key 过期运行会在约 1 秒内取消。2. 核实模型名ax evaluators get EVALUATOR_NAME --space SPACE -o json检查model_name字段。拼写错误或已弃用的模型会导致 LLM 调用失败运行约 3 分钟后取消。3. 导出样本 span/run 并与 column_mappings 对比路径project 任务ax spans export PROJECT --space SPACE -l 1 --days 7 --stdout | python3 -m json.toolexperiment 任务ax experiments export EXPERIMENT_NAME --dataset DATASET_NAME --space SPACE --stdout | python3 -c import sys,json; runsjson.load(sys.stdin); print(json.dumps(runs[0], indent2)) if runs else print(No runs)将导出的 JSON 路径与任务的column_mappings对比。对每个模板变量确认映射路径真实存在。常见不匹配在 experiment 运行上把output映射到attributes.output.value应该只是output在 CHAIN span 上把input映射到attributes.input.value而真实路径是attributes.llm.input_messages把context映射到被过滤 span kind 上不存在的路径4. 检查data_start_time不是 epoch如果trigger-run的起始时间是0、1970-01-01或空字符串时间窗口就无效。务必从真实 span 时间戳推导ax spans export PROJECT --space SPACE -l 5 --days 30 --stdout | python3 -c import sys, json spans json.load(sys.stdin) for s in spans: print(s.get(start_time, N/A), s.get(end_time, N/A)) 5. 核实 span kind 与评估器范围一致如果评估器用--data-granularity trace创建但任务的query_filter是span_kind LLM运行可能找不到合格数据而取消。确保粒度和过滤器一致。6. 检查所有模板变量都能解析模板中的每个{variable}都必须有对应的column_mappings条目且解析为非空值。用真实 span 测试解析ax spans export PROJECT --space SPACE -l 3 --days 7 --stdout | python3 -c import sys, json spans json.load(sys.stdin) # 把下面的路径换成你实际的 column_mappings 值 mappings {input: attributes.input.value, output: attributes.output.value} for i, span in enumerate(spans): print(f--- Span {i} ---) for var, path in mappings.items(): parts path.split(.) val span for p in parts: val val.get(p) if isinstance(val, dict) else None status FOUND if val else MISSING print(f {var} ({path}): {status} — {str(val)[:80] if val else \null\}) 如果某个变量在所有 spans 上都显示 MISSING修正列映射或调整query_filter指向其他 span kind。关联技能生态本技能在 Arize 的 ax 技能族中处于中心位置与其他技能协同使用arize-ai-provider-integrationLLM 提供商集成的完整 CRUDSKILL.md是创建评估器前的凭据前提arize-trace导出 spans 以发现列路径与时间范围SKILL.md其中 OpenInference 语义约定下的attributes.llm.input_messages、attributes.retrieval.documents.contents、annotation.name.label等列参考与本文的列映射直接相关arize-experiment创建实验并导出运行用于 experiment 任务的列映射arize-dataset导出 dataset examples当运行数据缺少input时定位字段arize-link生成指向 Arize UI 中评估器与任务的深链。此外ax-profile 配置文档 提供了凭据持久化的完整指引profile 创建、region 修正、ARIZE_SPACE环境变量设置以及会话结束时保存凭据供下次使用的规范流程ax-setup 文档 覆盖了版本检查、安装升级与 SSL 证书问题的处理。结语基于 Arize 的 LLM-as-judge 评估体系核心是把评判定义Evaluator与运行绑定Task解耦用通用的{input}/{output}/{context}变量写模板、用--classification-choices固定标签集、用column_mappings完成项目级接线。回填先行验证、持续监控跟进配合评估索引滞后 1–2 小时query_filter仅作用于已索引属性等运行机制认知就能把幻觉检测、回答正确性、相关性等评估从一次性脚本升级为可维护、可复现、可扩展的自动化质量防线。【免费下载链接】awesome-copilotCommunity-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.项目地址: https://gitcode.com/GitHub_Trending/aw/awesome-copilot创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表