← Cursor Skills · ENGINEERING
Retrieval-Augmented Generation (RAG) Architecture
.cursor/skills/rag-patterns
Document chunking, hybrid search, re-ranking, and context compression.
Where it installs
# .cursor/skills/rag-patterns/SKILL.md
---
name: rag-patterns
description: ...
---# .claude/skills/rag-patterns/SKILL.md
---
name: rag-patterns
description: ...
---
# identical content, skills are the same file in both editorsWhat it does
Retrieval-Augmented Generation (RAG) Architecture is a Cursor skill: a SKILL.md playbook that AgenticKit installs at .cursor/skills/rag-patterns. Cursor's agent loads it when the task matches the skill description, instead of stuffing the same rules into every chat.
End-to-end RAG architecture guidelines covering semantic chunking, keyword-vector hybrid search, Cohere re-ranking, and hallucination reduction.
Document chunking, hybrid search, re-ranking, and context compression. The file is domain knowledge, not a slash macro. You do not type it. The agent reads it when the job is rag patterns.
Why it exists
Default Cursor has no memory of how your team ships code, schema, and tests. Founders paste the same conventions into chat, then watch the model drift on the next turn. This skill exists so those conventions live on disk and load only when relevant.
It ships in the Engineering Kit. It is wired to the AI & Vector Engineer (ai-engineer) and Data Pipeline & ETL Engineer (data-engineer) agents. It is wired to the /rag-pipeline: RAG Pipeline & Document Ingestion System and /ai-feature: AI Integration & Vector Pipeline Builder commands. That graph is the point: the skill is the standard, the agent is the role, the command is the trigger.
When to use it
- Use Retrieval-Augmented Generation (RAG) Architecture when the work is specifically about document chunking, hybrid search, re-ranking, and context compression.
- Load it before a long session that will touch this surface more than once. A one-line edit does not need the full playbook.
- Use it on production SaaS work (multi-tenant apps, paid features, anything that will be reviewed) rather than a throwaway prototype.
When not to use it
- Do not treat the skill as a replacement for a slash command. Skills teach. Commands run a pipeline.
- Do not paste the whole SKILL.md into chat. If Cursor is not loading it, fix the description or invoke the matching command.
- Do not use it as a generic 'write better code' rule. Scope is this domain only.
Example workflow
- Install the Engineering Kit so .cursor/skills/rag-patterns lands in the repo.
- Open a new Cursor agent chat pointed at the files this skill governs.
- Ask the AI & Vector Engineer (ai-engineer) to read the skill, or run /rag-pipeline: RAG Pipeline & Document Ingestion System.
- Review the first artifact against the practices below. If it violates one, stop and correct the file. Do not prompt 'just finish it'.
- Commit the skill-guided files with the rest of the slice so the next session inherits the same standard.
Example usage
Example prompt: "Read .cursor/skills/rag-patterns and apply it to this change. Do not invent extra conventions."
Or trigger the pipeline: /rag-pipeline: RAG Pipeline & Document Ingestion System. That command is written to load this skill.
Check the output against: Chunk documents with 15-20% overlap to preserve semantic continuity across boundaries
Example output
- The skill itself does not write a single output file. It changes what the agent is allowed to produce in code, schema, and tests.
- When you run /rag-pipeline: RAG Pipeline & Document Ingestion System, expect repo files plus notes under docs/, not a chat-only answer.
Best practices
- Chunk documents with 15-20% overlap to preserve semantic continuity across boundaries
- Combine BM25 keyword search with dense vector retrieval using Reciprocal Rank Fusion
- Re-rank top retrieval candidates using a cross-encoder before context injection
- Inject source citations and metadata to verify AI-generated answers
Common mistakes
- Ignoring "Chunk documents with 15-20% overlap to preserve semantic continuity across boundaries" and hoping a later prompt will clean it up.
- Copying the skill into .cursor/rules as always-on. That burns context and fights Cursor's load-on-match design.
- Running two overlapping skills that contradict each other in the same turn.
- Letting the agent skip tests or types because 'the skill is about architecture'.
Frequently asked questions
What is the Retrieval-Augmented Generation (RAG) Architecture Cursor skill?
End-to-end RAG architecture guidelines covering semantic chunking, keyword-vector hybrid search, Cohere re-ranking, and hallucination reduction. It lives at .cursor/skills/rag-patterns after you install the Engineering Kit.When should I use rag-patterns instead of a Cursor rule?
Use a rule for always-on or glob-scoped constraints. Use this skill for the full playbook that should load only when the task matches.Which agents read rag-patterns?
AI & Vector Engineer (ai-engineer); Data Pipeline & ETL Engineer (data-engineer). Those roles are told to open this file before they edit.Which commands use rag-patterns?
/rag-pipeline: RAG Pipeline & Document Ingestion System; /ai-feature: AI Integration & Vector Pipeline Builder.Does this skill work outside AgenticKit?
Yes. A SKILL.md in .cursor/skills/rag-patterns is a normal Cursor skill. AgenticKit is the packaged version plus the agent and command graph.
Add rag-patterns and the other 48 Cursor skills
AgenticKit installs 61 skills, 46 agents, and 47 slash commands into .cursor/. One license, lifetime updates.