Knowledge Bases

Search knowledge base

Changed on

Search a Knowledge Base and return the most similar chunks, along with their search and rerank scores. Note that all configuration changes made in the API will override the settings in the UI.

post/v2/knowledge/{knowledge_id}/search

Request

  • Base URL
    https://my.orq.ai
  • URL
    https://my.orq.ai/v2/knowledge/{knowledge_id}/search
  • Auth
    HTTP bearer

Path parameters

knowledge_idstring required

The unique identifier or key of the knowledge base.

Request body

querystring required

The query to use to search the knowledge base

top_kinteger

The number of results to return. If not provided, will default to the knowledge base configured top_k.

thresholdnumber double

The threshold to apply to the search. If not provided, will default to the knowledge base configured threshold

search_type'vector_search' | 'keyword_search' | 'hybrid_search'

Example request

{
  "rerank_config": {
    "model": "cohere/rerank-multilingual-v3.0"
  }
}

Response

Search knowledge base

Changes

    • breaking

      added to the / request property allOf list

    • warning

      removed from the / request property allOf list

    • breaking

      added to the / request property allOf list

    • warning

      removed from the / request property allOf list