Exam DP-800 Topic 2 Question 94 Discussion

Actual exam question for Microsoft's DP-800 exam
Question #: 94
Topic #: 2
You have an Azure SQL database that contains tables named dbo.Tickets and dbo.TicketNotes.
dbo.Tickets contains support tickets and dbo.TicketNotes contains ticket notes.
A retrieval query returns the top five relevant ticket notes for a user question.
You plan to implement a Retrieval Augmented Generation (RAG) pattern that meets the following requirements:
- Formats the retrieved relational data for large language model (LLM)
processing
- Sends the user question and retrieved context to an Azure OpenAI REST endpoint for chat completions
- Extracts the response text from the LLM response
Which Transact-SQL function should you use to extract the response text?

Suggested Answer: D Vote an answer

The Transact-SQL function used to extract the response text from the Azure OpenAI REST endpoint is JSON_VALUE.
When you call the Azure OpenAI REST endpoint using sp_invoke_external_rest_endpoint, the response is returned as a JSON string. To isolate the actual text content from the LLM, you must parse this JSON structure.
Function: JSON_VALUE(response_body, '$.choices[0].message.content')
Purpose: It extracts a scalar (text) value from a JSON string.
Path: In the OpenAI schema, the generated response is always located at
$.choices[0].message.content.
Reference:
https://pub.towardsai.net/mastering-retrieval-augmented-generation-from-zero-to-expert-in-rag- for-quickly-building-a-08141a308836

by Cornelius at Jul 09, 2026, 12:11 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
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.

0
0
0
10