rag-systems

Implement RAG systems with chunking, hybrid retrieval, and reranking strategies.

4|1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/doanchienthangdev/omgkit --skill rag-systems-doanchienthangdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-systems
Source: https://github.com/doanchienthangdev/omgkit/tree/main/plugin/skills/ai-engineering/rag-systems
Command: npx skills add https://github.com/doanchienthangdev/omgkit --skill rag-systems-doanchienthangdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires rank_bm25, sentence_transformers, faiss-cpu, nltk, transformers, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides the tools and strategies to build robust Retrieval-Augmented Generation (RAG) systems, enhancing LLM responses with external knowledge.

Core Features & Use Cases

  • RAG Architecture: Understand and implement the indexing and querying phases of RAG.
  • Retrieval Algorithms: Utilize term-based (BM25), embedding-based (vector search), and hybrid retrieval methods.
  • Chunking Strategies: Employ fixed-size and semantic chunking for optimal document segmentation.
  • Retrieval Optimization: Improve search results with query expansion, HyDE, and reranking.
  • Evaluation: Define metrics for assessing RAG system performance.
  • Use Case: Develop a knowledge base for customer support that allows an LLM to accurately answer user queries by retrieving relevant information from a large document set.

Quick Start

Use the rag-systems skill to implement a hybrid retrieval strategy for a given query and documents.

Frequently Asked Questions about rag-systems

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

FAQPage Schema
How do I build a RAG pipeline with hybrid retrieval and vector search?

Build a RAG pipeline by implementing indexing and querying phases, combining term-based BM25 and embedding-based vector search for hybrid retrieval. This approach enhances LLM responses by injecting relevant external context retrieved from your knowledge base.

What is the best chunking strategy for processing documents in a knowledge base?

Document chunking strategies include fixed-size and semantic chunking for optimal document segmentation. Choosing the right chunking strategy improves retrieval accuracy by ensuring segments are contextually meaningful before generating embeddings for your knowledge base.

How does query transformation improve retrieval-augmented generation accuracy?

Query transformation improves retrieval-augmented generation accuracy through query expansion and HyDE. These techniques modify the original query to better match indexed documents, significantly increasing the relevance of retrieved context before passing it to the LLM.

Can I use FAISS with sentence transformers for building a retrieval system?

Yes, you can use FAISS with sentence transformers to build a retrieval system. The implementation supports embedding generation and vector search using faiss-cpu and sentence_transformers, enabling efficient similarity matching across large document sets.

When should I use reranking in a RAG system?

Use reranking in a RAG system after the initial retrieval phase to reorder search results based on relevance. Applying a reranking step refines the retrieved context from hybrid retrieval, ensuring the most accurate information is injected into the LLM response.

What metrics are needed to evaluate RAG system performance?

Evaluating RAG system performance requires defining specific metrics to assess retrieval accuracy and context relevance. The system provides evaluation capabilities to measure how effectively the pipeline retrieves and augments information for natural language processing tasks.