Classification use case
The classification use case lets you use embedding models to compute similarity scores between the incoming text and the labels. It returns the labels ranked in order of most similar to least similar.
The classification use case is compatible with all Lucidworks hosted pre-trained and custom embedding models. The default behavior of embedding models is to always have a score returned.
The topK and similarityCutoff parameters can be used to achieve behaviors where only the following are returned:
-
The single most applicable label
-
Labels with similarities that exceed a threshold
-
A set number of items
-
A set number if it exceeds the threshold
Request
- Base URLhttps://commerce_studio_id.experiencemanager.lucidworks.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Bearer token used for authentication. Format: Authorization: Bearer ACCESS_TOKEN.
application/json
Request body
Example request
{
"batch": [
{
"text": "Not all those who wander are lost."
}
],
"useCaseConfig": {
"topK": 10,
"similarityCutoff": 1
}
}Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.