七千二百袋水泥
七千二百袋水泥
Published on 2025-06-07 / 0 Visits

在NAS上部署MaxKB与Ollama构建专属AI知识库系统:详细安装教程、模型集成、应用创建与使用评测全指南

MaxKB(Max Knowledge Base)是一款基于大语言模型和RAG技术的开源知识库问答系统,广泛应用于智能客服、企业内部知识库、学术研究与教育等多个场景。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库2.webp)Image

该产品的主要优势包括:

  • 开箱即用:支持直接上传文档或自动爬取在线内容,内置文本自动拆分、向量化和RAG(检索增强生成)功能,有效减少大模型幻觉问题,提供流畅的智能问答交互体验。

  • 快速接入:无需编码即可嵌入第三方业务系统,并支持快速对接企业微信、钉钉、飞书、公众号等平台,使现有系统快速获得智能问答能力,显著提升用户满意度。

  • 灵活编排:内置强大工作流引擎和函数库,支持自定义AI工作流程编排,满足复杂业务场景下的多样化需求。

  • 模型中立:兼容多种大模型,包括本地私有大模型(如Llama 3、Qwen 2)、国内公共大模型(如DeepSeek、SILICONFLOW、通义千问、腾讯混元、字节豆包、百度千帆、智谱AI、Kimi)以及国外公共大模型(如OpenAI、Azure OpenAI、Anthropic、Gemini)。

MaxKB安装步骤详解

使用Docker Compose部署MaxKB,配置示例如下:

services:    maxkb:      image: 1panel/maxkb:latest      container_name: maxkb      volumes:        - /vol1/1000/docker/maxkb/data:/var/lib/postgresql/data        - /vol1/1000/docker/maxkb/python-packages:/opt/maxkb/app/sandbox/python-packages      ports:        - "8080:8080"  
    restart: always  

初始使用与登录指南

在浏览器中输入 http://NAS的IP:8080 即可访问MaxKB界面。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库3.webp)Image 输入管理员账号和密码进行登录:

  • 管理员账号:admin

  • 初始密码:MaxKB@123.. ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库4.webp)Image 首次登录后需修改初始密码以确保安全性。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库5.webp)Image 进入主面板后,界面设计简洁直观。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库6.webp)Image

创建并管理知识库

首先创建一个新知识库。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库7.webp)Image 根据提示填写知识库基本信息。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库8.webp)Image 创建完成后需上传文档以丰富内容。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库9.webp)Image 支持上传多种格式文档,包括TXT、Markdown、PDF、HTML、XLS、XLSX、CSV和ZIP。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库10.webp)Image 智能分段功能可能无法完美处理所有文档(如在VSCode中正常分段的文本)。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库11.webp)Image 高级分段选项更适合含特殊分隔符(如“------------”)的文档,提高准确性。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库12.webp)Image 右侧提供文本编辑功能,可手动调整分段内容。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库13.webp)Image 可为每个分段单独设置标题。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库14.webp)Image 设置完成后点击“开始导入”按钮。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库15.webp)Image 等待索引完成,期间可继续添加文档以扩充知识库。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库16.webp)Image 问题管理功能允许创建自定义问题与回答。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库17.webp)Image 命中测试工具用于验证输入内容是否能正确匹配知识库条目。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库18.webp)Image 参数设置中可调整检索模式和阈值以优化命中率。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库19.webp)Image 设置选项支持修改知识库基本信息并关联其他应用。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库20.webp)Image

模型添加与配置指南

进入系统设置 → 模型设置,分为公有模型和私有模型两类。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库21.webp)Image 公有模型支持多个主流平台。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库22.webp)Image 以添加OpenAI模型为例(需配合One API系统部署)。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库23.webp)Image 私有模型适用于本地运行的大模型。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库24.webp)Image 添加Ollama模型示例(需提前部署Ollama框架,API Key可随意填写)。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库25.webp)Image 模型添加完成后将显示在列表中。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库26.webp)Image

应用创建与测试流程

进入应用 → 创建应用以新建智能问答服务。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库27.webp)Image 填写应用名称并完成创建。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库28.webp)Image 选择AI模型(其他设置可后续调整)。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库29.webp)Image 通过右侧测试面板验证模型调用是否正常。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库30.webp)Image 未关联知识库时,提问相关主题可能无法获得准确回答。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库31.webp)Image 关联知识库后,回复质量显著提升。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库32.webp)Image 使用Ollama本地模型时响应速度较慢,但功能正常。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库33.webp)Image 测试无误后点击“保存并发布”。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库34.webp)Image 应用创建完成,点击打开查看详情。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库35.webp)Image 概览页面以图表形式直观展示数据指标。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库36.webp)Image 通过访问链接打开知识库聊天机器人界面。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库37.webp)Image 获得一个功能完备的在线问答机器人。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库38.webp)Image 命中测试工具支持参数实时调整验证效果。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库39.webp)Image 对话日志记录所有提问和回答历史。 ![Image](https://watermelonwater.tech/upload/imgs/NAS部署MaxKBOllama打造专属知识库40.webp)Image

系统总结与使用评价

总体而言,MaxKB是一款值得尝试部署的知识库系统。对于初次接触此类工具的用户来说,其上手难度较低,操作流程清晰:上传文档、选择模型、创建应用三步即可完成部署。界面设计美观合理,设置选项一目了然,避免了复杂操作带来的困扰。

虽然市场上有FastGPT和Dify等同类产品,但MaxKB以其易用性和便捷性脱颖而出。

  • 综合推荐:⭐⭐⭐⭐⭐(非常值得部署)

  • 使用体验:⭐⭐⭐⭐⭐(效果出色)

  • 部署难度:⭐⭐(过程简单)