简体   繁体   中英

How to switch between skills on Watson Assistant?

Currently in IBM Watson Assistant you can only assign one skill to an assistant. How can I programatically swap the main skill of an assistant?

The plan in the future is to have Assistant support multiple skills as well as custom skills. For the moment as data_henrik mentioned, you can use the V1 API to call each skill.

But having multiple skills still has its challenges, and this might give you some insights.

These are some approaches you can take (names are made up in some cases :).

Spray and pray

In this method you send your user utterance to all workspaces and take the highest scoring one.

This one is needed if you have a large number of intents (>1,000) and you have distinct differences between those intents. It's also the most costly in calls.

Gateway

In this set up you have a top level skill. This attempts to understand the intent of where each question should be routed to. You then call the second skill it suggests as the intent it returns.

This works if you have a large number of intents but similar topics, but not similar enough to group to a single skill.

Router

Similar to the gateway, except once you have determined the final skill to route to you then only ever go to that skill. If that skill does not understand a later question, then it routes it back to the top level skill to figure out where it should go.

This one works well if you have customers with a clearly defined path of where they want to go. As they will tend to ask all their questions in the same area.

Graph

Similar to the router, except when a sub-skill doesn't understand what the person asked, rather then going back to the top level it tries to figure out what other sub-skill has a common relationship with itself (if it can't it hands back to top).

This helps where multiple skills may have similar intents, but in the context of other questions already asked you would pick one skill over another.

Chain

In the chain setup you attempt to answer the user question in the first skill. If you can't, then you go to your second skill, then so on.

Your intents in this case are mapped in order of known frequency.

This method works well if you have intents are very similar, but you know the most common questions people ask. It's one of the harder ones to implement and maintain though.


Other points.

  • First, every skill needs a context object. You can't share the system part of the context object across skills. If you are using Premium or Watson Assistant Plus, then this is looked after within the skill itself (so you only need to store conversation IDs).

  • "Gateway", "Spray and pray" and "chain" lose the ability to have complex conversational flows without serious work.

  • If you plan a one-time call from one skill to another, you can use cloud functions to achieve this. It reduces the complexity, and takes the logic outside of the application layer. I achieve something like this with my language translation example .

  • By using the skills instead of the assistant, you lose the ability to do version control based deployments. You can create multiple assistants to get around this, but this makes things more messy.

In the UI, under Assistants , you can click on the assigned Skill and its dotted menu, then select Swap Skill . Thus, even with a Lite plan you could test different skills with an Assistant.

If you have a Premium or Plus account, you can have a dialog skill and search skill .

Another option to have multiple skills (workspaces), is to implement an application using the V1 API . It is a stateless REST API and you send a message to a bot identified by its workspace / skill ID. Depending on the context and flow, your app would pick the right workspace and send the message accordingly. That way it is possible to create specialized bots (workspaces) or switch from one language to another.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM