Sidemate
桌伴Sidemate Wiki

本地知识库

把文档放进本地,让 AI 读它。完全本地化。

把文档放进本地,让 AI 读懂你的资料。向量化、检索、重排序全在本地完成。

支持的文件格式

类型扩展名
--------------
文本.txt .md .csv
Office.docx .xlsx
电子书 / 网页.pdf .epub .html .htm
其他.srt .rtf

不支持:.doc / .xls 旧格式(请用 Word 另存为 .docx 后上传)

限制:单文件最大 50MB · 最多 200 个文档 · 批量操作每次最多 50 个

上传后发生了什么

  1. 文本提取:从 PDF/Word/HTML 等格式中提取纯文本
  2. 智能分块:按章节/段落/固定长度自动选择最优策略,每块约 500 字,块间 50 字重叠。中文不断句中间
  3. 向量化:用 bge-m3 模型生成 dense 向量(全程本地)
  4. 自动打标:打标引擎(设置中可选本地/云端)读取文档,生成摘要、分类标签

整个过程在后台线程执行,处理进度实时可见。支持暂停 / 恢复 / 取消。

检索流程

提问时,Sidemate 执行 3 步检索管线:

  1. Dense 向量检索:用余弦相似度找到语义相关的内容块
  2. Reranker 精排:bge-reranker-v2-m3 交叉编码器对 query+文档对重新打分
  3. MMR 去重:Maximal Marginal Relevance 确保结果多样性,每文档最多 3 条

如果所有结果的相关性分数低于 0.05,说明知识库中没有相关内容,会返回空结果(不硬凑答案)。

文档管理

操作说明
------------
上传拖拽或点击上传按钮,支持批量
删除单个删除或批量删除(最多 50 个)
重处理文档处理失败时可重新处理
暂停 / 恢复处理过程中可暂停,稍后恢复
私密标记标记为私密的文档不会出现在云端 Agent 的检索结果中
去重检测重复文档,可选择保留两者 / 替换 / 取消

标签系统

  • 自动打标:文档处理完成后,打标引擎(可选本地/云端)自动生成分类标签和摘要
  • AI 语义分组:把碎片标签按语义归并为 5-10 组
  • 手动调整:可手动移动标签到其他分组,AI 刷新不会覆盖手动分组

知识星图(v0.9.8 新增)

知识库整理完成后,会自动分析文档之间的相似关系,生成一张像星座图一样的关系网:

  • 连线:内容相近的文档自动连线——离得越近、线越粗,代表内容越像
  • 颜色分组:AI 按主题自动聚类、同色归类;点底部颜色分组可以只看一组
  • 虚线:分类不同、内容却有呼应的文档用虚线连接
  • 点任意文档:弹出信息卡片,列出它的"知识邻居"和为什么有关联;点「AI 详解」生成一段大白话解读
  • 支持缩放、拖动、双击复位

分析在你的电脑上完成(离线模型即可),打开即是成型的图。

推荐问题

每次整理后,AI 会通读你的文库,生成 3 条推荐追问问题——放在文档列表顶部,点击直接向知识库提问,帮你快速发现"原来这些资料还能回答这个"。

审计日志

每次知识库检索都会记录:时间、访问者(本地/云端/手动)、查询词、命中文档和片段、相关性评分。每文档最多保留 200 条。可在知识库设置页查看和清空。

---

Upload documents and let AI read your materials. Vectorization, retrieval, and reranking all run locally.

Supported File Formats

TypeExtensions
-----------------
Text.txt .md .csv
Office.docx .xlsx
Ebook / Web.pdf .epub .html .htm
Other.srt .rtf

Not supported: .doc / .xls legacy formats (re-save as .docx first)

Limits: 50MB per file · 200 documents max · 50 docs per batch operation

What Happens After Upload

  1. Text extraction: Extracts plain text from PDF/Word/HTML
  2. Smart chunking: Auto-selects a suitable strategy (section/paragraph/fixed), ~500 chars per chunk, 50 char overlap. Never breaks mid-sentence
  3. Vectorization: bge-m3 generates dense vectors (fully local)
  4. Auto-tagging: Local LLM reads document, generates summary + category tags

Runs in background threads with real-time progress. Supports pause / resume / cancel.

Retrieval Pipeline

When you ask a question, Sidemate runs a 3-step pipeline:

  1. Dense vector search: Cosine similarity to find semantically relevant chunks
  2. Reranker: bge-reranker-v2-m3 cross-encoder re-scores query+document pairs
  3. MMR dedup: Maximal Marginal Relevance ensures diversity, max 3 chunks per document

If all relevance scores are below 0.05, the KB has no relevant content — returns empty (no forced answers).

Document Management

OperationDescription
------------------------
UploadDrag-and-drop or click, batch supported
DeleteSingle or batch (max 50)
ReprocessRetry failed documents
Pause / ResumePause processing, resume later
PrivatePrivate docs excluded from cloud Agent results
DeduplicateDetect duplicates, choose keep/replace/cancel

Tag System

  • Auto-tagging: After processing, the tagging engine (local or cloud, selectable in Settings) generates category tags + summary
  • AI grouping: Fragments merged into 5-10 semantic groups
  • Manual override: Manually moved tags are preserved during AI refresh

Knowledge Star Map (new in v0.9.8)

After organizing, the KB analyzes how your documents relate and draws a constellation-style map:

  • Links: similar docs are connected automatically — closer nodes and thicker lines mean more similar content
  • Color groups: AI clusters by topic, color-coded; click a color group below to isolate it
  • Dashed lines: docs from different categories that still echo each other
  • Click any doc: an info card lists its "knowledge neighbors" and why they link; "AI Insights" generates a plain-language explanation
  • Zoom, drag, double-click to reset

Analysis runs on your computer (offline model works); the map is ready the moment you open it.

Recommended Questions

After each organize pass, AI reads your library and suggests 3 follow-up questions — shown atop the doc list. Click one to ask your KB directly and discover what else your materials can answer.

Audit Log

Every KB search logs: timestamp, actor (local/cloud/manual), query, matched docs/chunks, relevance score. Max 200 entries per document. Viewable and clearable in KB settings.

---