-
Notifications
You must be signed in to change notification settings - Fork 128
initial refactor of Reasoning Strategies #203
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
base: main
Are you sure you want to change the base?
Conversation
harshitgupta412
left a comment
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.
instead of checking whether prompt_strategy is None, it will be better to just define a DEFAULT_PROMPT_STRATEGY (there are already default args in PromptStrategy, so PromptStrategy() will be enough)
The default argument will then be PromptStrategy() instead of None
| user_instruction: str, | ||
| prompt_strategy: PromptStrategy, | ||
| operation_type: str = "filter", | ||
| ) -> tuple[list[dict[str, Any]], list[Any], list[str] | None]: |
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.
If I understand correctly, this is supposed to basically generate demonstrations using the teacher model for the given data. In that case, it will be better to use sem_ops directly with teacher model instead of bootstrap functions
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 will make sure that things are reusable and prevent double work in case some parameters change. (like adding a new prompt strategy or new prompts or new sem op)
Purpose
Refactors Reasoning Strategies to be more intuitive. Fixes #198 . Additionally, it fixes some of the inconsistencies with
sem_extractparticularly its output parsingTest Plan
Created comprehensive tests to test Reasoning with different operators and a mix of reasoning strategies.
Test Results
(Optional) Documentation Update
TODO: update docs on reasoning strategy
Type of Change
--> change to reasoning api
Checklist