-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support relationship_meta_filters / similarity_top_k / oversamp…
…ling_factor for retrieve api (#575) close #570 For `/admin/knowledge_bases/{kb_id}/graph/search` API, , add parameter: - `relationship_meta_filters`: pass the filtering conditions. For `/admin/retrieve/documents` API, add two parameters: - `similarity_top_k` to control how many nodes should the vector search return, if not set, using the value of `top_k` by default. - `oversampling_factor`: This is similar to the `ef_search` parameter of the HNSW index, the larger the parameter, the higher the recall rate. Since TiDB does not yet support modifying the value of `ef_search`, the current implementation uses subquery. The subquery returns the `similarity_top_k * oversampling_factor` rows, and the outer query finally returns the `similarity_top_k` rows. - At this time, if you need to turn on `metadata_filter`, you need to modify the Chat Engine configuration, this problem will be fixed after the retrieve API refactor (#573), thr new retrieve API will not dependant on the ChatEngine configuration.
- Loading branch information
Showing
7 changed files
with
113 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters