0

I have made a chatbot on Dialogflow. There are multiple options for a user to filter out their query, but at last they have a option of 'other_question' which is selected if and only if all the other options are not able to categorise the users query. I have a bunch of pdf files, I want that whenever a user asks a query and 'other_question' intent which is also the option for the user to choose is selected, the chatbot should look into the pdf file and return any response it finds.

This is a page from the pdf file. So, if a user asks a question: "Tell me about faculty of commerce" then it should return this first paragraph visible, if the user asks: "Programmes offered by the faculty of commerce in DEI(DEI-name of the university)" then it should return the relevant response.

I am clueless on how to do it. One of the ways I thought was indexing the pdf file using Apache Solr, then uploading that index in the Big-Query(on Google Cloud Platform) from where the chatbot should be able to read the data and display it to the user as the respoinse.

Please help me as I have no idea on how to do this. I thank everyone in advance and wish you all stay safe. Every help is much appreciated.

A page from the pdf file

Mikhail Berlyant
  • 165,386
  • 8
  • 154
  • 230
Aakash
  • 47
  • 1
  • 1
  • 10
  • Hello Aakash, I have some questions about your requirement: - Are we talking about a single PDF or several? - Could you parse the file or files just once? or for some reason you need to read the file once for every call or maybe update it periodically? - Would the users be providing the exact subtitles in their utterances or variations are expected? – ch_mike May 13 '20 at 13:32

1 Answers1

0

what you are trying to do is Machine Reading Comprehension. It is a very interesting subject. I have to say, we use it but only on small document. It works pretty well. But if your document is 15 pages, forget it

Here is teh Microsoft version https://www.microsoft.com/en-us/ai/ai-lab-machine-reading

And here the AllenNLP https://demo.allennlp.org/reading-comprehension

If you are in large document, i suggest you look at something like cognitive search

Good luck

Benoit Alvarez
  • 919
  • 6
  • 3