Is it possible to develop chatbot using Rasa to convert natural language into sql query adn reverie data from Oracle/ Mysql database.
Hi,
you can do this in custom actions! Somewhat similar (though not for SQL) is the knowledge base integration which is described in our blog posts: Integrating Rasa with knowledge bases
Hi @siddharthchauhan Let me know if you got any solution or way to do this .i am also looking for same. Thank you
I am not 100% if this is your solution but the closest i have come across a very good query engine to SQL/NoSQL is using ORM mappers in python or GraphQL, GraphQL endpoints are relatively easy to map using custom actions ,you can expose your data via a GraphQL endpoint and use rasa custom actions to map slot to the objects in your graphql query and thus retrieve the information you need.
Another slightly more complicated option is semantic naming convention with a subject->predicate->object , your RDFs, Turtles etc. very similar to the blog plot described above
Nevertheless i personally dont feel strongly about exposing your SQL query engine to the natural language directly because it risks Sql injection, you would need a good wrapper on top of it
hi @siddharthchauhan , i am also working on this, I am using typedb as my knowledge graph. I did a rule based approach, i can convert some types of input phrases into query, this approach fails when there are more than one attributes mentioned in the input phrase (or else add more and more rules, but seems to be a tedious work). I am looking forward to try some machine learning approach. I will be more happy to discuss about it over dicord,slack email or other platforms
email:daredeviles888@gmail.com discord: athulvingt #1506