azureopenai-apilangchainazure-openaiazure-ai-search

How can I get the lastModifiedDate (or any date) in Azure Open AI Service maps?


I created an Azure resource for testing that I am populating with a custom blob I created in Azure only for testing, I created the skillset, the indexer, the index, everything for the retrieval of the date and up until the index all the data is being sent properly:

example 1 example 2

My main interest is to do a hybrid search (so I can use a scoring profile I have created to use freshness... and then when I go to Open Azure AI the date is not part of the mapping and the files are not getting the date, and I really do not know why: example 3 example 4

I have gone back and forth between index (up until where all the data is being sent properly) and Open Azure AI tool, but I have not found how to make it take the date into consideration, does anybody know how ?


Solution

  • The field of type datetimeoffset is not supported while doing custom field mapping in azure open ai.

    All of the fields Content data, File name, Title,URL and Vector Fields asked is of type string.

    Whatever the fields you do map for Content data will be used by model for search query and the references are given by the field File name.

    If you want your date as a result in the reference you need to convert the type to string.

    enter image description here

    Then you will get the date field for mapping.

    If you map it to File name then instead of file name you will get the date as reference but no filename.

    enter image description here

    Next, if you want to search in the query like "Give me content before 20th apr 2024" kind of query then make the date field as string type and searchable as true then map it to Content data.