Page MenuHomePhabricator

GPT-4 in WikiGPT
Closed, ResolvedPublic

Description

With the release of GPT-4 we want to experiment with this version which will allow us to provide more information from Wikipedia into the prompt.
The newer models allow n input of 8k-32k tokens (as opposed to gpt-3.5 where max of 4k tokens were allowed.

The intuition is that this will allow us to provide more informative and richer answers as the model will have more Wikipedia content in its context.

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Update WikiGPT with GPT-4toolforge-repos/wiki-gpt!16isarantoadd-gpt-4main
Customize query in GitLab

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
Resolvedisarantopoulos

Event Timeline

Created a merge request that does thes following:

  • update openai python package
  • Use GPT-4 instead of GPT-3.5. GTP4 is implemented within the /chat/completions API instead of the text completions
  • GPT4 has an increased window size it can accept as context so w increase the amount of information we pass it from Wikipedia:
    • Use 4 articles instead of 3
    • Use 12 paragraphs from each article instead of 4

I have synced this branch with the application at wiki-gpt-ml.toolforge.org for now.

According to OpenAI's release report “GPT-4 scores 40% higher than our latest GPT-3.5 on our internal adversarial factuality evaluations.
Some preliminary tests demonstrate that this is valid in our scenario. The tests were run before increasing the amount of text we pass to the model (same num of articles and paragraphs) and we expect the results to be even better with the aforementioned increase in information the model is exposed to.
The below example is one that the previous version was failing.
Old version:

old_gpt.png (364×2 px, 79 KB)

new version with same information
Screenshot 2023-04-05 at 7.11.17 PM.png (286×2 px, 83 KB)

new version with increased number of articles and paragraphs:
Screenshot 2023-04-06 at 5.41.19 PM.png (518×2 px, 150 KB)