-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Automatic Prompt adaptation [language] #407
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
feat: Automatic Prompt adaptation [language] #407
Conversation
…to add-metric-prompts
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.
- logging module instead of print
- that part of code in
prompt.py
that I didn't quite understand, it could be why cache is slow.
Also try to put in a bit more effort into variable names after the llm.generate
step. more thoughtful var names can make a big difference in improving readability of the code esp after llm.generate
because normally we have no idea what the output of that function is.
assert len(grouped_results) == len( | ||
self.examples | ||
), "examples and adapted examples must be of equal length" |
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.
should this raise an exception or is it okay
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.
leaving it as assert itself - with the assumption that there is no try - except method we can do to catch this.
the con is that the whole operation fails in this case. I think we should raise an Exception and catch it and throw a warning
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.
I'll fix these things
Automatic prompt adaption for different languages.
To be merged only after #401
Usage