Skip to content

BEAM 评测 ​

English version

BEAM 是一个面向长上下文对话场景的记忆能力评测基准,每个 case 包含一段被切分为多个 batch 的超长对话。

1. 数据准备 ​

BEAM 按对话规模提供多种数据变体 —— 100K / 500K / 1M / 10M,可在不同上下文长度下 压测记忆系统。题型包括 abstention(拒答)、contradiction resolution(矛盾消解)、event ordering(事件排序)、information extraction(信息抽取)、instruction following(指令遵循)、 knowledge update(知识更新)、multi-session reasoning(多会话推理)、preference following (偏好遵循)、summarization(摘要)与 temporal reasoning(时间推理)。

BEAM 是公开仓库,clone 到 benchmark/beam/dataset/ 下:

bash
mkdir -p benchmark/beam/dataset
cd benchmark/beam/dataset
git clone https://github.com/mohammadtavakoli78/BEAM.git

clone 完成后,benchmark/beam/dataset/BEAM/ 目录下应包含 chats/、src/、topics/ 等子目录。

2. 使用 BEAM 插件 ​

2.1 简介 ​

BEAM 插件为每个 case 加载 chat.json,将每个 batch 转换为一个 ReMe 会话,按时间顺序摄入独立工作区,随后执行 digest_update。插件以 agentic(ReAct)模式回答探测问题,再通过 BEAM 基于 rubric 的 answer_judge 任务给出分级分数与二元判定,并输出各类型平均分。

2.2 如何使用 ​

安装与环境配置 ​

在仓库根目录以 editable 模式安装 ReMe 和 BEAM 插件:

bash
python -m pip install -e ".[as]"
reme plugins install ./plugins/beam --editable
reme plugins install ./plugins/beam-judge --editable
reme plugins validate beam

runner 显式启用已安装的 beam 插件,并将插件默认配置与 ReMe 内置的 benchmark 配置组合。 editable 安装会让 plugins/beam 下的源码修改直接生效,无需重复安装。 自定义完整应用配置路径可通过 reme.config 指定,并可使用 extends: benchmark。 模型凭据通过公共 benchmark 配置中声明的环境变量设置。

关键配置 — benchmark/beam/config.yaml ​

配置项含义
dataset.beam_rootBEAM 数据集根目录(benchmark/beam/dataset/BEAM)。
dataset.chat_size运行的变体:100K / 500K / 1M / 10M。
dataset.case_ids指定 case(如 ["1","2"]),空表示全部。
dataset.start_index / num_itemscase 分页(num_items 为 0 表示全部)。
dataset.workspace_rootcase 工作区根目录(benchmark/beam/workspaces/beam)。
evaluation.num_workers0 = 自动,1 = 串行,>1 = 并行。
reme.config使用的 ReMe 配置(benchmark)。
output.dir结果目录(benchmark/beam/results)。

运行评测 ​

在仓库根目录执行:

bash
python benchmark/beam/run.py
python benchmark/beam/run.py --config benchmark/beam/config.yaml
python benchmark/beam/run.py -q                        # 安静模式
python benchmark/beam/run.py --eval_only               # 复用已有工作区,仅执行查询 + 评判

2.3 结果 ​

结果以 JSON 文件写入 output.dir,文件名为 results_<chat_size>_<timestamp>.json, 同时控制台会打印含各类型分数的汇总。日志约定在各基准间通用,见 总说明。

100K ​

agentscope==2.0.4.post1,conda reme 环境,20 并发,eval-only(复用已构建 memory) (2026-08-05,20 cases / 400 Qs,总耗时 46.0 min)

题型AgenticBinaryinput tok/qoutput tok/qtotal tok/qtool calls/q
总体0.6610.62063.1K1.8K65.0K3.33
abstention0.5500.55096.0K1.1K97.1K4.58
contradiction_resolution0.4380.41232.3K0.9K33.1K2.48
event_ordering0.5010.423140.2K5.2K145.4K4.70
information_extraction0.8730.83250.2K0.9K51.1K3.15
instruction_following0.7500.72538.0K0.8K38.8K2.67
knowledge_update0.6880.67531.2K0.7K31.8K2.27
multi_session_reasoning0.6260.58485.0K4.6K89.6K4.28
preference_following0.9250.91234.3K1.0K35.3K2.50
summarization0.6230.46189.7K2.1K91.7K4.12
temporal_reasoning0.6370.62534.6K1.0K35.6K2.52

Memory Construction 平均 token 消耗(default agent,20 cases 全量构建):

Agentinput tok/caseoutput tok/casetotal tok/case
default2.2M136.7K2.3M

1M ​

agentscope==2.0.4.post1,conda reme 环境,20 并发,全量构建 memory (2026-08-05,35 cases / 700 Qs,总耗时 459.2 min)

题型AgenticBinaryinput tok/qoutput tok/qtotal tok/qtool calls/q
总体0.6500.609100.0K1.8K101.8K3.49
abstention0.4290.429118.7K1.2K119.9K4.20
contradiction_resolution0.3910.36449.8K0.8K50.6K2.50
event_ordering0.5580.456201.5K3.9K205.4K4.79
information_extraction0.8090.77279.0K0.9K79.8K3.00
instruction_following0.8520.83255.8K0.9K56.7K2.81
knowledge_update0.7790.77146.0K0.7K46.6K2.37
multi_session_reasoning0.6580.612138.1K2.9K141.0K4.40
preference_following0.7980.77751.8K0.9K52.7K2.53
summarization0.6930.537158.8K2.9K161.7K4.44
temporal_reasoning0.5360.536100.2K3.1K103.3K3.90

Memory Construction 平均 token 消耗(default agent,35 cases 全量构建):

Agentinput tok/caseoutput tok/casetotal tok/case
default31.9M1.4M33.4M

3. 使用 HoMe 优化插件 ​

3.1 简介 ​

HoMe 从数据集和指定的 Git 版本准备实验工作区,评测基线后迭代优化 BEAM 插件代码,并返回候选版本的 commit_sha;随后可用该版本在配置的评测集上进行独立评测。

3.2 如何使用 ​

实验准备 ​

按上文获取数据集,并参照 HoMe 运行指南 完成安装。 config_home.yaml 默认在 benchmark/beam/workspaces/home-100K 使用 100K 全部 case 进行优化。 config_home_eval.yaml 默认使用 benchmark/beam/workspaces/home-test-100K, 评测 100K 全部 case,可能与训练数据重叠。可修改 variant 或指定 case_ids 更换评测数据。

从仓库根目录准备优化工作区:

bash
python benchmark/beam/run_home.py

实验运行 ​

运行本地一次性优化:

bash
python benchmark/beam/run_home.py --optimize

将 CANDIDATE_SHA 设为优化器返回的 commit_sha 或其唯一十六进制前缀,再运行本地一次性评测:

bash
python benchmark/beam/run_home_eval.py --commit "$CANDIDATE_SHA"

服务方式见 HoMe 评测指南。

3.3 结果 ​

HoMe 在 BEAM-100K 上优化,在 BEAM-1M 上评测(35 个 case,700 道题)。 Token 用量和 LLM 调用次数均为问答阶段的每题平均值。

题型得分总 Token输入 Token输出 TokenLLM 调用
总体0.70460.4K57.8K2.6K6.7
Abstention0.63643.4K41.9K1.5K6.6
Contradiction Resolution0.70522.4K21.0K1.4K4.6
Event Ordering0.546123.0K116.6K6.4K12.7
Information Extraction0.73532.5K31.2K1.2K5.2
Instruction Following0.90130.7K29.4K1.3K5.5
Knowledge Update0.67119.2K18.3K0.9K4.0
Multi-session Reasoning0.68293.5K88.1K5.4K8.5
Preference Following0.83325.0K23.8K1.2K4.8
Summarization0.726173.2K169.0K4.2K9.4
Temporal Reasoning0.60441.4K39.1K2.3K6.0

Released under the Apache-2.0 License.