-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: Update OpenAIAnswerGenerator defaults and with learnings from PromptNode #4038
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tholor
requested changes
Feb 2, 2023
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.
Makes all sense. I would only switch the way users can modify the prompt to be more consistent across haystack
tholor
reviewed
Feb 6, 2023
tholor
reviewed
Feb 6, 2023
tholor
reviewed
Feb 6, 2023
tholor
reviewed
Feb 6, 2023
tholor
reviewed
Feb 6, 2023
tholor
reviewed
Feb 7, 2023
tholor
reviewed
Feb 7, 2023
tholor
reviewed
Feb 7, 2023
tholor
approved these changes
Feb 8, 2023
agnieszka-m
approved these changes
Feb 10, 2023
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 committed the changes here directly
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking change
topic:predictions
format of predictions, score, probability ...
topic:tests
type:documentation
Improvements on the docs
type:feature
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
Breaking Change: Update to Default Values
presence_penalty
andfrequency_penalty
to the recommended values by OpenAI to avoid repetitive text.-2
(now both are0.1
), which greatly increased the chance of repetitive text being generated and is what caused the occurrence of answers ending with repetitive commas or periods.text-davinci-003
since it returns much higher quality of results than thetext-curie-001
modelmax_tokens
to 50 since davinci-003 has a much bigger max seq length of 4000 tokens and the generated answers are often quite verboseAdditional Features (non-breaking):
Additionally, given some of the learnings from the
PromptNode
I:logger.debug
.instruction_prompt
at initialization (with the default instruction prompt being the same) using aPromptTemplate
. This allows for more flexibility which could be useful. Prior, we found that during internal usage we would often inject additional instructions into the query to get the output to change.How did you test it?
Existing tests
Notes for the reviewer
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.