VaultRelink:以本地 AI 找回失效連結指向的筆記
VaultRelink: Bringing Lost Notes Back to Life with Local AI
VaultRelink 以本地 AI 掃描 Markdown 筆記庫中的失效 wiki 連結,排序現有筆記並提供摘錄及替代建議,不會直接修改筆記庫。模型在小型合成數據集的測試中,為 18 個正向查詢中的 17 個將目標筆記排在首位;這項測試不代表最終混合排序的準確度。模型首次下載後可本地執行,毋須付費 API;報告可能包含敏感筆記摘錄。
Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine.
What I Built
Old notes are little ghosts: they still contain memories, but their links can point to names that no longer exist. VaultRelink helps a person find those lost connections in a local Markdown archive. It scans [[wiki links]], finds missing targets, ranks existing notes, and shows real excerpts and suggested replacements in a local HTML report. It never edits the vault; a human decides what to do.
Demo
Watch the illustrated walkthrough. The video illustrates the actual fictional-vault run; it is not a screen recording.
The included fictional demo has a broken link to a garden of memories. The report proposes the existing rose-stories note and preserves the link's display text in its suggested replacement.
Code
Source code and setup instructions — MIT license.
How I Built It
The core is the open-weight sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2, using the upstream quantized ONNX export and CPU inference. VaultRelink indexes overlapping chunks of notes, compares their embeddings with the missing link and surrounding context, and combines semantic similarity with lexical overlap. Each suggestion includes an excerpt from an actual note and a score that is a ranking signal, not a probability.
I first tested the model on a small synthetic dataset: 20 notes, 18 positive queries and 5 negative examples. Semantic retrieval returned the intended note first for 17 of 18 positives and within the top three for all 18. The benchmark preceded the application and does not establish the accuracy of the final hybrid ranking or performance on real vaults.
Why Does Open Innovation Matter?
The model runs locally after its initial download, without a paid API. The user can inspect the code, retain their notes on their own machine, and replace the model in a future version. Keeping the repair as a suggestion helps a person verify the evidence before changing a memory archive.
Limitations and credits
The scanner supports a subset of Obsidian link resolution; aliases in frontmatter and heading validation are not implemented. Query context may be truncated. Ranking is fallible, and generated reports can contain sensitive note excerpts. The fictional demo is included so reviewers can explore the app without exposing private notes.
Model: multilingual MiniLM, upstream model card states Apache 2.0. ONNX Runtime, NumPy and Tokenizers are third-party dependencies. AI assistance was used during development.
來源:DEV Community · dev.to