sample-app-aoai-chatGPT icon indicating copy to clipboard operation
sample-app-aoai-chatGPT copied to clipboard

make it possible to open the citation link refer to the metadata of Azure BLOB storage file

Open k-suminaga opened this issue 2 years ago • 5 comments

Hello Teams. I would like to express my utmost respect for the significant contributions made by the participants of this repository.

I've made modifications to our fork repository related to this issue. I'd appreciate it if you could consider merging these changes into the main repository.

  1. set URL for the file as a metadata in Azure BLOB storage.

image

  1. utilize URL info from metadata for citation link.

image

  1. open url with new tab when click link

image

k-suminaga avatar Dec 01 '23 04:12 k-suminaga

Hey! I am trying to reproduce this - how did you reference the new 'url' metadata in your Azure AI Studio indexer?

lauramartinazure avatar Dec 04 '23 15:12 lauramartinazure

@lauramartinazure

how did you reference the new 'url' metadata in your Azure AI Studio indexer?

We added fieldMappings setting.

{
  "@odata.context": "https://a1b2-cs-test-01.search.windows.net/$metadata#indexers/$entity",
  "@odata.etag": "\"0x8DBF202DF18629A\"",
  "name": "c2h1-indexer",
  "description": "",
  "dataSourceName": "c2h1",
  "skillsetName": null,
  "targetIndexName": "c2h1-index",
  "disabled": null,
  "schedule": null,
  "parameters": {
    "batchSize": null,
    "maxFailedItems": 0,
    "maxFailedItemsPerBatch": 0,
    "base64EncodeKeys": null,
    "configuration": {
      "dataToExtract": "contentAndMetadata",
      "parsingMode": "default"
    }
  },
  "fieldMappings": [
    {
      "sourceFieldName": "metadata_storage_path",
      "targetFieldName": "metadata_storage_path",
      "mappingFunction": {
        "name": "base64Encode",
        "parameters": null
      }
    },
+ {
+   "sourceFieldName": "url",
+   "targetFieldName": "url",
+   "mappingFunction": null
+ }
  ],
  "outputFieldMappings": [],
  "cache": null,
  "encryptionKey": null
}

We also added a url field to the corresponding index.

image

Then we searched for related text and the URL was returned.

image

Thank you.

k-suminaga2 avatar Dec 05 '23 01:12 k-suminaga2

@k-suminaga2 did you create your index and indexer directly in Azure Search Service or was this automatically configured through the Azure AI Studio GUI?

Thanks!

lauramartinazure avatar Dec 05 '23 11:12 lauramartinazure

@lauramartinazure I created index and indexer directly in Azure Search Service.

Thank you.

k-suminaga2 avatar Dec 06 '23 08:12 k-suminaga2

Ist this post related to the "AZURE_SEARCH_URL_COLUMN" ENV Variable?

Why is it "not currently in use?" Do you plan on making this ENV Variable usable?

image

Screenshot taken from here: https://github.com/microsoft/sample-app-aoai-chatGPT/blob/main/README.md

Matleo avatar Apr 24 '24 11:04 Matleo