How to get non empty values in citations when I make an Azure OpenAI call with Azure Search?

Laurie CANTALOUBE 6 Reputation points


I need to retrieve the citations when I make an Azure OpenAI call with Azure Search. For now, in the response, I have null values everywhere except for the content...Null citatations

The code I use for the call is the next one (same as

completion =
                    "type": "azure_search",
                    "parameters": {
                        "endpoint": ai_search_endpoint,
                        "index_name": ai_search_index_name,
                        "authentication": {
                            "type": "api_key",
                            "key": ai_search_api_key,

The thing I don't understand is that when I query my index directly in Azure search I have the information I'm looking for but not in the response call...

Azure Search query

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
791 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,416 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 43,341 Reputation points Microsoft Employee

    @Laurie CANTALOUBE Did you map the fields for title, filename and URL in your BYOD configuration when the index was configured? Please see this page on how these fields are used in the response.

    Mapping these fields correctly helps ensure the model has better response and citation quality.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments