
AI-102 EXAM QUESTIONS 2024 MICROSOFT AZURE AI 102 CERTIFICATION COURSE PART-8
AI Summary
This session, part eight of the AI 102 question series, begins by addressing common questions regarding the exam, specifically the presence of simulation questions. It is confirmed that there will be no simulation questions in the AI 102 exam. While some questions might involve screen-based scenarios, they are not true simulations. The speaker congratulates a student from Malaysia who passed the exam after following the playlist, highlighting that the student forgot to answer case study questions, which cost him six questions but he still achieved a good score. A key takeaway from successful students is the importance of time management during the exam, as it is not overly difficult but requires careful pacing. There is no negative marking, so it's advisable to attempt all questions.
Question 61 focuses on configuring a chatbot in Azure OpenAI Studio's chat playground to reduce word repetition. The question asks which parameter should be modified. The options provided are temperature, frequency penalty, stop sequence, and presence penalty.
Temperature controls the randomness or creativity of the chatbot's responses. A lower temperature makes responses more predictable and consistent, while a higher temperature leads to more varied, imaginative, and random answers.
Frequency penalty, as its name suggests, applies a penalty to the frequency of words, thereby reducing the chances of the model repeating the same words or phrases. This parameter directly addresses the requirement of reducing word repetition.
Stop sequence defines specific points where the model should stop generating text, preventing it from producing excessively long responses.
Presence penalty reduces the probability of the model introducing new topics by penalizing the presence of new tokens. It helps keep the conversation focused on the current topic but does not specifically target word repetition.
Therefore, frequency penalty is identified as the correct parameter to modify to reduce word repetition.
The discussion then expands on other parameters not explicitly mentioned in the options for Question 61:
Top P, similar to temperature, also controls randomness but uses a different method by considering the top probabilities of tokens. It is recommended to adjust either temperature or top P, but not both simultaneously. If top P is increased, the model selects from a more selective subset of high-probability options, leading to less varied but still random answers within that subset. If top P is lowered, it selects from a broader spectrum of choices.
Max response parameter sets a limit on the number of tokens per model response, with a maximum of 4,000 tokens shared between the prompt (input) and the model's response. One token is approximately equal to four characters of English text.
Question 62 is similar to Question 61 but asks about reducing the randomness of each response. Given the options (temperature, frequency penalty, stop sequence, presence penalty), temperature is the correct answer. If both temperature and top P were options and only one could be chosen, temperature would be preferred because it offers a broader control over randomness.
Question 63 asks what RAG (Retrieval Augmented Generation) with OpenAI enables developers to do. RAG involves two main steps:
1. Retrieval: The AI model retrieves relevant documents or data from a provided database or knowledge base, ensuring it has the necessary context and facts.
2. Augmented Generation: After retrieving information, the AI model uses augmented generation to produce responses that are informed by the specific details retrieved, ensuring the answers are current and factually correct.
The options are:
- Create their own AI chat model (not specific to RAG).
- Access Azure OpenAI without an approved subscription (not possible).
- Use supported AI chat models that can reference specific sources of data (this aligns with RAG's purpose).
The correct answer is using supported AI chat models that can reference specific sources of data.
Question 64 presents a scenario where an Azure subscription is used to build an app comparing documents for semantic similarity, requiring the return of numeric vectors and minimized development effort. The question asks which Azure OpenAI model should be used.
The models discussed are:
- GPT 3.5 and GPT 4: These are generative pre-trained models primarily used for generating natural language and completing code based on natural language prompts. They are optimized for chat-based interactions and do not return numeric vectors.
- Embeddings models: These models are specifically designed to convert text into numeric vectors. These vectors represent the semantic meaning of the text, allowing for the comparison of documents based on their meaningful similarity (e.g., "tea" and "coffee" would have closely placed vectors due to their shared context as beverages, unlike "banana"). This directly addresses the requirement of returning numeric vectors for semantic similarity.
- DALL-E models: These models generate images based on natural language prompts and are not relevant to comparing document similarity.
Therefore, embeddings models are the correct choice for this task.
Question 65 asks about recommended prompt engineering techniques when using RAG with Azure OpenAI on your own data.
The options are:
- Break down the task and use Chain of Thought prompting: This technique encourages the model to break down its reasoning process step by step, making responses more effective and managing token limits. This is a recommended technique.
- Include as much conversation history as possible in your call: Including too much history can exceed token limits and negatively impact the model's response. This is not recommended.
- Use a single long prompt to provide all necessary information: Similar to the previous option, a single long prompt can exceed token limits and impact the model's response. This is not recommended.
Breaking down the task and using Chain of Thought prompting is the correct recommendation.
Question 66 asks which Azure OpenAI base model can be deployed to assess the abilities of ChatGPT.
The options are:
- Text-DaVinci-003: An earlier completion model, best for single-turn tasks where context tracking is not required.
- GPT-3.5-Turbo: A chat completion model specifically designed for chat-based interactions and optimized for maintaining context in multi-turn conversations. ChatGPT primarily utilizes GPT models.
- Text-embedding-ada-002: An embedding model used for converting text to numerical vectors, not for assessing ChatGPT's abilities.
The key distinction is between completion models (like DaVinci) and chat completion models (like GPT 3.5 Turbo and later GPT 4 models). Chat completion models are capable of maintaining context in ongoing dialogues, which is a core ability of ChatGPT. Therefore, GPT-3.5-Turbo is the correct answer. The discussion also briefly mentions other model types like Whisper (speech recognition), TTS (text-to-speech), and DALL-E (text-to-image).
Question 67 is a code-based question involving querying Azure OpenAI to retrieve embeddings for text. It provides a code snippet with two blanks to fill. The scenario involves an Azure subscription, tenant ID, an OpenAI resource named `openai1` with a primary API key, and a deployment named `embedding1` using the `text-embedding-ada-002` model.
Blank 1 is within `AzureKeyCredential()`. The options are subscription ID, tenant ID, and API key.
- Subscription ID: Used to identify a subscription, not for authentication or deployment identification when querying OpenAI.
- Tenant ID: Associated with Azure Active Directory (now Microsoft Entra) for identity and access management, not for API credentials.
- API key: This is the primary key for the Azure OpenAI resource and is used to authenticate the OpenAI client.
Therefore, the API key is the correct value for Blank 1.
Blank 2 is within `client.get_embeddings(input_string, blank_2=...)`. The options are not explicitly listed in the summary but the explanation clarifies that the deployment name should be provided.
- The input string is already provided. To retrieve embeddings, the API call needs to know which deployment to use.
- The deployment name is `embedding1`. While the model name is `text-embedding-ada-002`, the deployment name is used in API calls because the underlying model can be changed without affecting the deployment name and, consequently, the API calls.
Therefore, `embedding1` (the deployment name) is the correct value for Blank 2.
Question 68 asks which Azure AI Studio playground can support message-in, conversation-out interactions.
The options are:
- Images: This playground generates images, not conversations.
- Chat: This playground is specifically designed for conversational interactions, taking conversation history as input and generating message responses.
- Completions: While it can generate text, the chat playground is specifically optimized for multi-turn, conversational interactions.
The Chat playground is the most appropriate answer.
Question 69 asks for the recommended way to add data when using OpenAI on your own data.
The options are:
- Using any data source option available for Azure OpenAI on your data: This is not recommended as it may lead to suboptimal results without proper configuration.
- Using Azure AI Studio to create the search resource and index: This is the recommended approach. Azure AI Studio helps with "chunking" (organizing and processing information) and indexing data, which improves retrieval and yields better responses from the AI model.
- Connecting to files in a storage account without using Azure AI Studio: Directly connecting to a storage account without Azure AI Studio will lack the necessary indexing and structuring features, making data retrieval and processing less effective.
Therefore, using Azure AI Studio to create the search resource and index is the correct answer.
The session concludes with a question for the viewers to answer in the comments, promising to discuss it in the next video.