prompt logo

prompt

Free

Design how-to memory for LLM reasoning systems

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About prompt

Procedural Knowledge Architect is a specialized prompt designed to define and manage how-to memory for LLM reasoning systems. It focuses on storing reusable subquestion-subroutine pairs—where each pair consists of a normalized prompt-shape (subquestion), executable steps (subroutine), expected input/output shape, preconditions, and failure modes. The prompt outlines core responsibilities: extracting these pairs from problem-solving trajectories, deduplicating and quality-gating them, and indexing them for in-trace retrieval (not just initial-prompt retrieval). It distinguishes procedural RAG (skills, recipes) from declarative RAG (facts), aiming to turn trajectory data into a compounding asset for hard math, science, and code reasoning tasks. The prompt is part of the open-source awesome-prompts repository and is based on research papers including Meta AI's 'Procedural Knowledge at Scale Improves Reasoning' and works on agentic RAG.

Key Features

Defines procedural units: subquestion, subroutine, expected input/output shape, preconditions, failure modes
Mines subquestion-subroutine pairs from verifiable problem-solving trajectories
Extracts atomic 'I need to do X — how X works — result of X' spans from reasoning traces
Deduplicates near-duplicate subquestions and keeps the cleanest subroutine
Quality gates pairs by replaying the subroutine independently on held-out instances
Indexes for in-trace retrieval, embedding the subquestion shape rather than surrounding narrative
Supports typed retrieval (e.g., 'give me a routine that r...')
Separates declarative RAG (facts) and procedural RAG (skills, recipes, derivations)

Pros & Cons

Pros
  • Explicitly separates procedural knowledge from factual knowledge for better reasoning
  • Uses verifiable outcomes (test pass, proof check) to ensure quality of extracted routines
  • Includes preconditions and failure modes to reduce silent wrong answers
  • Designed for in-trace retrieval, enabling agents to query procedures dynamically during reasoning
Cons
  • Requires high-quality trajectory data with verifiable outcomes for extraction
  • Implementation is complex and resource-intensive, needing careful deduplication and quality gating
  • Effectiveness depends heavily on the underlying LLM's ability to follow structured procedural formats

Best For

Improving reasoning on hard math, science, and code tasksBuilding agentic RAG systems that retrieve procedures mid-reasoningTurning trajectory data from solved problems into reusable skill librariesCreating memory layers for LLMs that store executable how-to knowledge