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§
- Embedding
Config - 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)