Generate
Retrieve top query-related documents
This endpoint retrieves documents with assigned relevance scores to each one based on their relevance to the query. The available options are:
- filter: a list of File IDs to be included in the search scope. By default (if not provided) we search the entire KB. Mostly useful for document processing tasks.
- hybrid: hybrid search activation flag. If hybrid search is used, the knowledge base will be searched by a mixture of KNN and keyword matching instead of pure KNN. This can be useful when building advisory systems. You may provide keywords, otherwise we will attempt automated keyword extraction from the query. WARNING: please be aware that hybrid search may override file filtering preferences and in rare cases leads to out-of-scope content being included into the prompt.
- nearestNeighborsNum: provide nearest paragraphs number to retrieve (minimum value is 1, maximum value is 50). The default value is 10% of all paragraphs in KB.
POST