curl --request POST \
--url https://api.trieve.ai/api/chunk/suggestions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"context": "<string>",
"filters": {
"must": [
{
"field": "tag_set",
"match_all": [
"A",
"B"
]
},
{
"field": "num_value",
"range": {
"gte": 10,
"lte": 25
}
}
]
},
"is_ecommerce": true,
"is_followup": true,
"query": "<string>",
"search_type": "fulltext",
"suggestion_type": "question",
"suggestions_to_create": 1
}'
{
"queries": [
"<string>"
]
}
This endpoint will generate 3 suggested queries based off a hybrid search using RAG with the query provided in the request body and return them as a JSON object.
curl --request POST \
--url https://api.trieve.ai/api/chunk/suggestions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Dataset: <tr-dataset>' \
--data '{
"context": "<string>",
"filters": {
"must": [
{
"field": "tag_set",
"match_all": [
"A",
"B"
]
},
{
"field": "num_value",
"range": {
"gte": 10,
"lte": 25
}
}
]
},
"is_ecommerce": true,
"is_followup": true,
"query": "<string>",
"search_type": "fulltext",
"suggestion_type": "question",
"suggestions_to_create": 1
}'
{
"queries": [
"<string>"
]
}
The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
JSON request payload to get alternative suggested queries
The body is of type object
.
A JSON object containing a list of alternative suggested queries
The response is of type object
.
Was this page helpful?