Forum Discussion

viswvaa's avatar
viswvaa
Copper Contributor
Sep 03, 2024

Azure AI Studio on SQL data base - Problem retrieving Numerical fields

Hi,

I've imported data from Azure SQL database and created an embedding on a combined text column CombinedText (concatenation of all textual columns)

 

 

 

I used the AI skillset below to create embeddings on the CombinedText column

#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill

I've tested the Index with REST API queries to sort numerical fields like 'MaxUnits' and retrieve textual fields like 'Location'. The results are satisfactory and matched the SQL results.

 

 

GET {{baseUrl}}/indexes/{{indexName}}/docs?api-version=2024-07-01&search=*&$filter=TimePeriod eq '2032'&$orderby=MaxUnits desc&$top=5&$select=Location,MaxUnits
Content-Type: application/json
api-key: {{apiKey}}

 



I used vector search on the index in Azure AI studio, with a custom field mapping which includes all textual fields in the Index. 

 

 

 

But the answers using GPT 4o do not retrieve the numerical fields with a response 'The retrieved documents do not provide specific information on the maximum units'.

Alternatively, I tried including the numerical columns in the concatenation to get the CombinedText column and used it to create embeddings. While numercial data seems to be retrieved, the sorting is done based on ASCII and the wrong MaxUnits are used in the response. This is understandable as the Content data uses 'CombinedText' which is a string.

Can you help out with numerical retrieval of data including sorting in the chatbot?

Thanks a lot.

No RepliesBe the first to reply

Resources