Table of Contents

Class DeterministicTextEmbeddingGenerator

Namespace
MailFathom.AI.Embeddings
Assembly
MailFathom.AI.dll

Produces vectors from the text alone, reaching no provider and costing nothing.

public sealed class DeterministicTextEmbeddingGenerator : ITextEmbeddingGenerator
Inheritance
DeterministicTextEmbeddingGenerator
Implements
Inherited Members

Remarks

Almost everything this feature needs proved is a property of the schema, the worker, or the switch rather than of a model: the dimension check, the uniqueness constraint, the per-profile index, the idempotent write, two generations coexisting, the bounded removal. All of it is provable against a real database and this generator, which is why ADR 0006 requires it to exist: embedding is the first thing MailFathom does that costs money per unit of mail, and a verification suite that spends the maintainer's credit on every run is one nobody can afford to run.

The vectors carry no meaning and this type never claims otherwise. Its identity names a provider of its own, so a profile built on it can never be confused with one a model produced, and a deployment that activated it by accident is visible in the profile row rather than in the quality of its search results. It is deterministic, which is the one property downstream work needs: embedding a passage twice produces the same vector, so an idempotent write is testable and a re-run changes nothing.

Constructors

DeterministicTextEmbeddingGenerator(int, int)

Initializes a generator producing vectors of one width.

Fields

ModelName

The model identifier a profile built on this generator records.

PassagesPerCall

The greatest number of passages one call accepts.

ProviderName

The provider name a profile built on this generator records.

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.