veyliss/ai-localbase
一个本地优先的AI知识库系统(RAG),用于把本地文档接入辅导搜索与大模型对话流程。目前支持md、txt、pdf(文本)、xlsx、cvs类型。支持mcp服务
What it solves
AI LocalBase is a local-first RAG (Retrieval-Augmented Generation) system designed to let individuals and small teams quickly set up a private knowledge base. It allows users to connect their local documents to a vector retrieval process and a large language model (LLM) for conversational Q&A, ensuring data stays within a self-hosted environment.
How it works
The system uses a Go-based backend and a React frontend. It processes uploaded documents (TXT, Markdown, PDF, xlsx, csv) into embeddings using an embedding model and stores them in a Qdrant vector database. When a user asks a question, the system retrieves relevant document chunks and injects them into the LLM's context. It supports integration with Ollama for fully local execution or OpenAI-compatible APIs for cloud-based models.
Who it’s for
- Individuals seeking a private, local personal knowledge base.
- Small teams needing a self-hosted internal document Q&A system.
- Developers testing RAG prototypes or experimenting with different retrieval strategies.
- Users of AI agents (like Cursor or Claude Desktop) who want to connect their local knowledge base via the built-in MCP server.
Highlights
- Local-First Architecture: Fully self-hosted deployment via Docker Compose, with chat history saved to SQLite and configurations in JSON.
- Advanced Retrieval: Features automatic text splitting, MMR redundancy removal, hybrid search, semantic reranking, and query rewriting.
- MCP Server Integration: Built-in Model Context Protocol (MCP) server allows external AI agents to access the knowledge base and session capabilities.
- Curable Document Support: Supports a wide range of file formats including PDF, Excel, and CSV.
- RAG Evaluation: Ability to generate evaluation datasets from existing knowledge base documents to verify retrieval quality.