In the following scenario, what’s your best approach using GPT-3 API?
- You need to come out with a short paragraph, about a specific subject/Topic
- You must base your paragraph on a set of articles, 3-6 articles, up to 1000 words each, written in an unknown structure.
Here is what I found so far to work well:
- The main constraint is the open ai token limit in the prompt
- Due to the constraint, I’d ask OPT-3 to parse unstructured data using the specific subject in the prompt request.
- I’ll then iterate each article and save it all into 1 string variable
- Then, repeat it one last time but using the new string variable
- If the article is too long, I’ll cut it into smaller chunks, based on line breaks or sentences ending with “.”.
- Of curse fine-tune, the model with the specific subject before will produce much better results
temperatureshould be set to
0, to make sure GPT-3 uses only facts from the data source.
Example: Let’s say I want to write a paragraph about
Subject B, and
Subject C. And I have 5
articles as references. The open ai playground will look something like this:
The open ai playground will look something like this:
Example Article 1 ---- Subject A: example A for OPT-3 Subject B: n/a Subject c: n/a ========= Example Article 2 ---- Subject A: n/a Subject B: example B for GPT-3 Subject C: n/a ========= Example Article 3 ---- Subject A: n/a Subject B: n/a Subject c: example for GPT-3 ========= Article 1 ----- Subject A: Subject B: Subject C: ========= ... repeating with all articles, save to str ----- str ----- Subject A: Subject B: Subject C: