2.5k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill rag-engineer- _meta.json281 B
- SKILL.md3.0 KB
Overview
This skill is an expert guide for building Retrieval-Augmented Generation (RAG) systems, focusing on practical choices that improve retrieval quality and downstream LLM outputs. It covers embedding models, vector databases, chunking strategies, hybrid search, and retrieval pipeline design. The goal is to help teams reduce hallucinations and improve relevance by optimizing retrieval, reranking, and context construction.
How this skill works
The skill inspects document structures and recommends semantic chunking that preserves sentence and paragraph boundaries, topic shifts, and metadata for filtering. It designs multi-stage retrieval pipelines: coarse candidate selection, finer-grained retrieval, and reranking, combining vector similarity with keyword signals. It also prescribes evaluation and maintenance patterns like embedding refresh, retrieval metrics separation, and per-content embedding selection.
When to use it
- Building a new RAG system or prototype for LLM-augmented apps
- Designing or improving semantic search over documents, code, or knowledge bases
- Setting up vector databases and defining embedding pipelines
- Implementing hybrid search combining keyword and semantic signals
- Optimizing retrieval to reduce LLM hallucinations and improve answer relevance
Best practices
- Chunk by meaning: use sentence/paragraph boundaries, detect topic shifts, and add overlap for continuity
- Index at multiple granularities (paragraph, section, document) and use hierarchical retrieval
- Combine BM25/TF-IDF with vector similarity and fuse ranks (e.g., Reciprocal Rank Fusion)
- Evaluate retrieval separately from generation with precision/recall and relevance metrics
- Refresh embeddings when source documents change and validate embedding models per content type
- Include metadata filters and relevance thresholds before passing context to the LLM
Example use cases
- Customer support knowledge base with semantic search plus keyword fallback
- Internal document search for legal or compliance teams with hierarchical retrieval
- Product FAQ assistant that reranks retrieved passages to reduce hallucinations
- Code search across repositories using language-specific embedding models and hybrid ranking
- Academic paper discovery with topic-aware chunking and multi-stage retrieval
FAQ
Avoid fixed token sizes. Chunk by semantic boundaries such as sentences or sections, include small overlap, and detect topic shifts with embeddings to decide chunk breaks.
How do I combine keyword and semantic search?
Run both signals in parallel, normalize scores, and fuse ranks (e.g., Reciprocal Rank Fusion). Tune weights based on query type and evaluate on representative queries.