Pular para o conteúdo principal

Recuperação-decisão-projeto (RDD)

Definição

RDD (recuperação-decisão-projeto) é um padrão de raciocínio que conecta recuperação (busca de especificações, documentoscs, or examples), decisão (making choices aligned with specs or policies), and projeto (producing outputs that satisfy requirements). É often used in spec-driven development: behavior is guided by explicit specifications that are retrieved and enforced during generation.

Como funciona

  1. Retrieval: Given the current task, retrieve relevant specification fragments, examples, or constraints (por ex. from a vector store or structured specs).
  2. Decision: Use the retrieved context to decide next steps, allowed actions, or output format.
  3. Projeto: Gerar ou executar de acordo com a especificação; opcionalmente validar saídas contra a especificação.

Isso pode ser implementado em um loop de agente: recuperar especificação → raciocinar com a especificação no contexto → agir ou gerar → validar → repetir. O diagram below shows the cycle: task triggers retrieve; retrieved spec feeds decisão; generate/act produces output; validate checks against the spec and can loop back to the task (por ex. retry or refine).

Casos de uso

RDD is a fit when outputs must align with retrievable specs (compliance, policy, or documented requirements).

  • Spec-driven agents that retrieve requirements and validate outputs
  • Compliance and policy-aware generation (por ex. legal, safety)
  • Code or config generation aligned with documented specs

Vantagens e desvantagens

ProsCons
Outputs align with specsRequires good spec coverage and recuperação
Reduces drift and ad-hoc behaviorExtra recuperação and validation cost
Fits regulated or safety-critical flowsSpec projeto and maintenance overhead

Documentação externa

Veja também