Struggling with Azure OpenAI function training formats for the AI-102 exam? Discover why JSONL files are essential for proper function call implementation, with expert analysis of real exam scenarios. Get tips to master this key certification requirement and avoid common pitfalls.
Table of Contents
Question
Xerigon Corporation has an Azure Open AI model.
You create the following function definition:
{ "messages": [ {"role": "user", "content": "What is the temperature in Atlanta?"}, {"role": "assistant", "function_call": {"name": "get_current_temperature", "arguments": "{\"location\": \"Atlanta, USA\", \"format\": \"celsius\"}"} ], "functions": [{ "name": "get_current_temperature", "description": "Get the current temperature", "parameters": { "type": "object", "properties": { "location": {"type": "string", "description": "The city and country, eg. Atlanta, USA"}, "format": {"type": "string", "enum": ["celsius", "fahrenheit"]} }, "required": ["location", "format"] } }] }
You need to construct a training file for the function. You express the information in one line in the training file.
What format should you use for the training file?
A. .xhtml
B. .jsonl
C. .rss
D. .xml
Answer
B. .jsonl
Explanation
You would use a .jsonl file format for the training file. It is preferred over a .json file because it can handle large datasets and is ideal for streaming. You can start partial file processing by loading an entire dataset into memory.
The following is a training file with a .jsonl extension that expresses the information for the function in the scenario as a single line:
{"messages": [{"role": "user", "content": "What is the temperature in Atlanta?"}, {"role": "assistant", "function_call": {"name": "get_current_temperature", "arguments": "{\"location\": \"Atlanta, USA\", \"format\": \"celsius\"}"}}], "functions": [{"name": "get_current_temperature", "description": "Get the current temperature", "parameters": {"type": "object", "properties": {"location": {"type": "string", "description": "The city and country, eg. Atlanta, USA"}, "format": {"type": "string", "enum": ["celsius", "fahrenheit"]}}, "required": ["location", "format"]}}]}
Microsoft does not recommend using an XML-based file such as .xml, .rss, or .xhtml as a training file. An .xml file uses extensive markup language which can be used for various structures and formats. An .rss (Really Simple Syndication) file is used to publish headlines and blog entries in web feeds. An .xhtml file is a variation of HTML that uses a stricter version of XML.
Microsoft Azure AI Engineer Associate AI-102 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure AI Engineer Associate AI-102 exam and earn Microsoft Azure AI Engineer Associate AI-102 certification.