dspy-reasoning-modules
Installation
SKILL.md
DSPy Reasoning Modules
Goal
Choose the appropriate DSPy reasoning module for long-context exploration, code-assisted reasoning, or parallel execution.
Module Selection
| Module | Use it for | Important constraint |
|---|---|---|
dspy.RLM |
Exploring very large contexts with iterative REPL code and recursive sub-LM calls | Experimental; requires Deno by default |
dspy.ProgramOfThought |
Solving tasks by generating and executing Python | Requires Deno by default |
dspy.CodeAct |
Combining generated Python with predefined tool functions | Functions only; requires Deno |
dspy.Parallel |
Running (module, example) pairs concurrently |
Tune threads and error handling |
RLM for Large Contexts
RLM treats long inputs as external data in a sandbox rather than placing the full context in each LM prompt.