Skip to content

embedkit: geteilte Embedding-Mechanik aus symseek und symmemory extrahieren #74

Description

@danieljustus

Status: tracking issue

This issue no longer has direct implementation work — it was split into 4 right-sized sub-issues (see comment below). Closes automatically once all four are merged.

Goal

New package embedkit with the embedding mechanics duplicated today across two repos: hash fallback, cache, dimension resolution, and provenance metadata.

Why now

Two near-identical implementations of the same concept, one of which bypasses ollamakit entirely:

  • symaira-seek/internal/engine/embeddings.goollamakit.Embed, FNV-1a fallback (local-hash), own LRU (map+list), dimension autodetect, defaultEmbeddingDim = 768
  • symaira-memory/internal/extractor/embeddings.goraw net/http, FNV-1a fallback, hashicorp/golang-lru, DefaultDimensions = 768

EmbeddingDim = 768 is additionally hard-coded in symaira-memory/internal/db/lsh.go:15 and only truncates mismatched dimensions with a stderr warning. Every model change is a risk in two independent places today.

Current state / Evidence

  • symaira-seek/internal/engine/embeddings.go (dimension autodetect, localHashModelName)
  • symaira-memory/internal/extractor/embeddings.go (own http.Client, EmbeddingResult{Vector,Source,Model})
  • symaira-memory/internal/db/lsh.go:15EmbeddingDim = 768
  • Both repos document a mixed-embedding-space guard; provenance fields exist twice

Out of Scope

  • Ranking, index, chunking (symseek)
  • Memory scopes, consolidation (symmemory)
  • Concrete model selection — separate issues in the consumer repos
  • Migrating the consumers themselves (their own issues)

Risks / Dependencies

Migrating the consumers requires a reindex and is tracked separately in symaira-seek and symaira-memory. This issue (and its sub-issues) deliver only the library.

Metadata

Metadata

Assignees

Labels

featureNew product capabilitygroup: local-modelsRelated issues to be planned and implemented togetherpriority: mediumPlanning priority

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions