-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agents-api): Performance improvements (#749)
- **feat(agents-api,typespec): Limit max_k for search to 50; max items for embed to 100** - **refactor(typespec): Remove older 0.4.0 version of typespec** - **feat: Add metadata filter argument to doc search** - **feat(agents-api): Performance improvements - use KNN unless dataset too big** - **feat(agents-api): Performance improvements - merge metadata_filter** <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > This PR improves agents API performance by limiting search and embed parameters, adding metadata filtering, updating typespec versions, and optimizing search functions. > > - **Behavior**: > - Limit `max_k` for search to 50 and max items for embed to 100 in `Docs.py`. > - Add `metadata_filter` argument to document search functions in `search_docs_by_embedding.py`, `search_docs_by_text.py`, and `search_docs_hybrid.py`. > - Use KNN for search unless dataset exceeds `ann_threshold` in `search_docs_by_embedding.py`. > - **Refactor**: > - Remove older `0.4.0` version of typespec. > - Update `openapi.yaml` to `1.0.0` version. > - **Models**: > - Split `EmbedQueryRequest` into `SingleEmbedQueryRequest` and `MultipleEmbedQueryRequest` in `Docs.py` and `models.tsp`. > - **Misc**: > - Adjust `workers` and add `timeout` in `gunicorn_conf.py`. > - Update `docker-compose.yml` to sync `gunicorn_conf.py`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup> for c0bd25c. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Signed-off-by: Diwank Singh Tomer <[email protected]> Co-authored-by: Dmitry Paramonov <[email protected]>
- Loading branch information
1 parent
65e912d
commit bb6b238
Showing
24 changed files
with
357 additions
and
6,390 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# generated by datamodel-codegen: | ||
# filename: openapi-0.4.0.yaml | ||
# filename: openapi-1.0.0.yaml |
Oops, something went wrong.