Azure Ai search service is returning results in the wrong order

Rachel Coughanour 20 Reputation points
2024-10-08T14:25:08.24+00:00

We have an Azure AI search service set up as a knowledge base for our internal employees. I have it connected to a PowerApp where they can search for a question. I was notified that the search service was returning some wrong results.

I determined it wasn't the app, but the search service itself. I went in and ran a query myself and we work in healthcare so the word I searched was "HSA". It returned a result with HSA at the beginning but then returned two with only FSA next. That would be fine if it were only two results.

You scroll down and all the other HSA results are listed. Anywhere where there's a - is redacted company information but see below for examples. What is the hierarchy to where fsa is coming before hsa?

      "Title": "Common Acronyms / Abbreviations",

      "Body": "<p>HSA - Health Savings Account</p><p>FSA - Flexible Spending Account</p><p>GPFSA - General Purpose Flexible Spending Account&nbsp;</p><p>LPFSA - Limited Purpose Flexible Spending Account</p><p>DCAP, DCA - Dependent Care Account Plan&nbsp;</p><p>IIAS - Inventory Information Approval System</p>",

      "Category": "General",

      "Date": "2024-10-02T00:00:00Z",

      "CreatedBy": "-",

      "subCategory": null,

      "KB": "-",

      "guid": "-",

      "Archive": "No",

      "extractedText": ""

    },

    {

      "Title": "Flexible Spending Account (FSA)",

      "Body": "<p>A medical FSA covers general-purpose health expenses and can be used for qualified expenses such as prescription drugs, insurance copayments and deductibles, and medical devices.</p>",

      "Category": "General",

      "Date": "2024-08-13T00:00:00Z",

      "CreatedBy": "-",

      "subCategory": null,

      "KB": "-",

      "guid": "-",

      "Archive": "No",

      "extractedText": ""

    },

    {

      "Title": "- Termination Information",

      "Body": "<p>EE's have 90 days after termination to submit a FSA claim (with service or purchase date on or before termination date)</p><p><strong>Medical, Dental, and Vision Coverage will end on the last day of the month of the termination.</strong></p><p><strong>Flexible Spending Accounts, Dependent Care Accounts, and Transit and Parking Accounts:</strong></p><ul><li>Will end on your last day of employment</li><li>We have provided supplemental information via your offboarding email that should be referenced related- if you have underspent the FSA</li></ul>",

      "Category": "-",

      "Date": "2024-10-03T00:00:00Z",

      "CreatedBy": "-",

      "subCategory": "-",

      "KB": "-",

      "guid": "-",

      "Archive": "No",

      "extractedText": ""

    },

    {

      "Title": "HSA Transfers Turnaround Time",

      "Body": "<p><strong>How long will it take to transfer the HSA? -&nbsp;</strong></p><p>It may take 2–5 weeks or, in some cases, more, depending on how quickly your current HSA provider responds. If any of your HSA money is invested, your current HSA may be held in 2 separate accounts which are both eligible to be transferred.</p>",

      "Category": "General",

      "Date": "2024-08-05T00:00:00Z",

      "CreatedBy": "-,

      "subCategory": null,

      "KB": "-",

      "guid": "-",

      "Archive": "No",

      "extractedText": null

    },

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,066 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 12,011 Reputation points
    2024-10-08T19:21:21.0533333+00:00

    Hello Rachel Coughanour,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your Azure AI search service is returning results in the wrong order.

    According to your explanations, the hierarchy issue where FSA results appear before HSA results in your Azure AI search service could be due to several reasons.

    You can address this by:

    • Adjusting the relevance scoring to prioritize HSA over FSA.
    • Updating metadata and tags to ensure HSA documents are appropriately tagged.
    • Reviewing and adjusting the search index configuration to ensure HSA fields are properly weighted.

    Read more from this link for detail steps: https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    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.