Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -603,19 +603,19 @@
"from IPython.display import display, Markdown\n",
"\n",
"def get_section5_desc_start():\n",
" return \"\"\"<p style = 'font-size:16px;font-family:Arial;color:#00233C'>The code above first reads the data from the files. The files contain information about the product embeddings and the customer's searched product embeddings. The code then loads the data into a permanent table in SQL. Once the data is loaded, we will use the Vantage in-database function <code>VectorDistance</code> to calculate the distance between the product embeddings and the customer's searched product embeddings. The data contains product embeddings, which are lists of numerical values, or vectors.</p>\n",
" <p style = 'font-size:16px;font-family:Arial;color:#00233C'>The embeddings file contains over 1500 records, each with 1,536 numerical features. This means that the file is quite large and it may take some time to load it into SQL.</p>\n",
" return \"\"\"<p style = 'font-size:16px;font-family:Arial'>The code above first reads the data from the files. The files contain information about the product embeddings and the customer's searched product embeddings. The code then loads the data into a permanent table in SQL. Once the data is loaded, we will use the Vantage in-database function <code>VectorDistance</code> to calculate the distance between the product embeddings and the customer's searched product embeddings. The data contains product embeddings, which are lists of numerical values, or vectors.</p>\n",
" <p style = 'font-size:16px;font-family:Arial'>The embeddings file contains over 1500 records, each with 1,536 numerical features. This means that the file is quite large and it may take some time to load it into SQL.</p>\n",
" <div class=\"alert alert-block alert-info\" id=\"no-azure\">\n",
" <p style = 'font-size:16px;font-family:Arial;color:#00233C'><i><b>Note</b>: Please be patient. The code above is loading data from files and copying it to SQL. This process may take 30-50 seconds.</i></p>\n",
" <p style = 'font-size:16px;font-family:Arial'><i><b>Note</b>: Please be patient. The code above is loading data from files and copying it to SQL. This process may take 30-50 seconds.</i></p>\n",
" </div>\"\"\"\n",
"\n",
"def get_section5_desc_end():\n",
" return \"\"\"<a id='section52'></a><p style = 'font-size:18px;font-family:Arial;color:#00233c'><b>5.2 Display the product embeddings</b></p>\n",
" <p style = 'font-size:16px;font-family:Arial;color:#00233C'>To give you a better idea of what the embeddings look like, here are the first five rows of the product embeddings:</p>\"\"\"\n",
" return \"\"\"<a id='section52'></a><p style = 'font-size:18px;font-family:Arial'><b>5.2 Display the product embeddings</b></p>\n",
" <p style = 'font-size:16px;font-family:Arial'>To give you a better idea of what the embeddings look like, here are the first five rows of the product embeddings:</p>\"\"\"\n",
"\n",
"def get_section5_desc_sample():\n",
" return \"\"\"<p style = 'font-size:16px;font-family:Arial;color:#00233C'>We can see that generated embeddings for all of the products are in vector of 1536 columns. </p>\n",
" <p style = 'font-size:16px;font-family:Arial;color:#00233C'>For example: The generated embeddings for product name: <b>What is the email address of Customer Service Department?</b> consists of 1536 numbers and looks like:<br>\n",
" return \"\"\"<p style = 'font-size:16px;font-family:Arial'>We can see that generated embeddings for all of the products are in vector of 1536 columns. </p>\n",
" <p style = 'font-size:16px;font-family:Arial'>For example: The generated embeddings for product name: <b>What is the email address of Customer Service Department?</b> consists of 1536 numbers and looks like:<br>\n",
" <code>-0.038744\t-0.016937\t-0.017475\t0.003624\t0.00744\t-0.00275\t0.02374</code></p>\"\"\"\n",
"\n",
"def load_the_emb():\n",
Expand Down Expand Up @@ -649,7 +649,7 @@
" display(\n",
" Markdown(\n",
" \"\"\"<br><div class=\"alert alert-block alert-success\">\n",
" <p style = 'font-size:16px;font-family:Arial;color:#00233C'><i>Section 4: Generate the embeddings is already executed! So, skipping the execution of above code.</i></p></div>\"\"\"\n",
" <p style = 'font-size:16px;font-family:Arial'><i>Section 4: Generate the embeddings is already executed! So, skipping the execution of above code.</i></p></div>\"\"\"\n",
" )\n",
" )\n",
"\n",
Expand Down Expand Up @@ -1143,7 +1143,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.10"
"version": "3.11.14"
}
},
"nbformat": 4,
Expand Down
Loading
Loading