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

Crawling topics to match pattern
 
 

Hi,

My understanding was that with the default setup, the pattern matching happens in this order:

1. Current topic
2. Look for topic with relevant keywords
3. Crawl all topics
4. Fire a gambit in the current topic

however, I’m starting to think step 3 never happens as I often see inputs with matching patterns in topics without relevant keywords not fired and local topic gambits fired instead.

So is my understanding of the process wrong or is there something not working as it should?

Thanks,

Jonathan

 

 
  [ # 1 ]

I do not think #3 happens under normal operating conditions.

At least I hope it doesn’t. grin

 

 
  [ # 2 ]

Because it would be too expensive?

Can we make it do it? (as our bots are much smaller than general conversation bots)

 

 
  [ # 3 ]

The answer is….

The system never crawls all topics.  It crawls topics that have relevant keywords and it crawls topics that the control explicit says to crawl anyway.  In the case of Harry, that topic is ~keywordless (a topic with no keywords) which it tries after all topics that have relevant keywords has been tried. And if that fails, it may also explicitly call the quibble topics.

If you want topics that lack keywords to be tried and you dont want to modify the control structure script,
you can just add things like this into the keywordless topic:

u: () respond(~mytopic1)
u: () respond (~mytopic2)
u: () respond (~mytopic3)

This can be also done as something like this:

concept: ~mytopics (~mytopic1 ~mytopic2 ~mytopic3)
and then in keywords put:
u: () @15 = query(direct_vo ? member ‘~mytopics)
    loop()
    {
$$tmptopic = first(@15subject) -- or last(@15subject)
respond($$tmptopic)
if (%response != 0) { end(rule)}
    }

 

 
  [ # 4 ]

Of course the above solution requires you know the names of your topics. If you just wanted the system to find them and do them, the code is more “interesting”, using ^walkdictionary to check every word in the dictionary, and then checking to see if the word is a name of a topic (and presumably is not a topic defined as SYSTEM since those are possibly already being used (or you need a list of system topics to IGNORE).

Or you just put all your rules in the one keywordless topic. and dont have other topics.

 

 
  [ # 5 ]

Thank you very much.

 

 
  login or register to react
‹‹ ChatScript to Javascript      Seeking NL work ››