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

Editing and saving facts
 
 

So far the way I’ve seen to deal with facts is to query them into a factset if you want to read facts and use create fact if you want to create new one. However, I am not sure how to edit the fields of already existing facts.

I know its is possible to use write to save factsets across inputs but how to save even after CS has been closed? Maybe create macros to read write and edit tables in a text file if that is possible?

 

 
  [ # 1 ]

If one really wanted to edit fields of existing fact, one would use ^revisefact

By default the most recent 100 (configurable) of the user’s created facts are saved across inputs, and as you point out, you can save factsets across inputs. But across inputs means across all of time even after CS is closed, because user data is kept in files between volleys.

One CAN (though you probably have no reason to), read and write files of facts from script.

 

 
  [ # 2 ]

Just to confirm since revisefact requires factid:

to get factid, I can only assign values to variables by first last pick and nth on factsets right? and what about the fieldtype? Can I only have a factid to @1fact or to @1subject specifically also?

And saving factset across input: If I write @10 does that mean I can no longer use @10 for other queries? OR can that be avoided by renaming the factset?

 

 
  [ # 3 ]

$$tmp = createfact(I love turnips)

$$tmp1 = createfact($$tmp love x FACTSUBJECT)

$$tmp2 = ^field($$tmp1 subject)

@0 = ^query(direct_o ? ? turnips)
$$tmp = @0subject
$$tmp = ^pick(@0fact)

If you have marked @10 as save, then whatever you keep it in will be saved across volleys. During a volley you could copy those facts elsewhere, but if the facts in @10 are transient and you move them somewhere else and clear @10, they will die at end of volley

 

 
  login or register to react
‹‹ Storing relative facts      Using ^match ››