Skip to content

Interface: EmbeddingRankRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / EmbeddingRankRequest

Defined in: src/types/embeddings.ts:16

Body of POST /api/v1/embeddings/rank — one query, and the texts to score against it.

candidates: string[]

Defined in: src/types/embeddings.ts:25

Candidate texts, scored in place — the response is index-aligned with this list, so the caller can zip the scores back onto whatever it retrieved.

An empty list is valid and yields an empty score list. The backend caps the list at 512 candidates and answers 400 above that; rank in pages instead. A blank candidate is not an error — it keeps its slot and scores 0.


query: string

Defined in: src/types/embeddings.ts:32

The text every candidate is scored against. Must be non-blank (the backend answers 400 otherwise).

Capped at 8192 characters, as is each candidate; longer text is a 400.