Table of Contents

Interface ITextEmbeddingGenerator

Namespace
MailFathom.Application.Emails.Embeddings
Assembly
MailFathom.Application.dll

Turns passages of text into points of one vector space.

public interface ITextEmbeddingGenerator

Remarks

The whole of what an embedding provider is, as far as this application is concerned: text in, vectors out. No provider type, no model name as a compile-time constant, and no provider exception crosses this boundary, which is what lets a second provider be a new adapter rather than a change to a use case.

Identity is part of the contract rather than a convenience, because a vector means nothing without the geometry it belongs to: it is what an activation computes a profile fingerprint from, and what a stored vector is attributed to afterwards. See ADR 0006.

Properties

Identity

Gets the geometry of the space every vector this generator produces belongs to.

MaximumPassagesPerCall

Gets the greatest number of passages one call accepts.

Methods

GenerateAsync(IReadOnlyList<string>, CancellationToken)

Produces one vector for each passage, in the order the passages were given.