Azure Agent Retrieval (Azure AI Search) returns JSON references instead of LLM-generated answer
15:54 28 Oct 2025

I’m testing Azure Agent Retrieval with Azure AI Search and Azure OpenAI integration. However, instead of getting a natural language LLM-generated answer, the response only returns raw JSON with document references.

Console.WriteLine((retrievalResult.Value.Response[0].Content[0] as KnowledgeAgentMessageTextContent).Text);

I see below response

[
  {"ref_id":0,"title":"abc.docx","content":"xyz"},
  {"ref_id":1,"title":"123.docx","content":"mnc"}
]

SDK version: Azure.Search.Documents 11.7.0-beta.7

What I’ve tried

Verified my Knowledge Agent configuration in Azure AI Search

Verified that the index has embeddings and content

Tried sending both simple and full prompts

Confirmed that the endpoint and credentials are correct

Question

How do I correctly get the LLM-generated response (summarized or synthesized answer) instead of just the retrieved documents?

c# azure azure-openai azure-ai-search