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

Viswavaageesh Chandramouli 20 Reputation points
2024-09-03T11:28:10.55+00:00

Hi,

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

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.
User's image

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

But the answers 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?

Thanks a lot.

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,795 questions
{count} votes

Accepted answer
  1. navba-MSFT 23,975 Reputation points Microsoft Employee
    2024-09-18T02:48:58.43+00:00

    @Viswavaageesh Chandramouli I'm glad to see you were able to resolve your issue. Thanks for posting your solution so that others experiencing the same thing can easily reference this. Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.

    .

    Issue:

    You're using Azure AI Studio with Azure SQL DB. You would like to retrieve the numerical fields, but getting the response The retrieved documents do not provide specific information on the maximum units. You need help with numerical retrieval of data.

    .

    Resolution:

    1. Make the rewriteIntent node convert user's query to Odata string
    2. Use a python code to send an REST API request for the Odata query
    3. Concat numerical fields in the output to the CombinedText field
    4. Use it to in the generateReply LLM node to retrieve the answer.

    **

    Please do not forget to "Accept the answer” and “up-vote” so that this beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.