AzureOpenAI.pptx

CTO, Akumina, Inc., em Akumina
31 de May de 2023
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
AzureOpenAI.pptx
1 de 16

Mais conteúdo relacionado

Mais procurados

Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...
Microsoft Build 2023 Updates – Copilot Stack and Azure OpenAI Service (Machin...Naoki (Neo) SATO
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
Understanding generative AI models A comprehensive overview.pdfUnderstanding generative AI models A comprehensive overview.pdf
Understanding generative AI models A comprehensive overview.pdfStephenAmell4
Generative-AI-in-enterprise-20230615.pdfGenerative-AI-in-enterprise-20230615.pdf
Generative-AI-in-enterprise-20230615.pdfLiming Zhu
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
Global Azure Bootcamp Pune 2023 -  Lead the AI era with Microsoft Azure.pdfGlobal Azure Bootcamp Pune 2023 -  Lead the AI era with Microsoft Azure.pdf
Global Azure Bootcamp Pune 2023 - Lead the AI era with Microsoft Azure.pdfAroh Shukla

Mais procurados(20)

Similar a AzureOpenAI.pptx

Azure Machine LearningAzure Machine Learning
Azure Machine LearningDavide Mauri
El camino a las Cloud Native Apps - Azure AIEl camino a las Cloud Native Apps - Azure AI
El camino a las Cloud Native Apps - Azure AIPlain Concepts
Decode2018 reportDecode2018 report
Decode2018 reportOsamu Masutani
Canada DevOps Summit 2020 Presentation Nov_03_2020Canada DevOps Summit 2020 Presentation Nov_03_2020
Canada DevOps Summit 2020 Presentation Nov_03_2020Varun Manik
Customizing Microsoft Teams Provisioning and-GovernanceCustomizing Microsoft Teams Provisioning and-Governance
Customizing Microsoft Teams Provisioning and-GovernanceOlli Jääskeläinen
Unity and Microsoft Azure Cognitive Services - DIGITREK21 WorkshopUnity and Microsoft Azure Cognitive Services - DIGITREK21 Workshop
Unity and Microsoft Azure Cognitive Services - DIGITREK21 WorkshopPablo Farías Navarro

Similar a AzureOpenAI.pptx(20)

Mais de Udaiappa Ramachandran

DiagnoseAndSolveproblems.pptxDiagnoseAndSolveproblems.pptx
DiagnoseAndSolveproblems.pptxUdaiappa Ramachandran
MAUI.pptxMAUI.pptx
MAUI.pptxUdaiappa Ramachandran
CosmosDB.pptxCosmosDB.pptx
CosmosDB.pptxUdaiappa Ramachandran
.NET7.pptx.NET7.pptx
.NET7.pptxUdaiappa Ramachandran
AzureDevOpsAzureDevOps
AzureDevOpsUdaiappa Ramachandran
.NET6.pptx.NET6.pptx
.NET6.pptxUdaiappa Ramachandran

Último

Product Listing Presentation-Maidy Veloso.pptxProduct Listing Presentation-Maidy Veloso.pptx
Product Listing Presentation-Maidy Veloso.pptxMaidyVeloso
Getting your enterprise ready for Microsoft 365 CopilotGetting your enterprise ready for Microsoft 365 Copilot
Getting your enterprise ready for Microsoft 365 CopilotVignesh Ganesan I Microsoft MVP
Framing Few Shot Knowledge Graph Completion with Large Language ModelsFraming Few Shot Knowledge Graph Completion with Large Language Models
Framing Few Shot Knowledge Graph Completion with Large Language ModelsMODUL Technology GmbH
How is AI changing journalism? Strategic considerations for publishers and ne...How is AI changing journalism? Strategic considerations for publishers and ne...
How is AI changing journalism? Strategic considerations for publishers and ne...Damian Radcliffe
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestrationCamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestrationBernd Ruecker
Google cloud Study Jam 2023.pptxGoogle cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGDSCNiT

Último(20)

AzureOpenAI.pptx

Notas do Editor

  1. https://aka.ms/oaiapply
  2. Chat and conversation interaction: Users can interact with a conversational agent that responds with responses drawn from trusted documents such as internal company documentation or tech support documentation; conversations must be limited to answering scoped questions. Available to internal, authenticated external users, and unauthenticated external users. Chat and conversation creation: Users can create a conversational agent that responds with responses drawn from trusted documents such as internal company documentation or tech support documentation; conversations must be limited to answering scoped questions. Limited to internal users only. Code generation or transformation scenarios: For example, converting one programming language to another, generating docstrings for functions, converting natural language to SQL. Limited to internal and authenticated external users. Journalistic content: For use to create new journalistic content or to rewrite journalistic content submitted by the user as a writing aid for pre-defined topics. Users cannot use the application as a general content creation tool for all topics. May not be used to generate content for political campaigns. Limited to internal users. Question-answering: Users can ask questions and receive answers from trusted source documents such as internal company documentation. The application does not generate answers ungrounded in trusted source documentation. Available to internal, authenticated external users, and unauthenticated external users. Reason over structured and unstructured data: Users can analyze inputs using classification, sentiment analysis of text, or entity extraction. Examples include analyzing product feedback sentiment, analyzing support calls and transcripts, and refining text-based search with embeddings. Limited to internal and authenticated external users. Search: Users can search trusted source documents such as internal company documentation. The application does not generate results ungrounded in trusted source documentation. Available to internal, authenticated external users, and unauthenticated external users. Summarization: Users can submit content to be summarized for pre-defined topics built into the application and cannot use the application as an open-ended summarizer. Examples include summarization of internal company documentation, call center transcripts, technical reports, and product reviews. Limited to internal, authenticated external users, and unauthenticated external users. Writing assistance on specific topics: Users can create new content or rewrite content submitted by the user as a writing aid for business content or pre-defined topics. Users can only rewrite or create content for specific business purposes or pre-defined topics and cannot use the application as a general content creation tool for all topics. Examples of business content include proposals and reports. May not be selected to generate journalistic content (for journalistic use, select the above Journalistic content use case). Limited to internal users and authenticated external users. Data Practitioners Automation Content Creation Writing code Daily workflows
  3. Ref: https://microsoftlearning.github.io/mslearn-openai/Instructions/Labs/01-get-started-azure-openai.html Explore a model in the Completions playground Playgrounds are useful interfaces in Azure OpenAI Studio that you can use to experiment with your deployed models without needing to develop your own client application. In Azure OpenAI Studio, in the left pane under Playground, select Completions. In the Completions page, ensure your text-davinci deployment is selected and then in the Examples list, select Summarize an article (abstractive). The summarize text sample consists of a prompt that provides some text, starting with the line Provide a summary of the text below…. Starting the prompt with this sentence tells the model to summarize the following block of text. At the bottom of the page, note the number of tokens detected in the text. Tokens are the basic units of a prompt - essentially words or word-parts in the text. Use the Generate button to submit the prompt to the model and retrieve a response. The response consists of a summary of the original text. The summary should communicate the key points from the original text in less verbose language. Use the Regenerate button to resubmit the prompt, and note that the response may vary from the original one. A generative AI model can produce new language each time it’s called. Under the summarized response, add a new line and enter the following text: How has AI advanced? Use the Generate button to submit the new prompt and review the response. The previous prompt and response provide context in an ongoing dialog with the model, enabling the model to generate an appropriate answer to your question. Replace the entire contents of the prompt with the following text: Provide a summary of the text below that captures its main idea. Azure OpenAI Service provides REST API access to OpenAI’s powerful language models including the GPT-4, Codex and Embeddings model series. These models can be easily adapted to your specific task including but not limited to content generation, summarization, semantic search, and natural language to code translation. Users can access the service through REST APIs, Python SDK, or our web-based interface in the Azure OpenAI Studio. Use the Generate button to submit the new prompt and verify that the model summarizes the text appropriately. Use a model to classify text So far, you’ve seen how to use a model to summarize text. However, the generative models in Azure OpenAI can support a range of different types of task. Let’s explore a different example; text classification. In the Completions page, ensure your text-davinci deployment is selected and then in the Examples list, select Classify text. The classify text sample prompt describes the context for the model in the form of an instruction to classify a news article into one of a range of categories. It then provides the text for the news article (prefixed by News article:) and ends with Classified category:. The intention is that the model “completes” the final line of the prompt by predicting the appropriate category. Use the Generate button to submit the prompt to the model and retrieve a response. The model should predict an appropriate category for the news article. Under the predicted category, add the following text: news article: Microsoft releases Azure OpenAI service. Microsoft corporation has released an Azure service that makes OpenAI models available for application developers building apps and services in the Azure cloud. Classified category: Use the Generate button to continue the dialog with the model and generate an appropriate categorization for the new news article.   Explore prompts and parameters Up until now, you’ve based your prompts on examples that are provided in Azure OpenAI Studio. Let’s try something different. Replace all of the text in the prompt area with the following text: You are a teacher creating a test for your students. Write three multiple choice questions based on the following text. Most computer vision solutions are based on machine learning models that can be applied to visual input from cameras, videos, or images. - Image classification involves training a machine learning model to classify images based on their contents. For example, in a traffic monitoring solution you might use an image classification model to classify images based on the type of vehicle they contain, such as taxis, buses, cyclists, and so on. - Object detection machine learning models are trained to classify individual objects within an image, and identify their location with a bounding box. For example, a traffic monitoring solution might use object detection to identify the location of different classes of vehicle. - Semantic segmentation is an advanced machine learning technique in which individual pixels in the image are classified according to the object to which they belong. For example, a traffic monitoring solution might overlay traffic images with “mask” layers to highlight different vehicles using specific colors. In the Parameters pane, set the following parameter values: Temperature: 0 Max length (tokens): 500 Pre-response text: Auto-generated questions. Validate before using in a test: Use the Generate button to submit the prompt and review the results, which should consist of the value in the pre-response text parameter followed by multiple-choice questions that a teacher could use to test students on the computer vision topics in the prompt. The total response should be smaller than the maximum length you specified as a parameter. Observe the following about the prompt and parameters you used: The prompt includes natural language context information that instructs the model on how to behave. Specifically, it indicates that the model should assume the role of a teacher creating a test for students. The parameters include Temperature, which controls the degree to which response generation includes an element of randomness. The value of 0 used in your submission minimizes randomness, resulting in stable, predictable responses. Use the Regenerate button to regenerate the response. It should be similar to the previous response. Change the Temperature parameter value to 0.9 and then use the Regenerate button to regenerate the response. This time the increased degree of randomness should result in a different response. However, the questions are more likely to contain inaccuracies than the ones in the previously generated response.   Explore code-generation The text-davinci model you deployed is a good general model that can handle most tasks well. However, in some cases it’s better to choose a model that is optimized for a specific kind of task. For example, Azure openAI models can be used to generate computer code rather than natural language text, and some models have been optimized for that task. In Azure OpenAI Studio, view the Models page; which lists all of the available models in your Azure OpenAI service resource. Select the code-davinci-002 model and use the Deploy model button to deploy it with the deployment name code-davinci. After deployment is complete, in Azure OpenAI Studio, view the Deployments page; which lists the models you’ve deployed. Select the code-davinci model deployment and use the Open in Playground button to open it in the playground. In the Completions page, ensure your code-davinci deployment is selected and then in the Examples list, select Natural language to SQL. The natural language to SQL sample prompt provides details of tables in a database, and a description of the query that is required followed by the SELECT keyword. The intention is for the model to complete the SELECT statement to create a query that satisfies the requirement. Use the Generate button to submit the prompt to the model and retrieve a response, which consists of a SQL SELECT query. Replace the entire prompt and response with the following new prompt: # Python 3 # Create a function to print “Hello “ and a specified string def print_hello(s): Use the Generate button to submit the prompt and view the code that gets generated. The prompt included an indication of the programming language to be generated (Python 3), a comment describing the desired functionality, and the first part of the function definition. The code-davinci model should have completed the function with appropriate Python code. Explore models for chat ChatGPT is a chatbot developed by OpenAI that can provide a wide variety of natural language responses in a conversational scenario. The model used by ChatGPT and APIs for using it are included in Azure OpenAI. In Azure OpenAI Studio, view the Models page; which lists all of the available models in your Azure OpenAI service resource. Select the gpt-35-turbo model and use the Deploy model button to deploy it with the deployment name gpt-chat. After the model is deployed, in the Playground section, select the Chat page, and ensure that the gpt-chat model is selected in the pane on the right. In the Assistant setup section, in the System message box, replace the current text with the following: The system is an AI teacher that helps people learn about AI Below the System message box, click on Add few-shot examples, and enter the following message and response in the designated boxes: User: What are different types of artificial intelligence? Assistant: There are three main types of artificial intelligence: Narrow or Weak AI (such as virtual assistants like Siri or Alexa, image recognition software, and spam filters), General or Strong AI (AI designed to be as intelligent as a human being. This type of AI does not currently exist and is purely theoretical), and Artificial Superintelligence (AI that is more intelligent than any human being and can perform tasks that are beyond human comprehension. This type of AI is also purely theoretical and has not yet been developed). Note: Few-shot examples are used to provide the model with examples of the types of responses that are expected. The model will attempt to reflect the tone and style of the examples in its own responses. Save the changes to start a new session and set the behavioral context of the chat system. In the query box at the bottom of the page, enter the following text: What is artificial intelligence? Use the Send button to submit the message and view the response. Note: You may receive a response that the API deployment is not yet ready. If so, wait for a few minutes and try again. Review the response and then submit the following message to continue the conversation: How is it related to machine learning? Review the response, noting that context from the previous interaction is retained (so the model understands that “it” refers to artificial intelligence).  
  4. https://openai.com/ https://platform.openai.com/docs/api-reference https://api.openai.com/v1/models/ https://api.openai.com/v1/models/gpt-3.5-turbo https://api.openai.com/v1/engines https://api.openai.com/v1/engines/{engine_id} https://api.openai.com/v1/completions { "model": "text-davinci-003", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 } https://api.openai.com/v1/chat/completions { "model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "Hello!"}] } https://api.openai.com/v1/edits { "model": "text-davinci-edit-001", "input": "What day of the wek is it?", "instruction": "Fix the spelling mistakes" } https://api.openai.com/v1/images/generations { "prompt": "A cute baby sea otter", "n": 2, "size": "1024x1024" } https://api.openai.com/v1/images/edits { "prompt": "A cute baby sea otter", "n": 2, "size": "1024x1024", "image":"village.png" }
  5. Iterating - Make better through training Summarizing – Tl;dr –gets summary of large content Inferring –analyze the text and outputs sentiment (emotion, rating, etc.,) Transformation – Translation to language, correction of writing, changing format (html to json) Expanding- Take an input text and write essay or email Chatbot- chat bot by setting conversational interface such as roles
  6. Apply prompt engineering in chat playground Before using your app, examine how prompt engineering improves the model response in the playground. In this first example, imagine you are trying to write a python app of animals with fun names. In Azure OpenAI Studio, navigate to the Chat playground in the left pane. In the Assistant setup section at the top, enter You are a helpful AI assistant as the system message. In the Chat session section, enter the following prompt and press Enter. CodeCopy Create a list of animals Create a list of whimsical names for those animals Combine them randomly into a list of 25 animal and name pairs The model will likely respond with an answer to satisfy the prompt, split into a numbered list. This is a good response, but not what we’re looking for. Next, update the system message to include instructions You are an AI assistant helping write python code. Complete the app based on provided comments. Click Save changes Format the instructions as python comments. Send the following prompt to the model. CodeCopy # 1. Create a list of animals # 2. Create a list of whimsical names for those animals # 3. Combine them randomly into a list of 25 animal and name pairs The model should correctly respond with complete python code doing what the comments requested. Next we’ll see the impact of few shot prompting when attempting to classify articles. Return to the system message, and enter You are a helpful AI assistant again, and save your changes. This will create a new chat session. Send the following prompt to the model. CodeCopy Severe drought likely in California   Millions of California residents are bracing for less water and dry lawns as drought threatens to leave a large swath of the region with a growing water shortage. In a remarkable indication of drought severity, officials in Southern California have declared a first-of-its-kind action limiting outdoor water use to one day a week for nearly 8 million residents. Much remains to be determined about how daily life will change as people adjust to a drier normal. But officials are warning the situation is dire and could lead to even more severe limits later in the year. The response will likely be some information about drought in California. While not a bad response, it’s not the classification we’re looking for. In the Assistant setup section near the system message, select the Add an example button. Add the following example. User: CodeCopy New York Baseballers Wins Big Against Chicago New York Baseballers mounted a big 5-0 shutout against the Chicago Cyclones last night, solidifying their win with a 3 run homerun late in the bottom of the 7th inning. Pitcher Mario Rogers threw 96 pitches with only two hits for New York, marking his best performance this year. The Chicago Cyclones' two hits came in the 2nd and the 5th innings, but were unable to get the runner home to score. Assistant: CodeCopy Sports Add another example with the following text. User: CodeCopy Joyous moments at the Oscars   The Oscars this past week where quite something! Though a certain scandal might have stolen the show, this year's Academy Awards were full of moments that filled us with joy and even moved us to tears. These actors and actresses delivered some truly emotional performances, along with some great laughs, to get us through the winter. From Robin Kline's history-making win to a full performance by none other than Casey Jensen herself, don't miss tomorrows rerun of all the festivities. Assistant: CodeCopy Entertainment Save those changed to the assistant setup, and send the same prompt about California drought, provided here again for convenience. CodeCopy Severe drought likely in California   Millions of California residents are bracing for less water and dry lawns as drought threatens to leave a large swath of the region with a growing water shortage. In a remarkable indication of drought severity, officials in Southern California have declared a first-of-its-kind action limiting outdoor water use to one day a week for nearly 8 million residents. Much remains to be determined about how daily life will change as people adjust to a drier normal. But officials are warning the situation is dire and could lead to even more severe limits later in the year. This time the model should respond with an appropriate classification, even without instructions.  
  7. https://microsoftlearning.github.io/mslearn-openai/Instructions/Labs/01-get-started-azure-openai.html https://microsoftlearning.github.io/mslearn-openai/Instructions/Labs/02-natural-language-azure-openai.html https://microsoftlearning.github.io/mslearn-openai/Instructions/Labs/03-prompt-engineering.html https://www.microsoft.com/en-us/videoplayer/embed/RE5fw9e https://designer.microsoft.com/
  8. https://microsoftlearning.github.io/mslearn-openai/Instructions/Labs/01-get-started-azure-openai.html https://microsoftlearning.github.io/mslearn-openai/Instructions/Labs/02-natural-language-azure-openai.html https://microsoftlearning.github.io/mslearn-openai/Instructions/Labs/03-prompt-engineering.html https://www.microsoft.com/en-us/videoplayer/embed/RE5fw9e https://github.com/jpalvarezl/WhatsForDinner/tree/main/WhatsForDinner https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/openai/Azure.AI.OpenAI