Implement Video Generation in Microsoft Foundry

Design and implement image- and video-generation solutions
Answer Select the option that calls client.videos.create() to initiate the job, followed by a loop that retrieves the job status using the returned ID until the status is 'completed' or 'failed'.

HOTSPOT Case Study This is a case study. Case studies are not timed separately from other exam sections. You can use as much exam time as you would like to complete each case study. However, there might be additional case studies or other exam sections. Manage your time to ensure that you can complete all the exam sections in the time provided. Pay attention to the Exam Progress at the top of the screen so you have sufficient time to complete any exam sections that follow this case study. To answer the case study questions, you will bed to reference information that is provided in the case. Case studies and associated questions might contain exhibits or other resources that provide more information about the scenario described in the case. Information provided in an individual question does not apply to the other questions in the case study. A Review Screen will appear at the end of this case study. From the Review Screen, you can review and change your answers before you move to the next exam section. After you leave this case study, you will NOT be able to return to it. To start the case study To display the first question in this case study, select the “Next” button. To the left of the question, a menu provides links to information such as business requirements, the existing environment, and problem statements. Please read through all this information before answering any questions. When you are ready to answer a question, select the “Question” button to return to the question. Overview Company Information Contoso, Ltd is a multinational retail company that builds, deploys, and manages generative AI and agent-based solutions by using Microsoft Foundry. Existing Environment Identity Environment Contoso uses Microsoft Entra ID for identity management, authentication, and authorization capabilities that enable agents to access organizational resources and services. Contoso recently formed a new AI engineering team named Agent1Dev Team to optimize and maintain existing AI solutions. The team collaborates with solution architects, DevOps engineers, and security engineers to design, implement. monitor, and secure AI applications. Contoso also has a team named Agent1Test Team that is responsible for validating AI solutions before the solution deployments. Generative Environment Contoso has a Microsoft Foundry deployment that contains two projects named Project1 and Project2. Project1 Project1 contains a customer support agent named Agent1 that assists customers with product inquiries and troubleshooting requests. Agent1 has the following configurations: • Agent1 uses a base model deployment. • A safety evaluation pipeline is NOT enabled. • Tool invocation approval workflows are NOT enabled. • Conversation memory constraints are NOT configured. Agent1 interacts with customers by using digital support channels and answers general questions about Contoso products. Project1 is deployed to an Azure region located in the European Union (EU). Agent1Dev Team will use Project1 to optimize and maintain Agent1. Project2 Project2 contains a deployed video generation model. The marketing department at Contoso has access to Project2 and plans to use the model to develop a video creation solution. Development of the solution is incomplete. Data Environment Contoso stores product-related information in Azure resources that support AI applications. The Azure environment contains an Azure Blob Storage account named storage1 that stores product detail sheets for all the Contoso products. The product sheets include specifications, feature descriptions, and product support information that Agent1 can use to answer customer questions. The product sheets are stored in the PDF format. Problem Statements Contoso identifies the following issues: • Agent1 has only general knowledge of the Contoso products. • A recent chat interaction with Agent1 was analyzed for sentiment. The results of the analysis have NOT been processed yet. • Agent1 does NOT use the detailed product information in the product sheets stored in storage1 when responding to customer questions. • The finance department at Contoso reports that vendor invoices must be reviewed manually to ensure that the invoices match the terms defined in the vendor contracts. The invoices contain tables, logos, and varied layouts that make the documents difficult to process consistently. Requirements Planned Changes Contoso plans to implement the following changes: • Implement a solution for Project1 that analyzes the vendor invoices by evaluating both the visual layout and the textual content of the invoices, so that the invoice details can be verified against the vendor contract terms. • Update the base model deployment used by Agent1 and standardize the model version to ensure continuity and consistent responses. • Enable Agent1 to retrieve and use the detailed product information from the product sheets stored in storage1. • Implement an indexing solution for the product sheets that Agent1 can use to answer customer questions. • Complete the development of the video creation solution. Technical Requirements Contoso identifies the following technical requirements: • The model deployment used by Agent1 must support scalable, high-throughput generative AI workloads and dynamically scale to handle variable customer support traffic, without requiring reserved throughput capacity. • The product sheets must be processed by using an indexing pipeline that enables semantic and vector search, so that Agent1 can retrieve the relevant product information. • Responses generated by using the product sheet information must be relevant, complete, and accurate. • Agent1 must be able to use the product sheets to answer natural language questions about product details. • The model version used by Agent1 must remain consistent to ensure stable responses. • The data processed by the model must remain within the EU. Security and Compliance Requirements Contoso identifies the following security and compliance requirements: • API keys must NOT be used to access Foundry-deployed models. • Access to the Azure resources must follow the principle of least privilege. • The developers at Contoso must authenticate to Microsoft Foundry resources by using Microsoft Entra authentication. • Access to Project1 must be assigned to the members of Agent1Dev Team by using a security group named SC_Agent1_Dev. • Access to Project1 must be assigned to the members of Agent1Test Team by using a security group named SC_Agent1_Test. • Agent1 must never reveal customer information, even if a document that contains customer data is added erroneously to the product sheet repository in storage1. • The product sheets might contain images that include embedded text. Agent1 must be protected from malicious instructions potentially hidden within the images. Business Requirements Contoso identifies the following business requirements: • Users that interact with Agent1 must have a personalized experience in future interactions, including the ability for Agent1 to retain conversation context and recall relevant information from previous interactions. • Agent1 must answer questions only about the products sold by Contoso. You need to ensure that the marketing department can generate videos by using the model deployed to Project2. How should you complete the Python code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. exhibit

Community Insight

The core trap is treating video generation as a synchronous operation; candidates must recognize that client.videos.create starts an async job requiring a retrieval loop to check status.

This question tests the implementation of asynchronous video generation using the Microsoft Foundry Python SDK. The correct code must initiate a long-running job and poll for its completion status.

Learners often select options that assume immediate return of the video asset or fail to include the polling logic, leading to incomplete implementations where the script exits before the video is ready.

Community Discussion (1 comments)

8ac3742 👍 1
create and retrieve Generating video is a long-running, asynchronous operation. client.videos.create(...) initiates the video generation job and immediately returns an initial job object containing an id and an initial status (e.g., "queued" or "processing"). then retrieve while video.status not in ["completed", "failed", "cancelled"]: time.sleep(20) video = client.videos.retrieve(video.id) Why not list? list() takes no ID and returns a paginated list of all video generation jobs.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The scenario requires completing a Python script to generate videos via Microsoft Foundry. Video generation is inherently a long-running, asynchronous operation. The correct code selection must first call client.videos.create to submit the job and then implement a loop that retrieves the job status until it reaches a terminal state like 'completed' or 'failed'. This ensures the application waits for the resource to be fully generated.

Why Other Candidate Answers Are Wrong

Incorrect selections typically involve synchronous calls that do not handle the asynchronous nature of media generation, or they omit the retrieval step entirely. Without polling, the code would proceed immediately after submission, likely failing when trying to access a non-existent or unprocessed video asset. Options suggesting direct file writes without status checks are also invalid because the backend processes the request asynchronously.

Community Comment Notes

As one user noted, "create and retrieve Generating video is a long-running, asynchronous operation." The community consensus emphasizes that client.videos.create(...) initiates the job and returns an ID, necessitating a subsequent retrieval loop to monitor progress until completion.

Exam Strategy

When dealing with generative AI media tasks (video/image) in Foundry, always look for asynchronous patterns. If the SDK method name implies creation or generation, expect a need for polling or checking a status endpoint rather than an immediate result.

Frequently Asked Questions

Why is polling required for video generation in Foundry?

Video generation is computationally intensive and asynchronous. The API returns a job ID immediately, so you must poll the status endpoint to know when the video is ready.

What happens if I don't wait for the video job to complete?

Attempting to use or download the video before the status is 'completed' will result in errors or missing assets, as the file does not yet exist on the server.

More AI-103 FAQ →

Related Analysis

Practice All AI-103 Questions

Access 88 questions with complete answers and detailed explanations.

View Full AI-103 Practice Test →

← Back to AI-103 Study Guide