Table of Contents

Class EmbeddingInputPreparation

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

What is done to a passage between reading it and sending it, and therefore what the model actually saw.

public sealed class EmbeddingInputPreparation
Inheritance
EmbeddingInputPreparation
Inherited Members

Remarks

Every member here changes the point a passage lands on, which is why this is part of an embedding profile's identity rather than a setting beside it: cutting a long passage at a different width, prefixing it with a different instruction, or normalizing one vector and not another produces vectors that cannot be compared, and nothing about the resulting distance says so.

This is not the input ceiling an instance configures to bound what it spends on one message. The two are easy to confuse because both are a limit on text, and the distinction is what ADR 0006 draws: preparation decides what a vector means, a ceiling decides how many vectors exist.

Deliberately not a record. Two preparations are never compared directly — an identity is compared through the fingerprint computed over it, which is what the unique index on the profile table is over.

Fields

MaximumPassageInstructionLength

The greatest number of characters an instruction or prefix template may hold.

Properties

InputCharacterLimit

Gets the width a passage is cut to before it is sent.

NormalizesVector

Gets whether the vector is normalized to unit length before it is stored.

PassageInstruction

Gets the instruction or prefix a model requires of a passage, or null where it requires none.

Methods

Create(int, string?, bool)

Builds a preparation, refusing one that could not produce a passage to send.