-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
Added COSP #823
Added COSP #823
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.
👍 Looks good to me! Reviewed everything up to c4b6731 in 28 seconds
More details
- Looked at
381
lines of code in4
files - Skipped
3
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. mkdocs.yml:251
- Draft comment:
The navigation title forcosp.md
has been changed from 'COSP' to 'Prioritize Consistent Examples'. If this change was intentional, please update the PR description to reflect this. Otherwise, revert the title change in the navigation. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 85%.
Workflow ID: wflow_OcMJtsXCk7tzMPE9
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Deploying instructor with
|
Latest commit: |
5eab504
|
Status: | ✅ Deploy successful! |
Preview URL: | https://d9f28bc2.instructor.pages.dev |
Branch Preview URL: | https://cosp.instructor.pages.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.
❌ Changes requested. Incremental review on bc0121d in 1 minute and 4 seconds
More details
- Looked at
268
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_BV2xYUn7E82Thxnq
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 b2786d3 in 36 seconds
More details
- Looked at
314
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. mkdocs.yml:251
- Draft comment:
The navigation title for COSP inmkdocs.yml
is 'Prioritize Consistent Examples', which might not clearly indicate the full technique name 'Consistency Based Self Adaptive Prompting'. Consider updating it to reflect the full name for clarity.
- Consistency Based Self Adaptive Prompting: 'prompting/ensembling/cosp.md'
- Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 85%.
Workflow ID: wflow_8GFYdUM6SGAmCVeW
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.
this looks awesome cant wait to share
docs/prompting/ensembling/cosp.md
Outdated
|
||
|
||
def score_repetitiveness(prediction: Response): | ||
sentences = [item for item in prediction.chain_of_thought.split(".") if item] |
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.
why not just ask for a list[str]
docs/prompting/ensembling/cosp.md
Outdated
|
||
!!! Info "Quick Note" | ||
|
||
Make sure to install `numpy` and `scikit-learn` before running the code, we need to use these two libraries to compute the cosine similarity |
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.
Make sure to install `numpy` and `scikit-learn` before running the code, we need to use these two libraries to compute the cosine similarity | |
Make sure to `pip install numpy scikit-learn` as we will need them for cosine computations |
can also implement a simple costine function in a list comprehension to avoid a install
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 c9b3da6 in 52 seconds
More details
- Looked at
301
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. docs/prompting/ensembling/cosp.md:96
- Draft comment:
Consider using thecosine_similarity
function from a library likescikit-learn
instead of a custom implementation to ensure optimized and accurate calculations.
from sklearn.metrics.pairwise import cosine_similarity
This suggestion applies to the entire custom implementation of cosine_similarity
from lines 96 to 104.
- Reason this comment was not posted:
Confidence of 20% on close inspection, compared to threshold of 85%.
2. docs/prompting/ensembling/cosp.md:107
- Draft comment:
It's recommended to use thecosine_similarity
function fromscikit-learn
for calculating repetitiveness to ensure optimized and accurate calculations. This would replace the custom implementation in thescore_repetitiveness
function.
from sklearn.metrics.pairwise import cosine_similarity
This change should be applied to the entire score_repetitiveness
function.
- Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_fPbH76ULH8ZufScO
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 5eab504 in 1 minute and 10 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. mkdocs.yml:258
- Draft comment:
The PR description mentions updates tomkdocs.yml
for KaTeX support, but the diff provided does not show these changes. Please ensure that all intended changes are correctly committed. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 85%.
Workflow ID: wflow_LeKWK9tlFkQNyh0p
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Summary:
Added documentation and implementation details for COSP, updated
mkdocs.yml
for KaTeX support, and made minor formatting fixes.Key points:
docs/javascripts/katex.js
for rendering mathematical expressions using KaTeX.mkdocs.yml
to include KaTeX-related JavaScript and CSS files.docs/prompting/ensembling/cosp.md
.mkdocs.yml
to reflect the new COSP documentation.docs/prompting/thought_generation/chain_of_thought_few_shot/uncertainty_routed_cot.md
.instructor/dsl/partial.py
andinstructor/function_calls.py
.Generated with ❤️ by ellipsis.dev