Semantic Map

approvedunreviewed

by nkyeah

Find and visualize related Markdown notes using cached embeddings.

★ 3 stars↓ 17 downloadsUpdated 3d ago0BSD

Semantic Map for Obsidian

中文说明

Semantic Map encodes Markdown notes into vectors, caches each note's embedding, and shows the 10 most related notes around the active note.

Features

  • Encodes each note only when it is new, modified, or the embedding provider changes.
  • Keeps embeddings in Obsidian plugin data instead of recomputing on every file open.
  • Opens a compact square semantic map at the top of the right sidebar.
  • Supports mouse-wheel zoom for scaling the graph inside the panel.
  • Shows encoding progress in the Obsidian status bar and semantic map view.
  • Uses fixed rank distance bands; notes with near-identical similarity share the same rank distance, with ranks linearly interpolated between the minimum distance and a fixed maximum distance of 400.
  • Works offline by default with a lightweight token-based encoder.
  • Supports SiliconFlow BAAI/bge-m3 and a custom embedding endpoint as opt-in alternatives.

Commands

  • Open map: opens the graph view.
  • Encode new and changed notes: scans Markdown files and encodes only notes that need work.
  • Re-encode current note: refreshes the active note's embedding.

Model integration

To use the offline encoder, run Encode new and changed notes, then Open map. The local encoder ranks notes by shared words. Select a remote provider for semantic embeddings.

  1. Create a SiliconFlow API key.
  2. Open Settings -> Community plugins -> Semantic Map.
  3. Select SiliconFlow BGE-M3 and paste the key.
  4. Run Encode new and changed notes from the command palette.

Network use and storage

When you run an encoding command with a remote provider selected, the plugin sends the beginning of each note it needs to encode, up to the configured character limit, to SiliconFlow or to your configured endpoint. The request includes the model name and that endpoint's API key when configured. The graph and similarity calculations run locally. The plugin stores embeddings, note paths and timestamps, settings, and API keys in this vault's plugin data.

Version 1.0.1 rebuilds old embeddings on the next scan. If you used an API key with a custom endpoint in 1.0.0, enter it again in the custom provider settings.

Custom endpoint

Choose Custom model endpoint in the plugin settings. Enter the service URL, an optional key, and the model name if required.

The built-in custom endpoint expects either:

{ "embedding": [0.1, 0.2, 0.3] }

or:

{ "data": [{ "embedding": [0.1, 0.2, 0.3] }] }

Development

npm.cmd install
npm.cmd test
npm.cmd run lint

For manual testing, copy main.js, manifest.json, and styles.css into:

<Vault>/.obsidian/plugins/semantic-map/

Then reload Obsidian and enable Semantic Map.

License

Released under the 0BSD license. See LICENSE.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.