Jump to content

Recommended Posts

Posted

 
       Dim C1prompts As New List(Of String)
       Dim C1Responses As New List(Of String)
       C1prompts.Add("My Internet Is not Working")
       C1prompts.Add("My Internet doesn't Working")
       C1prompts.Add("My internet does not work")
       C1prompts.Add("My internet isn't working")
       C1prompts.Add("My Internet won't Work")
       C1prompts.Add("My Internet will not Work")
       C1Responses.Add("OK, Have you checked your wireless is turned on?")
       Dim ChatItem1 As New ChatItem(C1prompts, C1Responses)

 

The above is a chunk of coding from a chat bot I'm trying to develop in Visual Basic, using Visual Studio 2013.

 

It's currently in its very early stages, but I am attempting to build something for the schools I support, that can basically guide them through some basic troubleshooting steps so they can possibly fix small issues before I'm on site.

 

Basically, I was wondering if there was some form of code I could use, so rather than having to have a line of text for each possible input, it would detect that the words "internet", "not" and "working" were in there then choose the response, so regardless of how the question was originally typed, the bot would still recognise the response?

 

Is this possible, or am I expecting too much of a basic language? I realise VB isn't the best.

 

Thanks for any help.

Posted

Hi,

 

I'd probably start by stripping out any non-useful words you can think of, 'eg the, my, and', etc. Then you've got the problem of alternative words for the same thing, see if you can do a fairly generic replace of words like' doesn't' to a fixed phrase you're going to use, eg 'does not'. You could then go a step further and replace 'does not work' to 'broken' to form a limited number of ways of saying the same thing. Then I'd probably breaking down the question into words, ie a string array and do a comparison with your list of possible questions and see which has the highest number of matched words.

 

HTH,

 

Meldrew

  • Thanks 1
Posted

Have you seen the chatbot I wrote a few weeks ago? http://www.edugeek.net/forums/web-development/150135-virtual-technician-application-feedback-please.html

 

It just looks for certain keywords in the string typed by the user and if it finds a match responds accordingly.. e.g. ['sound', 'audio', 'speakers', 'headphones', 'volume', 'hear'] if the string contains any of these words then it's a probelm with audio so deliver a predefined response. Otherwise check the next array...This has the probalem that it can't handle spelling variations or errors or other words for the same thing. Google use something called stemming in their search to make this approach more flexible which might be worth considering..

  • Thanks 1
Posted (edited)
Have you seen the chatbot I wrote a few weeks ago? http://www.edugeek.net/forums/web-development/150135-virtual-technician-application-feedback-please.html

 

It just looks for certain keywords in the string typed by the user and if it finds a match responds accordingly.. e.g. ['sound', 'audio', 'speakers', 'headphones', 'volume', 'hear'] if the string contains any of these words then it's a probelm with audio so deliver a predefined response. Otherwise check the next array...This has the probalem that it can't handle spelling variations or errors or other words for the same thing. Google use something called stemming in their search to make this approach more flexible which might be worth considering..

 

Cheers - I'll have a look at that.

 

Still want to have a go at my own though too - basically just for learning reasons like you.

 

edit - Those be some crazy eyes!

Edited by gtg93
Posted

If you want a real basic simple way:

 

Dim TeachersStupidQuestions as string = "my internet does not work and the screen is yellow but a monkey sat on it so it might be the file server"

If TeachersStupidQuestions.Contains("internet") and TeachersStupidQuestions.Contains("not") and TeachersStupidQuestions.Contains("work") Then
        Slap Em Hard and Reboot!
End if

 

etc.

 

That should work but haven't tested :p

 

Steve

  • Thanks 1
Posted

I would think that to be really useful for some of the responses the chatbot would need to store the state of the conversation (i.e. what has already been asked). Maybe the best approach would be to model the conversations on a flow chart where each question asked by the bot moves the user to a new node depending on what it can understand from their response. Also, it could email you a transcript of the conversation once complete so you can identify areas for improvement.

 

Better still might be if the chatbot was the front end for a ticketing system where the chat elicits the required information from the user through questioning and the user either typing repsonses or selecting from a list and then the bot generates a support ticket and advises the user of any general self help solutions they could try.

 

The way i see it the hardest part of making this into something useful is the potential complexity of language and trying to accurately determine meaning based on what a user inputs and not frustrating them further by giving them inappropriate advice. Let us know how you get on. Good luck!

  • Thanks 1
Posted (edited)
If you want a real basic simple way:

 

Dim TeachersStupidQuestions as string = "my internet does not work and the screen is yellow but a monkey sat on it so it might be the file server"

If TeachersStupidQuestions.Contains("internet") and TeachersStupidQuestions.Contains("not") and TeachersStupidQuestions.Contains("work") Then
        Slap Em Hard and Reboot!
End if

 

etc.

 

That should work but haven't tested :p

 

Steve

 

Seem to be struggling to get this to work I have:

 

Dim C1prompts as string = "my internet does not work"
Dim C1Responses As New List(Of String)

If C1prompts.Contains("internet") and C1prompts.Contains("not") and C1prompts.Contains("work") Then
        C1Responses.Add("Turn your wireless on")
End if
Dim ChatItem1 As New ChatItem(C1prompts, C1Responses)

 

But that's not working... Any ideas? It's just responding with my not recognised response... It's probably my lack of knowledge. I've tried figuring it out for myself but pulling my hair out now! :p

 

 

 

 

 

 

 

I would think that to be really useful for some of the responses the chatbot would need to store the state of the conversation (i.e. what has already been asked). Maybe the best approach would be to model the conversations on a flow chart where each question asked by the bot moves the user to a new node depending on what it can understand from their response. Also, it could email you a transcript of the conversation once complete so you can identify areas for improvement.

 

Better still might be if the chatbot was the front end for a ticketing system where the chat elicits the required information from the user through questioning and the user either typing repsonses or selecting from a list and then the bot generates a support ticket and advises the user of any general self help solutions they could try.

 

The way i see it the hardest part of making this into something useful is the potential complexity of language and trying to accurately determine meaning based on what a user inputs and not frustrating them further by giving them inappropriate advice. Let us know how you get on. Good luck!

 

 

My main aim is to get it working very basically at the moment, but the more I think about it the more I come up with ideas similar to the ones you mention... My thoughts more or less are to get it to recall some info, so when asked if they've checked their wireless for example, if they say no, it would then show them how to do it, if they says yes it skips that.

 

But I think that's for somewhere further down the line. Possibly even logging a ticket on their behalf if the ticket isn't solved after x amount of questions, using the info gathered to log the ticket.

Edited by gtg93
Posted

What bit doesn't work to you?

 

       Dim C1prompts As String = "my internet does not work"
       If C1prompts.Contains("internet") And C1prompts.Contains("not") And C1prompts.Contains("work") Then
           MsgBox("match")
       End If

 

Just tested that and it works fine.

 

Steve

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...