Skip to content
Weave templates

RAG — Production Architecture

Production-grade RAG with hybrid retrieval, reranker, guardrails, and eval feedback loop.

Template previewWeave
Rendering…

What this template contains

Shapes
13
Connectors
15
Includes
User, Input guardrail, Query rewrite, BM25 index, Vector DB, KG cache and 7 more
Source
34 lines

Make it your own.

{
  "nodes": [
    { "id":"u","type":"user","label":"User","x":40,"y":180 },
    { "id":"g1","type":"hexagon","label":"Input\nguardrail","x":200,"y":160,"fill":"#fee2e2" },
    { "id":"rw","type":"rounded","label":"Query rewrite","x":380,"y":160,"fill":"#dbeafe" },
    { "id":"bm","type":"database","label":"BM25 index","x":560,"y":40 },
    { "id":"vec","type":"database","label":"Vector DB","x":560,"y":160 },
    { "id":"kg","type":"database","label":"KG cache","x":560,"y":280 },
    { "id":"rerank","type":"rounded","label":"Reranker\n(cross-encoder)","x":760,"y":160,"fill":"#ede9fe","bold":true },
    { "id":"prompt","type":"rounded","label":"Prompt assembly","x":940,"y":160,"fill":"#dbeafe" },
    { "id":"llm","type":"aws-lambda","label":"LLM","x":1120,"y":160,"bold":true },
    { "id":"g2","type":"hexagon","label":"Output\nguardrail","x":1280,"y":160,"fill":"#fee2e2" },
    { "id":"out","type":"rounded","label":"Answer +\ncitations","x":1440,"y":160,"fill":"#dcfce7","bold":true },
    { "id":"tel","type":"aws-cloudfront","label":"Telemetry","x":1120,"y":320 },
    { "id":"eval","type":"aws-sns","label":"Eval harness","x":940,"y":320 }
  ],
  "edges": [
    { "id":"a","source":"u","target":"g1","thickness":2 },
    { "id":"b","source":"g1","target":"rw" },
    { "id":"c","source":"rw","target":"bm" },
    { "id":"d","source":"rw","target":"vec","thickness":2 },
    { "id":"e","source":"rw","target":"kg" },
    { "id":"f","source":"bm","target":"rerank" },
    { "id":"g","source":"vec","target":"rerank","thickness":2 },
    { "id":"h","source":"kg","target":"rerank" },
    { "id":"i","source":"rerank","target":"prompt","thickness":2 },
    { "id":"j","source":"prompt","target":"llm","thickness":2 },
    { "id":"k","source":"llm","target":"g2","thickness":2 },
    { "id":"l","source":"g2","target":"out","thickness":2 },
    { "id":"m","source":"out","target":"tel","style":"dashed" },
    { "id":"n","source":"tel","target":"eval","style":"dashed" },
    { "id":"o","source":"eval","target":"rerank","style":"dashed","label":"retraining","curve":"step" }
  ]
}