
Encodes each String into a dense Embedding with a bound sentence-transformers checkpoint (BGE family or a custom-code long-context embedder), with an optional retrieval query prefix and L2 normalisation. Suited to text retrieval, clustering, similarity, and RAG query/passage encoding.
Read a corpus from text files, embed each document, and ship the vectors over HTTP into an index.
OCR a page image, embed the recognised text, and forward the vector for retrieval.
query_prefix should be set to the checkpoint's retrieval instruction only for query-side text and left empty for passages; mismatching the two sides degrades retrieval quality.String short-circuits to a zero-length Embedding. Feeding that into a similarity stage breaks the math, so filter empty inputs upstream.normalize produces unit-length vectors so cosine similarity equals the inner product; keep it consistent across the index and the queries.device requesting CUDA resolves to CPU when no compatible accelerator is visible at startup; the smaller checkpoints run acceptably on CPU.max_seq_length set to its context length, and an instruction-style query prompt goes through query_prefix.Automated release