rag

Solid

Use when building retrieval-augmented generation. Covers chunking, embedding and hybrid search, reranking, grounding and citation, and diagnosing whether a bad answer is a retrieval failure or a generation failure.

AI & Automation 23 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
46
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Retrieval-Augmented Generation ## Purpose Build a RAG system whose answers are grounded in retrieved evidence, and be able to tell — when an answer is wrong — whether the retriever failed to find the right document or the generator failed to use it. ## When to Use - Building question answering over a document corpus. - A RAG system that returns confident, wrong answers. - Choosing chunking, embedding, and retrieval strategy. - Adding citation and grounding to a generative feature. ## Capabilities - Chunking strategies and their trade-offs. - Embedding selection and hybrid (dense + sparse) retrieval. - Reranking and query rewriting. - Grounding, citation, and refusal when evidence is absent. - Component-wise evaluation. ## Inputs - The corpus: its size, structure, and update frequency. - The query patterns: factual lookup, comparison, summarization, multi-hop. - Accuracy requirements and the cost of a wrong answer. ## Outputs - A retrieval pipeline with a measured recall figure. - Answers with citations to the retrieved passages. - Separate evaluation of retrieval quality and generation quality. ## Workflow 1. **Evaluate retrieval separately** — Before touching the prompt. If the correct passage is not in the top-k, no amount of prompt engineering will produce a correct answer. Measure recall@k first. 2. **Chunk on semantic boundaries** — Sections, paragraphs, or logical units. Fixed-size chunking splits a table in half and produces two useless chunks. Add overla...

Details

Author
nimadorostkar
Repository
nimadorostkar/Claude-Skills-collection
Created
1 weeks ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category