luplo.core.embedding ==================== .. py:module:: luplo.core.embedding .. autoapi-nested-parse:: Embedding backend abstraction. Default is ``NullEmbedding`` — no ML dependencies, vector reranking disabled. Install ``luplo[vector-local]`` for sentence-transformers support. Submodules ---------- .. toctree:: :maxdepth: 1 /api/luplo/core/embedding/local/index /api/luplo/core/embedding/null/index /api/luplo/core/embedding/protocol/index Classes ------- .. autoapisummary:: luplo.core.embedding.NullEmbedding luplo.core.embedding.EmbeddingBackend Package Contents ---------------- .. py:class:: NullEmbedding Embedding backend that produces no vectors. .. py:method:: embed(texts: list[str]) -> list[list[float] | None] :async: Return ``None`` for every text — embeddings disabled. .. 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.