-
Notifications
You must be signed in to change notification settings - Fork 890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(memory-store): fix vector search function #1046
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 3c9e5ee in 19 seconds
More details
- Looked at
61
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. memory-store/migrations/000022_vector_search.up.sql:22
- Draft comment:
The change in confidence range from 0 to 1 to -1 to 1 is not explained. Ensure this change is intentional and does not affect the logic adversely. - Reason this comment was not posted:
Confidence changes required:50%
The change in confidence range from 0 to 1 to -1 to 1 is not explained in the PR description. This change might affect the logic of the function, especially how the search threshold is calculated and used.
2. memory-store/migrations/000022_vector_search.up.sql:32
- Draft comment:
The calculation ofsearch_threshold
as1.0 - confidence
is a significant change. Verify this aligns with the intended functionality. - Reason this comment was not posted:
Confidence changes required:50%
The calculation ofsearch_threshold
as1.0 - confidence
is a significant change from the previous logic. This should be verified to ensure it aligns with the intended functionality.
3. memory-store/migrations/000022_vector_search.up.sql:72
- Draft comment:
The ordering of results bydistance
in ascending order is a change from the previous descending order. Verify this aligns with the intended functionality. - Reason this comment was not posted:
Confidence changes required:50%
The ordering of results bydistance
in ascending order is a change from the previous descending order. This should be verified to ensure it aligns with the intended functionality.
Workflow ID: wflow_Nu96N69xNi9NY2nF
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on aff6bd4 in 14 seconds
More details
- Looked at
19
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. memory-store/migrations/000022_vector_search.up.sql:67
- Draft comment:
The explicit 'ASC' in the ORDER BY clause is redundant since 'ASC' is the default order. However, it improves clarity. - Reason this comment was not posted:
Confidence changes required:10%
The ORDER BY clause in the SQL query has been updated to explicitly use 'ASC'. This is a good practice for clarity, but it doesn't change the default behavior since 'ASC' is the default order.
2. memory-store/migrations/000022_vector_search.up.sql:72
- Draft comment:
The explicit 'ASC' in the ORDER BY clause is redundant since 'ASC' is the default order. However, it improves clarity. - Reason this comment was not posted:
Confidence changes required:10%
The ORDER BY clause in the final SELECT statement has been updated to explicitly use 'ASC'. This is a good practice for clarity, but it doesn't change the default behavior since 'ASC' is the default order.
Workflow ID: wflow_Mx2NN1Y1H5gMuKJa
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
CI Failure Feedback 🧐(Checks updated until commit c9e9e87)
✨ CI feedback usage guide:The CI feedback tool (
In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:
where Configuration options
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on c9e9e87 in 31 seconds
More details
- Looked at
88
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/autogen/Docs.py:153
- Draft comment:
Ensure that the logic handling theconfidence
parameter can accommodate negative values, as the range has been expanded to include them. This change is also present in other files likeintegrations-service/integrations/autogen/Docs.py
andtypespec/docs/models.tsp
. - Reason this comment was not posted:
Confidence changes required:50%
The change in the confidence parameter range from 0.0 to -1.0 is consistent across multiple files. This change should be verified for correctness, as it might affect the logic that depends on this parameter.
Workflow ID: wflow_SuC1OR7grtoOtGhm
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
PR Type
Bug fix, Enhancement
Description
Adjusted
confidence
parameter range and default value.Refined distance calculation logic for vector search.
Updated SQL query to improve search result ordering.
Enhanced input validation for
confidence
parameter.Changes walkthrough 📝
000022_vector_search.up.sql
Refined vector search SQL function and parameters
memory-store/migrations/000022_vector_search.up.sql
confidence
default value from 0.5 to 0.0.confidence
range to include negative values.Important
Refines vector search by adjusting confidence parameter range, improving distance calculation, and updating SQL query for better result ordering.
confidence
parameter range to -1.0 to 1.0 and default to 0.0 inDocs.py
andmodels.tsp
.000022_vector_search.up.sql
to simplify formula and improve search result ordering.000022_vector_search.up.sql
to order results by ascending distance.confidence
validation to allow negative values in000022_vector_search.up.sql
.confidence
parameter inDocs.py
andmodels.tsp
.This description was created by for c9e9e87. It will automatically update as commits are pushed.