Get Referenced Knowledge
Get Referenced Knowledge
Retrieve the knowledge base slice data referenced in the Agent's response, including slice content, document ID, document name, source URL, and relevance score.
Request Method
GET
Request URL
https://api-${endpoint}.gptbots.ai/v1/correlate/dataset
Request Authentication
Refer to API Overview for authentication instructions.
Request
Request Example
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/correlate/dataset?message_id=65e04591a0e1e42392696d78' \
-H 'Authorization: Bearer ${API Key}' \
curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/correlate/dataset?message_id=65e04591a0e1e42392696d78' \
-H 'Authorization: Bearer ${API Key}' \
This code block in the floating window
Request Headers
| Field | Type | Description |
|---|---|---|
| Authorization | Bearer ${API Key} | Use Authorization: Bearer ${API Key} for authentication. Get API key from API Key page. |
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| message_id | string | true | Message ID of Agent's response. |
Response
Response Example
{
"conversation_id": "65dc320df07244300b25b993",
"question_id": "65dc323ef07244300b25b9c5",
"answer_id": "65dc323ef07244300b25b9c6",
"correlate_dataset": [
{
"content": "The Great Wall of China was built to resist the invasion of northern nomadic tribes.",
"data_id": "65dc3234f07244300b25b9b9",
"data_name": "Chinese History",
"source_url": "https://www.example.com/chinese-history",
"score": 0.93492633
}
]
}
{
"conversation_id": "65dc320df07244300b25b993",
"question_id": "65dc323ef07244300b25b9c5",
"answer_id": "65dc323ef07244300b25b9c6",
"correlate_dataset": [
{
"content": "The Great Wall of China was built to resist the invasion of northern nomadic tribes.",
"data_id": "65dc3234f07244300b25b9b9",
"data_name": "Chinese History",
"source_url": "https://www.example.com/chinese-history",
"score": 0.93492633
}
]
}
This code block in the floating window
Suceess Response
| Field | Type | Description |
|---|---|---|
| conversation_id | string | Conversation ID |
| question_id | string | Message ID of user question |
| answer_id | string | Message ID of Agent response |
| correlate_dataset | JSON Array | Correlate Dataset |
| content | string | Content of knowledge slice |
| data_id | string | Document ID |
| data_name | string | Document name |
| source_url | string | Document source URL |
| score | string | The semantic relevance of knowledge slices and problems. |
Failure Response
| Field | Type | Description |
|---|---|---|
| code | int | Error code. |
| message | string | Error details. |
Error Codes
| Code | Message |
|---|---|
| 40000 | Invalid parameter |
| 40379 | Credit not enough |
| 200222 | Agent configuration does not support this feature. |
| 40378 | Agent deleted |
| 20055 | API is forbidden |
| 40127 | Developer authentication failed |
