Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c9df23f

Browse files
Merge pull request openai#77 from Pankaj-Baranwal/patch-1
Replaced non-existent model with the new version.
2 parents 24a9480 + fdc0f42 commit c9df23f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/fine-tuned_qa/olympics-2-create-qa.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"metadata": {},
1313
"source": [
1414
"# 2. Creating a synthetic Q&A dataset\n",
15-
"We use [`davinci-instruct-beta-v2`](https://beta.openai.com/docs/engines/instruct-series-beta), a model specialized in following instructions, to create questions based on the given context. Then we also use [`davinci-instruct-beta-v2`](https://beta.openai.com/docs/engines/instruct-series-beta) to answer those questions, given the same context. \n",
15+
"We use [`davinci-instruct-beta-v3`](https://beta.openai.com/docs/engines/instruct-series-beta), a model specialized in following instructions, to create questions based on the given context. Then we also use [`davinci-instruct-beta-v3`](https://beta.openai.com/docs/engines/instruct-series-beta) to answer those questions, given the same context. \n",
1616
"\n",
1717
"This is expensive, and will also take a long time, as we call the davinci engine for each section. You can simply download the final dataset instead.\n",
1818
"\n",
@@ -175,7 +175,7 @@
175175
"def get_questions(context):\n",
176176
" try:\n",
177177
" response = openai.Completion.create(\n",
178-
" engine=\"davinci-instruct-beta-v2\",\n",
178+
" engine=\"davinci-instruct-beta-v3\",\n",
179179
" prompt=f\"Write questions based on the text below\\n\\nText: {context}\\n\\nQuestions:\\n1.\",\n",
180180
" temperature=0,\n",
181181
" max_tokens=257,\n",
@@ -255,7 +255,7 @@
255255
"def get_answers(row):\n",
256256
" try:\n",
257257
" response = openai.Completion.create(\n",
258-
" engine=\"davinci-instruct-beta-v2\",\n",
258+
" engine=\"davinci-instruct-beta-v3\",\n",
259259
" prompt=f\"Write questions based on the text below\\n\\nText: {row.context}\\n\\nQuestions:\\n{row.questions}\\n\\nAnswers:\\n1.\",\n",
260260
" temperature=0,\n",
261261
" max_tokens=257,\n",
@@ -385,15 +385,15 @@
385385
}
386386
],
387387
"source": [
388-
"answer_question(olympics_search_fileid, \"davinci-instruct-beta-v2\", \n",
388+
"answer_question(olympics_search_fileid, \"davinci-instruct-beta-v3\", \n",
389389
" \"Where did women's 4 x 100 metres relay event take place during the 2020 Summer Olympics?\")"
390390
]
391391
},
392392
{
393393
"cell_type": "markdown",
394394
"metadata": {},
395395
"source": [
396-
"After we fine-tune the model for Q&A we'll be able to use it instead of [`davinci-instruct-beta-v2`](https://beta.openai.com/docs/engines/instruct-series-beta), to obtain better answers when the question can't be answered based on the context. We see a downside of [`davinci-instruct-beta-v2`](https://beta.openai.com/docs/engines/instruct-series-beta), which always attempts to answer the question, regardless of the relevant context being present or not. (Note the second question is asking about a future event, set in 2024.)"
396+
"After we fine-tune the model for Q&A we'll be able to use it instead of [`davinci-instruct-beta-v3`](https://beta.openai.com/docs/engines/instruct-series-beta), to obtain better answers when the question can't be answered based on the context. We see a downside of [`davinci-instruct-beta-v3`](https://beta.openai.com/docs/engines/instruct-series-beta), which always attempts to answer the question, regardless of the relevant context being present or not. (Note the second question is asking about a future event, set in 2024.)"
397397
]
398398
},
399399
{
@@ -413,7 +413,7 @@
413413
}
414414
],
415415
"source": [
416-
"answer_question(olympics_search_fileid, \"davinci-instruct-beta-v2\", \n",
416+
"answer_question(olympics_search_fileid, \"davinci-instruct-beta-v3\", \n",
417417
" \"Where did women's 4 x 100 metres relay event take place during the 2048 Summer Olympics?\", max_len=1000)"
418418
]
419419
},

0 commit comments

Comments
 (0)