Index a dataset for retrieval
Index a dataset for retrieval
POST/api/v1/datasets/{dataset_id}/retrieval-index
Embeds the selected text columns of every row so the dataset can be searched. text_columns names the columns to search, in the order they are combined into each row’s text. Indexing runs in the background: poll GET /datasets/{dataset_id}/retrieval-index until status is succeeded, then pass the dataset id in file_search.dataset_ids on POST /responses. A dataset has one index. Repeating the request with the same text_columns returns the existing index instead of starting another, and different columns return 409. Once an index has failed, POST again, with the same or different text_columns, to rebuild it.
Body ParametersJSON
Index a dataset for retrieval
curl https://api.prod.adaptionlabs.ai/api/v1/datasets/$DATASET_ID/retrieval-index \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ADAPTION_API_KEY" \
-d '{
"text_columns": [
"question",
"answer"
]
}'{
"dataset_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"status": "pending",
"error": "error"
}Returns Examples
{
"dataset_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"status": "pending",
"error": "error"
}