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

Not answer for the question
 
 

Hi everyone!
Is there a way to stop some replies in some cases? For example, I have a pattern with two questions:

<category>
<
pattern>_ WHAT IS YOUR NAME</pattern>
<
template><sr/> <srai>WHAT IS YOUR NAME</srai></template>
</
category

but I want the bot replies only “full pattern” (without Wildcards) and not replies if it matches *</pattern>.
Step by step:

1. Ask: “Firstly” - Work Pattern:

<category>
  <
pattern>*</pattern>
  <
template>What do you want?</template>
 </
category

Bot Answer - “What do you want?”.

2. Ask: “How old are you and What is your name?” - Work Pattern:

<category>
  <
pattern_ WHAT IS YOUR NAME</pattern>
  <
template><sr/> <srai>WHAT IS YOUR NAME</srai></template>
 </
category>
+
 <
category>
  <
pattern>How old are you *</pattern>
  <
template>I am 50 years old.</template>
 </
category>
+
 <
category>
  <
pattern>WHAT IS YOUR NAME</pattern>
  <
template>My name is Alex.</template>
 </
category

Bot Answer - “I am 50 years old.” + “My name is Alex.”.

3. Ask: “Firstly, What is your name?” - Work Pattern:

<category>
  <
pattern>_ WHAT IS YOUR NAME</pattern>
  <
template><sr/> <srai>WHAT IS YOUR NAME</srai></template>
 </
category>
+
 <
category>
  <
pattern>*</pattern>
  <
template>What do you want?</template>
 </
category>
+
 <
category>
  <
pattern>WHAT IS YOUR NAME</pattern>
  <
template>My name is Alex.</template>
 </
category

Bot Answer - “What do you want?” + “My name is Alex.”.
Correct Answer MUST BE - “My name is Alex.” - without “What do you want?”.

Is it possible to set some conditions under which there will be no answer?

Thank for your reply!

 

 
  login or register to react