LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources。
TypeScript
docs: update READMEs with vector search, folder import, ingest queue, platform behavior
nash_su7216f2ee9b25
diff --git a/README.md b/README.mdindex 7e4e80f8..f884c932 100644--- a/README.md+++ b/README.md@@ -34,7 +34,9 @@- **4-Signal Knowledge Graph** — relevance model with direct links, source overlap, Adamic-Adar, and type affinity- **Louvain Community Detection** — automatic knowledge cluster discovery with cohesion scoring- **Graph Insights** — surprising connections and knowledge gaps with one-click Deep Research-- **4-Phase Query Retrieval** — tokenized search → graph expansion → budget control → cited context assembly+- **Vector Semantic Search** — optional embedding-based retrieval via LanceDB, supports any OpenAI-compatible endpoint+- **Persistent Ingest Queue** — serial processing with crash recovery, cancel, retry, and progress visualization+- **Folder Import** — recursive folder import preserving directory structure, folder context as LLM classification hint- **Deep Research** — LLM-optimized search topics, multi-query web search, auto-ingest results into wiki- **Async Review System** — LLM flags items for human judgment, predefined actions, pre-generated search queries- **Chrome Web Clipper** — one-click web page capture with auto-ingest into knowledge base@@ -111,6 +113,10 @@ Step 2 (Generation): LLM takes analysis → generates wiki filesAdditional ingest enhancements beyond the original:- **SHA256 incremental cache** — source file content is hashed before ingest; unchanged files are skipped automatically, saving LLM tokens and time+- **Persistent ingest queue** — serial processing prevents concurrent LLM calls; queue persisted to disk, survives app restart; failed tasks auto-retry up to 3 times+- **Folder import** — recursive folder import preserving directory structure; folder path passed to LLM as classification context (e.g., "papers > energy" helps categorize content)+- **Queue visualization** — Activity Panel shows progress bar, pending/processing/failed tasks with cancel and retry buttons+- **Auto-embedding** — when vector search is enabled, new pages are automatically embedded after ingest- **Source traceability** — every generated wiki page includes a `sources: []` field in YAML frontmatter, linking back to the raw source files that contributed to it- **overview.md auto-update** — global summary page regenerated on every ingest to reflect the latest state of the wiki- **Guaranteed source summary** — fallback ensures a source summary page is always created, even if the LLM omits it@@ -179,7 +185,7 @@ Not in the original. The system **automatically analyzes graph structure** to su### 7. Optimized Query Retrieval Pipeline-The original describes a simple query where the LLM reads relevant pages. We built a **4-phase retrieval pipeline** with budget control:+The original describes a simple query where the LLM reads relevant pages. We built a **multi-lane retrieval pipeline** with optional vector search and budget control:```Phase 1: Tokenized Search@@ -188,10 +194,16 @@ Phase 1: Tokenized Search- Title match bonus (+10 score)- Searches both wiki/ and raw/sources/+Phase 1.5: Vector Semantic Search (optional)+ - Embedding via any OpenAI-compatible /v1/embeddings endpoint+ - Stored in LanceDB (Rust backend) for fast ANN retrieval+ - Cosine similarity finds semantically related pages even without keyword overlap+ - Results merged into search: boosts existing matches + adds new discoveries+Phase 2: Graph Expansion- Top search results used as seed nodes- 4-signal relevance model finds related pages- - Discovers connections the keyword search missed+ - 2-hop traversal with decay for deeper connectionsPhase 3: Budget Control- Configurable context window: 4K → 1M tokens@@ -204,6 +216,8 @@ Phase 4: Context Assembly- LLM instructed to cite pages by number: [1], [2], etc.```+**Vector Search** is fully optional — disabled by default, enabled in Settings with independent endpoint, API key, and model configuration. When disabled, the pipeline falls back to tokenized search + graph expansion. Benchmark: overall recall improved from 58.2% to 71.4% with vector search enabled.+### 8. Multi-Conversation Chat with PersistenceThe original has a single query interface. We built **full multi-conversation support**:@@ -315,6 +329,8 @@ The original is platform-agnostic (abstract pattern). We handle concrete cross-p- **Path normalization** — unified `normalizePath()` used across 22+ files, backslash → forward slash- **Unicode-safe string handling** — char-based slicing instead of byte-based (prevents crashes on CJK filenames)+- **macOS close-to-hide** — close button hides window (app stays running in background), click dock icon to restore, Cmd+Q to quit+- **Windows/Linux close confirmation** — confirmation dialog before quitting to prevent accidental data loss- **Tauri v2** — native desktop on macOS, Windows, Linux- **GitHub Actions CI/CD** — automated builds for macOS (ARM + Intel), Windows (.msi), Linux (.deb / .AppImage)@@ -337,7 +353,8 @@ The original is platform-agnostic (abstract pattern). We handle concrete cross-p| UI | shadcn/ui + Tailwind CSS v4 || Editor | Milkdown (ProseMirror-based WYSIWYG) || Graph | sigma.js + graphology + ForceAtlas2 |-| Search | Custom tokenized search + graph relevance |+| Search | Tokenized search + graph relevance + optional vector (LanceDB) |+| Vector DB | LanceDB (Rust, embedded, optional) || PDF | pdf-extract || Office | docx-rs + calamine || i18n | react-i18next |diff --git a/README_CN.md b/README_CN.mdindex 2f6d74ce..9680206c 100644--- a/README_CN.md+++ b/README_CN.md@@ -34,7 +34,9 @@- **四信号知识图谱** — 直接链接、来源重叠、Adamic-Adar、类型亲和四维关联度模型- **Louvain 社区检测** — 自动发现知识聚类,内聚度评分- **图谱洞察** — 惊奇连接与知识空白检测,一键触发 Deep Research-- **四阶段查询检索** — 分词搜索 → 图谱扩展 → 预算控制 → 带引用的上下文组装+- **向量语义搜索** — 可选的 embedding 检索,基于 LanceDB,支持任意 OpenAI 兼容端点+- **持久化摄入队列** — 串行处理,崩溃恢复,取消/重试,进度可视化+- **文件夹导入** — 递归导入保留目录结构,文件夹路径作为 LLM 分类上下文- **深度研究** — LLM 智能生成搜索主题,多查询网络搜索,研究结果自动摄入 Wiki- **异步审核系统** — LLM 在摄入时标记需人工判断的项,预定义操作,预生成搜索查询- **Chrome 网页剪藏** — 一键捕获网页内容,自动摄入知识库@@ -111,6 +113,10 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有超越原始设计的摄入增强:- **SHA256 增量缓存** —— 摄入前检查源文件内容哈希,未变更则自动跳过,节省 LLM token 和时间+- **持久化摄入队列** —— 串行处理防止并发 LLM 调用;队列持久化到磁盘,应用重启后自动恢复;失败任务自动重试最多 3 次+- **文件夹导入** —— 递归导入保留目录结构;文件夹路径作为分类上下文传给 LLM(如 "papers > energy" 帮助分类)+- **队列可视化** —— 活动面板显示进度条、排队/处理中/失败任务,支持取消和重试+- **自动 Embedding** —— 开启向量搜索时,新页面摄入后自动生成 embedding- **来源可追溯** —— 每个生成的 Wiki 页面在 YAML frontmatter 中包含 `sources: []` 字段,链接回贡献的原始资料文件- **overview.md 自动更新** —— 全局概要页面在每次摄入后重新生成,反映 Wiki 最新状态- **保证资料摘要生成** —— 兜底机制确保资料摘要页面始终被创建,即使 LLM 遗漏@@ -179,7 +185,7 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有### 7. 优化的查询检索管线-原始设计描述了 LLM 读取相关页面的简单查询。我们构建了带预算控制的**四阶段检索管线**:+原始设计描述了 LLM 读取相关页面的简单查询。我们构建了支持可选向量搜索的**多车道检索管线**:```阶段 1:分词搜索@@ -188,10 +194,16 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有- 标题匹配加分(+10 分)- 同时搜索 wiki/ 和 raw/sources/+阶段 1.5:向量语义搜索(可选)+ - 通过任意 OpenAI 兼容的 /v1/embeddings 端点生成 embedding+ - 存储在 LanceDB(Rust 后端)中进行快速 ANN 检索+ - 余弦相似度发现即使没有关键词重叠也语义相关的页面+ - 结果合并:增强已有匹配 + 添加新发现+阶段 2:图谱扩展- 搜索结果作为种子节点- 四信号关联度模型发现相关页面- - 发现关键词搜索遗漏的关联+ - 2 跳遍历带衰减,发现更深层关联阶段 3:预算控制- 可配置上下文窗口:4K → 1M tokens@@ -204,6 +216,8 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有- LLM 被指示按编号引用页面:[1]、[2] 等```+**向量搜索**完全可选 —— 默认关闭,在设置中开启,有独立的端点、API Key 和模型配置。关闭时管线 fallback 到分词搜索 + 图谱扩展。基准测试:开启向量搜索后整体召回率从 58.2% 提升至 71.4%。+### 8. 多对话聊天与持久化原始设计只有单一查询接口。我们构建了**完整的多对话支持**:@@ -315,6 +329,8 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有- **路径规范化** —— 统一的 `normalizePath()` 在 22+ 个文件中使用,反斜杠 → 正斜杠- **Unicode 安全字符串处理** —— 基于字符而非字节的切片(防止中文文件名导致崩溃)+- **macOS 关闭隐藏** —— 关闭按钮隐藏窗口(程序后台运行),点击 Dock 图标恢复,Cmd+Q 退出+- **Windows/Linux 关闭确认** —— 关闭时弹出确认对话框,防止误操作导致数据丢失- **Tauri v2** —— macOS、Windows、Linux 原生桌面- **GitHub Actions CI/CD** —— 自动构建 macOS(ARM + Intel)、Windows(.msi)、Linux(.deb / .AppImage)@@ -337,7 +353,8 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有| UI | shadcn/ui + Tailwind CSS v4 || 编辑器 | Milkdown(基于 ProseMirror 的所见即所得) || 图谱 | sigma.js + graphology + ForceAtlas2 |-| 搜索 | 自定义分词搜索 + 图谱关联度 |+| 搜索 | 分词搜索 + 图谱关联度 + 可选向量(LanceDB) |+| 向量数据库 | LanceDB(Rust,嵌入式,可选) || PDF | pdf-extract || Office | docx-rs + calamine || 国际化 | react-i18next |