Comments (7)
Hi @amendlik Thanks for reporting this
We'll look into this and get back to you
from qnabot-on-aws.
Hello @jangidms - any updates on this? I can work on the fix if you can point me in the right direction.
from qnabot-on-aws.
Hi @amendlik
I looked into this scenario and I see that currently Document Chaining is not supported when using intent & slots. It is working as expected.
When processing request with QnaIntent, QnABot injects qid in the request (Link to Request Parsing Code)
When evaluating conditional chaining, QnABot updates the question in the request to chaining question (Conditional Chaining Code)
But since request also has qid field, that takes precedence over question when making OpenSearch request (OpenSearch Request logic)
You could try to customize QnABot as per your use case, or open a new enhancement request which we'll add to our backlog
from qnabot-on-aws.
@bobpskier I've been testing a solution that just deletes qid
from the structure by adding this code to evaluateConditionalChaining()
if(req.hasOwnProperty('qid')) {
delete req['qid'];
}
It's working fine so far. I have not encountered any negative effects.
from qnabot-on-aws.
@amendlik I'd probably implement something similar in evaluateConditionalChaining.js starting at line 100
if (next_q) {
req.question = next_q;
if (next_q.toLowerCase().startsWith('qid::')) {
_.set(req,'qid', next_q.substr(5));
} else {
_.set(req,'qid', undefined);
}
[req, res, hit2, errors] = await getHit(req, res);
}
This updates req.qid to be the actual target qid of the chaining config if it is specified as a "qid::" or removes qid if not specified in that format.
The intent/slot mechanism is not a good citizen in the word of QnABot chaining. It looks like it can only be used in the first qid that kicks off a series of chained qids. If in the middle of the chain of questions, a qid is specified that also uses intents/slots, the chaining mechanism will skip right over asking to resolve the slot values. The intent/slot mechanism only works at the beginning of the chain when Lex can call QnABot fulfillment using a DialogCodeHook with the intent/slots as the context.
If you want to conditionally ask for values in one of more qids via chaining, it is better to use ElicitResponse bots as they support the concept of chaining.
from qnabot-on-aws.
This fix is working well for us. @bobpskier, do you want to upstream that, or would you like me to do it?
from qnabot-on-aws.
@amendlik can you please submit a PR if you want us to consider as improvementÉ
Closing this
from qnabot-on-aws.
Related Issues (20)
- Lex slot validation using lambda code hook in lex v2 console HOT 4
- Kendra context summary encoding/decoding issues. HOT 2
- a Terraform version HOT 2
- 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 1
- Shell and other commands not working in Ubuntu linux HOT 2
- 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 3
- Kendra Web Cwaler is executed, but the KendraCrawlerSNSTopic that launches the ClowlerLambda is not triggered HOT 1
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.