pub enum EmbedTask {
RetrievalQuery,
RetrievalDocument,
Similarity,
Classification,
Clustering,
QuestionAnswering,
FactVerification,
CodeRetrievalQuery,
Other,
}Expand description
Re-exports of the embed wire types per ADR 0017. Embed lives on
the third inferd socket (separate from v1 and v2); the
proto types are re-exported here so consumers don’t need a separate
inferd-proto dep.
Task-prefix hint for embedding models trained with task-aware
prefixes (e.g. EmbeddingGemma). Backends that don’t recognise the
task ignore the field; the daemon applies the engine-specific
prefix on behalf of the consumer per ADR 0013.
Forward-compatibility: unknown task variants land in Other so
older daemons / clients tolerate task hints added in later v0.x
revisions without rejecting at parse time.
Variants§
RetrievalQuery
Encoding a query that will be matched against indexed documents.
RetrievalDocument
Encoding a document that will be indexed for retrieval.
Similarity
Encoding text for similarity scoring (symmetric).
Classification
Encoding text whose label will be predicted.
Clustering
Encoding text for unsupervised clustering.
QuestionAnswering
Encoding for question-answering pair scoring.
FactVerification
Encoding text for fact-verification scoring.
CodeRetrievalQuery
Encoding code for code-search retrieval.
Other
Forward-compatible escape hatch — unknown task strings deserialise here.