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

Virtual Recruiting Assisstant
 
 
  [ # 46 ]

You would need to code something like this:

<category>
  <
pattern>ASK NEXT QUESTION</pattern>
  <
template>
    <
condition name="questnum">
      <
li value="E1">(ask easy question 2)</li>
      <
li value="E2">(ask easy question 3)</li>
      ...
    </
condition>
  </
template>
</
category

With all due respect, are you wanting us to write the finished project for you? I fear we are going into consultancy rather than just pointers and examples.

 

 
  [ # 47 ]

Sir actually we are extremely new to the concept of chatbots….thats why I am asking each and everything…..
The answer to my query was really too easy..Silly me ...Apologies…. :(

And you two are really so quick..Thanks to you both helping us so thoroughly even on my childish questions..

 

 
  [ # 48 ]

No worries, Maleeha. That’s what we’re here for. I, for one, don’t mind answering the “silly” questions, so long as I have the time. smile

I might suggest, however that you run a Google search on AIML tutorials. There are a few good ones (and more than a few not-so-good ones) that can help you to understand how AIML works, and they may be of great benefit to you and your team.

 

 
  [ # 49 ]

I think I sounded a bit harsh in my earlier post and of course I am happy to help. I just think for someone who is new to chatbots, you are starting with a fairly difficult project and perhaps you should cover the basics first.

 

 
  [ # 50 ]

No sir, you didn’t sound harsh at all smile

Yup Sir, you are absolutely right that we should cover the basics first…we have downloaded some articles of the aiml project and also have searched online…but most of them are “not-so-good ones"as Dave Sir had said…. :(

The code here works absolutely fine…...Thanks to you both.
Prior to this I was unaware of the working of get and set tags…....

Now moving on the next task…thanks again…..I will sure bother you both again smile

 

 
  [ # 51 ]

Jawaria, Maleeha, Wardha: welcome to the Chatbots.org forums on my behalf. Interestingly enough, you all see to be coming from Pakistan where I’ve just returned from a workshop I facilitated in Karachi:
http://www.pas.org.pk/the-rebranded-future/

I might be able to connect you with a few people if necessary. Drop me an email if you’re interested.

Hopefully you’ll enjoy other threads as well.

Would it be possible to add a resembling picture to your profiles and a bit more bio? That would be helpful. Takes you just a minute:
http://www.chatbots.org/account/bio

At last, on topic, virtual recruitment is a great idea! Have you considered to make a video version, i.e. capturing video of the applicant? A video is far more appealing for recruiters than just text.

 

 
  [ # 52 ]

Thanks Erwin Sir, for welcoming us and appreciating the idea…

hello there….
For the question “What is the colour of Tomato??”
I have to make bot response “correct” for each of these patterns:
Tomato is Red.
Red is tomato.
Red.
I have tried it doing in this way:

<———fragment 1—->

<category>
<
pattern>_ RED</pattern>
<
template><srai><star/>red</srai></template>
</
category>

<
category>
<
pattern>RED _</pattern>
<
template><srai><star/>red</srai></template>
</
category>  

<
category>
  <
pattern>red</pattern>
  <
template>
<
think>
<
set name="checkanswer"><get name="questnum"/> <star/></set>
</
think>
    <
condition name="checkanswer">
      <
li value="E1 RED">Correct!</li>
      <
li>That is incorrectPlease try again.</li>
    </
condition>
  </
template>
</
category


But in vain...:( .
I have also tried nested <conditions>,nested <li>....
I have also tried this as in one of threads but its not working  either:( 

<---
fragment2---->

<
category>
<
pattern>RED</pattern>
<
template><think>
<
set name="checkanswer"><get name="questnum"/> <star/></set>
</
think>
    <
condition name="checkanswer">
      <
li value="E1 RED">Correct!</li>
      <
li>That is incorrectPlease try again.</li>
    </
condition></template>
</
category>

<
category>
<
pattern>RED *</pattern>
<
template><think>
<
set name="checkanswer"><get name="questnum"/> <star/></set>
</
think>
    <
condition name="checkanswer">
      <
li value="E1 RED">Correct!</li>
      <
li>That is incorrectPlease try again.</li>
    </
condition></template>
</
category>

<
category>
<
pattern>_ RED</pattern>
<
template><think>
<
set name="checkanswer"><get name="questnum"/> <star/></set>
</
think>
    <
condition name="checkanswer">
      <
li value="E1 RED">Correct!</li>
      <
li>That is incorrectPlease try again.</li>
    </
condition></template>
</
category>

<
category>
<
pattern>_ RED *</pattern>
<
template><think>
<
set name="checkanswer"><get name="questnum"/> <star/></set>
</
think>
    <
condition name="checkanswer">
      <
li value="E1 RED">Correct!</li>
      <
li>That is incorrectPlease try again.</li>
    </
condition></template>
</
category

Please correct my mistake….....

 

 

 
  [ # 53 ]

—-on the note——-
Sir Steve, i have downloaded some of your online projects and presentation…..really its quite interesting to learn from it…..but as a beginner I am poor at correcting errors….hope so that I will manage that with the time smile

 

 
  [ # 54 ]

Your categories will not work as you are trying to set variables equal to <star> when your pattern doesn’t contain a star, such as this one.

<category>
  <
pattern>red</pattern>
  <
template>
<
think>
<
set name=“checkanswer”><get name=“questnum”> <star></set>
</
think>
  <
condition name=“checkanswer”>
    <
li value=“E1 RED”>Correct!</li>
    <
li>That is incorrectPlease try again.</li>
  </
condition>
  </
template>
</
category

Assuming Program O can handle wildcards in <condition> tags, this is how to code checking the first two questions:
(What colour is a tomato)
(What shape is the Sun)

<category>
  <
pattern>*</pattern>
  <
template>
<
think>
<
set name="checkanswer"><get name="questnum"/> <star/></set>
</
think>
    <
condition name="checkanswer">
      <
li value="E1 RED">Correct!</li>
      <
li value="E1 * RED">Correct!</li>
      <
li value="E1 RED *">Correct!</li>
      <
li value="E1 * RED *">Correct!</li>
      <
li value="E2 ROUND">Correct!</li>
      <
li value="E2 * ROUND">Correct!</li>
      <
li value="E2 ROUND *">Correct!</li>
      <
li value="E2 * ROUND *">Correct!</li>
      <
li>That is incorrectPlease try again.</li>
    </
condition>
  </
template>
</
category
 

 
  [ # 55 ]

Maleeha, I’ve edited your post above to enclose your AIML code within [code] BBCode tags. Any time you need to post programming code of any kind, whether it’s AIML, or PHP or whatever, it’s always best to use [code] tags so that it will format properly on the page. Otherwise, things like <pattern> tags don’t show up. smile

In case you’re wondering why these show up for me, it’s because I know how to “cheat”, using HTML entity tags. cheese

Anyway, I haven’t got the time right now to even study the AIML that you’ve posted, much less comment on it, so I’ll… Oops? I see by my email alert that Steve just posted a response. Let’s see what he says, yes? smile

 

 
  [ # 56 ]

I have also tried doing, but not getting where I am setting up a mistake/mistakes..Please help me out…

<category>
<
pattern>EASYQUESTIONS</pattern>
<
template>
<
random>
<
li><set name="quest">What colour is a tomato?</set></li>
<
li><set name="quest">What shape is the Sun?</set></li>
</
random>
</
template>
</
category>

<
category>
  <
pattern>*</pattern>
  <
that>What colour is a tomato?</that>
  <
template>
   <
think><set name="que"><star/></set></think>
    <
condition name="que">
      <
li value="RED">Correct!</li>
     <
li>That is incorrectPlease try again.</li>
       </
condition>
  </
template>
</
category>

<
category>
  <
pattern>*</pattern>
  <
that>What shape is the Sun?</that>
  <
template>
   <
think><set name="que"><star/></set></think>
    <
condition name="que">
      <
li value="ROUND">Correct!</li>
     <
li>That is incorrectPlease try again.</li>
       </
condition>
  </
template>
</
category

I wanted to do this way because I have seen in one of the tutorials that I can write in this way:
<li value=”*RED”>

 

 
  [ # 57 ]

Apologies….First when I scroll down there was not your post…and after posting it is

Sure Dave Sir, I will take care of this whenever I will post again

Steve Sir,I have tried this one too

——RESPONSES—-

Human:Hello
Bot:Shall I start the interview?
Human: yes
Bot: What colour is a tomato??
Human: it is red
Bot: That is incorrect. Please try again.

 

 
  [ # 58 ]

Ok, a couple of things, here.

First, you cannot have any sort of punctuation within either the <PATTERN> or <THAT> tags. This will break nearly every AIML interpreter in existence today. Things like question marks, exclamation points, dashes, even periods and commas need to be kept out. The interpreter removes them from the user’s input anyway, often replacing them with spaces, so you end up failing to match as a result. The only “approved” characters within <PATTERN> and <THAT> tags are the letters A through Z (case doesn’t matter), spaces, number characters (0-9) and the two wildcard characters (* and _). Anything else found within those two patterns (with very few exceptions) will result in failed matches, and therefor, unexpected results.

Secondly, a bit about the wildcard characters. The AIML specification (the “rules”, so to speak) states that a wildcard character has to match one or more words when used within a pattern matching tag (e.g. <PATTERN> or <THAT>), so a pattern of “* YOU” will match “I love you”, “I hate you”, or even “Hey, YOU!”; but it will NOT match just the word “you”. this applies to the underscore wildcard, too. Some interpreters, but certainly not all, also allow for the use of the * wildcard within the VALUE attribute of certain tags, such as <CONDITION> or <LI> tags, but the same rules apply. Version 1.0 of Program O allows this usage, as a “pseudo wildcard”, and I think that version 2.0 does, as well (I didn’t write that part of the code, so I’m not 100% sure), but you may get funny results if you use a * wildcard right next to a word, as in the example you cited in your previous post (<li value=”*RED”>). I say keep that, for now, but check to see if it works as intended, but don’t get your hopes up.

I hope this helps you to understand why your above code is failing, and will help you to locate and correct the problems. smile

 

 
  [ # 59 ]

Thanks Dave Sir, for correcting me…I have done in this way now:

<category>
 <
pattern>[/color][color=blue]*[/color][color=red]</pattern>
 <
that>[/color][color=blue]What colour is a *[/color][color=red]</that>
 <
template>
  <
think><set name="que"><star/></set></think>
   <
condition name="que">
     <
li value="RED">[/color][color=blue]Correct![/color][color=red]</li>
     <
li value="* RED">[/color][color=blue]Correct![/color][color=red]</li>
    <
li>[/color][color=blue]That is incorrectPlease try again.[/color][color=red]</li>
      </
condition>
 </
template>
</
category

But the same problem persist,
When I give “red” ,Bot’s response is “Correct”
But when I give “It is red”,Bot’s response is “That is incorrect. Please try again.”

 

 
  [ # 60 ]

That indicates to me that you’re not going to be able to use the * wildcard within the VALUE attributes. that being the case, an entirely different approach will be needed. Let me think on this, and I’ll see what I can come up with.

 

‹ First  < 2 3 4 5 6 > 
4 of 6
 
  login or register to react