QnA + Azure Cognitive Search enables instant answers over your search results. Now, you do not need to spend time looking through your pile of documents to find the exact answer to your query. There 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
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:
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 Maker. By 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.
- Your deployment process will take 4-5 minutes to complete. Once completed you will land up on the following page:
- Click on Deployment details to check all the resources that have been created.
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.
- If the initialization is successful, then following message will appear:
- Once the resources are initialized, you can access the portal through the “UI portal link” value in the Output tab.
Upload Documents:
- You can upload the documents one by one through the UI portal, by going to the Upload tab.
- You can also upload the documents in bulk, through a container.
- Go to your storage account.
- Click on Containers and select qna-container to upload the documents in bulk.
- 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.
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”.
- 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.
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:
- Azure Cognitive Search documentation
- Choose a pricing tier - Azure Cognitive Search | Microsoft Docs
- Pricing - Search | Microsoft Azure
- Storage account overview - Azure Storage | Microsoft Docs
- App Service Pricing | Microsoft Azure
- App Service plans - Azure App Service | Microsoft Docs
- QnA Maker documentation
- Add a new Question Answer pair in QnA Maker
- Test your Knowledge Base in QnA Maker
Updated Jul 18, 2023
Version 22.0nerajput
Microsoft
Joined March 22, 2020
AI - Azure AI services Blog
Follow this blog board to get notified when there's new activity