Enum Class EmbeddingInputType
- All Implemented Interfaces:
Serializable, Comparable<EmbeddingInputType>, Constable
The role a piece of text plays in a retrieval task, allowing a provider to encode it differently.
Embedding the same text as a QUERY versus a DOCUMENT can significantly improve retrieval
quality on providers that support the distinction (the canonical RAG "query vs passage" asymmetry). This
enum captures only the distinction that is universally supported across providers that expose the concept
(Cohere, Voyage, Nomic, Google Vertex/Gemini, NVIDIA, ...). Richer, provider-specific task types (e.g.
Google's SEMANTIC_SIMILARITY or CODE_RETRIEVAL_QUERY) are exposed via provider-specific
parameters rather than this common enum.
- Since:
- 1.18.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic EmbeddingInputTypeReturns the enum constant of this class with the specified name.static EmbeddingInputType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
QUERY
The text is a search query (the canonical "query" side of a retrieval pair). -
DOCUMENT
The text is a document/passage to be indexed and later retrieved (the "passage" side).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-