Describe features of generative AI workloads on Azure Flashcards
Generative AI
Generative AI describes a category of capabilities within AI that create original content. People typically interact with generative AI that has been built into chat applications. (ChatGPT)
Generative AI applications take in natural language input, and return appropriate responses in a variety of formats such as natural language, images, or code.
Transformer Models
Transformer models are trained with large volumes of text, enabling them to represent the semantic relationships between words and use those relationships to determine probable sequences of text that make sense.
Embeddings
To create a vocabulary that encapsulates semantic relationships between the tokens, we define contextual vectors, known as embeddings.
The specific categories for the elements of the vectors in a language model are determined during training based on how commonly words are used together
-The closer tokens are to one another along a particular dimension, the more semantically related they are
What is the purpose of vector-based embeddings?
To represent semantic meaning of text tokens.
Attention
The encoder and decoder blocks in a transformer model include multiple layers that form the neural network for the model.
Attention is a technique used to examine a sequence of text tokens and try to quantify the strength of the relationships between them.
-In an encoder block, attention is used to examine each token in context, and determine an appropriate encoding for its vector embedding.
-In a decoder block, attention layers are used to predict the next token in a sequence. (I heard a dog [bark])
Azure OpenAI
Azure OpenAI Service is Microsoft’s cloud solution for deploying, customizing, and hosting large language models. It brings together the best of OpenAI’s cutting edge models and APIs
Azure OpenAI supports many models that can serve different needs. These models include:
-GPT-4 / GPT-3.5 can generate natural language and code completions based on natural language prompts
-Embeddings models convert text into numeric vectorS
-DALL-E is used to generate images based on natural language prompts Access is invite basis only.
Key components:
-Pre-trained generative AI models
-Customization capabilities; the ability to fine-tune AI models with your own data
-Built-in tools to detect and mitigate harmful use cases so users can implement AI responsibly
-Enterprise-grade security with role-based access control (RBAC) and private networks
-Currently you need to apply for access to Azure OpenAI.
Azure OpenAI Service includes support for content filters that apply criteria to suppress prompts and responses based on classification of content into four severity levels (safe, low, medium, and high) for four categories of potential harm (hate, sexual, violence, and self-harm).
Azure AI Studio
Developers can work with these models in Azure AI Studio, a web-based environment where AI professionals can deploy, test, and manage LLMs that support generative AI app development on Azure.
-You can experiment with OpenAI models in playgrounds. In the Completions playground, you can type in prompts, configure parameters, and see responses without having to code.
-Chat playground, you can use the assistant setup to instruct the model about how it should behave
Copilots
Copilots are often integrated into other applications and provide a way for users to get help with common tasks from a generative AI model. (a chat screen feature that opens up next to your file.)
Copilots have the potential to revolutionize the way we work by helping with first drafts, information synthesis, strategic planning, and much more.
Microsoft Copilot
Microsoft Copilot features can be found throughout commonly used applications. The goal of these features is to empower people to be smarter, more productive, more creative, and connected to the people and things around them.
-Can be used with Microsoft Bing search engine to generate natural language answers to questions
-Copilots can help with first drafts, information synthesis, strategic planning, and much more.
Improve generative AI responses with prompt engineering
The quality of responses that a generative AI application returns not only depends on the model itself, but on the types of prompts it’s given. The term prompt engineering describes the process of prompt improvement.
-System Message: sets the context for the model
-Writing good prompts: You can achieve better results when you submit clear, specific prompts.
-Providing examples
-Grounding data: provide context (email text in the prompt with an instruction to summarize it.)
OpenAI Models
-Artificial Intelligence imitates human behavior by relying on machines to learn and execute tasks without explicit directions on what to output.
-Machine learning algorithms take in data like weather conditions and fit models to the data, to make predictions like how much money a store might make in a given day.
-Deep learning models use layers of algorithms in the form of artificial neural networks to return results for more complex use cases.
-Generative AI models can produce new content based on what is described in the input. The OpenAI models are a collection of generative AI models that can produce language, code, and images.
AI workloads Azure OpenAI supports
-Generating Natural Language
Text completion: generate and edit text
Embeddings: search, classify, and compare text
-Generating Code: generate, edit, and explain code
-Generating Images: generate and edit images
Microsoft AI Principles
- Fairness: AI systems shouldn’t make decisions that discriminate against or support bias of a group or individual.
- Reliability and Safety: AI systems should respond safely to new situations and potential manipulation.
- Privacy and Security: AI systems should be secure and respect data privacy.
- Inclusiveness: AI systems should empower everyone and engage people.
- Accountability: People must be accountable for how AI systems operate.
- Transparency: AI systems should have explanations so users can understand how they’re built and used.
Transparency Notes
Transparency Notes are intended to help you understand how Microsoft’s AI technology works, the choices system owners can make that influence system performance and behavior, and the importance of thinking about the whole system, including the technology, the people, and the environment.
Microsoft guidance for responsible generative AI
The Microsoft guidance for responsible generative AI is designed to be practical and actionable. It defines a four stage process to develop and implement a plan for responsible AI when using generative models.
- Identify potential harms that are relevant to your planned solution.
- Measure the presence of these harms in the outputs generated by your solution.
- Mitigate the harms at multiple layers in your solution to minimize their presence and impact, and ensure transparent communication about potential risks to users.
- Operate the solution responsibly by defining and following a deployment and operational readiness plan.
An AI Impact Assessment guide documents the expected use of the system and helps identify potential harms.
Complete prerelease reviews
Before releasing a generative AI solution, identify the various compliance requirements in your organization and industry and ensure the appropriate teams are given the opportunity to review the system and its documentation. Common compliance reviews include:
-Legal
-Privacy
-Security
-Accessibility