Building a RAG Knowledge Base

Learn how to build and manage a RAG knowledge base with Plugged.in for enhanced AI interactions

Overview

Retrieval-Augmented Generation (RAG) allows you to enhance AI interactions by providing relevant context from your documents. Plugged.in's document library enables you to build a project-specific knowledge base.

Document Management

Upload and organize documents for vector-based retrieval

Semantic Search

Query your knowledge base using natural language

Prerequisites
  • Active Plugged.in account with RAG features enabled
  • At least one project created
  • Documents to upload (PDF, TXT, MD, DOCX)
Step 1: Set Up Document Library
Setup
Initialize your project's document library for RAG

Access Document Library

Navigate to your project's document library:

Project → Library → Document Library

Supported Formats

The library supports various document formats:

  • • PDF
  • • TXT
  • • MD (Markdown)
  • • DOCX
Step 2: Upload Documents
Content
Add documents to build your knowledge base

Upload Process

Drag and drop or click to upload documents:

Drag files here or click to browse

Organize Documents

Use tags and categories to organize your documents for better retrieval accuracy.

Step 3: Query Your Knowledge Base
Usage
Use the RAG query tool to retrieve relevant information

Using MCP Tool

Query your knowledge base through the MCP proxy:

pluggedin_rag_query("Your question about the documents")

Using API

Query via the REST API for integration:

curl -X POST https://pluggedin.ai/api/rag/query \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "Your question here"}'
Step 4: Advanced Features
Advanced
Optimize your RAG knowledge base for better results

Document Chunking

Documents are automatically chunked for optimal retrieval. Larger documents are split into semantic segments.

Metadata Enrichment

Add metadata to documents to improve search relevance and filtering capabilities.

Project Isolation

Each project's documents are isolated, ensuring queries only retrieve from the current project's knowledge base.

Next Steps
  • Integrate RAG queries into your applications via API
  • Share knowledge bases with team members
  • Configure security settings for sensitive documents