AI Zone Admin Forum Add your forum
Virtual Recruiting Assisstant
 
 
  [ # 31 ]

You can’t put punctuation in Pandorabots tags too. I agree entirely Dave but the poster hasn’t put any such punctuation in his categories from what I could see.

 

 
  [ # 32 ]

There was a question mark in a <THAT> tag. Oddly enough it was from AIML code that you had posted. smile

 

 
  [ # 33 ]

AARGH!! Yes, well spotted Dave. Time I got some new glasses cool smile

 

 
  [ # 34 ]

No worries, my friend. We ALL miss that sort of thing.

 

 
  [ # 35 ]

yoohooooo it finally worked out….. THANKS BOTH OF YOU that u people listened to our problem and replied to it smile that means a lot :D….
STEVE Sir is right i didn’t made any punctuation mistakes in my code.I saw that question mark too in STEVE Sir’s post and i ignored it when i was writing categories.

The problem was with <CONDITION> tags i just replaced last two categories in my database and it worked. So yes DAVE SIR u were absolutely right that “Program O handles the values of <CONDITION> tags differently from Pandorabots”.

:D

 

 
  [ # 36 ]

I knew that but wanted to let Dave have his 15 minutes of fame wink

Glad you got it sorted.

 

 
  [ # 37 ]

lolz it seems u people have great understanding.. smile
yup this problem is solved.. now moving towards next task in my project smile

 

 
  [ # 38 ]

Glad we could help. That’s what we’re here for, after all. smile If you have any more questions or problems, just let us know.

 

 
  [ # 39 ]

sure smile

 

 
  [ # 40 ]

Hey there…. I am part of this same team too…

Thanx you people have solved our prior problems…..

I am in a fix right now….
I wanted to ask you that i have to make bot to ask questions to candidate…...but the problem is that the questions are from different subjects..so i have to make bot ask a question from one subject..then from another subject…..I know the working of<thatpattern> but by hard coding the paths of the questions asked the posssibilities of the paths increase dramatically…....

For questions,we have three levels…easy,medium and hard…..in easy and hard there are 5 questions each and in medium there are 10 questions ....each question is of different subject….

My idea is to make bot run queries(ask question to user) from one file then from the second and so on…..In this case I can cover all possibilities of the questions to be asked and therefore can change questions or add new ones to file if required afterwards…...
I s this possible??Can you help me?

Thanks in advance smile

 

 
  [ # 41 ]

To make the bot ask questions with different levels of difficulty, you will need categories like:

<category>
<
pattern>EASYQUESTIONS</pattern>
<
template>
<
think>
<
random>
<
li><set name="quest">What colour is a tomato?</set><set name="ans">red</set></li>
<
li><set name="quest">What shape is the Sun?</set><set name="ans">round</set></li>
<
li><set name="quest">How many legs does a spider have?</set><set name="ans">8</set></li>
</
random>
</
think>
</
template>
</
category>

<
category>
<
pattern>MEDIUMQUESTIONS</pattern>
<
template>
<
think>
<
random>
<
li><set name="quest">What does a milliner make?</set><set name="ans">hats</set></li>
<
li><set name="quest">What is the capital of Finland?</set><set name="ans">Helsinki</set></li>
</
random>
</
think>
</
template>
</
category>

<
category>
<
pattern>HARDQUESTIONS</pattern>
<
template>
<
think>
<
random>
<
li><set name="quest">What is the 235th digit of pi?</set><set name="ans">6</set></li>
<
li><set name="quest">What animal is on the flag of Sri Lanka?</set><set name="ans">lion</set></li>
</
random>
</
think>
</
template>
</
category

You can then call one of the categories to set up the question, present get name=“quest” to the user and check his response with the value in get name=“ans”. No need to user that tags.

Incidentally, I have wrote these categories as I post and so they make have errors (In case Dave is watching! tongue rolleye)

 

 
  [ # 42 ]

Thankyou Sir for this…..
Sure I will wait for Dave Sir, smile

In additional to this I also want to ask how to call and set one of the categories and how to call and set them sequentially i.e. one after the other…...

 

 
  [ # 43 ]
Steve Worswick - Jun 1, 2012:

Incidentally, I have wrote these categories as I post and so they make have errors (In case Dave is watching! raspberry

Now how do you think that makes me feel? raspberry

Actually, I think it looks fine, except that I would suggest removing the question marks, and have them placed in the category that actually asks the questions.

This can also be done using topics, but that takes a LOT more creative AIML coding, and you would need to “break out” of the topic at the end of the test. It’s probably better to use the basic method that Steve outlined until you become more proficient in AIML coding.

As to how to call these questions, you would need something like this:

<category>
  <
pattern>YES</pattern>
  <
that>WOULD YOU LIKE TO TAKE A TEST</that>
  <
template>What level of difficulty (EASYMEDIUM, or HARDwould you like?</template>
</
category>

<
category>
  <
pattern>*</pattern>
  <
that>WHAT LEVEL OF DIFFICULTY *</that>
  <
template>
    <
think><set name="testdifficulty"><star/></set></think>
    <
condition name="testdifficulty">
      <
li value="easy"><srai>EASYQUESTIONS</srai></li>
      <
li value="medium"><srai>MEDIUMQUESTIONS</srai></li>
      <
li value="hard"><srai>HARDQUESTIONS</srai></li>
    </
condition><get name="quest" />?
  </
template>
</
category

Grading the questions, or even just getting some sort of coherent response, can be really tricky. The following code amy or may not work, depending on whether the <GET> tag is allowed within the <THAT> tag:

<category>
  <
pattern>*</pattern>
  <
that><eval><get name="quest"/></eval></that><!-- Please note that this may well be forbidden! -->
  <
template>
    <
condition name="ans">
      <
li value="*">Thats right! <srai><get name="testdifficulty">QUESTIONS</srai></li>
      <
li>That is incorrectPlease try again.<srai>ASKTHESAMEQUESTIONAGAIN</srai>
    </
condition>
  </
template>
</
category>

<
category>
  <
pattern>ASKTHESAMEQUESTIONAGAIN</pattern>
  <
template><get name="quest" /></template>
</
category

I didn’t add any sort of scoring to that routine, but I’m pretty sure that we discused that bit earlier in this (or possibly another) thread.

As to asking them in a sequential manner, that’s not hard, but it requires a LOT of time and coding, because each question will have two separate categories (one to ask the question, and one to evaluate the answer). It can certainly be done, but it’s more work than I have time or space for in this post. downer

Still in all, this should help a bit. And let’s see what Steve says about the “legality” of the solution I proposed. smile

 

 
  [ # 44 ]

You can’t do this:

<that><eval><get name="quest"/></eval></that><!-- Please note that this may well be forbidden! --> 

But I would suggest amending the question categories to give them a unique number, let’s say E1 is easy question one, M4 is medium question 4 and so on:

<li>
   <
set name="questnum">E2</set>
   <
set name="quest">What shape is the Sun?</set>
   <
set name="ans">round</set>
</
li

You can check the answers to the question I posted above using something like:

<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="E2 ROUND">Correct!</li>
      <
li value="E3 8">Correct!</li>
      <
li value="M1 HATS">Correct!</li>
      <
li value="M2 HELSINKI">Correct!</li>
      <
li value="H1 6">Correct!</li>
      <
li value="H2 LION">Correct!</li>
      <
li>That is incorrectPlease try again.</li>
    </
condition>
  </
template>
</
category

Basically, it sets a variable called checkanswer to the question number and the user’s response and checks that.
Again, this is code created on the fly and so you may need to check for errors. Hope this helps.

 

 
  [ # 45 ]

Thanks Sir, I will try this one.

But one thing i would like to mention that i donot have to make the bot ask user which level of difficulty should be chosen by him/her as this is an interview ...I just have to ask questions from one level to the questions in an other level…

 

3 of 6
3
 
  login or register to react