rag

Retrieve documents from a knowledge base and generate LLM answers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/liushuang393/serverlessAIAgents --skill rag-liushuang393
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag
Source: https://github.com/liushuang393/serverlessAIAgents/tree/main/agentflow/skills/builtin/rag
Command: npx skills add https://github.com/liushuang393/serverlessAIAgents --skill rag-liushuang393

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The RAG Skill grounds AI-generated responses in an external knowledge base by retrieving relevant documents and generating context-aware answers with an LLM, reducing hallucinations and speeding up information discovery.

Core Features & Use Cases

  • Document ingestion and semantic search to fetch relevant passages
  • Contextual prompting and answer generation with retrieved context
  • Source tracking and topic management for auditable results
  • Use cases include internal knowledge bases, product documentation QA, policy lookup, and customer support knowledge bases.

Quick Start

  • Initialize the RAGSkill: rag = RAGSkill(); await rag.start()
  • Add documents: await rag.add_document(content="Your text here", topic="general")
  • Query: result = await rag.query("What is AgentFlow?"); print(result.answer)

Frequently Asked Questions about rag

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

FAQPage Schema
How does retrieval-augmented generation reduce LLM hallucinations?

Retrieval-augmented generation grounds LLM responses by retrieving relevant documents from a knowledge base and passing that context to the LLM, ensuring answers are based on external factual sources rather than model parameters.

How do I build a document QA system for an internal knowledge base?

You can build a document QA system by ingesting text into the knowledge base, performing semantic search to fetch relevant passages, and generating context-aware answers with an LLM using the retrieved document context.

Can I use a provider-agnostic interface to connect my LLM and vector search components?

Yes, the Skill integrates memory stores, vector search, and LLM providers via a provider-agnostic interface, allowing you to connect different components without being locked into a specific vendor.

What is the best way to track sources for AI-generated answers in a knowledge base?

The best way to track sources for AI-generated answers is using built-in source tracking and topic management features, which provide auditable results by linking responses back to their originating retrieved documents.

Does retrieval-augmented generation work for domain-specific information retrieval?

Yes, retrieval-augmented generation is designed for domain-specific information retrieval, fetching relevant passages from ingested documents to answer queries about product documentation, policies, or customer support topics.

What are the limitations of using semantic search for knowledge-base QA?

Semantic search for knowledge-base QA depends entirely on ingested documents, meaning it cannot answer queries outside its knowledge base scope and requires documents to be properly added and topic-tagged beforehand.