QnA with Azure Cognitive Search
Published Feb 02 2021 11:59 PM 5,251 Views
Microsoft

 

QnA + Azure Cognitive Search enables instant answers over your search resultsNow, you do not need to spend time looking through your pile of documents to find the exact answer to your queryThere will be an instant answer coming up for the user query from the most relevant documents present in your system.  A solution where you can ingest your pile of documents and query over them to get the answer as well as related relevant documents to get more information. 

 

This solution accelerator enables automatic bulk ingestion of documents for QnA processing via a Cognitive Search custom skill.  The sample UI showcases the combined experience of instant answers to your questions as well as the list of relevant documents.  Finally, the solution is easily deployed using a simple Deploy button, which sets up all necessary services in your Azure subscription

 

B1.PNG

 

Benefits: 

  • Converged search experience powering instant answer and relevant documents. 
  • Search using natural language queries. 
  • One-click deployment. 
  • Saves end user time during search.  
  • Flexibility to enhance and edit instant answers. 

 

The solution combines the power of both Azure Cognitive Search and QnA Maker to extract question-answer pairs from your documents before storing them in the index. Once you deploy the solution, you get a single endpoint where for each end user query both the services will be called in parallel and you will get a combined result with an instant answer powered by QnA Maker along with the relevant documents coming from Azure Cognitive Search.  Checkout the Cognitive Search Question Answering Solution Accelerator (github.com) 

 

 

Architecture 

A1.PNG

 

This solution accelerator contains the following artifacts: 

  • ARM template to set up the solution. 
  • Custom skill in Azure Cognitive Search, which ingests the data into QnA Maker. 
  • User interface to view the results. 

 

Live Demo Link:  

You can view a live demo of this repo at the following link: https://aka.ms/qnaWithAzureSearchDemo 

 

File Type Supported:  

Currently instant answers will only be available for the file types supported by QnA MakerBy default, the logic in the Azure Cognitive Search service indexer also ingests only the following file types: .pdf,.docx,.doc,.xlsx,.xls,.html,.rtf,.txt,.tsv. You can change this by modifying the indexedFileNameExtensions property in the Indexer.json. 

 

Tutorial: 

NOTE: You need to have a GitHub account and Azure subscription to try out this solution.  

 

Resource creation and deployment: 

  • Click here to Deploy to Azure. 
  • This will take you to the create blade where all the information will be pre-filled, as shown below. Click Review+ Create button to proceed. T1.PNG

 

  • Your deployment process will take 4-5 minutes to complete. Once completed you will land up on the following page: T2.PNG

 

  • Click on Deployment details to check all the resources that have been created.  T8.PNG

 

Initialization: 

  • To initialize the solution, click on the Outputs” button on the left. Copy the http trigger to initialize accelerator" value. Open a new browser tab and paste this URL into the browser. This will run for about a minute, and then you'll see a message indicating success or failure.T4.PNG 
  • If the initialization is successful, then following message will appear: T5.PNG
  • Once the resources are initialized, you can access the portal through the UI portal link value in the Output tab.  T6.PNG

Upload Documents:  

  • You can upload the documents one by one through the UI portal, by going to the Upload tab. 

        T7.PNG

  • You can also upload the documents in bulk, through a container.  
    • Go to your storage account.  T3.PNG
    • Click on Containers and select qna-container to upload the documents in bulk.  T9.PNGT10.PNG
    • Use the Upload tab and select the multiple files you want to ingest. It will take some time to index the documents and to extract the Question Answer pairs out of the documents. T11.PNG 

 

Question Answer Enhancement:  

  • Once the ingestion is complete, you can view all the Question Answer pairs extracted from the documents by clicking on Knowledge Base. T12.PNG
  • Play with your knowledge base!,  You can also test for different queries using the Test Pane. Once you are satisfied with the experience, click on Save and Train and then Publish the changes to get these changes reflected on your main portal. T13.PNG

This solution has been specifically created for our customers to address the long-term standing ask to retrieve an instant answer from the relevant document. This solution currently covers the basic functionality, and we will keep adding more features based on user interaction and customer’s feedback.  Please feel free to drop us a mail at search-qna-solution@microsoft.com to provide your valuable feedback. 

 

 

Useful Links:

3 Comments
Co-Authors
Version history
Last update:
‎Feb 02 2021 11:59 PM
Updated by: