AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

AIML & Graph Databases
 
 

What is (or is not) the relation between AIML and modern graph databases?

We do know that Fritz Kunze, founder of Pandorabots, was co-founder of Franz Inc., originator of the popular graph database, AllegroGraph.

- The Graphmaster algorithm is used by many AIML interpreters.
- Graphmaster forms the core of the Alicebot engine.
- ALICE loads all AIML into a graph metaphor known as a Graphmaster.
- AIML categories are stored in a semantic tree named Graphmaster.
- AIML software stores the patterns in a tree structure managed by an object called the Graphmaster, implementing a pattern storage and matching algorithm.
- Graphmaster is a set of files and directories, which has a set of nodes called Nodemappers.
- The Graphmaster has a collection of nodes called Nodemapper, pictorially a hierarchy of Nodes, each being either a root, a leaf, or both.
- A set of nodes called Nodemappers - that map branches from each node - and branches represents the first words of all patterns and for wildcards.
- Graphmaster implements the search algorithm that allows the bot to match the user input and construct an appropriate response.
- Graphmaster matching is a special case of backtracking, depth-first search; in most cases matching is handled by a linear traversal of the graph from the root to a terminal node.

 

 
  [ # 1 ]

Graphmaster is/can be an algorithmic implementation on top of a graph database. When you say:

Graphmaster is a set of files and directories, which has a set of nodes called Nodemappers.

That, to me, is the responsibility of the graph database, not the AIML algorithm. The latter defines the queries on top of the db system.
For me, the AIML algorithm compares to a graph database like an accounting algorithm to an RDBMS system.

 

 
  [ # 2 ]

Apples and oranges.

AIML is a flat tree data structure.  Graph databases are, well, graph structure. ( nodes, edges, properties ).

It’s possible to appear to mix and match - XML can represent graph data, graph data sets can be translated to relational, tree, whatever.  So from certain layers in the stack it might seem interchangeable but from others it’s orthogonal.

Ie, if you are talking fruit, then ya, same thing.

From a broader point of view a more interesting question might be “what data structure is a conversation?” 

It’s fruit all the way down…..  wink

 

 
  [ # 3 ]

1) Are you saying that AIML tree structure is 2D, whereas tree structure within a graph database is 3D?

2) Is it correct then that AIML Graphmaster is in fact a “graph metaphor” or algorithm, rather than a data structure per se?

3) Could AIML be used with a graph database?

4) Has there been any AIML interpreter built on a graph database?

5) Would it even make any sense to use AIML with a graph database, why or why not?

6) What are the fundamental differences and/or similarities between a relational database, such as MySQL, and a graph database?

 

 
  [ # 4 ]
Marcus Endicott - Aug 23, 2014:

1) Are you saying that AIML tree structure is 2D, whereas tree structure within a graph database is 3D?

2) Is it correct then that AIML Graphmaster is in fact a “graph metaphor” or algorithm, rather than a data structure per se?

3) Could AIML be used with a graph database?

4) Has there been any AIML interpreter built on a graph database?

5) Would it even make any sense to use AIML with a graph database, why or why not?

6) What are the fundamental differences and/or similarities between a relational database, such as MySQL, and a graph database?

I’m on vacation and only brought my ipad but I’ll try to provide a skeleton stab at an answer.

1)  yes, sort of, see below.
2) I believe so, but haven’t done more than glance at it, again, see below.
3) yes, see below.
4) dunno.
5) sure, but there are many values of “make sense”. wink
6) wik/google answers this better than me.

It’s important to realize there are layers and abstractions here and it’s easy to start muddling the waters. Roughly for the layman:

There is the data storage layer commonly referred to as ‘the database’’ (MySQL, oracle,neo4j, ect)
—This usually has a data model it presents to the client (rdbm,rdf,network,ect)
— And query languages it supports (nosql,sql,sparcql,prolog,ect)
— And internals to implement the above, ie how it internally stores and manipulates data.

There is the query language as mentioned.

There are data processing algorithms including translation (map reduce, XML -> json ect ).

There is data format, which is how data transits systems. Common data formats would be XML, json, cvs, various binary formats, ect.  Note: databases also use data formats in their internals.

There is data representation or how the data is exposed to end consumers (humans,aliens,other computers, ect)

The key here is that most people use all these terms interchangeably so it’s confusing. Furthermore any system the interacts with data likely composes a heterogeneous composition of all of the above. You may have a classic RDBMS providing an implementation of a graph data model through a client library that provides a nosql interface. A web service could use that data store to provide XML data to a web app that displays it in tabular form.  And that is a simple use case. wink. Like I said, it’s fruit all the way down.  A simple XML configuration file is technically a database if you squint at it right.

I believe allegro is mostly focused on providing RDF which is a graph database model more focused on triplestore - data entities with the form ‘subject : predicate : object’ which makes it perfect for storing stuff like ‘cats are animals’ or ‘Bob age 35’.  Can you see where that fits best into a chat system?

Bottom line: Any data model can be expressed in any data format or accessed via any query language - the question of which to use at any given moment is really one of efficiency, ease and elegance.  A particular chat system is likely to use a broad range of data models, formats and query languages to accomplish it’s job.

(Disclaimer:simplified)

PS:  AIML would technically fall under a data format specification for a DSL (domain specific language). It is processed per the spec similarly to how various web browsers process and display HTML. 

PPS: the ‘fruit all the way down’ is a reference to http://en.m.wikipedia.org/wiki/Turtles_all_the_way_down

 

 
  login or register to react