I want to store some data in the database. Then using those data I will answer the queries for the user using Dialog flow. Any idea on implementing these
-
Yes go and look into this answer, https://stackoverflow.com/questions/49192054/php-script-receives-get-instead-of-post-request/49210715#49210715 – Nikhil Savaliya Mar 14 '18 at 11:52
3 Answers
You will need to use a webhook to do fulfillment. In your webhook, you can make the database queries you want.

- 49,922
- 7
- 53
- 105
-
-
your question was **very** broad, so the only answer I could give was a broad one as well. Any example would also be broad. At this point, you should try to implement a basic Dialogflow fulfillment webhook, work from there, and ask questions if you have specific problems you're encountering. There are many samples in github.com/dialogflow about building fulfillment webhooks. – Prisoner Mar 09 '18 at 17:34
-
You may want to use an NLIDB (natural language interface to database). An NLIDB maps natural language questions over the database schema into SQL, solves such SQL queries and returns answers. Additional misconception and ambiguity resolution steps may be included.
NLIDBs are in contrast to dialog management systems (such as DialogFlow) which use interactive dialog to fill in slots for specific question types, and then execute these questions in specialized code. This specialized code may very well interact with a database, but it is relative to a specific question type so it is fairly straight forward to implement.
The advantage of NLIDBs however is that if the mapping tool is robust, a practically infinite number of questions may be answered over a complex database schema. The disadvantage is that the mapping tools are often sometimes less than robust. But this is an area under active R&D.
There are several companies currently offering NLIDB systems. See for example: https://friendlydata.io/, http://c-phrase.com and http://kueri.me/.

- 11
- 2
AWS might be of help. I have some answers where I detail how to use API gateway for example, as a pseudo back-end so you can run this all from a front end ( or static ) page. DOing this, my hack would be to just write a JSON file or create a variable thats imported (key/vales) which would include your database info. I created a react page once where I used a long list of database data (SQL) which i just put in a json file and imported. worked great.
Of course if you have experience building a back end, you can figure all this out. if not, i would recommend looking into wix. They have a great platform, which you can use javascript in and it also has a node back end with access to node modules. they also have fully functional built in databases. good luck!

- 1,835
- 6
- 21
- 40