Building RAG Knowledge Bases: Agent Skills for Enterprise RAG from Scratch to Pipeline

Introduction

When building RAG systems, the common dilemma is not just “whether it can connect to a vector database,” but rather the lack of a comparable selection and implementation framework for the entire pipeline: how to determine chunking, how to select an embedding model, whether to use Rerank after retrieval, and what metrics to use for acceptance. Since documentation and examples are scattered, Agents often only generate fragmented code, making it difficult to cover the complete path from ingestion to evaluation.

Below is an introduction to the community Skill on SkillHub: “RAG Knowledge Base Builder” (@user_69009747/rag-knowledge-base-builder, v1.0.0). It organizes chunking strategies, embedding model selection, LangChain Pipelines, vector database options, and deployment scripts into a followable process guide, suitable for on-demand invocation within Agents that support Skills, such as Cursor.

What is this

“RAG Knowledge Base Builder” is an ai-agent category Skill published on SkillHub, sourced from the community, and maintained by user_69009747 (displayed as “Zhuangzi 18th Generation Technician” on the SkillHub page). Official entry points:

  • API / Installation Coordinates: https://api.skillhub.cn/user_69009747/rag-knowledge-base-builder
  • Display Page: https://www.skillhub.cn/skills/user_69009747/rag-knowledge-base-builder

The Skill page indicates requires_api_key=false (meaning the installation and guidance of the Skill itself do not force binding to a platform API Key); however, if you choose to use cloud-based embedding or generation services like OpenAI in your Pipeline, you must still configure the corresponding keys yourself.

Core Functions

The following capabilities are derived from the official SkillHub description; details not present in the materials are not expanded upon.

Document Chunking

Covers three basic solutions: Fixed-size Chunking, Semantic Chunking, and Structured Chunking. It also includes advanced optimization ideas for Small Chunk, Large Context (Small-to-Large) strategies, used to balance recall granularity and context integrity.

Embedding Model Selection (2026 Mainstream Directions)

The Skill guides selection based on scenarios and mentions the MTEB leaderboard for reference:

Scenario Preference Direction Mentioned in Materials
Chinese Focused BGE Series
Multilingual BGE-M3
English Focused OpenAI Embeddings

Specific model IDs, dimensions, and dependency versions depend on the Skill body text; after installation, simply let the Agent expand based on the current task.

Complete RAG Pipeline (LangChain)

The standard pipeline described in the materials is:

  1. Document Ingestion
  2. Vectorization
  3. Retrieval
  4. Rerank
  5. Generation
  6. Ragas Evaluation

The implementation side is organized using LangChain code, facilitating the connection and replacement of components in local or self-hosted environments.

Vector Database Selection (Choose One of Three)

You can choose to deploy one of ChromaDB, FAISS, or Milvus. The Skill provides selection and integration instructions compatible with the Pipeline and mentions one-click deployment scripts to shorten the time from an empty environment to a searchable knowledge base.

Installation and Activation

The Skill follows the general SKILL.md format. Installation methods are subject to the official SkillHub instructions.

Method 1: Via SkillHub CLI

First, confirm if skillhub is already on your machine (see SkillHub Installation Documentation). When installing the skill, you must use --dir to point to the current Agent’s skills directory; otherwise, it defaults to ./skills/ which might not be recognized.

In Cursor, the common skills directory is ~/.cursor/skills/:

command -v skillhub && skillhub --version

skillhub install @user_69009747/rag-knowledge-base-builder --dir ~/.cursor/skills/

Other client paths (also from official installation docs, replace --dir as needed):

  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project
  • Windsurf: ~/.codeium/windsurf/skills/ or .windsurf/skills/

If the CLI is not installed, you can execute the recommended one-click installation via the installation documentation (requires internet connection):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

Method 2: Let the Agent Install via Documentation

The prompt provided on the SkillHub page is:

Please install `@user_69009747/rag-knowledge-base-builder` according to https://skillhub.cn/install/skillhub.md.

Send the above content to the AI in the current session, and the Agent will read the installation documentation and complete the installation to the corresponding skills directory.

After installation is complete, describe your document type, language, expected QPS, or deployment environment (local / container / existing Milvus cluster, etc.) in the conversation, and the Agent will guide you step-by-step to produce configuration and code according to the Skill.

Typical Usage

The materials do not provide a separate copyable “end-to-end command list,” but they clearly define a reproducible working order. Below is a usage skeleton consistent with the official description; specific parameters and script names depend on the SKILL content after installation.

  1. Determine Chunking Strategy
    Describe the document format (PDF, Markdown, database export, etc.), select from fixed / semantic / structured solutions, and enable small-chunk-large optimization if necessary.

  2. Select Embedding Model
    Select based on Chinese, multilingual, or English scenarios using BGE, BGE-M3, OpenAI, etc., and compare with MTEB references.

  3. Select Vector Database and Deploy
    Choose one of ChromaDB, FAISS, or Milvus; if the one-click deployment script in the materials applies to your environment, complete the vector database and dependency setup first.

  4. Run LangChain Pipeline
    Implement or generate code following the order of Ingestion → Vectorization → Retrieval → Rerank → Generation, connecting to your LLM and document sources.

  5. Evaluate with Ragas
    Run evaluations on sample QA sets, and iterate on chunking and retrieval parameters based on metrics such as faithfulness and context utilization.

Example Conversation (Illustrative):

I want to build internal Q&A using Chinese technical documents, about 500 Markdown files, starting with local verification.
Please follow @user_69009747/rag-knowledge-base-builder to start with chunking and BGE embedding selection,
Use ChromaDB for the vector database for now, and provide the LangChain Pipeline and Ragas evaluation steps.

Applicable Scenarios and Notes

Who it is for

  • Developers who need to build enterprise-level RAG from scratch and want Agents to output based on fixed methodologies rather than fragmented snippets.
  • Teams that need to choose between ChromaDB / FAISS / Milvus, or require a Rerank + Ragas closed loop.
  • Users already using Skills in environments like Cursor, Claude Code, Codex, who want to solidify RAG best practices into repeatable conversational workflows.

Limitations and Notes

  • Sourced from the community; quality and update frequency depend on the publisher. It is recommended to verify in a test environment before major version upgrades.
  • SkillHub Statistics (as of data capture): Rating 100000, Downloads 1851, Install Count 0; actual experience depends on the SKILL body text after local installation.
  • When using OpenAI embeddings or some commercial vector services, costs, compliance, and key management must be borne by you; requires_api_key=false does not mean the entire RAG pipeline is keyless.
  • Distributed solutions like Milvus have higher operational requirements than ChromaDB / local FAISS; capacity and high availability need to be planned separately for production environments.

Conclusion

“RAG Knowledge Base Builder” consolidates chunking, embedding selection, the full LangChain pipeline, three vector database options, and Ragas evaluation into a single Agent Skill. It serves as a structured guide for building a RAG knowledge base from scratch. To install or view details, you can open the SkillHub display page: https://www.skillhub.cn/skills/user_69009747/rag-knowledge-base-builder, or use the coordinates @user_69009747/rag-knowledge-base-builder and the API address https://api.skillhub.cn/user_69009747/rag-knowledge-base-builder.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye