evals

openai更新放缓

用于评测大语言模型及 LLM 系统的框架,同时提供开源基准测试注册表,方便对比不同模型和系统的表现。

Evals is a framework for evaluating LLMs and LLM systems, and an open-source registry of benchmarks.

暂无版本19,723star +10 / 7 天3,127fork同步于 2026-11-10 11:24 UTC

怎么上手

由 README 提炼,执行前请确认
pip install evals
硬件要求按 README 说明

README 未说明硬件要求;评测通过 OpenAI API 调用模型,需自备 OPENAI_API_KEY 并注意 API 费用

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

OpenAI 开源的 LLM 评测框架与基准注册表,帮你判断模型版本变化对用例的影响

用于评测大语言模型及 LLM 系统的框架,同时提供开源基准测试注册表,方便对比不同模型和系统的表现。

核心能力

  • 提供现成 eval 注册表,覆盖模型不同维度
  • 支持用自有数据构建不公开的私有 eval
  • 用 JSON 数据加 YAML 参数即可写评测,无需写代码
  • 支持 prompt 链与工具调用等复杂系统的 Completion Function Protocol
  • 可将评测结果记录到 Snowflake 数据库

容易踩的坑

评测数据用 Git-LFS 存储,需先装 git-lfs 并执行 git lfs fetch --all 与 git lfs pull,否则 registry/data 下只有指针文件;需 Python 3.9 及以上并设置 OPENAI_API_KEY 环境变量;运行结束后可能卡在最终报告处,属已知问题,可安全中断

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    OpenAI Evals

    You can now configure and run Evals directly in the OpenAI Dashboard. Get started →

    Evals provide a framework for evaluating large language models (LLMs) or systems built using LLMs. We offer an existing registry of evals to test different dimensions of OpenAI models and the ability to write your own custom evals for use cases you care about. You can also use your data to build private evals which represent the common LLMs patterns in your workflow without exposing any of that data publicly.

    If you are building with LLMs, creating high quality evals is one of the most impactful things you can do. Without evals, it can be very difficult and time intensive to understand how different model versions might affect your use case. In the words of OpenAI's President Greg Brockman:

    Setup

    To run evals, you will need to set up and specify your OpenAI API key. After you obtain an API key, specify it using the OPENAI_API_KEY environment variable. Please be aware of the costs associated with using the API when running evals. You can also run and create evals using Weights & Biases.

    Minimum Required Version: Python 3.9

    Downloading evals

    Our evals registry is stored using Git-LFS. Once you have downloaded and installed LFS, you can fetch the evals (from within your local copy of the evals repo) with:

    cd evals
    git lfs fetch --all
    git lfs pull
    

    This will populate all the pointer files under evals/registry/data.

    You may just want to fetch data for a select eval. You can achieve this via:

    git lfs fetch --include=evals/registry/data/${your eval}
    git lfs pull
    

    Making evals

    If you are going to be creating evals, we suggest cloning this repo directly from GitHub and installing the requirements using the following command:

    pip install -e .
    

    Using -e, changes you make to your eval will be reflected immediately without having to reinstall.

    Optionally, you can install the formatters for pre-committing with:

    pip install -e .[formatters]
    

    Then run pre-commit install to install pre-commit into your git hooks. pre-commit will now run on every commit.

    If you want to manually run all pre-commit hooks on a repository, run pre-commit run --all-files. To run individual hooks use pre-commit run <hook_id>.

    Running evals

    If you don't want to contribute new evals, but simply want to run them locally, you can install the evals package via pip:

    pip install evals
    

    You can find the full instructions to run existing evals in run-evals.md and our existing eval templates in eval-templates.md. For more advanced use cases like prompt chains or tool-using agents, you can use our Completion Function Protocol.

    We provide the option for you to log your eval results to a Snowflake database, if you have one or wish to set one up. For this option, you will further have to specify the SNOWFLAKE_ACCOUNT, SNOWFLAKE_DATABASE, SNOWFLAKE_USERNAME, and SNOWFLAKE_PASSWORD environment variables.

    Writing evals

    We suggest getting starting by:

    Please note that we are currently not accepting evals with custom code! While we ask you to not submit such evals at the moment, you can still submit model-graded evals with custom model-graded YAML files.

    If you think you have an interesting eval, please open a pull request with your contribution. OpenAI staff actively review these evals when considering improvements to upcoming models.

    FAQ

    Do you have any examples of how to build an eval from start to finish?

    • Yes! These are in the examples folder. We recommend that you also read through build-eval.md in order to gain a deeper understanding of what is happening in these examples.

    Do you have any examples of evals implemented in multiple different ways?

    • Yes! In particular, see evals/registry/evals/coqa.yaml. We have implemented small subsets of the CoQA dataset for various eval templates to help illustrate the differences.

    When I run an eval, it sometimes hangs at the very end (after the final report). What's going on?

    • This is a known issue, but you should be able to interrupt it safely and the eval should finish immediately after.

    There's a lot of code, and I just want to spin up a quick eval. Help? OR,

    I am a world-class prompt engineer. I choose not to code. How can I contribute my wisdom?

    • If you follow an existing eval template to build a basic or model-graded eval, you don't need to write any evaluation code at all! Just provide your data in JSON format and specify your eval parameters in YAML. build-eval.md walks you through these steps, and you can supplement these instructions with the Jupyter notebooks in the examples folder to help you get started quickly. Keep in mind, though, that a good eval will inevitably require careful thought and rigorous experimentation!

    Disclaimer

    By contributing to evals, you are agreeing to make your evaluation logic and data under the same MIT license as this repository. You must have adequate rights to upload any data used in an eval. OpenAI reserves the right to use this data in future service improvements to our product. Contributions to OpenAI evals will be subject to our usual Usage Policies: https://platform.openai.com/docs/usage-policies.