能力标签
document-assistant AI技能包
🛠
AI工具

document-assistant AI技能包

基于 Python · 开源免费,本地部署,数据完全自主可控
英文名:document-assistant
⭐ 9 Stars 💻 Python 📄 CC-BY-SA-4.0 🏷 AI 7.5分
7.5AI 综合评分
RAG文档生成AI工具
✦ AI Skill Hub 推荐

AI Skill Hub 推荐使用:document-assistant AI技能包 是一款优质的AI工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。

📚 深度解析

document-assistant AI技能包 是一款基于 Python 的开源工具,在 GitHub 上收获 0k+ Star,是RAG、文档生成、AI工具领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
document-assistant AI技能包 依赖 Python 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 Python 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 document-assistant AI技能包 的版本更新,及时通知重要功能变化。

📋 工具概览

document-assistant AI技能包 是一款基于 Python 开发的开源工具,专注于 RAG、文档生成、AI工具 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 9
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
CC-BY-SA-4.0
AI 综合评分
7.5 分
工具类型
AI工具
Forks
—

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

document-assistant AI技能包 是一款基于 Python 开发的开源工具,专注于 RAG、文档生成、AI工具 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:pip 安装(推荐)
pip install document-assistant

# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install document-assistant

# 方式三:从源码安装(获取最新功能)
git clone https://github.com/gosha70/document-assistant
cd document-assistant
pip install -e .

# 验证安装
python -c "import document_assistant; print('安装成功')"
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 命令行使用
document-assistant --help

# 基本用法
document-assistant input_file -o output_file

# Python 代码中调用
import document_assistant

# 示例
result = document_assistant.process("input")
print(result)
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# document-assistant 配置文件示例(config.yml)
app:
  name: "document-assistant"
  debug: false
  log_level: "INFO"

# 运行时指定配置文件
document-assistant --config config.yml

# 或通过环境变量配置
export DOCUMENT_ASSISTANT_API_KEY="your-key"
export DOCUMENT_ASSISTANT_OUTPUT_DIR="./output"
📑 README 深度解析 真实文档 完整度 90/100 含工作流图 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

Document Assistant — D.O.T. (Document Of Things)

A Retrieval-Augmented Generation (RAG) framework with a FastAPI backend, a browser-based chat UI, a full-featured admin console, and a configurable query pipeline. Designed for local-first, private deployments: with a local LLM backend (e.g., Ollama) and a local vector store, all data stays on your machine. When an external LLM backend is configured (llm.backend: openai), queries and retrieved context are sent to that endpoint.

CI Python 3.11+ License: CC-BY-SA-4.0

---

Architecture Overview

graph TB subgraph Clients CUI["Chat UI · index.html"] AUI["Admin Console · admin.html"] API["REST Client · Swagger UI"] end subgraph FastAPI["FastAPI · src/api/"] MW["Middleware: Auth · RateLimit · Telemetry"] IR["/ingest"] CR["/chat · /chat/stream"] SR["/study"] AR["/admin"] ST["/status · /health"] end subgraph Pipeline["Query Pipeline · src/rag/"] OR["QueryOrchestrator"] QD["Query Decomposition"] HY["HyDE"] RT["Retriever: Hybrid Search + Rerank"] CR2["Corrective Retrieval"] GN["Generator: Prompt Templates"] VF["Answer Verification"] end subgraph Ingest["Ingestion Pipeline · embeddings/"] FC["File Converters · 17 types"] CK["Chunker: Standard / Late / Contextual"] EM["Embedding Adapter: Instructor / HuggingFace"] end subgraph Backends["Vector Store Backends · src/rag/"] CH["ChromaBackend · dev / local"] QD2["QdrantBackend · production"] end subgraph LLM["LLM Backends"] OL["Ollama"] OA["OpenAI-compatible"] LG["Legacy GGUF/GPTQ"] end CUI & AUI & API --> MW MW --> IR & CR & SR & AR & ST IR --> FC --> CK --> EM --> CH & QD2 CR --> OR --> QD & HY --> RT --> CR2 --> GN --> VF RT --> CH & QD2 GN --> OL & OA & LG AR --> CH & QD2

---

Features at a Glance

AreaHighlights
**Ingestion**17 file types · PDF, Markdown, HTML, CSV, Excel, JSON, YAML, XML, SQL, Java, JS, Python, RTF, DDL, XSL · Duplicate handling (check / replace / add / skip)
**Chunking**Configurable token-aware splitting · Late Chunking (long-context pooling) · Contextual Augmentation (LLM-generated per-chunk context)
**Retrieval**Hybrid search (dense + BM25 sparse, fused via RRF) · CrossEncoder reranking · Four optional query pipeline stages
**Query Pipeline**Query Decomposition · HyDE (Hypothetical Document Embeddings) · Corrective Retrieval · Answer Verification
**LLM Backends**Ollama (local) · OpenAI-compatible APIs · Legacy GGUF/GPTQ/AWQ quantised models
**Vector Stores**Chroma (dev/local) · Qdrant (production) — swappable via config
**API**FastAPI REST + Server-Sent Events streaming · Interactive Swagger UI (/docs) · ReDoc (/redoc)
**Study Mode**/study/summarize · /study/glossary · /study/flashcards — LLM-generated study aids
**Admin Console**Collection management · Background jobs · Live metrics · Alerts · Periodic reports
**Security**Bearer-token auth (user + admin roles) · Per-IP rate limiting · Prompt injection firewall · Upload validation
**Observability**Request/LLM telemetry · Windowed alerting · Hourly snapshots

---

Prerequisites

  • Python 3.11+
  • Poetry
  • An LLM backend — Ollama is the easiest for local use

1. Install dependencies

poetry install

E2e tests (requires a live server at localhost:8000)

poetry run pytest tests/e2e/ -v --tb=short ```

Install all deps (including dev)

poetry install

Quick Start

2. Configure

Copy the default config and set your LLM backend:

cp config/defaults.yaml config/local.yaml

Edit config/local.yaml — minimum for Ollama:

llm:
  backend: "ollama"          # or "openai"
  model: "llama3.2"          # any model pulled via `ollama pull`

vectorstore:
  persist_directory: "./my_vectorstore"
  collection_name: "my_docs"

All other settings have sensible defaults. See Configuration Reference below.

Configuration Reference

Configuration is YAML-based. The application loads config/defaults.yaml and deep-merges config/local.yaml (if present) on top. Override the config path with DOT_CONFIG_PATH=/path/to/config.yaml.

API Reference

Full interactive documentation at /docs (Swagger UI) or /redoc.

Core Endpoints

MethodPathDescription
GET/healthLiveness check — {"status": "ok"}
GET/statusApp info, collection name, document count, embedding model
POST/ingestUpload files (multipart) → ingest into vector store
POST/chatSynchronous Q&A with sources
POST/chat/streamServer-Sent Events streaming Q&A

Admin Endpoints (`/admin/*`)

MethodPathDescription
GET/admin/collectionsList all collections
GET/admin/collections/{name}Collection details (count, model, backend)
GET/admin/collections/{name}/chunksSample chunks (max 50)
GET/admin/collections/{name}/sourcesList ingested source files
POST/admin/collections/{name}/reindexTrigger background reindex
POST/admin/collections/{name}/migrateStamp embedding provenance on legacy collections
GET/admin/jobsList background jobs
GET/admin/jobs/{id}Job status and progress
POST/admin/jobs/{id}/retryRetry a failed job
DELETE/admin/jobs/{id}Cancel a running job
GET/admin/metrics/runtimeLive process + application metrics
GET/admin/alertsActive alert conditions
GET/admin/reports/summarySnapshot report history
POST/admin/reports/generateGenerate an on-demand snapshot

Query Pipeline

All stages are independently opt-in:

query_pipeline:
  decomposition_enabled: false    # Break complex queries into sub-queries
  hyde_enabled: false             # Hypothetical Document Embeddings
  corrective_retrieval_enabled: false  # Re-retrieve if confidence < threshold
  corrective_retrieval_threshold: 0.4
  verification_enabled: false     # LLM verifies answer is grounded in sources
  max_sub_queries: 5

Retrieval Pipeline

User Query
    │
    ▼
[Query Decomposition]  ←  optional: break into ≤5 sub-queries
    │
    ▼
[HyDE]                 ←  optional: generate hypothetical answer, embed it
    │
    ▼
[Hybrid Search]           dense (embedding) + sparse (BM25) → RRF fusion
    │
    ▼
[CrossEncoder Rerank]     ms-marco-MiniLM-L-6-v2, top-5 of 20 candidates
    │
    ▼
[Corrective Retrieval] ←  optional: re-retrieve if confidence < 0.4
    │
    ▼
[Prompt Injection Firewall]  sanitize retrieved context
    │
    ▼
[LLM Generation]          streamed or synchronous
    │
    ▼
[Answer Verification]  ←  optional: LLM checks claims against sources
    │
    ▼
Response + Sources + Metadata

---

5. Ask questions

Use the Chat UI or send a request:

curl -X POST http://127.0.0.1:8000/chat \
  -H "Content-Type: application/json" \
  -d '{"question": "What does the document say about X?"}'

---

🇨🇳 中文文档镜像 AI 翻译 2026-05-31
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

Document Assistant (D.O.T.) 是一个基于 RAG (Retrieval-Augmented Generation) 架构的文档助手框架。它采用 FastAPI 构建后端,提供基于浏览器的 Chat UI 和功能完备的 Admin Console。该项目专为“本地优先”和隐私保护设计,支持通过 Ollama 等工具调用本地 LLM 和本地向量数据库,确保所有数据均保留在您的本地机器中。若配置为 OpenAI 等外部后端,系统也可灵活切换为云端模式。

⚡ 功能介绍

本项目具备强大的文档处理能力:在 Ingestion 阶段,支持 PDF、Markdown、Python、SQL 等 17 种文件格式,并提供灵活的重复文件处理策略;在 Chunking 阶段,支持 Token 感知的智能切分、Late Chunking 以及利用 LLM 生成上下文的 Contextual Augmentation 技术;在 Retrieval 阶段,通过 Hybrid Search(结合 Dense 与 Sparse 检索)与 CrossEncoder Rerank 技术,确保检索结果的精准度与相关性。

📋 环境依赖

在开始之前,请确保您的开发环境已安装 Python 3.11 或更高版本,并安装了 Poetry 包管理工具。此外,由于本项目支持本地化部署,您需要准备一个 LLM 后端,推荐使用 Ollama 以获得最便捷的本地运行体验。

🛠 安装步骤(Docker/pip/源码)

您可以通过 Poetry 进行快速安装。首先,在项目根目录下运行 `poetry install` 以安装所有必要的依赖(包括开发环境依赖)。安装完成后,建议运行 `poetry run pytest tests/e2e/` 执行端到端测试,以确保在本地 localhost:8000 环境下服务运行正常。

🚀 使用教程

快速上手非常简单:首先通过 `poetry install` 完成安装,随后进入配置阶段。您可以直接使用 Chat UI 进行交互式对话,或者通过 `curl` 命令向 `/chat` 接口发送 JSON 请求来测试文��问答功能。对于开发者,系统还提供了 Swagger UI 方便进行 API 测试。

⚙️ 配置说明(含 MCP / env)

项目的配置采用 YAML 格式。系统启动时会加载 `config/defaults.yaml` 作为默认配置,并使用 `config/local.yaml` 进行深度合并覆盖。您可以根据需要通过环境变量 `DOT_CONFIG_PATH` 指定自定义配置文件路径。在配置 LLM 后端时,请务必正确设置 `llm.backend`(如 'ollama' 或 'openai')以及对应的 `model` 参数。

🔌 API 说明

本项目提供了完整的 RESTful API 接口,您可以通过访问 `/docs` (Swagger UI) 或 `/redoc` 获取交互式文档。核心接口包括用于文件上传与向量化存储的 `/ingest`、用于对话流式输出的 `/chat` 以及 `/chat/stream`。此外,`/admin/*` 系列接口允许您管理 Collection、查看文档分片(Chunks)详情及监控系统状态。

🔄 工作流/模块

本项目拥有高度模块化的 Query Pipeline(查询流水线),所有阶段均可根据需求通过配置独立开启或关闭。流水线支持 Query Decomposition(将复杂查询拆解为子查询)、HyDE(生成假设性文档进行嵌入)、Hybrid Search(结合 BM25 的混合检索)以及 CrossEncoder Rerank(重排序)和 Corrective Retrieval(纠错检索),从而实现从用户提问到精准答案的高质量转化。

❓ FAQ 摘要

如果您在使用过程中遇到问题,可以通过 Chat UI 直接提问,或者使用 `curl` 模拟客户端请求进行调试。对于系统状态的检查,可以访问 `/health` 接口确认服务存活状态,或通过 `/status` 查看当前加载的模型、文档计数及向量库信息。

🎯 aiskill88 AI 点评 A 级 2026-05-30

高质量开源AI工具,实现智能文档生成

📚 实用指南(长尾问题)
适合谁
  • 需要 document-assistant 解决具体问题的开发者与运营人员
最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • Python 依赖冲突:建议用 venv / uv 隔离环境
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
document-assistant 中文教程document-assistant 安装报错怎么办document-assistant 与同类工具对比document-assistant 最佳实践document-assistant 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要 document-assistant 解决具体问题的开发者与运营人员
⭐ 最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • Python 依赖冲突:建议用 venv / uv 隔离环境

👥 适合人群

AI 技术爱好者研究人员和学生开发者和工程师技术创业者

🎯 使用场景

  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发

⚖️ 优点与不足

✅ 优点
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • −安装和初始配置可能需要一定技术基础
  • −功能完整性通常不如成熟商业产品
  • −技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

该工具使用 CC-BY-SA-4.0 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

📄 CC-BY-SA-4.0 — 请查阅原始协议条款了解具体使用限制。

🔗 相关工具推荐

📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

请参考项目README文件
💡 AI Skill Hub 点评

总体来看,document-assistant AI技能包 是一款质量良好的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。

📚 深入学习 document-assistant AI技能包
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 document-assistant
原始描述 开源AI工具:RAG (Retrieval-Augmented Generation) framework of merging private vector databas。⭐9 · Python
Topics RAG文档生成AI工具
GitHub https://github.com/gosha70/document-assistant
License CC-BY-SA-4.0
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/gosha70/document-assistant

收录时间:2026-05-16 · 更新时间:2026-05-30 · License:CC-BY-SA-4.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →