Class ActiveEmbeddingSpace
- Namespace
- MailFathom.Application.Emails.Search
- Assembly
- MailFathom.Application.dll
Places text in the vector space this instance retrieves under, or reports why it cannot right now.
public sealed class ActiveEmbeddingSpace
- Inheritance
-
ActiveEmbeddingSpace
- Inherited Members
Remarks
Everything that has to hold before a distance means anything is established here and in one place: that this instance has activated a profile, that it has an embedding provider at all, that the provider it would call reaches the same vector space that profile's stored vectors were written under, and that the provider is currently answering. A caller receives either vectors in that space or none, and never a vector placed in a space the stored vectors do not belong to — which is what lets a search over mail and a search over the Agent's history measure against what was stored rather than against a second geometry nobody wrote.
None of those is a failure. An instance with no active profile serves lexical search and is a supported deployment; an instance whose provider is briefly unreachable serves lexical search for the length of the outage. What every caller does receive is the SemanticSearchCapability separating those cases, so a degraded instance is legible rather than merely quieter.
A provider known to be failing is not called again by every caller that arrives while it refuses. The health state is what the embedding workers' own calls established, so consulting it costs nothing and spends nothing, and a refused credential stops buying one rejected request per query. What it is not is a latch: after MailFathom.Application.Emails.Search.ActiveEmbeddingSpace.ProviderRecheckInterval without a fresh observation, one call is allowed through to find out, so recovery is automatic and needs no restart even on an instance whose mail is fully embedded and whose workers are therefore calling nobody.
What is placed is the most revealing value either caller carries — a query, or somebody's own words to the Agent — so nothing here records it: no failure this type raises repeats it, and the vectors it produces are returned to the caller and published to nobody.
Constructors
- ActiveEmbeddingSpace(IActiveEmbeddingProfileReader, IAiProviderHealthReader, TimeProvider, ITextEmbeddingGenerator?)
Initializes placement over whatever this deployment configured.
Methods
- PlaceAsync(IReadOnlyList<string>, CancellationToken)
Places each text in the active space, all of them or none.
- ReadCapabilityAsync(CancellationToken)
Reads what semantic retrieval can do for this instance, without calling a provider.