luplo.core.embedding.protocol

Protocol for embedding backends.

Classes

EmbeddingBackend

Abstraction over text embedding models.

Module Contents

class luplo.core.embedding.protocol.EmbeddingBackend

Bases: Protocol

Abstraction over text embedding models.

Implementations produce fixed-dimension float vectors from text. The null backend returns None for every input, which causes the search pipeline to skip vector reranking entirely.

async embed(texts: list[str]) list[list[float] | None]

Embed a batch of texts.

Parameters:

texts – Strings to embed.

Returns:

One vector per input text, or None if embedding is unavailable for that text.