RAG Architecture Decision Record Template for Production

GT

GigaRAG team

Retrieval11 min read
On this page
GigaRAG article cover for RAG Architecture Decision Record Template for Production Teams.

RAG Architecture Decision Record Template for Production Teams

A RAG diagram is useful for outlining the system. Use an architecture decision record to document the approved chunking rule, retrieval choice, and conditions for revisiting that choice.

Use a RAG architecture decision record to capture the reasoning behind the system design, including alternatives considered and limits that affect quality, cost, safety, and the next code change. Store approved records in Git, and make current ADRs available to agents as implementation context.

For agent-readable guidance, identify the decision owner, review point, and conditions that call for revisiting the choice. If your team uses GigaRAG, it can keep project knowledge available across agent sessions and tools while the ADR remains the documented decision record.

Before you begin

A useful RAG ADR makes the decision, its rationale, and its implementation constraints easy to find. Prepare these details before drafting:

  • Name the specific decision and its owner.
  • Record the problem, alternatives, and evidence considered.
  • List relevant RAG constraints, such as chunking, retrieval, evaluation, access control, and cost.
  • Set a review point and describe how the decision could be reversed.

What is a RAG architecture decision record template?

A RAG ADR records one architecture decision and its rationale. For RAG work, it can also document the context, alternatives, constraints, and implementation boundaries the team wants contributors to follow.

[!note] An ADR records a single architectural decision and its rationale. Use a separate record when a new choice needs its own rationale, owner, or review path.

What an ADR captures: decision, context, rationale, and consequences

An ADR records one decision and its rationale, a pattern also used in Spec Kitty's ADR documentation. For RAG, that might be "use hybrid retrieval with reranking," not a broad note about the whole system.

Add the context that made the choice necessary, the evidence and alternatives considered, and the consequences, such as latency, cost, access, or maintenance limits. State the details in terms that an implementer can apply.

When to create a separate ADR instead of extending an existing record

Create a new record when a choice can be approved, reversed, or reviewed on its own. Chunking strategy, embedding model, retrieval method, and access-control rules may warrant separate ADRs when they need distinct rationale, ownership, or review.

Don't turn trivial settings into paperwork. Extend an existing ADR when the change doesn't alter its approved decision.

Pair an ADR with tests, evaluation, code review, and operational controls

Use the ADR to state the intended architecture, then define the validation and operational controls that apply to the change.

Run the evaluation, code-review, permission, and production-monitoring processes your system requires. The ADR can identify the expected behavior, relevant limits, and actions to take when those checks identify a problem.

Git ADRs and agent memory: roles in an implementation workflow

FactorGit ADRAgent memory
Workflow roleDocument the approved decision and rationaleSurface project context during implementation
Change handlingKeep the ADR Markdown with the projectRefresh retrieved context when an ADR changes
Approval workflowSubmit the ADR with the relevant implementation workRetrieve ADRs that the team has marked Approved
Use in implementationState the constraints the change must followHelp an agent find the applicable constraints
Decision changesMark an earlier ADR as superseded by a newer recordUpdate indexed context to point to current guidance
Comparison of Git ADR and agent memory roles in implementation work.

RAG decisions to make explicit in an ADR

Your ADR should name the rule, owner, evidence, and operational limit for each consequential choice. That gives implementation work a documented set of constraints instead of leaving decisions scattered across tickets and agent sessions.

Knowledge corpus, ownership, freshness, and exclusion rules

State which sources belong in the corpus, who can approve them, how often they refresh, and which content the team excludes from the index. Include deleted records and stale versions so reviewers can determine whether retrieved material is current and within the approved corpus.

Chunking, metadata, embedding, retrieval, and reranking choices

Record chunk boundaries, overlap, metadata fields, embedding model, retrieval method, candidate count, and reranking rule. Keeping these parameters together makes the selected retrieval configuration explicit.

In Anuj Maharjan and Umesh Yadav's Chunking, Retrieval, and Re-ranking: An Empirical Evaluation of RAG Architectures for Policy Document Question Answering, the advanced configuration with cross-encoder reranking had higher faithfulness than the study's basic RAG configuration on its CDC policy-document corpus. Keep that result scoped to its corpus and evaluation.

Grounding, citations, access control, and evaluation criteria

Specify the team's policy for citing retrieved sources, how the system should respond when evidence is missing, and which permissions apply before retrieval rather than after generation. Define evaluation sets and pass criteria for retrieval, faithfulness, relevance, and refusal behavior when those measures apply.

Don't treat answer fluency as proof.

Latency, cost, observability, incident response, and rollback triggers

Set request-latency and spend limits, then name the metrics and alerts that show when the system is crossing them. Document the budget and measurement points for each stage in your request path, including retrieval and reranking.

Define who can disable a feature, restore a prior index or configuration, and act when citations, access checks, or evaluation results fail. That gives your team a path back when the system crosses a stated limit.

Steps: turn a RAG choice into an approved ADR

  1. Identify one RAG decision to document.
  2. Describe the problem and the constraints that shape the selected design.
  3. Compare feasible alternatives and record the evidence considered.
  4. State the chosen approach, its consequences, and implementation boundaries.
  5. Assign an owner and define a review point and rollback conditions.
  6. Submit the ADR for team review and link it from the relevant implementation work.
  7. Update or supersede the record when the team changes the decision.
Four stages for documenting, approving, and maintaining a RAG ADR.

Copyable RAG architecture decision record template

Keep one file per consequential choice. This template records one decision and its rationale while adding the RAG controls that affect retrieval, safety, and reversal. Store the file in Git, submit it for review with the relevant work, and mark it Approved after the named owners agree.

Template fields: title, status, date, owners, and decision scope

# ADR-###: [short decision title]

- Status: Proposed | Approved | Superseded | Rejected
- Date: YYYY-MM-DD
- Owners: [names or team]
- Approvers: [names or roles]
- Scope: [service, repository, or request path]
- Supersedes: [ADR ID or none]
- Review date: YYYY-MM-DD

## Context and constraints
- User task:
- Corpus, owner, and refresh rule:
- Excluded content:
- Access-control rule:
- Risk:
- Latency and cost limits:
- Non-goals:

## Decision and implementation contract
- Selected option:
- Chunking and metadata:
- Embeddings and index:
- Retrieval and reranking:
- Grounding and citation rule:
- Interfaces, configuration, and defaults:
- Failure behavior:

## Alternatives considered and rejected
| Option | Evidence | Trade-off | Why rejected |
|---|---|---|---|
| [option] | [test, review, or source] | [cost, risk, quality] | [reason] |

## Validation and lifecycle
- Evaluation set and pass criteria:
- Metrics: retrieval, faithfulness, relevance, refusal, latency, cost
- Monitoring and alert:
- Rollback trigger:
- Rollback steps and owner:
- Reversal conditions:

Context and constraints: user task, corpus, risk, and non-goals

Name the user task, not just the model. Document the evidence the system is intended to retrieve, the response behavior the team expects, and the constraints that shape the selected design.

Decision and implementation contract: selected option, interfaces, and defaults

Write defaults that code can follow. If an agent can't identify the approved retrieval path or failure behavior from this record, it should stop and ask for review.

Alternatives considered and rejected: evidence, trade-offs, and why they lost

For each rejected option, record the evidence and trade-off that led to the decision. Specify what new evidence would justify reconsidering that option.

Validation and lifecycle: evaluation plan, monitoring, review date, supersedes, and rollback

Before release, set the review date and rollback owner. Define the signals that require action when the corpus, traffic, permissions, or evaluation results change.

How to share approved RAG decisions with AI coding agents

Make ADRs that the team has reviewed and merged available to agents during implementation. Configure retrieval so agents receive the ADRs relevant to the code path they are changing.

Three steps for sharing approved RAG decisions with coding agents.

1. Keep ADR Markdown in Git

Keep approved ADRs in your repository. Index only files with an Approved status, and remove or clearly mark records that a later ADR supersedes.

2. Use GigaRAG as shared context, not approval

Use GigaRAG to keep approved ADRs and other project knowledge available to connected agents across sessions and tools during implementation work. Connect agents to the central Hive Mind through MCP or the API, and limit the material to records your team intends agents to use.

Use GigaRAG access controls to manage which materials each agent can use. Keep superseded records clearly marked so agents working with project knowledge can identify the current guidance.

3. Retrieve an approved ADR before code changes

Ask the agent to retrieve the ADR for the code path, state its ADR identifier, and apply only the stated contract. If it finds no approved record, or finds conflicting records, it should stop for human review.

Treat ADRs as living constraints, not permanent truth

Treat an ADR as the record of the decision made under its stated assumptions. Revisit that decision when the corpus, traffic pattern, model, or risk profile changes.

[!tip] For agent-assisted coding, link the approved ADR from the task or repository guidance and tell the agent to treat it as a constraint, not as permission to revise the architecture.

Keep the earlier record to preserve the decision history, but make its current authority plain. Link superseded ADRs to the approved record that replaced them.

Use status, supersedes, and review-date fields to identify current guidance

Give each consequential record a status, review date, and supersedes field. Create a new ADR when the decision changes, rather than rewriting history.

Review when the corpus, traffic, model behavior, or risk changes. If evaluation fails or costs breach the stated limit, follow the rollback trigger.

Do not let an agent silently change an approved architecture decision

Require a new review when an implementation change would alter an approved architecture decision.

Require human review when a change conflicts with an ADR, needs a new retrieval approach, or has no applicable approved record. Document the accepted replacement and the ADR it supersedes in the project history.

Frequently asked questions

What should a RAG architecture decision record include?

Record one decision and its rationale, along with the problem, alternatives, evidence, operational constraints, owner, review point, and rollback conditions. For RAG, make chunking, retrieval, evaluation, and access-control choices explicit when they apply to that decision.

When should a team create a new RAG ADR?

Create one when the team needs to document a consequential architectural choice and its rationale. Keep each ADR focused on a single decision.

Should chunking and embedding choices be separate ADRs?

It depends on whether they have different rationales, owners, or review paths. Use separate ADRs when they do, and record them together only when the team makes them as one connected decision.

How do you document rejected RAG architecture options?

List the alternatives considered and explain why the chosen option won. Include the evidence and constraints that informed the comparison.

How should a team track a superseded RAG decision?

Keep the earlier decision as part of the history and link it to the newer ADR. Mark the earlier choice as superseded so readers can tell past decisions from current guidance.

Can AI coding agents use ADRs as implementation guidance?

Teams can provide ADRs to coding agents as implementation guidance. Review the resulting work against the approved record, and route changes that alter the decision through the team’s approval process.

Does agent memory replace Git for architecture decisions?

No. Use agent memory as implementation context, and maintain approved ADRs in Git for this workflow’s decision record and history.

What should trigger a review or rollback of a RAG architecture decision?

Review the decision when its stated assumptions or constraints no longer hold, or when evaluation and operational evidence show that the chosen approach is not meeting its goals. Define review signals and rollback conditions in the ADR so the team knows what to check.

About GigaRAG

GigaRAG is a shared memory platform for AI agents that helps developers and teams keep project knowledge available across sessions and tools. In an ADR workflow, teams can make approved decisions and related project materials available to agents as implementation context.

Connect agents to a central Hive Mind through MCP or the API, with access controls to manage what each agent can use. In an ADR workflow, those controls can limit access to the project guidance intended for a particular agent or task.

All posts