Ai Task - More than one Task Example

In an AI task, is it possible to have more than one task example?

Can you give me more info about what you are trying to achieve?

The ai task works pretty well but not as well as id like. It looks like the task example is a way to train or fine tune the ai task. But maybe not if you can only add one example. Basically i am trying to qualify messages to be one of several types. It would be nice to give several examples of each.

In that case, I would say remove the example and give it a try again. Also, if there is no sensitive information, you can share a screenshot of what you are doing, and we can collaborate on it

Are you trying to build something like what was shown in our Webinar?

Yes. I am. I was able to change the AI task a bit to get the result I wanted but it would be nice to be able to train somehow as part of the task. Or is that already in the platform somewhere? I’m enjoying the platform so far but I’m having a hard time when I get stumped. The documentation is either lacking or maybe I’m not looking in the right place. Today I wanted to just send a message from an execute code card and I can’t seem to do that. Is there any docs on what native functions can be called from the execute code task?

For the documentation, we are enhancing it on a daily basis. So all your comments will be taken into consideration. Thanks for raising your concerns. It would be of great help to us, if you could give me your feedback about where and what we can enhance.

For the dynamic content part - like sending messages from code - we are working on it.

It’s a cool product so hopefully you’ll have that info together soon. I’ll probably have to move on though as my timeframe is more immediate.



Can you give me more about your use case? Maybe there is a workaround for this challenge?

OK So I have an incoming message–it can be classified as multiple types. This all seems to work pretty well. I’m learning to get better with my prompts. Now what I would like to do is print out a message saying what types were detected.
I put in code like:

const statementst = [];

// check if the message is a complaint
if (workflow.IsComplaint) {
statementst.push('You have a complaint.')

// check if the message is asking for an appointment for a test-drive
if (workflow.IsAppointment) {
statementst.push('You want to schedule an appointment.')

// check if the message is a question about a specific vehicle
if (workflow.IsVehcileQuestion) {
statementst.push('You have a question about a vehicle.')

// check if the message is a question about financing or credit
if (workflow.IsFinanceQuestion) {
statementst.push('You have a question about financing.')

// check if the message is a question about a trade in
if (workflow.IsTradeInQuestion) {
statementst.push('You have a question about trade-ins')
// check if the message cannot be classified
if (workflow.IsUknown) {
statementst.push('I am sorry, I did not understand your message. Can you please rephrase it?')
for (var i=0; i < statementst.length; i++)
    sendMessage(event.conversationId, event.botId, statementst[i]);

But this doesn’t seem to work even though sendMessage seems to be a call I can make

One way is:
1- Create an array variable
2- Use that array variable (let’s name it outputArr for example) instead of statementst or set workflow.outputArr = statements at the end of your code

Then show it like this:

The other way would be that you concatenate your findings into one big message then just show it like the above screenshot

OK that looks like it will work. Thanks

I created a variable string array called QuestionTypes. When I try workflow.QuestionTypes = statementst I get an error saying QuestionTypes is not available in the CurrentWorkflow

OK despite showing the error it seems to have worked

1 Like

That’s great news. Keep us posted about the progress :rocket:

1 Like