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

Fixed up Max Mutual information example #842

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Fixed up Max Mutual information example #842

merged 2 commits into from
Jul 15, 2024

Conversation

ivanleomk
Copy link
Collaborator

@ivanleomk ivanleomk commented Jul 15, 2024

🚀 This description was created by Ellipsis for commit 5358961

Summary:

Updated docs/prompting/ensembling/max_mutual_information.md with detailed explanation, formulas, and Python implementation example for Max Mutual Information method.

Key points:

  • Updated docs/prompting/ensembling/max_mutual_information.md with a detailed explanation of the Max Mutual Information method.
  • Added sections explaining entropy and mutual information with relevant formulas.
  • Included a Python implementation example using OpenAI's API to demonstrate the method.
  • Provided two prompt templates (prompt_template_1 and prompt_template_2) for comparison.
  • Added functions generate_response, generate_responses, calculate_entropy, and calculate_mutual_information to compute and compare mutual information scores.
  • Included example queries and results to illustrate the selection of the best prompt template.

Generated with ❤️ by ellipsis.dev

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.

❌ Changes requested. Reviewed everything up to e76e619 in 30 seconds

More details
  • Looked at 270 lines of code in 1 files
  • Skipped 1 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_0IXi8nKOi8ydGQyI


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.

@@ -1,7 +1,260 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new markdown file max_mutual_information.md should be added to mkdocs.yml to ensure it is included in the site navigation.

Copy link

cloudflare-workers-and-pages bot commented Jul 15, 2024

Deploying instructor with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5358961
Status: ✅  Deploy successful!
Preview URL: https://dcd2ec12.instructor.pages.dev
Branch Preview URL: https://max-mutual.instructor.pages.dev

View logs

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 5358961 in 38 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. mkdocs.yml:256
  • Draft comment:
    The navigation title for max_mutual_information.md has been changed to 'Use Ensembles To Test Prompts'. If the document specifically focuses on the Max Mutual Information method, consider reverting this to a more accurate title, such as 'Max Mutual Information'.
      - Max Mutual Information: 'prompting/ensembling/max_mutual_information.md'
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 85%.

Workflow ID: wflow_1V9pckpXEzO3qqyt


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

@ivanleomk ivanleomk requested a review from jxnl July 15, 2024 14:05
Copy link
Collaborator

@jxnl jxnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hard to imagine when this will ever be used unforch...

@ivanleomk
Copy link
Collaborator Author

hard to imagine when this will ever be used unforch...

I think unless you have the log probs, the implementation here is more of an example of LLM-as-a-judge to score different templates. I feel like this is just something to try but agree that few shot is going to give you much more mileage rather than messing around with prompts like this.

@ivanleomk ivanleomk merged commit 177b601 into main Jul 15, 2024
15 of 16 checks passed
@ivanleomk ivanleomk deleted the max-mutual branch July 15, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants