rag-implementation

Build retrieval-augmented generation systems with citation-ready outputs from external documents.

2|Updated May 20, 2026
One-click install
npx skills add https://github.com/Dianshu-Liao/SkilLGuard --skill rag-implementation-dianshu-liao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-implementation
Source: https://github.com/Dianshu-Liao/SkilLGuard/tree/main/data/skills/rag-implementation
Command: npx skills add https://github.com/Dianshu-Liao/SkilLGuard --skill rag-implementation-dianshu-liao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you build Retrieval-Augmented Generation (RAG) systems that produce grounded, accurate answers by retrieving relevant knowledge from external document sources instead of relying on the model’s memory.

Core Features & Use Cases

  • Vector database foundation: Choose and configure a vector store (e.g., Chroma, Qdrant, Pinecone, Weaviate, Milvus, FAISS) to store embeddings and perform similarity search.
  • Embedding and retrieval pipeline: Generate embeddings, index documents, and retrieve relevant chunks using dense, sparse, or hybrid strategies.
  • Quality improvements for retrieval and answers: Apply reranking (e.g., cross-encoders, MMR), add metadata filtering, and use citation-oriented prompting and evaluation metrics for groundedness.

Quick Start

Create a RAG question-answering assistant over your local document folder by loading files, chunking them, embedding them into a local vector store, and returning answers with source documents.

Frequently Asked Questions about rag-implementation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a RAG pipeline for document question answering?

To build a RAG pipeline, load and chunk your documents, generate embeddings, store them in a vector database, and use a retriever to fetch relevant context for a final prompt that returns answers with source citations.

What's the best way to improve retrieval quality in a RAG system?

Improve retrieval quality in a RAG system by applying cross-encoders or Maximal Marginal Relevance (MMR) reranking after the initial vector search, and by adding metadata filtering to refine the retrieved chunks before generation.

Can I use a local vector database for semantic search?

Yes, you can use local vector databases like Chroma or FAISS to store embeddings and perform similarity search for semantic retrieval, avoiding the need for external hosted services.

Does this RAG implementation support hybrid search strategies?

Yes, the retrieval pipeline supports configurable dense, sparse, and hybrid retrieval strategies to fetch relevant document chunks from the vector store before applying optional reranking.

How do I get grounded answers with citations from external documents?

Generate grounded answers by using citation-oriented prompting that instructs the model to rely on retrieved context, returning the source documents alongside the final output for verification.