Rag systems

From charlieviettq/awesome-agent-skill · View interactive version

Rag systems is an AI agent skill from the GitHub repository charlieviettq/awesome-agent-skill. Design retrieval-augmented generation pipelines—chunking, embeddings, retrieval, reranking, grounding, and evaluation. Use when building or improving doc Q&A, code search agents, or knowledge bases.

How to use this skill

Skill file

RAG systems

Pipeline stages

  1. Ingest — parse, clean, preserve structure (headings, tables).
  2. Chunk — size/overlap tuned to content type; keep metadata (source, section).
  3. Embed — consistent model; version stored with index.
  4. Retrieve — hybrid (keyword + vector) when recall matters.
  5. Rerank — optional cross-encoder for top-k precision.
  6. Generate — cite sources; refuse when context insufficient.

Chunking heuristics

| Content | Guidance |

|---------|----------|

| Docs | Split on headings; 300-800 tokens typical |

| Code | Function/class level; include path in metadata |

| Tables | Row batches or markdown table blocks |

Quality checks

Failure modes

| Issue | Mitigation |

|-------|------------|

| Missed relevant doc | Hybrid search, query expansion, metadata filters |

| Wrong chunk | Smaller chunks, reranker, parent-child retrieval |

| Stale index | Version tag, scheduled re-embed |

| Prompt overflow | Summarize chunks, dynamic top-k |

Evaluation

Security

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.