Skip to content

Commit

Permalink
Merge pull request #697 from Teradata/complaints_analysis_Azure_OpenAI
Browse files Browse the repository at this point in the history
Complaints Analysis Azure OpenAI
  • Loading branch information
DallasBowden authored Aug 27, 2024
2 parents b26fd36 + 0578858 commit 1cfdf3d
Show file tree
Hide file tree
Showing 37 changed files with 4,819 additions and 0 deletions.
173 changes: 173 additions & 0 deletions UseCases/Complaints_Analysis_Azure_OpenAI/Azure-OpenAI.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "504d8fda-bd2e-40aa-bb95-5542add2b084",
"metadata": {},
"source": [
"<header>\n",
" <p style='font-size:36px;font-family:Arial; color:#F0F0F0; background-color: #00233c; padding-left: 20pt; padding-top: 20pt;padding-bottom: 10pt; padding-right: 20pt;'>\n",
" Getting Started with Azure-OpenAI\n",
" <br>\n",
" <img id=\"teradata-logo\" src=\"https://storage.googleapis.com/clearscape_analytics_demo_data/DEMO_Logo/teradata.svg\" alt=\"Teradata\" style=\"width: 125px; height: auto; margin-top: 20pt;\">\n",
" </p>\n",
"</header>"
]
},
{
"cell_type": "markdown",
"id": "6513185a-7e21-4fdc-b936-dfa9572be37f",
"metadata": {},
"source": [
"<p style='font-size:20px;font-family:Arial;color:#00233C'><b>Introduction:</b></p>\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>This notebook describes how to get started with the Azure-OpenAI Service and provides step-by-step instructions to create a resource and deploy a model.</p>\n",
"\n",
"<hr style='height:2px;border:none;background-color:#00233C;'>\n",
"<b style='font-size:20px;font-family:Arial;color:#00233C'>1. Create a resource</b>\n",
"\n",
"<ol style='font-size:16px;font-family:Arial;color:#00233C'>\n",
" <li>Sign in with your Azure subscription in the Azure portal.</li>\n",
" <li>Search for the Azure OpenAI.</li>\n",
" <li>Select Create Azure OpenAI.</li>\n",
"</ol>\n",
"\n",
"<img src='./images/step-1.png' alt='Step 1'>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>On the Create Azure OpenAI page, provide the following information for the fields on the Basics tab:</p>\n",
"\n",
"<ul style='font-size:16px;font-family:Arial;color:#00233C'>\n",
" <li><b>Subscription</b>: The Azure subscription used in your Azure OpenAI Service onboarding application.</li>\n",
" <li><b>Resource group</b>: The Azure resource group to contain your Azure OpenAI resource. You can create a new group or use a pre-existing group.</li>\n",
" <li><b>Region</b>: The location of your instance. Different locations can introduce latency, but they don't affect the runtime availability of your resource.</li>\n",
" <li><b>Name</b>: A descriptive name for your Azure OpenAI Service resource, such as MyOpenAIResource.</li>\n",
" <li><b>Pricing Tier</b>: The pricing tier for the resource. Currently, only the Standard tier is available for the Azure OpenAI Service. For more info on pricing, visit the <a href='https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/' style='color:#0066CC;text-decoration:none;'>Azure OpenAI pricing page</a>.</li>\n",
" <li><b>Select Next</b>.</li>\n",
"</ul>\n",
"\n",
"<img src='./images/step-2.png' alt='Step 2'>\n",
"\n",
"<hr style='height:2px;border:none;background-color:#00233C;'>\n",
"<b style='font-size:20px;font-family:Arial;color:#00233C'>2. Configure network security</b>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>The Network tab presents three options for the security type:</p>\n",
"\n",
"<ul style='font-size:16px;font-family:Arial;color:#00233C'>\n",
" <li><b>Option 1</b>: All networks, including the internet, can access this resource.</li>\n",
" <li><b>Option 2</b>: Selected networks, configure network security for your Azure AI services resource.</li>\n",
" <li><b>Option 3</b>: Disabled, no networks can access this resource. You can configure private endpoint connections that will be the exclusive way to access this resource.</li>\n",
" <li><b>Select Next</b>: Here we go with Option 1.</li>\n",
"</ul>\n",
"\n",
"<img src='./images/step-3.png' alt='Step 3'>\n",
"\n",
"<hr style='height:2px;border:none;background-color:#00233C;'>\n",
"<b style='font-size:20px;font-family:Arial;color:#00233C'>3. Confirm the configuration and create the resource</b>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>Configure any tags for your resource, as desired.</p>\n",
"\n",
"<img src='./images/step-4.png' alt='Step 4'>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>Select Next to move to the final stage in the process: <b>Submit</b>.</p>\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>Confirm your configuration settings, and select <b>Create</b>.</p>\n",
"\n",
"<img src='./images/step-5.png' alt='Step 5'>\n",
"\n",
"<img src='./images/step-6.png' alt='Step 6'>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>The Azure portal displays a notification when the new resource is available. Select <b>Go to resource</b>.</p>\n",
"\n",
"<img src='./images/step-7.png' alt='Step 7'>\n",
"\n",
"<hr style='height:2px;border:none;background-color:#00233C;'>\n",
"<b style='font-size:20px;font-family:Arial;color:#00233C'>4. Deploy Model</b>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>Open the Model Catalog to see models available for you to deploy.</p>\n",
"\n",
"<img src='./images/step-8.png' alt='Step 8'>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>Model availability varies by region. For a list of available models per region, see the <a href='https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability' style='color:#0066CC;text-decoration:none;'>Model summary table and region availability</a>. Select the model of your choice.</p>\n",
"\n",
"<img src='./images/step-9.png' alt='Step 9'>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>This usecase uses 3 models as follows:</p>\n",
"<ul style='font-size:16px;font-family:Arial;color:#00233C'>\n",
" <li><b>gpt-4o-mini</b></li>\n",
" <li><b>whisper</b></li>\n",
" <li><b>text-embedding-3-small</b></li>\n",
"</ul>\n",
"<div class=\"alert alert-block alert-info\">\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'><b>Note: </b><i>Deployment for one of the models i.e. \"gpt-4o-mini\" is shown below. A similar process is to be followed for other models as well.</i></p>\n",
"</div>\n",
"<img src='./images/step-10.png' alt='Step 10'>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>The deployment tab presents options for the deployment configuration:</p>\n",
"\n",
"<ul style='font-size:16px;font-family:Arial;color:#00233C'>\n",
" <li><b>Deployment name</b>: Choose a name carefully. The deployment name is used in your code to call the model using the client libraries and the REST APIs.</li>\n",
" <li><b>Deployment type</b>: Standard, Global-Batch, Global-Standard, Provisioned-Managed. Learn more about <a href='https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/deployment-types' style='color:#0066CC;text-decoration:none;'>deployment type options</a>.</li>\n",
" <li><b>Tokens</b>: For the Tokens per Minute Rate Limit, adjust the Tokens per Minute (TPM) to set the effective rate limit for your deployment. Suggested TPM is 50k for this demo.</li>\n",
" <li><b>Select Deploy</b>.</li>\n",
"</ul>\n",
"\n",
"<img src='./images/step-11.png' alt='Step 11'>\n",
"\n",
"<p style='font-size:16px;font-family:Arial;color:#00233C'>The deployments table shows a new entry that corresponds to your newly created model.<br><br>When the deployment completes, your model deployment status changes to succeeded.</p>\n",
"\n",
"<img src='./images/step-12.png' alt='Step 12'>"
]
},
{
"cell_type": "markdown",
"id": "ea821089-7436-4024-89c3-256c92d77be1",
"metadata": {},
"source": [
"<hr style='height:2px;border:none;background-color:#00233C;'>\n",
"<b style = 'font-size:20px;font-family:Arial;color:#00233c'>Resources:</b>"
]
},
{
"cell_type": "markdown",
"id": "9e8c0461-3e83-438c-a5c2-6ea29e6c0fd2",
"metadata": {},
"source": [
"<p style='font-size:16px;font-family:Arial;color:#00233C'><a href='https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource'>Create and deploy an Azure OpenAI Service resource</a></p>"
]
},
{
"cell_type": "markdown",
"id": "69a01e44-d3b1-4a10-b951-3d3ffb095616",
"metadata": {},
"source": [
"<footer style=\"padding-bottom:35px; background:#f9f9f9; border-bottom:3px solid #00233C\">\n",
" <div style=\"float:left;margin-top:14px\">ClearScape Analytics™</div>\n",
" <div style=\"float:right;\">\n",
" <div style=\"float:left; margin-top:14px\">\n",
" Copyright © Teradata Corporation - 2024. All Rights Reserved\n",
" </div>\n",
" </div>\n",
"</footer>"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 1cfdf3d

Please sign in to comment.