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 刷新不会覆盖手动分组

AI 洞察

点击「整理」按钮,打标引擎(可选本地/云端)会通读你的整个文库,生成:

  • 主题分类(3-5 个大类)
  • 适用场景建议
  • 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

AI Insights

Click "Organize" — the tagging engine (local or cloud) reads your entire library and generates:

  • Theme classification (3-5 categories)
  • Use case suggestions
  • 3 recommended follow-up questions

Based on real document summaries, no hallucinated topics. Results persist across refreshes.

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.

---