Comments (8)
thanks, we will look into this and come back to you
from qnabot-on-aws.
@ARUNIMA1314 Bot routing is covered in a readme. See: https://github.com/aws-solutions/qnabot-on-aws/tree/main/docs/bot_routing#readme
That said, the error above normally indicates the QnABot (supervisory bot) can't resolve the utterance and match the qid which would start bot routing to the target (specialty) lexv2 bot. Please check this qid's configuration and make sure its configured with an appropriate utterance and that QnABot is matching this qid for the intended utterance.
Its also possible if the specialty bot (target bot) is another QnABot, that this message is being generated from the specialty bot and you would need to check its configuration for the utterance given.
from qnabot-on-aws.
@bobpskier Can you please elaborate on what you mean by that the QnABot (supervisory bot) can't resolve the utterance and match the qid which would start bot routing to the target (specialty) lexv2 bot. Are we supposed to configure qids for utterances that can trigger the bot routing? So far I've been trying to use utterances that I've added in my lex v2 bot to try to initiate the routing. But that is failing. Also, if yes, where to configure this qid? I've referred the readme that you've linked but that doesn't mention anything about this.
from qnabot-on-aws.
@ARUNIMA1314 To answer your question, yes you need to configure a question (separate qid) to initiate routing to a target bot.
Going a bit deeper for this discussion assume you have one QnABot performing standard question and answers and one LexV2Bot performing order flowers. QnABot is the supervisory bot. the LexV2 order flowers is the specialty bot. With this example, a standard Q and A might be, what flowers are in season now? QnABot might response with Roses and provide an image. Great.
Now suppose the user says," lets order some roses". QnABot can be configured with a question (separate qid), "lets order some roses" that is configured with an answer. "Super, lets get you over to the order department". This question is also configured to perform bot routing and targets the specialty bot by specifying "lexv2::YOURID/en_us".
From this moment on, QnABot (supervisory bot) passes utterances to "lexv2::YOURID/en_us" (specialty bot). When the specialty bot indicates that fulfillment is complete or when the specialty bot sets a special session attribute to indicate the conversation is over, QnABot stops routing utterances to the specialty bot and starts processing utterances as normal QnABot questions.
I've not experimented with the current release to validate if bot routing is still working. What version of QnABot are you using? Its possible a defect has been introduced. You mentioned you've been trying utterances in QnABot that were used in the LexV2 bot but its still failing, can you describe the failure? Routing should initiate whenever one of these utterances is made to QnABot.
from qnabot-on-aws.
@ARUNIMA1314 I went back and looked at the pull request I submitted back in April 2023 to fix known issues with bot routing and lexV2 bots. To my surprise this was not merged into until just now. Its been broken for a long time with lexv2 bots. In theory the 5.5.0 release of QnABot released yesterday will have this fix and will support lexV2 bots as the target of bot routing.
from qnabot-on-aws.
I went back in and looked at the prior code merge / refactoring and then tested against 5.5.0. These are the defects I found that were not merged in properly or introduced in 5.5.0.
-
specialtyBotRouter.js will throw an exception as LexV2 will sometimes not return an intent as expected at lexv2response.sessionState.intent. The revised code is not handling this condition.
-
specialtyBotRouter.js will throw an exception in getDialogState() for the same undefined lexv2response.sessionState.intent.
-
bot router termination is not preserving the last message from the specialty bot in endUseOfSpecialtyBot().
-
merging of specialty bot session attributes for supervisory bot response does not handle special cases for "appContext" and "qnabotcontext" when the specialty bot is another QnaBot.
-
The matching QID's answer/markdown which initiated bot routing is not provided to the user. The original answer is ignored when it should be prepended as part the response message when bot routing starts.
-
The superivsory bot does not terminate bot routing when the specialty LexV2 bot reaches fulfillment or is closed. Incorrect states are being checked. Note that a specialty QnABot (also LexV2) target is a special case where bot routing should not be terminated when fulfillment is reached as each answer represents a fulfilled state. A specialty QnABot requires special processing to terminate bot routing either through a defined session attribute or by the user entering the termination phrase.
-
getRespCard() is incorrectly defining several attributes that should be left undefined. One example is an image url in the response card. When an image url is defined in the response card as an empty string which the present code is setting, the LexV2 service handling the fulfillment response from the supervisory bot will return an error and the UI will display an error.
I'm in the process of submitting another PR to address these issues. The only file affected is specialtyBotRouter.js.
from qnabot-on-aws.
related #575
from qnabot-on-aws.
Fixed in v6.0.0
from qnabot-on-aws.
Related Issues (20)
- Provide session management capabilities HOT 2
- Ability to reset the conversation or start new conversation HOT 2
- QnA wont get any content from Kendra , if the Kendra content is not in english. HOT 15
- [Bug] AWS environment variable for region is wrongly set HOT 3
- Enable Intent Trigger every start of a session HOT 2
- Using Elicit Response but with chaining HOT 4
- Confirmation Decline Response Prompt not sending HOT 2
- Lambda creates about 1 bilion copies of file HOT 5
- Lambda layer changes not reflecting HOT 4
- Response card is not showing when chaining rule is added. HOT 8
- Amazon Polly voice name for Austrian German is incorrect HOT 4
- Score matching HOT 2
- Answer data that contains only double-byte full-width characters cannot be imported. HOT 2
- Shell and other commands not working in Ubuntu linux HOT 3
- Issue: QnABot logs Never Expire. Request: Add configurable log retention period for all CloudWatch log groups used by QnABot HOT 2
- 6.0.0 has updated PassRole resource constraint definition that breaks upgrades or new installs if stack name is greater than 26 characrters HOT 5
- Kendra Web Cwaler is executed, but the KendraCrawlerSNSTopic that launches the ClowlerLambda is not triggered HOT 2
- ELICIT_RESPONSE_DEFAULT_MSG can't be changed HOT 3
- Add support for Titan Models for Bedrock Knowledge Bases HOT 1
- Logout functionality not working correctly in qnabot-on-aws solution HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qnabot-on-aws.