rag-architecture-designer
Skill3 starsChanged 4 months agoMITView on GitHub
Design a Retrieval-Augmented Generation (RAG) pipeline architecture: ingestion, indexing, retrieval, generation, and evaluation components. Use when working on RAG architecture, retrieval pipelines, vector stores.
In this repository59 other files it gives its agents.
- agent-memory-designerSkill
- ai-cost-optimizerSkill
- ai-evaluation-builderSkill
- ai-latency-optimizerSkill
- ai-solution-architectSkill
- ai-workflow-builderSkill
- context-engineeringSkill
- human-in-the-loop-designerSkill
- multi-agent-plannerSkill
- prompt-engineerSkill
- prompt-optimizerSkill
- prompt-reviewerSkill
- adr-generatorSkill
- api-designerSkill
- architecture-reviewSkill
- component-diagram-builderSkill
- container-diagram-builderSkill
- data-flow-analyzerSkill
- integration-plannerSkill
- observability-plannerSkill
- scalability-advisorSkill
- solution-architectureSkill
- system-context-builderSkill
- experiment-designerSkill
- go-to-market-plannerSkill
- pricing-strategy-advisorSkill
- mcp-best-practicesSkill
- mcp-client-generatorSkill
- mcp-security-reviewSkill
- mcp-server-generatorSkill
- mcp-tool-generatorSkill
- acceptance-criteria-generatorSkill
- analytics-instrumentation-plannerSkill
- competitive-analysisSkill
- epic-generatorSkill
- feature-prioritizationSkill
- idea-validatorSkill
- north-star-metric-advisorSkill
- okr-builderSkill
- persona-generatorSkill
- prd-generatorSkill
- problem-statement-builderSkill
- product-discovery-assistantSkill
- product-vision-builderSkill
- sprint-plannerSkill
- story-mappingSkill
- user-story-generatorSkill
- value-proposition-designerSkill
- chunking-strategy-advisorSkill
- embedding-strategy-advisorSkill
- hybrid-search-advisorSkill
- knowledge-ingestion-plannerSkill
- retriever-optimizerSkill
- ai-governance-advisorSkill
- ai-threat-modelingSkill
- guardrails-builderSkill
- owasp-llm-reviewerSkill
- prompt-injection-detectorSkill
- skill-nameSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Input: Use case, document types, query patterns, quality/latency requirements
- Distinctive: line 41
Document per stage: format handlers, metadata extraction, update frequency.
- Distinctive: line 56
Consider: pgvector, Pinecone, Weaviate, OpenSearch, managed vs self-hosted.
- Distinctive: line 107
Start with smallest pipeline that passes eval bar.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RAG Architecture Designer
Purpose
Design a Retrieval-Augmented Generation (RAG) pipeline architecture: ingestion, indexing, retrieval, generation, and evaluation components.
Input: Use case, document types, query patterns, quality/latency requirements
Output: RAG Architecture document with pipeline diagram, component specs, and technology recommendations
References: See references.md for domain cheat sheets.
Examples: See examples.md for worked input/output.
Workflow
Step 1: Define RAG requirements
| Requirement | Target |
| Query types | factual, analytical, multi-hop |
| Corpus size | documents, pages, tokens |
| Freshness | static / daily / real-time |
| Latency budget | p95 target |
| Accuracy target | citation required, acceptable hallucination rate |
Step 2: Design ingestion pipeline
Source → Extract → Clean → Chunk → Embed → IndexDocument per stage: format handlers, metadata extraction, update frequency.
Step 3: Design retrieval pipeline
Query → Preprocess → Retrieve → Rerank → Context assembly → GenerateSpecify retriever type: dense, sparse, hybrid.
Step 4: Select vector store and index
| Option | Fit | Trade-off |
Consider: pgvector, Pinecone, Weaviate, OpenSearch, managed vs self-hosted.
Step 5: Plan evaluation loop
- Offline: golden Q&A set, RAGAS metrics
- Online: user feedback, citation click-through
- Regression on corpus updates
Step 6: Validate
Run Validation checklist.
Decision Rules
| Condition | Action |
| Corpus < 100 pages, static | Consider simple keyword search first; RAG may be overkill |
| Real-time freshness required | Plan incremental indexing pipeline |
| Multi-hop reasoning needed | Add query decomposition or agentic retrieval |
| No eval dataset | Block production; require golden set creation |
| Customer-facing without citations | Require citation in generation step |
Validation
- Query types and corpus characteristics documented
- Ingestion pipeline end-to-end defined
- Retrieval pipeline with retriever type specified
- Vector store recommendation with trade-offs
- Context assembly linked to context-engineering budget
- Eval plan with offline and online metrics
- Latency budget allocated per pipeline stage
- Citation strategy defined for customer-facing use
Anti-patterns
- RAG by default — applying RAG without retrieval need.
- Chunk and pray — no chunking strategy or eval.
- Single retriever — no hybrid when queries vary widely.
- No freshness plan — stale index without update pipeline.
- Missing citations — generated answers without source attribution.
Best Practices
- Start with smallest pipeline that passes eval bar.
- Separate ingestion from query serving for independent scaling.
- Version indexes for rollback on bad ingests.
- Align with ai/context-engineering for assembly.
- Document RAG-specific ADRs.
Output Structure
# RAG Architecture: [System Name]
## Requirements
| Dimension | Target |
|-----------|--------|
## Ingestion Pipeline
[Stage descriptions]
## Retrieval Pipeline
[Stage descriptions]
## Technology Stack
| Component | Choice | Rationale |
|-----------|--------|-----------|
## Evaluation
| Metric | Target | Method |
|--------|--------|--------|
## Diagram
```mermaid
[pipeline diagram]
---
# Next Skills
| Outcome | Recommended Skill |
|---------|-------------------|
| Chunking strategy | `rag/chunking-strategy-advisor` |
| Embedding selection | `rag/embedding-strategy-advisor` |
| Optimize retrieval | `rag/retriever-optimizer` |
| Hybrid search | `rag/hybrid-search-advisor` |
| Context budget | `ai/context-engineering` |Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

