Skip to content

Support multimodal embedding inputs and query/document task intent #133

Description

@RaviTharuma

Problem

Memorix's embedding abstraction accepts only string / string[]. Observation indexing serializes only title, narrative, and facts, and query/document embeddings use the same generic operation. This prevents modern embedding models from receiving image, audio, video, or document inputs and prevents asymmetric retrieval modes such as retrieval.query vs retrieval.passage.

Current multimodal models (for example Jina v5 Omni and Gemini Embedding 2) place text and media in one vector space. Memorix cannot represent or transport those inputs even when the configured OpenAI-compatible gateway supports them.

Expected behavior

  • Preserve the existing text-only API without breaking callers.
  • Add typed embedding inputs for text, image, audio, video, and document references/data.
  • Distinguish query and document embedding intent so providers can map to task-specific modes/instructions.
  • Include modality/task/model/dimension in cache identity.
  • Persist safe media references/metadata on observations without embedding arbitrary local secrets.
  • Degrade to BM25 when a provider does not support the requested modality.
  • Require explicit reindex when model/dimension/vector family changes.

Security constraints

  • Bound inline payload sizes.
  • Reject unsupported schemes and unsafe local/private URL fetches by default.
  • Never persist provider credentials or raw sensitive media accidentally.

Motivation

This enables screenshot, diagram, PDF, audio, and video retrieval for coding-agent memory while retaining current text behavior.

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