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..

Storing relative facts
 
 

I have read through all of the documentation extensively and now have a nice chat system setup for my home automation system which I am now expanding.

I cant seem to find a nice way to store the following information.

Example: Bob has a cat named Fluffy.

Normally the fact would just be Cat, Name and Fluffy. But adding in who owns the cat is where I am having problems.

Should I be sorting 2 seperate facts of Bob has a cat, and cat named fluffy. If so how do I link those 2 facts together? Or should I be storing this some how in a fact table?

Hope you can help. Thanks.

 

 
  [ # 1 ]

There are two mechanisms for storing “complex data”.
1. Facts can have facts as fields.  Eg.
    createfact( (Fluffy name cat)  owner Robert)

2. you can create JSON structures with ^jsonparse and query them or use ^jsonpath to access data.

 

 
  [ # 2 ]

Thanks Bruce. I will have a play around with both methods.

 

 
  login or register to react