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.
I noticed that many prompts/scrolls include a statement of intent at the start of the prompt ( a "premise" )
for example.
https://github.com/maraoz/gpt-scrolls/blob/master/tweets/twitter-fiction.txt
the premise would be
"Twitter fiction: 21 authors try their hand at 140-character novels
We challenged...at Twitter fiction."
This PR adds a premise to GPT which can be set on GPT in a similar way to the examples, and a configurable premise_prefix and premise_suffix to control how this premise appears and the gap between it and the examples etc. If the premise is not set or empty string this prefix and suffix should not be used. Otherwise, if premise is set, this setup allows the prefix-premise-suffix to be prepended to the examples.
Also included is a sample app for this, which uses the Twitter fiction example above. I've also demonstrated with this app how the config parameters and examples could be loaded from a template json file ( for formatting ) and a prompt json file ( for the content ).
Files are currently residing here:
https://github.com/ml4j/gpt-scrolls/tree/master/tweets
https://github.com/ml4j/gtp-3-prompt-templates/tree/master/question-answer/default/templates
These are currently set to remote urls simply for demonstration purposes - it would be great if GPT-3 applications had the ability to pull in json files of a standard format from different projects. It would allow the separation of content and formatting - allowing a prompt to be used with different formats or vice versa).
If you like this idea of premises, I can amend this PR to remove the remote urls and commit the json files into the project as part of this PR - if so would you be able to recommend where they could reside ?