Embedding-based semantic recall hook for CodeMap — registers into `codemap recall` via the recall_hooks entry-point group and adds vector search over .ai-memory/knowledge/*.yml
Project description
codemap-semantic-index
Embedding-based semantic recall plugin for codemap.
Registers an embedding ranker into codemap recall via the codemap.recall_hooks entry-point group (introduced in codemap-core 0.4.1). codemap-aimemory automatically RRF-fuses the embedding ranking with its token ranking and applies freshness decay (P4-2).
Install
pipx inject codemap codemap-semantic-index
# pulls sentence-transformers + torch (~200MB)
# Pick + download a local model (1.2GB default)
codemap embed install # interactive picker
codemap embed install BAAI/bge-m3 # direct
# First embed (writes <project>/.ai-memory/_semantic/)
codemap embed
# Now `codemap recall` does double-path (token + embedding) + RRF + freshness
codemap recall '<query>' --with-content
Default model
Qwen/Qwen3-Embedding-0.6B (1024 dim, 32k context, 1.2GB). Same-source training as the Qwen cloud text-embedding-v3, so switching to cloud preserves recall "feel".
Cloud backend (any OpenAI-compatible embedding API)
codemap embed backend set # interactive picker (qwen / openai / zhipu / voyage / custom)
codemap embed backend show
codemap embed backend reset # back to local
Four preset providers + custom for self-hosted vLLM / Ollama / TEI. Config persists to ~/.config/codemap/embedding.yaml (chmod 600).
Storage
<project_root>/.ai-memory/_semantic/
├── chunks.json chunked text + metadata (model-independent)
├── vectors.npy (n_chunks, 1024) float32 (model-specific)
├── model_id.txt active backend fingerprint
└── manifest.json text_hash → chunk_id (drives incremental)
Switching models requires codemap embed --rebuild (different vector spaces are not comparable).
Design doc
Obsidian/Notes/07-Ideas/AI-Enterprise-Delivery-System/2026-06-27-p1-3-codemap-semantic-index-设计方案.md — full spec including chunker / RRF / freshness integration.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codemap_semantic_index-0.1.0.tar.gz.
File metadata
- Download URL: codemap_semantic_index-0.1.0.tar.gz
- Upload date:
- Size: 29.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bba2d731b35c10ab6e35107ed1d200e133b8ff3686b53c7a64d322339ea7f3bb
|
|
| MD5 |
09020f43fd2acb66c4f5648068c0d0c7
|
|
| BLAKE2b-256 |
e42994b3ab42ab960f524c1cf5b980fa02a4c2b2b8bed233bd9e021206587f64
|
Provenance
The following attestation bundles were made for codemap_semantic_index-0.1.0.tar.gz:
Publisher:
publish.yml on qxbyte/codemap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codemap_semantic_index-0.1.0.tar.gz -
Subject digest:
bba2d731b35c10ab6e35107ed1d200e133b8ff3686b53c7a64d322339ea7f3bb - Sigstore transparency entry: 1975509660
- Sigstore integration time:
-
Permalink:
qxbyte/codemap@59236156ec3ae2a9f8e112cc931d42799ad452c8 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/qxbyte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@59236156ec3ae2a9f8e112cc931d42799ad452c8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file codemap_semantic_index-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codemap_semantic_index-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a0e3dfbc3533f2aeb1a9b277f363a1ac10294ab3d839ce8e16deb2f35ee0970
|
|
| MD5 |
aeba651b8620312b1305c5ab61306348
|
|
| BLAKE2b-256 |
c80dd89713ddff337bdfce2eaa01a0dbd72cce109e8a86e6ce39a15680db4f46
|
Provenance
The following attestation bundles were made for codemap_semantic_index-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on qxbyte/codemap
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codemap_semantic_index-0.1.0-py3-none-any.whl -
Subject digest:
9a0e3dfbc3533f2aeb1a9b277f363a1ac10294ab3d839ce8e16deb2f35ee0970 - Sigstore transparency entry: 1975509790
- Sigstore integration time:
-
Permalink:
qxbyte/codemap@59236156ec3ae2a9f8e112cc931d42799ad452c8 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/qxbyte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@59236156ec3ae2a9f8e112cc931d42799ad452c8 -
Trigger Event:
push
-
Statement type: