Skip to main content

Module embeddings_simple

Module embeddings_simple 

Source
Expand description

Simple semantic embeddings implementation

⚠️ WARNING: This module contains mock/test-only implementations

This is a simplified version that demonstrates the concept without all the complex integrations that cause compilation issues. The text_to_embedding function uses hash-based pseudo-embeddings that are NOT semantically meaningful and should only be used for:

  • Unit testing
  • Development/demonstration purposes
  • Fallback when real embeddings are unavailable

Production Use: Use memory-core/src/embeddings/ module with real embedding models (gte-rs, ONNX runtime) for actual semantic search.

Structs§

EmbeddingConfig
Configuration for embeddings

Functions§

cosine_similarity
Calculate cosine similarity between two vectors
demonstrate_semantic_search
Simple semantic search demonstration
find_similar_texts
Find most similar texts from a collection
text_to_embedding
Simple text to embedding converter (mock implementation)