curl --request POST \
--url https://api.orq.ai/v2/knowledge/{knowledge_id}/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"top_k": 50,
"threshold": 0.5,
"search_type": "hybrid_search",
"filter_by": {},
"search_options": {
"include_vectors": true,
"include_metadata": true,
"include_scores": true
},
"rerank_config": {
"model": "cohere/rerank-multilingual-v3.0",
"threshold": 0,
"top_k": 10
},
"agentic_rag_config": {
"model": "<string>"
}
}
'{
"matches": [
{
"id": "<string>",
"text": "<string>",
"vector": [
123
],
"metadata": {},
"scores": {
"rerank_score": 123,
"search_score": 123
}
}
]
}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.
curl --request POST \
--url https://api.orq.ai/v2/knowledge/{knowledge_id}/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"top_k": 50,
"threshold": 0.5,
"search_type": "hybrid_search",
"filter_by": {},
"search_options": {
"include_vectors": true,
"include_metadata": true,
"include_scores": true
},
"rerank_config": {
"model": "cohere/rerank-multilingual-v3.0",
"threshold": 0,
"top_k": 10
},
"agentic_rag_config": {
"model": "<string>"
}
}
'{
"matches": [
{
"id": "<string>",
"text": "<string>",
"vector": [
123
],
"metadata": {},
"scores": {
"rerank_score": 123,
"search_score": 123
}
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique identifier or key of the knowledge base
A search request for chunks in a knowledge base
The query to use to search the knowledge base
The number of results to return. If not provided, will default to the knowledge base configured top_k.
1 <= x <= 100The threshold to apply to the search. If not provided, will default to the knowledge base configured threshold
0 <= x <= 1The type of search to perform. If not provided, will default to the knowledge base configured retrieval_type
vector_search, keyword_search, hybrid_search The metadata filter to apply to the search. Check the Searching a Knowledge Base for more information.
Show child attributes
Additional search options
Show child attributes
Override the rerank configuration for this search. If not provided, will use the knowledge base configured rerank settings.
Show child attributes
Override the agentic RAG configuration for this search. If not provided, will use the knowledge base configured agentic RAG settings.
Show child attributes
Search knowledge base
Show child attributes
Was this page helpful?