exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 5 question 9 discussion

Actual exam question from Microsoft's AI-102
Question #: 9
Topic #: 5
[All AI-102 Questions]

HOTSPOT -
You are reviewing the design of a chatbot. The chatbot includes a language generation file that contains the following fragment.
# Greet(user)
- ${Greeting()}, ${user.name}
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
zellck
Highly Voted 1 year, 10 months ago
NYY is the answer. https://learn.microsoft.com/en-us/azure/bot-service/file-format/bot-builder-lg-file-format?view=azure-bot-service-4.0#template-names https://learn.microsoft.com/en-us/azure/bot-service/file-format/bot-builder-lg-file-format?view=azure-bot-service-4.0#references-to-templates Variation text can include references to another named template to aid with composition and resolution of sophisticated responses. References to other named templates are denoted using braces, such as ${<TemplateName>()}.
upvoted 23 times
rdemontis
1 year, 5 months ago
To me you're right https://learn.microsoft.com/en-us/azure/bot-service/file-format/bot-builder-lg-file-format?view=azure-bot-service-4.0#templates
upvoted 1 times
...
zellck
1 year, 9 months ago
Gotten this in Jul 2023 exam.
upvoted 7 times
...
...
evangelist
Highly Voted 1 year, 2 months ago
COrrect answer is : NYY why: ${user.name} retrieves the user's name using a prompt.-->No. In this context, ${user.name} directly retrieves the user's name from the incoming user object. It doesn't obtain the user's name through a prompt but assumes that the user object already contains the name property. Greet() is the name of the language generation template.-->Yes. # Greet(user) defines a language generation template named Greet. This template takes a user parameter, indicating that Greet is the template name used to generate personalized greeting messages. ${Greeting()} is a reference to a template in the language generation file.-->Yes. ${Greeting()} is a reference to another template in the language generation file. This syntax indicates that Greeting is a template that will be invoked to generate all or part of a greeting when messages are generated. This allows developers to reuse and combine templates in the language generation file to create more complex messages.
upvoted 13 times
...
gyaansastra
Most Recent 1 month, 4 weeks ago
1. "${user.name} retrieves the user name by using a prompt." No - The ${user.name} syntax is accessing a property of the user object passed to the template. It's not retrieving the name through a prompt but using data that's already available in the context. 2. "Greet() is the name of the language generation template." Yes - The "#" symbol indicates a template definition in LG files, and "Greet(user)" is the name of this template with a parameter called "user". 3. "${Greeting()} is a reference to a template in the language generation file." Yes - The ${} syntax indicates a template reference in LG files, so ${Greeting()} is calling another template named "Greeting" that must be defined elsewhere in the same language generation file.
upvoted 1 times
...
syupwsh
1 month, 4 weeks ago
see zellck's provided links No Yes Yes
upvoted 1 times
...
HaraTadahisa
10 months, 1 week ago
My answer is that No Yes Yes
upvoted 1 times
...
takaimomoGcup
10 months, 2 weeks ago
No Yes Yes
upvoted 1 times
...
Lion007
1 year, 6 months ago
${user.name} retrieves the “name” parameter from the “user” by using PARAMETER (NOT Prompt). Check out the Parametrization of Templates section https://learn.microsoft.com/en-us/azure/bot-service/file-format/bot-builder-lg-file-format?view=azure-bot-service-4.0#parametrization-of-templates Greet() is indeed the NAME of the language generation template. Why not Greet(user) is the name, I hear you asking? Not including the parameter “user” in the question doesn’t change the fact that what comes after the hashtag # is the NAME of the template, only without referring to its parameter. Again, check out Parametrization of Templates section https://learn.microsoft.com/en-us/azure/bot-service/file-format/bot-builder-lg-file-format?view=azure-bot-service-4.0#parametrization-of-templates ${Greeting()} is a reference to another template’s name called Greeting() template.
upvoted 1 times
Lion007
1 year, 6 months ago
N.Y.Y.
upvoted 1 times
...
...
sl_mslconsulting
1 year, 6 months ago
Just think of $ as the eval in JavaScript. It evals an expression. A template is just like a function you can invoke. The answers are then quite evident.
upvoted 1 times
...
kail85
1 year, 11 months ago
No, Yes, Yes
upvoted 1 times
...
NNU
2 years, 2 months ago
the user.name retrieves from .log file, the anwser is No second is yes Greet() is the name of LG template # TemplateName - You can say cheese and tomato \[toppings are optional\] third yes is a reference to a template Variation text can include references to another named template to aid with composition and resolution of sophisticated responses. References to other named templates are denoted using braces, such as ${<TemplateName>()}. https://learn.microsoft.com/en-us/azure/bot-service/file-format/bot-builder-lg-file-format?view=azure-bot-service-4.0
upvoted 3 times
...
Eltooth
2 years, 9 months ago
No No Yes
upvoted 2 times
...
kubikjakubik
3 years, 10 months ago
First is true. You even have it in your reference. https://docs.microsoft.com/en-us/composer/how-to-ask-for-user-input "Hello ${user.name}, nice to talk to you!" ... so the part ${user.name} in fact does retrieve the name of the user.
upvoted 4 times
AzureJobsTillRetire
2 years, 2 months ago
One way of getting the user name is by using a prompt, but there are other ways as well
upvoted 1 times
...
azurelearner666
3 years, 10 months ago
it does retrieve the user name, but NOT USING A PROMPT. retrieves the already stored property. But without a PROMPT. so, the response is correct, it's a NO. 1. NO 2. NO 3. YES
upvoted 28 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago