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

exact rules for how topics get added and removed from pending
 
 

The pending topics mechanism is very important concept in CS. I have reviewed the documentation and there really isn’t a lot of information about how the pending stack is manipulated. I have had times when I had to force a topic into pending and more times that I have been unable to get a topic out of pending.

Bruce would you tell us:
1) All of the circumstances that cause a topic to be added to the top of the pending stack.
2) All of the circumstances that cause a topic to be removed from any place in the pending stack
3) Any circumstances where ^poptopic() will not remove a topic from the pending stack.

By circumstances, I mean not only system functions like ^pending() ^end() and ^poptopic() but also things like ^respond() ^gambit() ^reuse()  and rejoinders from the control script. Finally, are there special concerns if these things are called from a topic that is already in the pending stack?

I know this is a bit generalized. But I may not be the only person who is confused by this. I feel that I am writing a lot of code to organize my active topics that could be eliminated if I had a correct and complete understanding of the pending topics stack.

Thanks,

Stephen G.

 

 
  [ # 1 ]

Have you uncovered any specifics since this post?
Anything that was not as expected?

I am rewriting my control script and including an executive function script that will be used to manage the current and pending topic, and the priority of other topics based on context,  history and goals.

Plus, i am trying to figure out a good way to identify related topics, based on the conversation history, for pending topics, outside of the topics themselves.

 

 
  [ # 2 ]

I am afraid that I haven’t uncovered the default ways that a topic gets taken out of the pending stack. I am compensating by explicitly using ^poptopic (). YI do know from experience that you can’t have ~topicA:DONE call ^poptopic(~) if that rule has produced any output. I now have the ^poptopic(~topicA) calls in a differenttopic and do the deed after ~topicA has committed all of its output.

 

 
  [ # 3 ]

A topic is added to the pending topics list when the system stops in it to issue an output AND it is not a NOSTAY/SYSTEM topic.

^Poptopic will remove a topic from the list. So will ^FAIL(TOPIC ~xx)

There is an internal max of 50 pending topics.

 

 
  [ # 4 ]

CS does not automatically use this pending list to control your flow. It merely tracks it for you to use and shuffles the order if you revised a previously pending topic.  Some bots may want to try to return to the most recent pending topic when the current topic exhausts. That is all in how you write your control script.

 

 
  login or register to react