saved
Imp: declarative self-improving language-model programs for Elixir
Hraness wrote this summary from a saved copy of the source. Quotations are taken word for word from the source.
gist
deepfates' Imp is a DSPy port to the BEAM for declarative, self-improving language-model programs in Elixir. You declare typed signatures, choose predictors such as predict, chain-of-thought, or ReAct, and let optimizers like GEPA improve instructions and examples against labeled sets. Programs can run in-process or as supervised OTP runs with tool authorization, MCP import, ACP serving, and shapes such as RLM and CodeAct. Imp 0.5 is experimental on Hex and needs Elixir 1.19 or later.
ideas
- Signatures replace hand-written prompts. Imp builds the prompt from the signature, checks the reply, and returns typed fields or an error.
- Optimizers improve measurable programs. Labeled train, val, and test sets plus a metric drive GEPA, MIPROv2, SIMBA, few-shot bootstraps, and weight-training paths.
- Agents are OTP processes. Imp.start_run supervises a program so you can authorize tool calls, watch events, stop it, and tie its lifetime to the starter process.
- The same optimizers steer agents. GEPA can reflect on whole agent runs, and Optimize Anything can rewrite scorable tool descriptions or JSON.
- 0.5 is experimental. The first Hex release may still change its API, and the README says its optimizers still need large-scale benchmarking.
quotes
“Declarative, self-improving language-model programs for Elixir.”
“You never write a prompt or a parser.”
“GEPA runs the program, reads where it failed, and rewrites its instructions.”
“The result is a new program whose instructions and examples you can read, save as JSON, and review as a diff.”