Skip to content
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

Update reranker limits #203

Merged
merged 5 commits into from
Oct 28, 2024
Merged

Update reranker limits #203

merged 5 commits into from
Oct 28, 2024

Conversation

prasmussen15
Copy link
Collaborator

@prasmussen15 prasmussen15 commented Oct 28, 2024

Important

Update reranker limits, add preliminary RRF reranker, and update version and dependencies.

  • Behavior:
    • Updated reranker limits in edge_search, node_search, and community_search in search.py.
    • Added RRF as a preliminary reranker in node_search and edge_search.
    • Modified edge_bfs_search and node_bfs_search to include a limit parameter in search_utils.py.
  • Renames:
    • Renamed input to input_data in create() in openai.py and voyage.py.
  • Misc:
    • Updated version in pyproject.toml from 0.3.17 to 0.3.18.
    • Updated openai dependency to ^1.52.2 and ruff to ^0.7.1 in pyproject.toml.

This description was created by Ellipsis for 6bc0413. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 898e139 in 18 seconds

More details
  • Looked at 452 lines of code in 3 files
  • Skipped 1 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. graphiti_core/search/search.py:57
  • Draft comment:
    The indentation level for function parameters has been changed to 8 spaces. Consider reverting to 4 spaces for consistency with PEP 8 guidelines. This issue is present in multiple functions in this file.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The indentation in the function definitions has been changed from 4 spaces to 8 spaces. This is inconsistent with the typical Python style guide (PEP 8) which recommends 4 spaces per indentation level. This change affects readability and consistency across the codebase.
2. graphiti_core/search/search_utils.py:64
  • Draft comment:
    The indentation level for function parameters has been changed to 8 spaces. Consider reverting to 4 spaces for consistency with PEP 8 guidelines. This issue is present in multiple functions in this file.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The indentation in the function definitions has been changed from 4 spaces to 8 spaces. This is inconsistent with the typical Python style guide (PEP 8) which recommends 4 spaces per indentation level. This change affects readability and consistency across the codebase.
3. graphiti_core/search/search_utils.py:698
  • Draft comment:
    Using list(set(...)) to remove duplicates changes the order of elements, which might not be intended. Consider using an OrderedDict to maintain order while removing duplicates.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    In the maximal_marginal_relevance function, the use of list(set(...)) to remove duplicates changes the order of elements, which might not be intended. This could affect the ranking order of the results.
4. graphiti_core/search/search.py:57
  • Draft comment:
    Function parameters should be aligned consistently. Adjust the indentation to align parameters with the opening parenthesis.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The code has inconsistent indentation for function parameters, which is not idiomatic.
5. graphiti_core/search/search_utils.py:64
  • Draft comment:
    Function parameters should be aligned consistently. Adjust the indentation to align parameters with the opening parenthesis.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The code has inconsistent indentation for function parameters, which is not idiomatic.
6. pyproject.toml:1
  • Draft comment:
    Ensure consistent indentation for all sections in the file.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code has inconsistent indentation for function parameters, which is not idiomatic.

Workflow ID: wflow_GpQ1nmY4a5Nw7Iu6


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 34b0b0b in 23 seconds

More details
  • Looked at 362 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. graphiti_core/search/search.py:119
  • Draft comment:
    Consider adding the RRF reranker to the community_search function for consistency with node_search and edge_search.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR introduces a new RRF reranker in the node_search and edge_search functions. However, the community_search function does not include this new reranker, which might be an oversight if the intent was to apply RRF consistently across all search functions.
2. graphiti_core/search/search_utils.py:230
  • Draft comment:
    Ensure the limit parameter is applied in the Cypher query to avoid large result sets.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The PR modifies the edge_bfs_search and node_bfs_search functions to include a limit parameter. However, the limit parameter is not used in the Cypher query within edge_bfs_search, which could lead to performance issues if the result set is large.
3. graphiti_core/search/search_utils.py:621
  • Draft comment:
    The rrf function is not immediately clear in its purpose. Consider adding a comment explaining its role in the code.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code is missing a comment explaining the purpose of the rrf function, which is not immediately clear from the code itself.
4. graphiti_core/search/search_utils.py:683
  • Draft comment:
    The maximal_marginal_relevance function is not immediately clear in its purpose. Consider adding a comment explaining its role in the code.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code is missing a comment explaining the purpose of the maximal_marginal_relevance function, which is not immediately clear from the code itself.

Workflow ID: wflow_BxySWMF6aFFnJfnX


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 60c939e in 24 seconds

More details
  • Looked at 31 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. graphiti_core/embedder/openai.py:45
  • Draft comment:
    Renaming input to input_data avoids shadowing the built-in input function, which is a good practice. Ensure this change is consistently applied across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The change from input to input_data is consistent across both files and aligns with Python's best practices to avoid using built-in names as variable names.
2. graphiti_core/embedder/voyage.py:44
  • Draft comment:
    Renaming input to input_data avoids shadowing the built-in input function, which is a good practice. Ensure this change is consistently applied across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The change from input to input_data is consistent across both files and aligns with Python's best practices to avoid using built-in names as variable names.
3. graphiti_core/embedder/openai.py:44
  • Draft comment:
    Function create should have a more descriptive name to indicate its purpose, such as create_embedding. This applies to the same function in voyage.py.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code in both files is mostly fine, but there is a minor issue with the function naming pattern.

Workflow ID: wflow_WinEi0Ul6ILIytS1


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 6bc0413 in 10 seconds

More details
  • Looked at 22 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. graphiti_core/embedder/voyage.py:53
  • Draft comment:
    The check for empty strings in input_list is redundant since it's already done in the previous list comprehension. You can remove this line.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The check for empty strings in input_list is redundant since it's already done in the previous list comprehension.
2. graphiti_core/embedder/voyage.py:49
  • Draft comment:
    The list comprehension on line 49 and line 51 can be combined with the one on line 53 to avoid repetition and make the code more DRY.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The code is mostly fine, but there are some improvements needed for idiomatic Python and DRY principles.

Workflow ID: wflow_gzXJmA7T77aMLeTe


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@paul-paliychuk paul-paliychuk merged commit 7bb0c78 into main Oct 28, 2024
7 checks passed
@paul-paliychuk paul-paliychuk deleted the update-reranker-limits branch October 28, 2024 18:50
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants