-
Notifications
You must be signed in to change notification settings - Fork 181
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
Context filtering guardrails #1192
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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 dca981b in 1 minute and 10 seconds
More details
- Looked at
31
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_bIRnghBTPl1blAef
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.
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
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. Incremental review on 3ec0c72 in 1 minute and 52 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_A0LvWTd6yrQzYdbX
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 9090135 in 1 minute and 6 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. trulens_eval/trulens_eval/tru_llama.py:83
- Draft comment:
Ensure that all references toWithFeedbackFilterNodes
throughout the codebase are updated to reflect the new import pathtrulens_eval.guardrails.llama
to avoid import errors. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_w6b5Npw3qgwPOZ0U
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Skipped PR review on 777240f because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away. Generated with ❤️ by ellipsis.dev |
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 8b6abf3 in 33 seconds
More details
- Looked at
21
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. trulens_eval/trulens_eval/utils/llama.py:9
- Draft comment:
The import forList
was removed. Please ensure thatList
is not used elsewhere in this file or in any related files where this module's objects are utilized. IfList
is indeed not used, then this change is appropriate. - Reason this comment was not posted:
Confidence changes required:50%
The import statement for 'List' was removed, but it's not clear if 'List' was actually unused. The code snippet provided does not show any usage of 'List', but it's possible that other parts of the file or related files might still require it. I need to check if 'List' is used elsewhere in the file or if its removal is justified.
Workflow ID: wflow_M3l4SiH2YvcTpctr
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.
❌ Changes requested. Incremental review on 1110aea in 1 minute and 25 seconds
More details
- Looked at
98
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_5TAnJJWcvNzS8EH1
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 d525b35 in 3 minutes and 22 seconds
More details
- Looked at
79
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_wkgvRbTyfTiZBgyK
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 b6eadac in 1 minute and 42 seconds
More details
- Looked at
31
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. mkdocs.yml:29
- Draft comment:
The PR description mentions significant updates related to context filtering and display utilities, but the diff provided only shows changes to the mkdocs.yml file, which is unrelated to the described features. Please ensure that all relevant changes are included in the PR or update the PR description to accurately reflect the changes made. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_vyvQTpHWr7XzZlGN
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 7d77dc2 in 1 minute and 47 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. docs/trulens_eval/guardrails/index.md:23
- Draft comment:
The PR description suggests updates related to context filtering guardrails, but the diff only shows a minor formatting change. Please ensure that all intended updates are included in the PR. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_hZ84EDCrX9GRxGKZ
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.
❌ Changes requested. Incremental review on 310d0b1 in 1 minute and 2 seconds
More details
- Looked at
14
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_YhOhkgJlSkSWzP5t
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.
❌ Changes requested. Incremental review on 9036798 in 1 minute and 52 seconds
More details
- Looked at
133
lines of code in6
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. trulens_eval/trulens_eval/guardrails/langchain.py:83
- Draft comment:
The lambda function inside the ThreadPoolExecutor is capturing the loop variabledoc
. This can lead to all lambda functions capturing the same reference, which is the last item in the loop. To fix this, you should use a default argument in the lambda to capture the current value ofdoc
for each iteration.
lambda doc=doc: self.feedback(query, doc.page_content)
- Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_RqCHOpNAR2B4hB4A
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.
* fix select_context to call return individual items, not collected list * display utilities, context filtering, oh my * Update trulens_eval/trulens_eval/tru_chain.py Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * undo bad ellipsis change * change moved import * update llama quickstart * get llama working * llama updates * add docstring examples * guardrails docs page * allow tabbed content setting in mkdocs yml * formatting * api ref links * api ref files for guardrails * api ref to guardrails in mkdocs * update in trubot * fix typo * add missing init * api ref updates * docstring updates * docstring updates * base context filter for custom apps * guardrails in quickstart * make display util more efficient * switch openai model to std * drop unneccessary import * docs for base guardrails * remove unneccessary name * drop unneccessary args * using sentence * fix select_context * langchain quickstart updates * fix link * langchain feedback type error handling * llama feedback type error handling * base feedback type error handling * pass context as default argument to lambda function in base Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * revert ellipsis change * fix test failure * move docstrings, simplify * accept directionality from feedback * set wraper.__dict__ too * filter on demand * format, remove unused imports * format * format * assert llama-index installed * assert langchain installed * test llam aguardrails optional mod * format * copy signature instead of dict * add note --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix select_context to call return individual items, not collected list * display utilities, context filtering, oh my * Update trulens_eval/trulens_eval/tru_chain.py * undo bad ellipsis change * change moved import * update llama quickstart * get llama working * llama updates * add docstring examples * guardrails docs page * allow tabbed content setting in mkdocs yml * formatting * api ref links * api ref files for guardrails * api ref to guardrails in mkdocs * update in trubot * fix typo * add missing init * api ref updates * docstring updates * docstring updates * base context filter for custom apps * guardrails in quickstart * make display util more efficient * switch openai model to std * drop unneccessary import * docs for base guardrails * remove unneccessary name * drop unneccessary args * using sentence * fix select_context * langchain quickstart updates * fix link * langchain feedback type error handling * llama feedback type error handling * base feedback type error handling * pass context as default argument to lambda function in base * revert ellipsis change * fix test failure * move docstrings, simplify * accept directionality from feedback * set wraper.__dict__ too * filter on demand * format, remove unused imports * format * format * assert llama-index installed * assert langchain installed * test llam aguardrails optional mod * format * copy signature instead of dict * add note --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix select_context to call return individual items, not collected list * display utilities, context filtering, oh my * Update trulens_eval/trulens_eval/tru_chain.py Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * undo bad ellipsis change * change moved import * update llama quickstart * get llama working * llama updates * add docstring examples * guardrails docs page * allow tabbed content setting in mkdocs yml * formatting * api ref links * api ref files for guardrails * api ref to guardrails in mkdocs * update in trubot * fix typo * add missing init * api ref updates * docstring updates * docstring updates * base context filter for custom apps * guardrails in quickstart * make display util more efficient * switch openai model to std * drop unneccessary import * docs for base guardrails * remove unneccessary name * drop unneccessary args * using sentence * fix select_context * langchain quickstart updates * fix link * langchain feedback type error handling * llama feedback type error handling * base feedback type error handling * pass context as default argument to lambda function in base Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * revert ellipsis change * fix test failure * move docstrings, simplify * accept directionality from feedback * set wraper.__dict__ too * filter on demand * format, remove unused imports * format * format * assert llama-index installed * assert langchain installed * test llam aguardrails optional mod * format * copy signature instead of dict * add note --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix select_context to call return individual items, not collected list * display utilities, context filtering, oh my * Update trulens_eval/trulens_eval/tru_chain.py Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * undo bad ellipsis change * change moved import * update llama quickstart * get llama working * llama updates * add docstring examples * guardrails docs page * allow tabbed content setting in mkdocs yml * formatting * api ref links * api ref files for guardrails * api ref to guardrails in mkdocs * update in trubot * fix typo * add missing init * api ref updates * docstring updates * docstring updates * base context filter for custom apps * guardrails in quickstart * make display util more efficient * switch openai model to std * drop unneccessary import * docs for base guardrails * remove unneccessary name * drop unneccessary args * using sentence * fix select_context * langchain quickstart updates * fix link * langchain feedback type error handling * llama feedback type error handling * base feedback type error handling * pass context as default argument to lambda function in base Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * revert ellipsis change * fix test failure * move docstrings, simplify * accept directionality from feedback * set wraper.__dict__ too * filter on demand * format, remove unused imports * format * format * assert llama-index installed * assert langchain installed * test llam aguardrails optional mod * format * copy signature instead of dict * add note --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix select_context to call return individual items, not collected list * display utilities, context filtering, oh my * Update trulens_eval/trulens_eval/tru_chain.py Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * undo bad ellipsis change * change moved import * update llama quickstart * get llama working * llama updates * add docstring examples * guardrails docs page * allow tabbed content setting in mkdocs yml * formatting * api ref links * api ref files for guardrails * api ref to guardrails in mkdocs * update in trubot * fix typo * add missing init * api ref updates * docstring updates * docstring updates * base context filter for custom apps * guardrails in quickstart * make display util more efficient * switch openai model to std * drop unneccessary import * docs for base guardrails * remove unneccessary name * drop unneccessary args * using sentence * fix select_context * langchain quickstart updates * fix link * langchain feedback type error handling * llama feedback type error handling * base feedback type error handling * pass context as default argument to lambda function in base Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * revert ellipsis change * fix test failure * move docstrings, simplify * accept directionality from feedback * set wraper.__dict__ too * filter on demand * format, remove unused imports * format * format * assert llama-index installed * assert langchain installed * test llam aguardrails optional mod * format * copy signature instead of dict * add note --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Items to add to release announcement:
select_context
for Langchain2024-06-13.12-33-13.mp4
Summary:
Enhancements in context filtering and display utilities, with significant improvements in the
select_context
method across different classes, added checks for method availability in retrievers, and updated import paths and documentation for better organization.Key points:
select_context
for Langchainselect_context
method across different classestrulens_eval/trulens_eval/utils/display.py
Generated with ❤️ by ellipsis.dev