用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-ai-agents --skill rag-systems命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Implement agent memory - short-term, long-term, semantic storage, and retrieval
Ensure agent safety - guardrails, content filtering, monitoring, and compliance
Master AI agent fundamentals - architectures, ReAct patterns, cognitive loops, and autonomous system design
基于 SOC 职业分类
正在显示 SKILL.md
| name | rag-systems |
| description | Build RAG systems - embeddings, vector stores, chunking, and retrieval optimization |
| sasmp_version | 1.3.0 |
| bonded_agent | 03-rag-systems |
| bond_type | PRIMARY_BOND |
| version | 2.0.0 |
Build Retrieval-Augmented Generation systems for grounded responses.
Invoke this skill when:
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
task | string | Yes | RAG goal | - |
vector_db | enum | No | pinecone, weaviate, chroma, pgvector | chroma |
embedding_model | string | No | Embedding model | text-embedding-3-small |
chunk_size | int | No | Chunk size in chars | 1000 |
from langchain_openai import OpenAIEmbeddings
from langchain_chroma import Chroma
from langchain_text_splitters import RecursiveCharacterTextSplitter
# 1. Split documents
splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
chunks = splitter.split_documents(documents)
# 2. Create vector store
embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
vectorstore = Chroma.from_documents(chunks, embeddings)
# 3. Retrieve
docs = vectorstore.similarity_search("query", k=5)
| Content Type | Size | Overlap | Rationale |
|---|---|---|---|
| Technical docs | 500-800 | 100 | Preserve code |
| Legal docs | 1000-1500 | 200 | Keep clauses |
| Q&A/FAQ | 200-400 | 50 | Atomic answers |
| Model | Cost/1M tokens |
|---|---|
| text-embedding-3-small | $0.02 |
| text-embedding-3-large | $0.13 |
| Cohere embed-v3 | $0.10 |
| Issue | Solution |
|---|---|
| Irrelevant results | Improve chunking, add reranking |
| Missing context | Increase k, use parent retriever |
| Hallucinations | Add "only use context" prompt |
| Slow retrieval | Add caching, reduce k |
llm-integration - LLM for generationagent-memory - Memory retrievalai-agent-basics - Agentic RAG