RAG Architect
Jeffallan/claude-skills
Designs retrieval-augmented generation systems: document chunking, embeddings, vector store setup, hybrid search, reranking and retrieval evaluation, with checks at each step.
Guides evaluation of a RAG system by diagnosing failures in traces, building a retrieval test set and scoring retrieval and generation separately.
$ npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ai-evals-course/evals-skills evaluate-rag --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ai-evals-course/evals-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/evaluate-rag .claude/skills/evaluate-rag && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "evaluate-rag" agent skill from https://github.com/ai-evals-course/evals-skills/tree/main/skills/evaluate-rag into .claude/skills/evaluate-rag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "evaluate-rag", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ai-evals-course/evals-skills/tree/main/skills/evaluate-ragType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ai-evals-course/evals-skills evaluate-rag --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ai-evals-course/evals-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/evaluate-rag .agents/skills/evaluate-rag && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "evaluate-rag" agent skill from https://github.com/ai-evals-course/evals-skills/tree/main/skills/evaluate-rag into .agents/skills/evaluate-rag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "evaluate-rag", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ai-evals-course/evals-skills evaluate-rag --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ai-evals-course/evals-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/evaluate-rag .cursor/skills/evaluate-rag && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "evaluate-rag" agent skill from https://github.com/ai-evals-course/evals-skills/tree/main/skills/evaluate-rag into .cursor/skills/evaluate-rag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "evaluate-rag", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ai-evals-course/evals-skills.git --path skills/evaluate-rag--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ai-evals-course/evals-skills evaluate-rag --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ai-evals-course/evals-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/evaluate-rag .gemini/skills/evaluate-rag && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "evaluate-rag" agent skill from https://github.com/ai-evals-course/evals-skills/tree/main/skills/evaluate-rag into .gemini/skills/evaluate-rag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "evaluate-rag", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ai-evals-course/evals-skills evaluate-ragInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ai-evals-course/evals-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/evaluate-rag .github/skills/evaluate-rag && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "evaluate-rag" agent skill from https://github.com/ai-evals-course/evals-skills/tree/main/skills/evaluate-rag into .github/skills/evaluate-rag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "evaluate-rag", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ai-evals-course/evals-skills evaluate-rag --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ai-evals-course/evals-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/evaluate-rag .opencode/skills/evaluate-rag && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "evaluate-rag" agent skill from https://github.com/ai-evals-course/evals-skills/tree/main/skills/evaluate-rag into .opencode/skills/evaluate-rag/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "evaluate-rag", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
evaluate-ragGuides evaluation of a RAG system by diagnosing failures in traces, building a retrieval test set and scoring retrieval and generation separately.
The skill insists on error analysis first: read end-to-end traces to see whether bad answers come from retrieval, generation or both, and fix retrieval before anything else. It then has you build a retrieval evaluation set of queries paired with the document chunks that answer them, either written by hand or produced by prompting an LLM to pull a fact from each chunk and write a question only that fact answers.
Harder adversarial questions are made by taking a target chunk, finding similar chunks through embedding search and writing questions that only the target can answer. Retrieval is scored per stage: Recall@k for first-pass retrieval, and Precision@k, MRR or NDCG@k for reranking. Generation is judged apart, on faithfulness to the retrieved context and relevance to the query. If retrieval is the bottleneck, chunking is tuned by grid search before generation is touched.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 80d5f7b. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Evaluate RAG loads about 1.9k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 877 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ai-evals-course/evals-skills at commit 80d5f7b, republished under its Apache-2.0 licence (© ai-evals-course). 877 words, ~1,906 tokens.
.claude/skills/evaluate-rag/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Complete error analysis on RAG pipeline traces before selecting metrics. Inspect what was retrieved vs. what the model needed. Determine whether the problem is retrieval, generation, or both. Fix retrieval first.
Measure each component independently. Use the appropriate metric for each retrieval stage:
You need queries paired with ground-truth relevant document chunks.
Manual curation (highest quality): Write realistic questions and map each to the exact chunk(s) containing the answer.
Synthetic QA generation (scalable): For each document chunk, prompt an LLM to extract a fact and generate a question answerable only from that fact.
Synthetic QA prompt template:
Given a chunk of text, extract a specific, self-contained fact from it.
Then write a question that is directly and unambiguously answered
by that fact alone.
Return output in JSON format:
{ "fact": "...", "question": "..." }
Chunk: "{text_chunk}"Adversarial question generation: Create harder queries that resemble content in multiple chunks but are only answered by one.
Process:
Example:
Only chunk A contains the answer. Chunk B is a plausible distractor.
Filtering synthetic questions: Rate synthetic queries for realism using few-shot LLM scoring. Keep only those rated realistic (4-5 on a 1-5 scale). Likert scoring is appropriate here, since the goal is fuzzy ranking for dataset curation, not measuring failure rates.
Recall@k: Fraction of relevant documents found in the top k results.
Recall@k = (relevant docs in top k) / (total relevant docs for query)Prioritize recall for first-pass retrieval. LLMs can ignore irrelevant content but cannot generate from missing content.
Precision@k: Fraction of top k results that are relevant.
Precision@k = (relevant docs in top k) / kUse for reranking evaluation.
Mean Reciprocal Rank (MRR): How early the first relevant document appears.
MRR = (1/N) * sum(1/rank_of_first_relevant_doc)Best for single-fact lookups where only one key chunk is needed.
NDCG@k (Normalized Discounted Cumulative Gain): For graded relevance where documents have varying utility. Rewards placing more relevant items higher.
DCG@k = sum over i=1..k of: rel_i / log2(i+1)
IDCG@k = DCG@k with documents sorted by decreasing relevance
NDCG@k = DCG@k / IDCG@kCaveat: Optimal ranking of weakly relevant documents can outscore a highly relevant document ranked lower. Supplement with Recall@k.
Choosing k: k varies by query type. A factual lookup uses k=1-2. A synthesis query ("summarize market trends") uses k=5-10.
| Query Type | Primary Metric |
|---|---|
| Single-fact lookups | MRR |
| Broad coverage needed | Recall@k |
| Ranked quality matters | NDCG@k or Precision@k |
| Multi-hop reasoning | Two-hop Recall@k |
Treat chunking as a tunable hyperparameter. Even with the same retriever, metrics vary based on chunking alone.
Grid search for fixed-size chunking: Test combinations of chunk size and overlap. Re-index the corpus for each configuration. Measure retrieval metrics on your evaluation dataset.
Example search grid:
| Chunk size | Overlap | Recall@5 | NDCG@5 |
|---|---|---|---|
| 128 tokens | 0 | 0.82 | 0.69 |
| 128 tokens | 64 | 0.88 | 0.75 |
| 256 tokens | 0 | 0.86 | 0.74 |
| 256 tokens | 128 | 0.89 | 0.77 |
| 512 tokens | 0 | 0.80 | 0.72 |
| 512 tokens | 256 | 0.83 | 0.74 |
Content-aware chunking: When fixed-size chunks split related information:
After confirming retrieval works, evaluate what the LLM does with the retrieved context along two dimensions:
Answer faithfulness: Does the output accurately reflect the retrieved context? Check for:
Answer relevance: Does the output address the original query? An answer can be faithful to the context but fail to answer what the user asked.
Use error analysis to discover specific manifestations in your pipeline. Identify what kind of information gets hallucinated and which constraints get omitted.
| Context Relevance | Faithfulness | Answer Relevance | Diagnosis |
|---|---|---|---|
| High | High | Low | Generator attended to wrong section of a correct document |
| High | Low | -- | Hallucination or misinterpretation of retrieved content |
| Low | -- | -- | Retrieval problem. Fix chunking, embeddings, or query preprocessing |
For queries requiring information from multiple chunks:
Two-hop Recall@k: Fraction of 2-hop queries where both ground-truth chunks appear in the top k results.
TwoHopRecall@k = (1/N) * sum(1 if {Chunk1, Chunk2} ⊆ top_k_results)Diagnose failures by classifying: hop 1 miss, hop 2 miss, or rank-out-of-top-k.
© ai-evals-course, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/evaluate-rag of ai-evals-course/evals-skills.
Open the folder on GitHubat commit 80d5f7b
Evaluate RAG next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Evaluate RAG this skillai-evals-course/evals-skills | 1.5k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| RAG ArchitectJeffallan/claude-skills | 12k | 1 repos | ~2k | Automated safety check: Pass | MIT | |
| LLM Opsdavila7/claude-code-templates | 32k | 4 repos | ~2k | Automated safety check: Pass | MIT | |
| Chroma Vector DatabaseOrchestra-Research/AI-Research-SKILLs | 13k | 8 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Chatbox Session RAG Evalchatboxai/chatbox | 42k | — | ~758 | Automated safety check: Pass | GPL-3.0 | |
| Pgvector Semantic Searchtimescale/pg-aiguide | 1.9k | 1 repos | ~3.8k | Automated safety check: Pass | Apache-2.0 |
Jeffallan/claude-skills
Designs retrieval-augmented generation systems: document chunking, embeddings, vector store setup, hybrid search, reranking and retrieval evaluation, with checks at each step.
davila7/claude-code-templates
LLM Operations -- RAG, embeddings, vector databases, fine-tuning, prompt engineering avancado, custos de LLM, evals de qualidade e arquiteturas de IA para producao.
Orchestra-Research/AI-Research-SKILLs
Shows how to store documents and embeddings in Chroma, query them by similarity with metadata filters, and persist them to disk for RAG and semantic search projects.
chatboxai/chatbox
Runs and debugs evaluations of how Chatbox models answer questions about large attached files, using synthetic and real long-document fixtures.
timescale/pg-aiguide
A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.
Orchestra-Research/AI-Research-SKILLs
Generates text embeddings locally with the sentence-transformers library for RAG, semantic search, clustering and similarity, with model picks for general, multilingual and legal text.
ai-evals-course/evals-skills
Builds a browser-based annotation page for reviewing LLM traces one at a time with pass/fail labels, notes and saved results, tailored to your data.
ai-evals-course/evals-skills
Inspects an LLM evaluation setup for missing error analysis, unvalidated judges and vanity metrics, and ranks the problems by impact with fixes.
ai-evals-course/evals-skills
Builds diverse synthetic test inputs for LLM pipeline evaluation by defining failure-focused dimensions, drafting tuples with you and turning them into realistic queries.
ai-evals-course/evals-skills
Checks an LLM judge against human labels using train, dev and test splits, TPR and TNR, and a bias correction applied to production data.
ai-evals-course/evals-skills
Designs a binary Pass/Fail LLM-as-Judge prompt for one subjective failure mode, built from a task statement, clear definitions, labeled examples and a structured output format.
ai-evals-course/evals-skills
Write code evaluators for known failure modes with objective rules.
Categories
Guides evaluation of a RAG system by diagnosing failures in traces, building a retrieval test set and scoring retrieval and generation separately. The skill insists on error analysis first: read end-to-end traces to see whether bad answers come from retrieval, generation or both, and fix retrieval before anything else. It then has you build a retrieval evaluation set of queries paired with the document chunks that answer them, either written by hand or produced by prompting an LLM to pull a fact from each chunk and write a question only that fact answers.
Evaluate RAG fits situations like: measuring how well a retrieval step finds the right chunks; judging whether generated answers stay grounded in the retrieved context; creating synthetic question and answer pairs to test retrieval; comparing chunk sizes or chunking strategies for a RAG pipeline.
Run `npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a claude-code`. Or copy the skill folder (skills/evaluate-rag in ai-evals-course/evals-skills) into .claude/skills/evaluate-rag in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a codex`. Or copy the skill folder (skills/evaluate-rag in ai-evals-course/evals-skills) into .agents/skills/evaluate-rag in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-evals-course/evals-skills --skill evaluate-rag -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/evaluate-rag, .gemini/skills/evaluate-rag, .github/skills/evaluate-rag and .opencode/skills/evaluate-rag in your project.
SKILL.md names no scripts, command-line tools or credentials: Evaluate RAG is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Evaluate RAG is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Evaluate RAG: RAG Architect (Jeffallan/claude-skills, 12k stars), LLM Ops (davila7/claude-code-templates, 32k stars), Chroma Vector Database (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Chatbox Session RAG Eval (chatboxai/chatbox, 42k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ai-evals-course (a GitHub organization) maintains it in ai-evals-course/evals-skills, which has 1,468 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 24, 2026.
Source: ai-evals-course/evals-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.