Skip to content

Commit

Permalink
Update kdb.AI example notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgiannak committed Apr 9, 2024
1 parent 83462f5 commit c3e498a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/providers/kdbai/ChatGPT_QA_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
}
],
"source": [
"data = load_dataset(\"adversarial_qa\", 'adversarialQA', split=\"train\").to_pandas()\n",
"data = load_dataset(\"adversarial_qa\", 'adversarialQA', ignore_verifications=True)['train'].to_pandas()\n",
"data = data.drop_duplicates(subset=[\"context\"])\n",
"print(f\"Number of unique contexts: {len(data)}\")\n",
"data.head()"
Expand Down Expand Up @@ -308,7 +308,11 @@
"# extract text data from the dataset\n",
"documents = [\n",
" {\n",
" 'id': r['id'],\n",
" 'text': r['context'],\n",
" 'metadata': {\n",
" 'title': r['title']\n",
" }\n",
" } for r in data.to_dict(orient='records')\n",
"]\n",
"pprint(documents[0])"
Expand Down

0 comments on commit c3e498a

Please # to comment.