AI 编程 3.0 · 值得看 2026-09-27 · GitHub

Imp: declarative self-improving language-model programs for Elixir/BEAM

deepfates/imp 是把 DSPy 全量移植到 BEAM(Elixir/Erlang 虚拟机)上的项目:开发者用 signature 声明"输入 输出字段"(如 issue -> kind: enum[bug,feature,question], summary),由 Imp 生成 prompt解析并做字段校验,全程不需要手写提示词或解析器;predict / chain_of_thought / react 三种模块风格覆盖单次推理与多步 tool 调用...

打开原文回到归档

Imp: declarative self-improving language-model programs for Elixir/BEAM

原文链接: https://github.com/deepfates/imp
作者: deepfates
发布时间: 2026-09-27
源: arXiv外部扫描 (2026-09-28)

摘要

deepfates/imp 是把 DSPy 全量移植到 BEAM(Elixir/Erlang 虚拟机)上的项目:开发者用 signature 声明"输入 输出字段"(如 issue -> kind: enum[bug,feature,question], summary),由 Imp 生成 prompt解析并做字段校验,全程不需要手写提示词或解析器;predict / chain_of_thought / react 三种模块风格覆盖单次推理与多步 tool 调用;BEAM 上的 agent 是独立进程,自带 state可被 supervisor 接管优化器侧覆盖 GEPA(读失败重写指令)LabeledFewShot / BootstrapFewShot(挑样例)MIPROv2(搜索指令+样例组合)SIMBA(从自身尝试里学规则与样例)以及 fine-tuning / GRPO,且优化产物可读可存为 JSON可走 diff reviewImp.call/2 在调用者进程跑,Imp.start_run/3 把同一程序跑成独立 supervised 进程,配合 authorize 回调可以细粒度允许/拒绝每一次 tool call是声明式 LLM 编程范式向 Erlang 生态落地的代表作

English Summary

Imp is a full port of DSPy to the BEAM: developers declare typed signatures (e.g. issue -> kind: enum[bug,feature,question], summary), Imp builds prompts and checks responses, with predict/chain_of_thought/react modules for single-call reasoning or tool-using agents that run as supervised processes. Optimizers include GEPA (read failures, rewrite instructions), LabeledFewShot/BootstrapFewShot, MIPROv2, SIMBA, fine-tuning, and GRPO, with human-readable diffable artifacts; Imp.start_run/3 exposes per-tool-call authorization callbacks for supervised execution.

为什么值得关注

把 DSPy 整套声明式 + 优化器范式搬到 BEAM:Elixir 生态第一次有了 process-friendly 的 LLM 编程模型

信息源