Expand description
EmbeddingActor + pluggable AnnIndex.
Structs§
- Embedding
Tool Strategy - Embeds tool descriptors at construction; at select-time, embeds the user turn and returns top-k tools that fit the budget.
- Hit
- A single vector-store search result.
- InMemory
AnnIndex - Linear-scan, cosine-similarity index. Mirrors the algorithm in
atomr_accel_agents::CpuVectorIndexbut lives in-process to avoid requiring anActorSystemfor unit tests. - InMemory
Vector Store - In-memory cosine-similarity vector store. Applies
MetadataFilterat query time before ranking. Suitable for tests and small hot tiers. - Mock
Embedder - Deterministic, dimension-configurable mock embedder. Produces stable vectors so tests are reproducible.
Enums§
- Metadata
Filter - A set of equality / range predicates over metadata keys, honored by
the backend at query time.
Andcomposes sub-predicates conjunctively.MetadataFilter::matchesis provided for in-memory backends and as a documented fallback for backends that cannot push the predicate down to the engine.
Traits§
- AnnIndex
- Approximate-nearest-neighbor index. v0 ships an in-memory linear scan; a CUDA / external-service implementation slots in behind the same trait without changing call sites.
- Embedder
- Single text → vector. The default implementation in production
will wrap an
atomr-inferModelRunnerconfigured with an embedding model; for unit tests,MockEmbedderproduces deterministic vectors from a hash. - Embeddings
- Batch embeddings interface. A blanket impl bridges any existing
single-text
Embedder, so all current embedders satisfyEmbeddingsfor free. - Vector
Store - Backend-agnostic vector store: dense upsert, filtered top-k query,
and delete. In-memory impl lives in
atomr-agents-embed; pgvector and Redis backends live in this crate behind feature flags.
Functions§
- cosine
- Cosine similarity (0 for mismatched / zero-norm vectors).