Get a list of the last 10 FAQ added to QnAMaker

Thomas 21 Reputation points
2021-07-22T09:05:30.063+00:00

We are freqently adding FAQs to our database and allow users to search the FAQ through an application.
It would be handy to dynamically show a list of the last 10 FAQ added. Is this something that can be queried through the API? How?

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

Accepted answer
  1. romungi-MSFT 45,961 Reputation points Microsoft Employee
    2021-07-22T10:34:37.803+00:00

    @Thomas If you are looking to display the last 10 FAQs displayed when a user queries through the GenerateAnswer API then you can achieve this by using the metadata tags to your Q&A pairs.

    For example if you add a Q&A pair with the following tags:

    117084-image.png

    You could query the metadata tags with strictFilters in the generateAnswer API.

    curl -X POST https://replace-with-your-resource-name.azurewebsites.net/qnamaker/knowledgebases/replace-with-your-knowledge-base-id/generateAnswer -H "Authorization: EndpointKey replace-with-your-endpoint-key" -H "Content-type: application/json" -d "{'top':30, 'question':'size','strictFilters': [{'name':'service','value':'qna_maker'}]}"  
    

    You could possibly add a tag called added:latest to your last 10 Q&A FAQs and then use these in the query to fetch results only from the latest Q&A answers.


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.