Not getting file path and title in citations in Azure Open AI service

Copper Contributor

We have developed chat bot for custom data using Azure Open AI service. We are using SharePoint Document library as the data source. We configured data source, index and indexers as mentioned in Microsoft guideline article. We are getting correct answers when we ask the questions, it is giving answer from the files SharePoint document library which we selected as data source. But, issue is, we are not getting file path and title in the citations of the result. We are getting null in id, title, filepath and url. Below it the sample output of our question, I got it from postman:



"id": "*****",
"model": "gpt-35-turbo-16k",
"created": 1702038809,
"object": "",
"choices": [
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "{ANSWER}",
"end_turn": true,
"context": {
"messages": [
"role": "tool",
"content": "{\"citations\": [{\"content\": \{CONTENT}, \"id\": null, \"title\": null, \"filepath\": null, \"url\": null, \"metadata\": {\"chunking\": \"orignal document size=30129. Scores=2.1690063Org Highlight count=240.Filtering to chunk no. 3/Highlights=42 of size=1605\"}, \"chunk_id\": \"3\"}], \"intent\": \"[\\\"{QUESTION}\\\"]\"}",
"end_turn": false
"usage": {
"prompt_tokens": ****,
"completion_tokens": ***,
"total_tokens": ***



Can someone please help with this and provide solution for how to get file path and title of the document in citations.

Thank You!

2 Replies
I had the same issue.
I found when the fields in the index were lowercase it mapped properly.

Hi @adam-laketree,

Thanks for your reply.

Actually I used field names in lower case only while creating index, still it is not working:

Below is the body I used to create index:

    "name" : "sharepoint-index",
    "fields": [
        { "name": "id", "type": "Edm.String", "key": true, "searchable": false },
        { "name": "metadata_spo_item_name", "type": "Edm.String", "key": false, "searchable": true },
        { "name": "metadata_spo_item_path", "type": "Edm.String", "key": false, "searchable": true },
        { "name": "metadata_spo_item_content_type", "type": "Edm.String", "key": false, "searchable": false },
        { "name": "metadata_spo_item_last_modified", "type": "Edm.DateTimeOffset", "key": false, "searchable": false },
        { "name": "metadata_spo_item_size", "type": "Edm.Int64", "key": false, "searchable": false },
        { "name": "keyphrases", "type": "Collection(Edm.String)", "searchable": true, "filterable": true },
        { "name": "content", "type": "Edm.String", "searchable": true, "filterable": false, "sortable": false, "facetable": false }

Can you please share body which you have used while creating index. It would be helpful!