-
Notifications
You must be signed in to change notification settings - Fork 88
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
Abstract Neo4j filters in search queries #243
Conversation
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.
❌ Changes requested. Reviewed everything up to cb339a9 in 53 seconds
More details
- Looked at
141
lines of code in3
files - Skipped
1
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. graphiti_core/search/search_utils.py:242
- Draft comment:
The query parameters 'source_uuid' and 'target_uuid' are being set twice, which is incorrect. This could lead to unexpected behavior. Consider setting these parameters only once outside the conditional blocks. - Reason this comment was not posted:
Marked as duplicate.
2. graphiti_core/search/search_utils.py:376
- Draft comment:
The query parameters 'group_ids' are being passed twice, which is unnecessary. Consider removing the redundant parameter. - Reason this comment was not posted:
Confidence changes required:80%
The PR abstracts Neo4j filters in search queries, but there is a logical error in the way query parameters are being set for source and target node UUIDs. The same parameters are being set twice, which is incorrect and could lead to unexpected behavior.
3. examples/podcast/podcast_runner.py:59
- Draft comment:
Remove commented-out code to keep the codebase clean and maintainable. - Reason this comment was not posted:
Confidence changes required:50%
The code contains commented-out lines that are not needed and should be removed for cleanliness.
4. examples/podcast/podcast_runner.py:56
- Draft comment:
Avoid using hardcoded credentials. Consider using environment variables or a secure vault to manage sensitive information. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
5. graphiti_core/search/search_utils.py:197
- Draft comment:
The logic for setting query parameters and constructing query strings is repeated in multiple functions. Consider refactoring this into a helper function to adhere to the DRY principle. This applies toedge_similarity_search
,node_similarity_search
, andcommunity_similarity_search
. - Reason this comment was not posted:
Confidence changes required:80%
The code contains repeated logic for setting query parameters and constructing query strings. This violates the DRY principle.
6. graphiti_core/search/search_utils.py:192
- Draft comment:
Add a comma aftern.name_embedding AS name_embedding
in the Cypher query to fix the syntax error. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
Workflow ID: wflow_qkcdhyF6S9Xmduzk
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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 8a52756 in 23 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. examples/podcast/podcast_runner.py:59
- Draft comment:
Theclear_data
andbuild_indices_and_constraints
functions are uncommented, which contradicts the PR description stating they should be commented out. Please ensure the code matches the PR description. - Reason this comment was not posted:
Comment did not seem useful.
2. examples/podcast/podcast_runner.py:59
- Draft comment:
Avoid using hardcoded credentials likeneo4j_password
. Consider using environment variables or a secure vault. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
Workflow ID: wflow_Pu7BQnGHw4cIMvOt
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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 93b1bb6 in 18 seconds
More details
- Looked at
30
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. graphiti_core/search/search_utils.py:205
- Draft comment:
Ensure$source_uuid
and$target_uuid
are set inquery_params
before using them in the query. - Reason this comment was not posted:
Comment did not seem useful.
2. graphiti_core/search/search_utils.py:201
- Draft comment:
Avoid settingquery_params['source_node_uuid']
andquery_params['target_node_uuid']
multiple times. Set them once outside the conditional blocks. - Reason this comment was not posted:
Confidence changes required:80%
The code has a repeated pattern for settingquery_params['source_node_uuid']
andquery_params['target_node_uuid']
which can be optimized.
3. graphiti_core/search/search_utils.py:205
- Draft comment:
Avoid settingquery_params['source_node_uuid']
andquery_params['target_node_uuid']
multiple times. Set them once outside the conditional blocks. - Reason this comment was not posted:
Confidence changes required:80%
The code has a repeated pattern for settingquery_params['source_node_uuid']
andquery_params['target_node_uuid']
which can be optimized.
Workflow ID: wflow_3783clPaKWeqVbE7
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Abstracts Neo4j filters in search queries by introducing
group_filter_query
andquery_params
insearch_utils.py
for optional filtering.edge_similarity_search
,node_similarity_search
, andcommunity_similarity_search
insearch_utils.py
.group_filter_query
andquery_params
to handle optional filtering bygroup_ids
,source_node_uuid
, andtarget_node_uuid
.clear_data
andbuild_indices_and_constraints
inpodcast_runner.py
.client.py
.This description was created by for 93b1bb6. It will automatically update as commits are pushed.