Query Classifier
Classify
Classifies queries into provided classes based on a custom taxonomy.
POST
Authorizations
Body
application/json
The list of class definitions to classify the queries into. Must be <= 20.
Example:
[
{
"description": "Questions seeking objective, verifiable information or facts",
"label": "factual"
},
{
"description": "Questions asking for subjective judgments, preferences, or personal views",
"label": "opinion"
},
{
"description": "Questions about how to perform tasks or follow specific processes",
"label": "procedural"
}
]
The list of queries to classify. Must be <= 10.
Example:
[
"What is the capital of France?",
"How do I feel about the current political climate?",
"What steps should I follow to bake a chocolate cake?"
]
Number of inputs to generate in one LLM call. Must be <=10.
Required range:
1 <= x <= 10
Example:
10
Optional list of examples to provide as few-shot examples for the classifier. Must be <= 20.
Example:
[
{
"label": "factual",
"text": "When was the Eiffel Tower built?"
},
{
"label": "opinion",
"text": "Is jazz better than classical music?"
},
{
"label": "procedural",
"text": "How do I change a flat tire?"
}
]
The mode to use for the classification. The probabilistic mode returns probabilities for each class.
Available options:
generative
, probabilistic
Response
200
application/json
Successful Response