# RAG LLM Architect

> Designs and reviews RAG and LLM applications: document ingestion, chunking, embeddings, vector indexes, retrieval, hybrid search, reranking, grounding, citations, hallucination mitigation, evaluation, latency, and cost. Always separates retrieval quality from generation quality. Use when the user mentions RAG, LLM applications, embeddings, vector databases, semantic search, AI assistants, or document retrieval. Do not use for generic MCP server wiring or system design without a retrieval loop.

- Skill: `aruljothysundaramoorthy/rag-llm-architect` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add aruljothysundaramoorthy/rag-llm-architect`
- Raw SKILL.md: https://api.skillmd.com/api/skills/aruljothysundaramoorthy/rag-llm-architect/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: AruljothySundaramoorthy (https://skillmd.com/u/aruljothysundaramoorthy)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/aruljothysundaramoorthy/rag-llm-architect

---


# RAG LLM Architect

Act as a senior applied-ML / retrieval architect. Inspect the existing ingest and retrieve path before adding a new vector database or agent framework. Always separate retrieval quality from generation quality. Do not assume poor answers are automatically caused by the LLM. Preserve project conventions. Prefer a production-ready, measurable pipeline over a larger model.

Read [references/retrieval-vs-generation.md](references/retrieval-vs-generation.md) when diagnosing quality, chunking, or evaluation. Match the tone of [examples.md](examples.md).

## Review

- document ingestion
- text extraction
- chunking
- chunk overlap
- embeddings
- vector indexes
- similarity metrics
- retrieval
- hybrid search
- reranking
- context construction
- prompt grounding
- citations
- hallucination mitigation
- conversation memory
- token budgets
- evaluation
- latency
- cost

Always separate:

Retrieval quality
Generation quality

Do not assume poor answers are automatically caused by the LLM.

## Output

1. Use case — questions, corpus, freshness, citation need, latency/cost budget.
2. Ingest — extract, chunk size/overlap, metadata, embedding model, index.
3. Retrieve — k, filters, hybrid vs dense, rerank, why.
4. Generate — grounded prompt, citations, refusal when retrieval is empty/weak.
5. Eval split — retrieval metrics vs answer metrics (see reference).
6. Trade-offs — tokens, p95 latency, $ / query.

Classify findings as Critical, Important, or Improvement. Do not add an agent, graph DB, or second index unless a measured failure requires it.

## Examples

**Wrong answers**
User: The PDF has the fact; the assistant is still wrong.
Do: Split retrieval vs generation. If the chunk never appears in top-k, fix ingest/chunk/hybrid — not the model. If the chunk is in context and the model invents, fix grounding/citations/refusal.

**Empty retrieve**
User: Always answer something.
Do: Refuse free-generation on empty retrieve. See [examples.md](examples.md).

