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 community detection, insights, KaTeX, ingest cache
nash_sud939e131dbe2
diff --git a/README.md b/README.mdindex cff85a3e..e43c836c 100644--- a/README.md+++ b/README.md@@ -99,6 +99,7 @@ Step 2 (Generation): LLM takes analysis → generates wiki files```Additional 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- **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@@ -120,13 +121,26 @@ The original mentions `[[wikilinks]]` for cross-references but has no graph anal| Adamic-Adar | ×1.5 | Pages sharing common neighbors (weighted by neighbor degree) || Type affinity | ×1.0 | Bonus for same page type (entity↔entity, concept↔concept) |+**Louvain Community Detection:**+- Automatic knowledge cluster discovery via graphology-communities-louvain+- Type / Community coloring mode toggle — see pages by type or by discovered topic clusters+- Per-community cohesion score (intra-edge density), low-cohesion clusters flagged with warning+- 12-color palette, community legend with top node labels and member counts++**Graph Insights Panel:**+- Right-side expandable panel showing automatically discovered insights+- **Surprising connections** — cross-community, cross-type, peripheral↔hub edges scored by composite metric; dismissable+- **Knowledge gaps** — isolated pages (degree ≤ 1), sparse communities (cohesion < 0.15), bridge nodes (connecting 3+ clusters)+- Click any insight to highlight corresponding nodes and edges in the graph+- **Deep Research integration** — knowledge gaps and bridge nodes have a one-click Deep Research button that generates domain-aware search topics via LLM+**Graph Visualization (sigma.js + graphology + ForceAtlas2):**-- Node colors by page type, sizes scaled by link count (√ scaling)+- Node colors by page type or community, sizes scaled by link count (√ scaling)- Edge thickness and color by relevance weight (green=strong, gray=weak)- Hover interaction: neighbors stay visible, non-neighbors dim, edges highlight with relevance score label- Zoom controls (ZoomIn, ZoomOut, Fit-to-screen)- Position caching prevents layout jumps when data updates-- Legend showing node counts per type+- Legend switches between type counts and community info based on coloring mode### 5. Optimized Query Retrieval Pipeline@@ -176,12 +190,14 @@ Not in the original. For LLMs that emit `<think>` blocks (DeepSeek, QwQ, etc.):- **Collapsed by default** — thinking blocks hidden after completion, click to expand- **Visual separation** — thinking content shown in distinct style, separate from the main response-### 8. LaTeX → Unicode Conversion+### 8. KaTeX Math Rendering-Not in the original. Handles mathematical notation across all views:+Not in the original. Full LaTeX math support across all views:-- **100+ symbol mappings** — Greek letters (α, β, γ), operators (∑, ∏, ∫), arrows (→, ←, ↔), relations (≤, ≥, ≠), and more-- **Inline conversion** — `$\alpha$` → α, `$\sum$` → ∑, rendered in chat, preview, and saved wiki pages+- **KaTeX rendering** — inline `$...$` and block `$$...$$` formulas rendered via remark-math + rehype-katex+- **Milkdown math plugin** — preview editor renders math natively via @milkdown/plugin-math+- **Auto-detection** — bare `\begin{aligned}` and other LaTeX environments automatically wrapped with `$$` delimiters+- **Unicode fallback** — 100+ symbol mappings (α, ∑, →, ≤, etc.) for simple inline notation outside math blocks### 9. Review System (Async Human-in-the-Loop)@@ -200,12 +216,15 @@ The original suggests staying involved during ingest. We added an **asynchronousNot in the original. When the LLM identifies knowledge gaps:-- **Web search** (Tavily API) finds relevant sources+- **Web search** (Tavily API) finds relevant sources with full content extraction (no truncation)- **Multiple search queries** per topic — LLM-generated at ingest time, optimized for search engines+- **LLM-optimized research topics** — when triggered from Graph Insights, LLM reads overview.md + purpose.md to generate domain-specific topics and queries (not generic keywords)+- **User confirmation dialog** — editable topic and search queries shown for review before research starts- **LLM synthesizes** findings into a wiki research page with cross-references to existing wiki+- **Thinking display** — `<think>` blocks shown as collapsible sections during synthesis, auto-scroll to latest content- **Auto-ingest** — research results automatically processed to extract entities/concepts into the wiki- **Task queue** with 3 concurrent tasks-- **Research Panel** — dedicated sidebar panel showing real-time progress per task+- **Research Panel** — dedicated sidebar panel with dynamic height, real-time streaming progress### 11. Browser Extension (Web Clipper)diff --git a/README_CN.md b/README_CN.mdindex 1d8b4ff3..43b8dc04 100644--- a/README_CN.md+++ b/README_CN.md@@ -99,6 +99,7 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有```超越原始设计的摄入增强:+- **SHA256 增量缓存** —— 摄入前检查源文件内容哈希,未变更则自动跳过,节省 LLM token 和时间- **来源可追溯** —— 每个生成的 Wiki 页面在 YAML frontmatter 中包含 `sources: []` 字段,链接回贡献的原始资料文件- **overview.md 自动更新** —— 全局概要页面在每次摄入后重新生成,反映 Wiki 最新状态- **保证资料摘要生成** —— 兜底机制确保资料摘要页面始终被创建,即使 LLM 遗漏@@ -120,13 +121,26 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有| Adamic-Adar | ×1.5 | 共享共同邻居的页面(按邻居度数加权) || 类型亲和 | ×1.0 | 相同页面类型的加分(实体↔实体,概念↔概念) |+**Louvain 社区检测:**+- 基于 graphology-communities-louvain 自动发现知识聚类+- 类型 / 社区 着色模式一键切换 —— 按页面类型或按发现的主题集群查看+- 每个社区计算 cohesion(内聚度)评分,低内聚社区标警告+- 12 色调色板,社区图例显示核心节点标签和成员数++**图谱洞察面板:**+- 右侧展开式面板,自动发现知识结构中的洞察+- **惊奇连接** —— 跨社区、跨类型、边缘↔核心的意外关联,复合评分排序,可消除+- **知识空白** —— 孤立页面(度 ≤ 1)、稀疏社区(cohesion < 0.15)、桥接节点(连接 3+ 个集群)+- 点击洞察卡片高亮图谱中对应节点和边+- **深度研究集成** —— 知识空白和桥接节点一键触发 Deep Research,LLM 自动生成领域精准的搜索主题+**图谱可视化(sigma.js + graphology + ForceAtlas2):**-- 按页面类型着色节点,按链接数缩放节点大小(√ 缩放)+- 按页面类型或社区着色节点,按链接数缩放节点大小(√ 缩放)- 边的粗细和颜色按关联权重变化(绿色=强,灰色=弱)- 悬停交互:邻居节点保持可见,非邻居变暗,边高亮并显示关联度分数- 缩放控件(放大、缩小、适应屏幕)- 位置缓存防止数据更新时布局跳动-- 图例显示每种类型的节点计数+- 图例根据着色模式自动切换类型计数或社区信息### 5. 优化的查询检索管线@@ -176,12 +190,14 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有- **默认折叠** —— 生成完成后思维块隐藏,点击展开- **视觉分离** —— 思维内容以独特样式显示,与主回复分开-### 8. LaTeX → Unicode 转换+### 8. KaTeX 数学公式渲染-原始设计中没有。跨所有视图处理数学符号:+原始设计中没有。跨所有视图的完整 LaTeX 数学支持:-- **100+ 符号映射** —— 希腊字母(α, β, γ)、运算符(∑, ∏, ∫)、箭头(→, ←, ↔)、关系符(≤, ≥, ≠)等-- **内联转换** —— `$\alpha$` → α,`$\sum$` → ∑,在聊天、预览和保存的 Wiki 页面中渲染+- **KaTeX 渲染** —— 行内 `$...$` 和块级 `$$...$$` 公式通过 remark-math + rehype-katex 渲染+- **Milkdown 数学插件** —— 预览编辑器通过 @milkdown/plugin-math 原生渲染数学公式+- **自动检测** —— 裸 `\begin{aligned}` 等 LaTeX 环境自动补上 `$$` 定界符+- **Unicode 降级** —— 100+ 符号映射(α, ∑, →, ≤ 等)用于数学块外的简单行内符号### 9. 审核系统(异步人机协作)@@ -200,12 +216,15 @@ LLM Wiki 是一个跨平台桌面应用,能将你的文档自动转化为有原始设计中没有。当 LLM 识别出知识空白时:-- **网络搜索**(Tavily API)查找相关资料+- **网络搜索**(Tavily API)查找相关资料,返回完整内容(非截断摘要)- **多条搜索查询** —— 摄入时由 LLM 生成,针对搜索引擎优化+- **LLM 智能主题生成** —— 从图谱洞察触发时,LLM 读取 overview.md + purpose.md 生成领域精准的研究主题和查询(非泛泛关键词)+- **用户确认对话框** —— 研究主题和搜索查询可编辑,确认后才开始研究- **LLM 综合** 搜索结果生成 Wiki 研究页面,并交叉引用现有 Wiki+- **思维链展示** —— 综合过程中 `<think>` 块显示为可折叠区域,自动滚动到最新内容- **自动摄入** —— 研究结果自动进入两步摄入流程,提取实体/概念到 Wiki- **任务队列** —— 最多 3 个并发任务-- **研究面板** —— 专用侧边面板实时显示每个任务的进度+- **研究面板** —— 专用侧边面板,动态高度,实时流式进度### 11. 浏览器扩展(网页剪藏)