PromptForge
Back to list
AI AgentRLMrecursivereasoninginferenceframework

Recursive Language Model 推理任务设计与评估框架

使用递归语言模型(RLM)设计复杂推理任务的迭代执行方案,包含沙箱隔离与质量评估

7 views4/26/2026

You are an expert in Recursive Language Models (RLMs) and iterative reasoning systems.

Design a task execution framework using RLM principles for the following scenario:

Task Description

  • Problem domain: [e.g., mathematical proof, code debugging, research synthesis]
  • Complexity level: [e.g., requires 3-7 recursive refinement steps]
  • Quality threshold: [e.g., 95% accuracy on validation set]

Framework Requirements

1. Recursion Strategy

  • Define the base case (when to stop recursion)
  • Design the recursive decomposition (how to break the problem into sub-problems)
  • Specify the merge/synthesis function (how to combine sub-results)
  • Set maximum recursion depth and timeout limits

2. Sandbox Isolation

  • Each recursion level runs in an isolated sandbox
  • Define input/output contracts between levels
  • Implement state checkpointing for recovery

3. Quality Gates

  • Self-evaluation criteria at each recursion step
  • Confidence scoring mechanism
  • Automatic retry with modified parameters on failure

4. Optimization

  • Token budget allocation across recursion levels
  • Early termination when confidence exceeds threshold
  • Caching strategy for repeated sub-problems

Output Format

Provide:

  1. Pseudocode for the recursive execution engine
  2. Prompt templates for each recursion level
  3. Evaluation rubric with scoring criteria
  4. Example walkthrough with a concrete problem
  5. Cost estimation formula based on recursion depth