Skip to content

Feature: Use proper embedding model for semantic memory #3

@Roberdan

Description

@Roberdan

Description

Replace the simple hash-based fake embedding with a proper embedding model for semantic memory and RAG functionality.

Current State

Location: src/neural/claude.c:1207

// TODO: Use a proper embedding model (voyage-ai, openai embeddings, etc.)

Currently uses a hash-based fake embedding that doesn't capture semantic meaning.

Options

Option 1: Local MLX Model (Preferred)

Option 2: Voyage AI Embeddings

  • High quality embeddings
  • API-based (requires key)
  • voyage-2 or voyage-code models

Option 3: OpenAI Embeddings

  • text-embedding-3-small or text-embedding-3-large
  • API-based (requires key)
  • Well documented

Requirements

  • Generate meaningful semantic vectors
  • Support at least 512 dimensions
  • Reasonable performance (<100ms per embedding)
  • Graceful fallback if service unavailable

Technical Notes

  • Memory table already has embedding BLOB column
  • Cosine similarity function exists in mlx_embed.m
  • Need to update mlx_embed_text() or add alternative

Labels

enhancement, feature-request, embeddings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions