Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
Dev.to AI · 2026/8/4 16:48:38

Build an AI Evaluation from a Hugging Face Dataset Without Writing Python

AI 中文解读
准备好了!以下是这篇新闻的中文摘要: AI评估现在也能“零代码”搞定了!Quantiles推出了一款无代码评估工具,你不需要写一行Python,只要动动鼠标配置几个参数,就能用Hugging Face上的现成数据集,比如MMLU-Pro,搭建一套完整的AI性能测试。这就像以前需要自己动手组装电脑,现在直接买配件插上就能用。目前它支持两种最常见的评测方式:一种是“精确匹配”,看看AI的答案和标准答案是否一模一样;另一种是“选择题”,从几个选项里选对的。对于大多数常规测试来说,这就够了。如果你需要更复杂的逻辑,比如多步骤推理或特殊评分,它也没落下,仍然支持传统编码方式。这项技术的最大意义在于,把AI评测的门槛一下子拉低了。以前企业或开发者想验证自己的AI模型水平,得请工程师专门写代码,费时费力。现在业务人员也能自己上手,快速做出一套可靠的测试,大大加快了AI产品的迭代和落地。普通人以后用到的AI服务,质量把关会变得更高效、更可靠。
<p>AI benchmarks and evaluations have varying datasets, prompts, measurement techniques, and more, but core execution logic rarely changes. In most cases, maintaining multiple custom implementations of the same evaluation pattern increases complexity and maintenance overhead.</p> <p>Quantiles' Custom No-code Evaluations provide a purely configuration-based way to build evaluations without writing any code yourself. Below, we'll walk through creating one using the MMLU-Pro dataset, but you can use any dataset compatible with the evaluation styles described below.</p> <h2> Supported custom no-code evaluation styles </h2> <p>Quantiles custom no-code evaluations currently support two deterministic scoring styles:</p> <ul> <li> <code>exact_match</code>: each sample has a golden answer, and that answer is one fixed string, number, or boolean, and each sample has a golden answer</li> <li> <code>multiple_choice</code>: each sample has an answer selected from a finite set of choices, and each sample includes possible answers and the correct choice</li> </ul> <p>If you're building an evaluation that fits either of these two styles, we encourage you to use custom no-code evaluations. Otherwise, if your evaluation requires the use of retrieval, multi-step agents, judges, highly specialized scoring logic, or any other logic that doesn't fit the custom no-code framework, use Quantiles <a href="https://quantiles.io/documentation/custom-evaluations" rel="noopener noreferrer">custom code evaluations</a>.</p> <h2> Prerequisites </h2> <p>We introduced the Quantiles CLI installation process in our <a href="https://huggingface.co/blog/phranzia/quantiles-local-ai-evaluation" rel="noopener noreferrer">previous Hugging Face article</a>. Here is the command again for reference:<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight shell"><code>curl <span class="nt">-fsSL</span> https://cli.quantiles.io/install.sh | bash </code></pre> </div> <p>After you have the <code>qt</code> CLI installed, create a working directory containing these two files:<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight plaintext"><code>. ├── quantiles.toml └── prompts/ └── mmlu-pro.txt </code></pre> </div> <p>The example in this article uses the public <code>quantiles/MMLU-Pro</code> mirror of the canonical MIT-licensed <a href="https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro" rel="noopener noreferrer">TIGER-Lab/MMLU-Pro</a> dataset.</p> <h2> 1. Define the evaluation </h2> <p>Each evaluation is built around four core configuration fields:</p> <ul> <li> <code>type</code>: set this value to <code>custom_nocode</code>.</li> <li> <code>dataset</code>: define the dataset source, configuration, split, and revision.</li> <li> <code>prompt_template_file</code>: specifies how the prompt should be rendered for each sample.</li> <li> <code>style</code>: configures the specific style (see above for details on valid styels), maps dataset fields to choices and expected labels as appropriate, and selects parsing and scoring behavior.</li> </ul> <p>The following <code>quantiles.toml</code> configuration shows how to define the MMLU-Pro evaluation using these four fields:<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight toml"><code><span class="c"># MMLU-Pro Custom No-Code Evaluation Example</span> <span class="nn">[benchmarks.mmlu-pro-nocode]</span> <span class="c"># This field must be set to "custom_nocode"</span> <span class="py">type</span> <span class="p">=</span> <span class="s">"custom_nocode"</span> <span class="c"># Identifies the Hugging Face dataset to evaluate</span> <span class="py">dataset</span> <span class="o">=</span> <span class="p">{</span> <span class="py">name</span> <span class="p">=</span> <span class="s">"quantiles/MMLU-Pro"</span><span class="p">,</span> <span class="py">config_name</span> <span class="p">=</span> <span class="s">"default"</span><s
分享
阅读原文