* refactor(plugins): move BaseAgenticAnswerStep into lme/beam plugins Move the shared benchmark answer base class from the core reme.steps.benchmark package into each plugin's own src tree (reme_lme.base_agentic_answer / reme_beam.base_agentic_answer) with absolute imports, drop the core benchmark steps package, and update plugin READMEs accordingly. * refactor(plugins): simplify benchmark answer steps * docs(plugins): clarify benchmark answer step migration --------- Co-authored-by: jinli.yl <jinli.yl@alibaba-inc.com>
2.1 KiB
BEAM 插件
插件包含 BEAM 的记忆、回答 Step 及对应 Job 默认配置。可信评分 Step、提示词和
answer_judge Job 位于独立的 plugins/beam-judge 插件中。
ReMe 内置的 benchmark.yaml 负责公共评测 Job 和 Component;数据集处理、runner 和结果仍留在
benchmark/beam。
在仓库根目录以 editable 模式安装 ReMe 和本插件,再运行评测:
python -m pip install -e ".[as]"
reme plugins install ./plugins/beam --editable
reme plugins install ./plugins/beam-judge --editable
reme plugins validate beam
reme plugins validate beam-judge
python benchmark/beam/run.py
editable 安装会注册 beam entry point,并让源码修改立即生效。runner 选择内置 benchmark
配置,并为每个 Application 显式启用 beam 和 beam-judge。安装只让插件可被发现,不会在所有应用中全局启用。
plugin.yaml 注册 backend,并通过 application_defaults 提供插件拥有的 auto_memory、
agentic_answer Job。完整评测使用
reme start config=benchmark plugins='["beam", "beam-judge"]'。公共评测配置不继承 default,只运行声明的 Job:
索引手动更新,dream 定时任务和可选的 auto_dream
均保持关闭。原有 auto_memory、agentic_answer、answer_judge、bench、judge 名称及模型环境变量
保持不变,显式应用参数和 CLI 覆盖仍优先。安装或启用插件不会自动开始评测。
自定义 Python 调用应从 reme_beam 导入记忆、搜索和回答 Step;安装 beam-judge 后再从
judge_beam 导入评判 Step。
BeamAgenticAnswerStep 现在直接实现回答逻辑。原来的
reme.steps.benchmark.BaseAgenticAnswerStep 导入路径已移除;自定义子类可继承
reme_beam.BeamAgenticAnswerStep 以复用 BEAM 回答行为,或基于
reme.steps.base_step.BaseStep 自行实现 Step。
卸载插件后,Application 和 CLI 服务必须移除插件选择,直到再次安装。
卸载不会删除数据集、工作区或结果。修改插件后需重启已有服务。