rag-implementation_skill

This skill helps you build knowledge-grounded AI by integrating vector stores, embeddings, and retrieval strategies for accurate, sourced answers.
  • Python

20

GitHub Stars

1

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 nilecui/skillsbase --skill rag-implementation

  • SKILL.md11.0 KB

Overview

This skill helps you design and implement Retrieval-Augmented Generation (RAG) systems that ground LLM outputs in external knowledge sources. It covers vector database selection, embedding choices, retrieval strategies, reranking, chunking, and prompt patterns to reduce hallucinations and improve factuality. The content is pragmatic with code patterns and operational guidance for production use.

How this skill works

The skill explains how to ingest documents, split them into retrievable chunks, compute embeddings, and store vectors in a vector database. It shows retrieval pipelines (dense, sparse, hybrid), reranking options, and how to feed selected context into an LLM with citation-aware prompts. It also covers evaluation metrics and production optimizations like metadata filtering and caching.

When to use it

  • Building Q&A systems over proprietary or internal documents
  • Creating chatbots that need up-to-date or factual responses
  • Implementing semantic search with natural language queries
  • Reducing LLM hallucinations by grounding answers in source text
  • Integrating domain-specific knowledge into conversational apps

Best practices

  • Choose chunk sizes between ~500–1000 tokens and keep 10–20% overlap to preserve context
  • Include useful metadata (source, page, timestamp, category) for filtering and debugging
  • Combine dense and sparse retrieval (hybrid) when keyword fidelity matters
  • Rerank top candidates with a cross-encoder or LLM scoring to improve precision
  • Always return source documents or citations with answers for transparency
  • Continuously evaluate retrieval quality and groundedness with test cases

Example use cases

  • Document Q&A assistant that cites pages and paragraphs for auditability
  • Customer support chatbot that answers from product manuals and policies
  • Research assistant that finds relevant papers or sections and summarizes findings
  • Internal knowledge base search that supports boolean filters and categories
  • Legal or compliance assistant that returns source excerpts with confidence scores

FAQ

Pick managed services like Pinecone for scale and convenience, Milvus or Qdrant for on-prem/high-performance needs, and Chroma for lightweight local prototypes.

How do I reduce hallucinations?

Ground the LLM with retrieved context, use explicit prompt instructions to say when information is missing, rerank retrieved docs, and add a verification step or confidence reporting.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
rag-implementation skill by nilecui/skillsbase | VeilStrat