Skip to main content
POST
/
api
/
v1
/
rag
/
search
Search within a multi knowledge bases
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
  body: JSON.stringify({
    query: '<string>',
    knowledgeBaseNames: ['<string>'],
    maxResults: 123,
    minScore: 123,
    reranker: '<string>'
  })
};

fetch('https://blackbox.dasha.ai/api/v1/rag/search', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "results": [
    {
      "chunkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "content": "<string>",
      "title": "<string>",
      "score": 123
    }
  ],
  "totalResults": 123,
  "processingTime": {
    "total": "<string>",
    "embeddingTime": "<string>",
    "searchTime": "<string>",
    "rerankingTime": "<string>"
  }
}

Body

Single KB search request

query
string | null
knowledgeBaseNames
string[] | null
maxResults
integer<int32>
minScore
number<float>
reranker
string | null

Response

OK

results
object[] | null
totalResults
integer<int32>
processingTime
object