nerdexam
Microsoft

DP-100 · Question #563

Drag and Drop Question You have an Azure AI Foundry project named Project1. You are developing a web classification Prompt flow named Flow1 in Project1. The current input of Flow1 is defined as the fo

The correct answer is ${inputs.url}; {{url}}. This question tests the understanding of Prompt Flow input referencing in Azure AI Foundry, specifically distinguishing between assigning flow inputs to node inputs and referencing node inputs within Jinja code.

Optimize language models for AI applications

Question

Drag and Drop Question You have an Azure AI Foundry project named Project1. You are developing a web classification Prompt flow named Flow1 in Project1. The current input of Flow1 is defined as the following: You plan to add a large language model (LLM) node named Node1 to Flow1. Node1 will use an input named url of type string to classify the url provided as Flow1 input. In Node1, you will add Jinja code to reference the value of its url input. You need to ensure Node1 will classify the provided url values as the Flow1 input. How should you configure Node1? To answer, move the appropriate values to the correct Node1 configurations. You may use each value once, more than once, or not at all. You may need to move the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:

Exhibit

DP-100 question #563 exhibit

Answer Area

Drag items

{{url}}${inputs.url}{% inputs.url %}

Correct arrangement

  • ${inputs.url}
  • {{url}}

Explanation

This question tests the understanding of Prompt Flow input referencing in Azure AI Foundry, specifically distinguishing between assigning flow inputs to node inputs and referencing node inputs within Jinja code.

Approach. To correctly configure Node1: 1. For 'Node1 input value', drag and drop ${inputs.url}. This is because Node1's input url needs to receive its value from the overall Flow1's input url. In Prompt Flow, the syntax ${inputs.<input_name>} is used to reference a parent flow's input when assigning it to a node's input. 2. For 'Node1 input reference in Jinja code', drag and drop {{url}}. The question states that Jinja code within Node1 will reference its own url input. Once Node1's url input has been populated, Jinja templates inside Node1 (e.g., in a prompt) refer to that input directly using standard Jinja variable syntax {{ <variable_name> }}.

Common mistakes.

  • common_mistake. Using {{url}} for 'Node1 input value' is incorrect because {{url}} is Jinja templating syntax used for referencing a variable within a prompt or code block, not for assigning a flow input to a node's input. Using ${inputs.url} for 'Node1 input reference in Jinja code' is incorrect because while ${inputs.url} correctly references the flow's input, Jinja code within Node1 expects the standard Jinja variable syntax {{url}} to reference Node1's own url input. The value {% inputs.url %} is incorrect for both as {% %} is used for Jinja statements (like control flow or setting variables), not for directly outputting a variable's value. It is also an invalid syntax for referencing flow inputs.

Concept tested. Azure AI Foundry Prompt Flow input/output management, specifically distinguishing between referencing flow inputs when configuring node inputs (using ${inputs.<input_name>} syntax) and referencing node inputs within Jinja templates (using {{<variable_name>}} syntax). It also tests knowledge of basic Jinja templating syntax for variable output versus control flow.

Topics

#Prompt Flow#LLM Integration#Input Mapping#Azure AI Studio

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice