Imp is an Elixir port of DSPy that enables declarative, self-improving language-model programs on the BEAM. It provides typed signatures for LLM calls, multiple optimization algorithms like GEPA that refine instructions and examples, and support for agent loops with tools running under OTP supervision.
DSPy is a Python framework for building AI systems using structured signatures instead of prompts, enabling maintainable and modular programs. It provides composable primitives like signatures, modules, and optimizers that automatically tune performance without requiring prompt rewrites.