Vector Similarity Matching

Convert keywords to vectors and match to document IDs, perform vector retrieval and return top K results ranked by keyword similarity.

Request Method

POST

Request URL

https://api.gptbots.ai/v1/bot/detail

Request Authentication

See Overview for authentication details.

Request

Request Example

curl -X POST https://api.gptbots.ai/v1/vector/match \
  -H 'Authorization: Bearer app-qp97HeWyyBqFs7VUKDoi2ti3' \
  -H 'Content-Type: application/json' \
  -d '{
        "prompt": "Please introduce Aurora.",  
        "data_ids": [
                "1234567890",
                "1230987654"
        ],
        "top_k": "5"
}'

Request Headers

Request Body

Response

Response Example

{
  "total": 2,
  "list": [
    {
      "content": "Test data",
      "data_id": "aS1CNvPK4XCckDKQNj7azC9a", 
      "score": 0.75
    },
    {
      "content": "Test data",
      "data_id": "aS1CNvPK4XCckDKQNj7azC9a",
      "score": 0.75
    }
  ]
}

Success Response

Failure Response

Error Codes

Last updated