Class EmbeddingProfileIdentity
- Namespace
- MailFathom.Application.Emails.Embeddings
- Assembly
- MailFathom.Application.dll
The geometry of one vector space, which is the whole of what an embedding profile is.
public sealed class EmbeddingProfileIdentity
- Inheritance
-
EmbeddingProfileIdentity
- Inherited Members
Remarks
These are exactly the properties that decide whether two vectors can be compared, and ADR 0006 admits nothing else. The chunk boundary rules are absent by decision rather than by omission: they belong to the chunk's own hash, so re-cutting a mailbox is a local derivation instead of a paid re-embed. The endpoint address, the credential, the batch size, the request rate, the concurrency, and the ceilings are configuration, because none of them changes what a vector means.
Dimension is a member rather than something derived from the model, for two reasons: some providers take it as a request parameter, and where a model is narrowed to what the database can index, the narrowed width is what the stored vectors have. A profile claiming the model's nominal dimension would be describing vectors that do not exist.
Deliberately not a record. Two identities are compared through EmbeddingProfileFingerprint, which is what the profile table's unique index is over, and a second equality mechanism beside it would be a second answer to one question.
Fields
- MaximumModelIdentifierLength
The greatest number of characters a provider's model identifier may hold.
- MaximumModelVersionLength
The greatest number of characters a model version may hold.
- MaximumProviderLength
The greatest number of characters a provider name may hold.
Properties
- Dimension
Gets the width of the vectors this space holds.
- DistanceMetric
Gets how distance is measured between two vectors of this space.
- InputPreparation
Gets what is done to a passage before it is sent, which decides what the model saw.
- ModelIdentifier
Gets the model identifier the provider publishes.
- ModelVersion
Gets the model version the provider exposes, or null where it exposes none.
- Provider
Gets the vendor whose model defines this space.
Methods
- Create(string, string, string?, int, EmbeddingDistanceMetric, EmbeddingInputPreparation)
Builds an identity, refusing one that could not describe a vector space.