vaticle / typeql

TypeQL: the polymorphic query language of TypeDB
https://typedb.com
Mozilla Public License 2.0
213 stars 45 forks source link

Natural language to TypeQL with machine learning? #75

Open edanweis opened 4 years ago

edanweis commented 4 years ago

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!

edanweis commented 4 years ago

A PyData 2019 presentation by Suyog S Swami has described one such approach.

neomatrix369 commented 4 years ago

@edanweis Have a look at the enhancement issue #70 - similar ideas I think

JRWest2000 commented 3 years ago

Tread carefully

there are several major pitfalls hidden in machine learning when applied to this kind of propleam.

  1. Current ML is just statistical guessing and will make a guess even when the input does not have any logical meaning
  2. 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.
  3. Minor differences, even the placement of a comma, are likely make for generated output queries that exhibit wildly different befavaries and thus results.
  4. 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.
metacritical commented 3 years ago

Depends on the use case I suppose, if one were to write a chatbot engine it might be useful.