# AI Prompting RAG Architecture

> Sub-skill of ai-prompting: RAG Architecture (+2).

- Skill: `vamseeachanta/ai-prompting-rag-architecture` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/ai-prompting-rag-architecture`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/ai-prompting-rag-architecture/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/ai-prompting-rag-architecture

---


# RAG Architecture (+2)

## RAG Architecture


```
User Query --> Embedding --> Vector Search --> Context Assembly --> LLM --> Response
     |                            |                   |               |
     +-- Query expansion         +-- Reranking       +-- Chunking    +-- Citations
     +-- Intent detection        +-- Filtering       +-- Templates   +-- Validation
```

## Prompt Optimization Pipeline


```
Initial Prompt --> Generate Outputs --> Evaluate --> Optimize --> Deploy
      |                  |                 |            |            |
      +-- Template      +-- Test cases   +-- Metrics  +-- Search   +-- Monitor
      +-- Variables     +-- Edge cases   +-- Human    +-- Iterate  +-- A/B test
```

## Agent Architecture


```
User Request --> Plan --> Tool Selection --> Execution --> Reflection --> Response
      |           |             |                |              |             |
      +-- Parse  +-- Decompose +-- Available    +-- Retry     +-- Verify    +-- Format
      +-- Intent +-- Prioritize+-- Constraints  +-- Timeout   +-- Correct   +-- Cite
```

