AgentSkillsCN

rag-learning

通过构建真实应用来学习RAG。当您:(1) 从零开始构建首个RAG系统;(2) 理解RAG组件的设计原理;(3) 调试检索问题;(4) 优化检索质量;(5) 对比不同RAG框架时,可使用此技能。

SKILL.md
--- frontmatter
name: rag-learning
description: Learn RAG by building real applications. Use when (1) building first RAG from scratch, (2) understanding RAG component design, (3) debugging retrieval problems, (4) optimizing retrieval quality, (5) comparing RAG frameworks.

RAG Learning

Learning Path

Level 1: Minimal RAG

Build working RAG with LangChain + Chroma in 30 minutes.

For step-by-step: See references/level1-minimal.md

Level 2: Core Components

Understand and experiment with each RAG component.

For details: See references/level2-components.md

Level 3: Real Documents

Handle PDF, web pages, tables. Build personal knowledge base.

For details: See references/level3-documents.md

Level 4: Optimization

Implement Hybrid Search, Reranking, better prompts.

For details: See references/level4-optimization.md

Level 5: Production

Compare frameworks, choose vector DB, add caching.

For details: See references/level5-production.md

Quick Reference

Frameworks by Use Case

Use CaseFrameworkWhy
Quick prototypeLangChainMost examples, easy start
Data-heavy appsLlamaIndexBest data connectors
No promptingDSPyProgrammatic LLM
Production RAGRAGFlowEnd-to-end solution

Common Issues

ProblemSolution
Chunk too large/smallAdjust chunk_size (500-1000 tokens)
Wrong embedding modelTry domain-specific model
Retrieved but wrong answerCheck prompt template
No resultsLower similarity threshold
Slow retrievalAdd caching, use hybrid search

Resources