Skip to content

Commit

Permalink
Display question and answers together
Browse files Browse the repository at this point in the history
Signed-off-by: Christy Bergman <[email protected]>
  • Loading branch information
Christy Bergman authored and Christy Bergman committed Oct 23, 2023
1 parent d04c4d7 commit 8d5d7d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions notebooks/text/imdb_search_milvus_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -645,14 +645,15 @@
"\n",
"###############\n",
"## EXERCISE #1: Change NEW_CHUNK_SIZE to 256 below. How many chunks (vectors) does this create?\n",
"## BONUS: Can you explain why the default chunk_size creates a single chunk per review?\n",
"## ANSWER: 542\n",
"## BONUS: Can you explain why the # vectors changed from 290 to 542? \n",
"## Hint: What is the default chunk overlap?\n",
"###############\n",
"NEW_CHUNK_SIZE = None \n",
"if NEW_CHUNK_SIZE is not None:\n",
" chunk_size = NEW_CHUNK_SIZE\n",
"print(f\"chunk_size: {chunk_size}\")\n",
"## END EXERCISE #1\n",
"## ANSWER: 542\n",
"\n",
"batch['chunk'] = batch['text'].apply(chunk_text, chunk_size=chunk_size)\n",
"# Explode the 'chunk' column to create new rows for each chunk.\n",
Expand Down

0 comments on commit 8d5d7d6

Please sign in to comment.