Skip to content

Erupt AI RAG v2.1.0+ ​

erupt-ai-rag is the knowledge-base extension of erupt-ai. Turn business documents into AI-searchable knowledge: upload documents → automatic chunking → vector embedding → semantic retrieval, all managed visually. The AI decides on its own when to query which knowledge base during conversations (Agentic RAG) — no manual mounting required.

Getting Started ​

  1. Add the dependency (requires erupt-ai):
xml
<dependency>
    <groupId>xyz.erupt</groupId>
    <artifactId>erupt-ai-rag</artifactId>
    <version>${erupt.version}</version>
</dependency>
  1. After startup, the Knowledge Base menu group is added (the Embedding Model menu is provided by erupt-ai, under the AI Manager menu group).

Embedding Models ​

Go to AI → Embedding Model to configure the embedding model used for vectorization. 12 provider types are built in:

ProviderDescription
OpenAI CompatibleAny service compatible with the OpenAI Embedding API
OllamaLocally deployed open-source embedding models
GeminiGoogle Gemini Embedding
QwenAlibaba Cloud Qwen
GLMZhipu AI
SiliconFlowSiliconFlow
DoubaoByteDance Doubao (Volcano Engine)
CohereCohere Embed
VoyageVoyage AI
JinaJina Embeddings
MistralMistral
OpenRouterOpenRouter aggregation platform

⚠️ The vector dimension cannot be changed after the first embedding; if a knowledge base's embedding model is changed, all documents must be re-embedded.

Vector Store ​

The vector store is deployment infrastructure and is configured via properties (leave blank to auto-select: the single persistent implementation on the classpath, otherwise in-memory storage):

yaml
erupt:
  ai:
    rag:
      vector-store:
        type: PGVECTOR   # Options: QDRANT / MILVUS / PGVECTOR / REDIS / MEMORY
        uri: postgresql://user:password@host:5432/db
        api-key:         # Optional authentication key
Typeuri format
QDRANThost:6334 (gRPC, https:// prefix for TLS)
MILVUShttp://host:19530
PGVECTORpostgresql://user:password@host:5432/db (blank = reuse the application datasource)
REDIShost:6379 (rediss:// prefix for TLS, blank = localhost)
MEMORYNo configuration needed; suitable for development

Knowledge Bases & Documents ​

Go to AI → Knowledge Base to create a knowledge base, select an embedding model, and configure retrieval parameters:

ParameterDefaultDescription
Chunk Size500Max characters per chunk
Chunk Overlap50Characters shared by adjacent chunks
Top K5Number of chunks returned per retrieval
Min Score0.5Similarity threshold (0–1); lower-scored results are dropped

💡 The Remark field is read by the AI to decide which knowledge base fits the current question — describe the content scope clearly.

Upload documents under a knowledge base (supports txt / md / markdown, or paste text directly). The system automatically chunks and embeds them, with status flowing: Pending → Embedding → Ready (errors are shown on failure and documents can be re-embedded).

The Retrieval Test row operation provides a visual interface — enter a question to verify recall results and similarity scores.

Agentic RAG ​

Knowledge base retrieval is exposed as AI Tools (listKnowledgeBases / searchKnowledgeBase). During conversations the AI decides autonomously: first list available knowledge bases, then run semantic retrieval against the appropriate one, preferring retrieved passages when answering. These tools are also governed by Role-Level Tool Authorization, giving fine-grained control over which roles may search which knowledge.

Contributors

The avatar of contributor named as YuePeng YuePeng
The avatar of contributor named as Claude Fable 5.1 Claude Fable 5.1

Changelog

Released under the Apache-2.0 License.