agentic-rag-patterns
Advanced RAG with Self-RAG, Corrective-RAG, and knowledge graphs. Use when building agentic RAG pipelines, adaptive retrieval, or query rewriting.
npx skills add majiayu000/claude-skill-registry --skill agentic-rag-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Agentic RAG Patterns Build self-correcting retrieval systems with LLM-driven decision making. > **LangGraph 1.0.6** (Jan 2026): langgraph-checkpoint 4.0.0, compile-time checkpointer validation, namespace sanitization. ## Architecture Overview ``` Query → [Retrieve] → [Grade] → [Generate/Rewrite/Web Search] → Response ↓ ↓ Documents Quality Check ↓ Route Decision: - Good docs → Generate - Poor docs → Rewrite query - No docs → Web fallback ``` ## Self-RAG State Definition ```python from langgraph.graph import StateGraph, START, END from typing import TypedDict, List, Annotated from langchain_core.documents import Document import operator class RAGState(TypedDict): """State for agentic RAG workflows.""" question: str documents: Annotated[List[Document], operator.add] generation: str web_search_needed: bool retry_count: int relevance_scores: dict[str, float] ``` ## Core Retrieval Node ```python def retrieve(state: RAGState) -> dict: """Retrieve documents from vector store.""" question = state["question"] documents = retriever.invoke(question) return {"documents": documents, "question": question} ``` ## Document Grading (Self-RAG Core) ```python from pydantic import BaseModel, Field cl
- Architecture Overview
- Self-RAG State Definition
- Core Retrieval Node
- Document Grading (Self-RAG Core)
- Query Transformation
- Web Search Fallback (CRAG)
- Generation Node
- Conditional Routing
- Complete CRAG Workflow
- Pattern Comparison
- Key Decisions
- Common Mistakes
- Related Skills
- Capability Details
What does the agentic-rag-patterns skill do?
Advanced RAG with Self-RAG, Corrective-RAG, and knowledge graphs. Use when building agentic RAG pipelines, adaptive retrieval, or query rewriting.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill agentic-rag-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
