typeql
typeql copied to clipboard
Natural language to TypeQL with machine learning?
Has the GRAKN team ever thought to implement natural language to graql via machine learning models and datasets similar to https://github.com/salesforce/WikiSQL and other efforts using SQL and Neo4j's Cypher?
Given the effort to make GRAKN easy to use, NLP batteries included would be a very compelling feature I think!
A PyData 2019 presentation by Suyog S Swami has described one such approach.
@edanweis Have a look at the enhancement issue #70 - similar ideas I think
Tread carefully
there are several major pitfalls hidden in machine learning when applied to this kind of propleam.
- Current ML is just statistical guessing and will make a guess even when the input does not have any logical meaning
- The returned guess will change over time if you use a ML system that evolves with time and changes to the base Graql language. So every change to Graql or update to the training set will be a breaking change.
- Minor differences, even the placement of a comma, are likely make for generated output queries that exhibit wildly different befavaries and thus results.
- Since the query generated is the result of a statistical guess and not a logical analyst of the english language input debugging the english input becomes impossible because changes to the logic of the input will not map to changes in the logic of the output query only to some unknowable statistical relationship between the actual input and the training input/output pairs.
Depends on the use case I suppose, if one were to write a chatbot engine it might be useful.