Table of Contents

Class SemanticEmailSearch

Namespace
MailFathom.Application.Emails.Search
Assembly
MailFathom.Application.dll

Ranks mail by meaning, or reports why this search cannot be answered that way.

public sealed class SemanticEmailSearch
Inheritance
SemanticEmailSearch
Inherited Members

Remarks

What has to hold before a distance means anything — an active profile, a provider, the same vector space, and a provider that is answering — is established by ActiveEmbeddingSpace, which the Agent's history search places its query through as well. A caller receives either a ranking or nothing, and never a ranking computed against a space the stored vectors do not belong to.

None of the reasons for nothing is a failure: an instance with no active profile, or whose provider is briefly unreachable, serves lexical search. Raising would turn a mailbox search into an error because an external service was busy, which is a worse answer than the results the local index can already give.

Constructors

SemanticEmailSearch(IActiveEmbeddingProfileReader, IEmailVectorSearchIndexReader, IAiProviderHealthReader, TimeProvider, ITextEmbeddingGenerator?)

Initializes semantic retrieval over whatever this deployment configured.

Methods

FindNearestCandidatesAsync(MailboxEmailSelection, EmailSearchQueryText, int, CancellationToken)

Ranks the eligible mail by how near it sits to what the query means.

ReadCapabilityAsync(CancellationToken)

Reads what semantic retrieval can do for this instance, without calling a provider.