logo
R

RAG Service

Deploy your own RAG (Retrieval-Augmented Generation) service with admin dashboard. Hybrid search (semantic + BM25), API key management, query analytics, and knowledge learning API. Powered by InsForge (pgvector) and Zeabur AI Hub.

平台Zeabur
部署次数4
发布者zeaburZeabur
部署次数4
发布者zeaburZeabur
创建于2026-04-04
模版内的服务
service icon
标签
AIRAGSearch

RAG Service

A complete RAG service with admin dashboard for managing your knowledge base.

Source code: github.com/zeabur/rag-service

Getting Started

Step 1: Create a Zeabur Project

Go to Zeabur Dashboard and create a new project.

Step 2: Enable InsForge

In your project, go to Integration → InsForge → Enable InsForge. Additional charges may apply based on usage (pricing details).

Step 3: Get InsForge Credentials

After enabling, open InsForge and go to Project Settings → API to find:

  • Project URL (INSFORGE_URL): e.g. https://xxx.us-east.insforge.app
  • API Key (INSFORGE_API_KEY): starts with ik_...

Step 4: Deploy RAG Service

In your project, click Add Service → Marketplace, search for RAG Service, and fill in:

  • The InsForge credentials from Step 3
  • Zeabur AI Hub API Key: can be generated during deployment, or created in advance at Zeabur AI Hub

Schema migrations run automatically on first startup — no manual setup needed.

Features

  • Hybrid search: semantic (pgvector) + BM25 keyword with RRF fusion
  • Streaming RAG answers via configurable LLM model
  • Admin dashboard: chunk browser, query signals, reports, audit log
  • API key management with scopes and expiry
  • Knowledge learning API: add new chunks via /api/learn
  • Feedback collection on query results

API Endpoints

EndpointMethodAuthDescription
/api/queryPOSTAPI keySearch knowledge base + optional RAG answer
/api/learnPOSTAPI keyAdd new knowledge chunks
/api/reportPOSTAPI keyReport content issues
/api/feedbackPOSTAPI keySubmit result feedback
/api/admin/*GET/POSTAPI key (admin)API key management, signals, reports, chunks
/dashboardGETBasic AuthAdmin dashboard

Quick Test

curl -X POST "https://your-domain/api/query" \
  -H "Authorization: Bearer $RAG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "how to deploy", "mode": "hybrid", "top_k": 5}'

Agent Integration (Claude Code Plugin)

Install the plugin to let Claude Code agents search and contribute to your knowledge base:

claude plugins marketplace add zeabur/rag-service
claude plugins install rag-service@rag-service
claude
# Inside Claude Code, run: /zeabur-rag-setup

The plugin provides 8 skills: search, learn, report for everyday use, and triage, inspect, edit, curate for admin curation. Agents automatically search the KB when answering questions and can contribute new knowledge after solving problems.

Environment Variables

VariableRequiredDescription
INSFORGE_URLYesInsForge backend URL
INSFORGE_API_KEYYesInsForge API key (ik_...)
ZEABUR_AI_HUB_API_KEYYesZeabur AI Hub key for LLM inference
RAG_API_KEYAutoAPI key for service access (auto-generated)
RAG_BASIC_AUTHAutoDashboard auth (auto-generated, format admin:password)
RAG_MODELNoLLM model (default: gemini-2.5-flash-lite)
CORS_ORIGINNoCORS origin (default: service URL)

All embeddings use openai/text-embedding-3-small (1536d) via InsForge AI proxy — no separate OpenAI key needed.

Schema migrations run automatically on first startup.

License

MIT — Built by Zeabur