rag

Build retrieval-augmented generation systems with document ingestion, hybrid search, reranking, and prompt augmentation.

6|1|Updated Aug 11, 2025
One-click install
npx skills add https://github.com/juanre/llmemory --skill rag-juanre
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag
Source: https://github.com/juanre/llmemory/tree/main/skills/rag
Command: npx skills add https://github.com/juanre/llmemory --skill rag-juanre

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables building Retrieval-Augmented Generation systems by integrating document ingestion, hybrid search retrieval, reranking, and prompt augmentation to produce grounded, source-backed responses from large language models.

Core Features & Use Cases

  • Ingest and index documents into a knowledge base with chunking, summaries, and metadata.
  • Perform hybrid search that blends semantic vector similarity with keyword matching for robust retrieval.
  • Apply reranking (OpenAI or local models) to improve the final answer quality.
  • Augment prompts with retrieved context to ensure grounded, source-backed responses.
  • Use cases include customer-support knowledge bases, product documentation QA, research assistants, and code/documentation search.

Quick Start

Install the RAG components, ingest documents, run retrieval with reranking, and generate an LLM response using the retrieved context.

Frequently Asked Questions about rag

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

FAQPage Schema
How does retrieval-augmented generation improve LLM answer accuracy?

Retrieval-augmented generation improves accuracy by blending hybrid search retrieval and reranking with prompt augmentation, ensuring LLM responses are grounded in source-backed context from a document knowledge base.

What's the best way to build a customer support knowledge base with grounded LLM responses?

Build a customer support knowledge base by ingesting documents with chunking and metadata, then apply hybrid search and reranking to augment prompts, delivering grounded, source-backed responses for support queries.

Do I need a PostgreSQL database to set up a RAG knowledge base?

Yes, a PostgreSQL-backed store with embeddings is required to set up the RAG knowledge base, supporting document ingestion and hybrid vector similarity search for retrieval-augmented generation.

Can I use local models for reranking retrieved documents?

Yes, you can apply reranking using either OpenAI or local models to refine retrieved context, improving the final answer quality and source-backed accuracy of the LLM response.

How do I ingest and index documents for semantic vector search?

Ingest and index documents by applying chunking, summaries, and metadata extraction into a PostgreSQL-backed store, enabling hybrid search that blends semantic vector similarity with keyword matching.

What are the limitations of retrieval-augmented generation for code documentation search?

Retrieval-augmented generation for code documentation search requires a PostgreSQL store with embeddings and optional rerankers, but may face limitations in context window size and chunking precision for complex code structures.