luplo.core.embedding.protocol ============================= .. py:module:: luplo.core.embedding.protocol .. autoapi-nested-parse:: Protocol for embedding backends. Classes ------- .. autoapisummary:: luplo.core.embedding.protocol.EmbeddingBackend Module Contents --------------- .. py:class:: EmbeddingBackend Bases: :py:obj:`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. .. py:method:: embed(texts: list[str]) -> list[list[float] | None] :async: Embed a batch of texts. :param texts: Strings to embed. :returns: One vector per input text, or ``None`` if embedding is unavailable for that text.