Giter Site home page Giter Site logo

eyvaz27 / aws-ai-qna-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-solutions/qnabot-on-aws

0.0 1.0 0.0 166.66 MB

Code samples related to "Creating a Question and Answer Bot with Amazon Lex and Amazon Alexa", published on the AWS AI Blog. QnABot (pronounced “Q and A Bot”), uses Amazon Lex and Amazon Alexa to provide a conversational interface to your “Questions and Answers”, so users can just ask their questions and get quick and relevant answers.

License: Other

Makefile 0.71% Shell 0.47% JavaScript 82.79% CSS 0.35% HTML 1.27% Vue 9.41% Python 4.57% Handlebars 0.06% SCSS 0.24% Pug 0.10% Stylus 0.02% EJS 0.03%

aws-ai-qna-bot's Introduction

A Question and Answer Bot Using Amazon Lex and Amazon Alexa

Build a chat bot to answer questions.

Overview

This repository contains code for the QnABot, described in the AWS AI blog post “Creating a Question and Answer Bot with Amazon Lex and Amazon Alexa”.

See the "Getting Started" to launch your own QnABot.

See all the new features list for 4.7.1 Lex V2 Elicit response bots, Config import/export

4.7.1 provides performance improvements and component upgrades

  • Amazon Elasticsearch version 7.10 is now utilized.
  • Encrypted Elasticsearch (production) instance types now use m6g.large.elasticsearch for improved price/performance/memory.
  • The QnABot fulfillment Lambda function has been optimized to reduce query response times and variability, especially after periods of inactivity.
  • LexV2 built-in Elicit Response bots have been added.
  • Custom settings can now be exported and imported from the Content Designer Settings page.
  • Bug fix when ES_SCORE_ANSWER_FIELD is set to true. Prior to this fix, answer fields were not utilized fully in Elasticsearch queries.

4.7.0 QnABot now supports LexV2 with voice interaction in multiple languages.

  • Two installation/update modes are now available:
    • (i) LexV1 + LexV2 (default, recommended for most AWS regions.
    • (ii) LexV2-only (currently recommended for AWS regions where LexV1 is not available).

4.6.0 provides a number of new features described below. Several to call attention to are the following:

  • Kendra custom no_hits item required in earlier releases is no longer required to enable Kendra Fallback and should be removed, configurable confidence thresholds now available for filtering Kendra results.
  • Kendra integration is now fully automated during install or update when the new default Kendra Index Id parameter is provided.
  • Standard markdown is now automatically converted to Slack markdown when using Slack, Kibana dashboard logs and metrics retention period is now configurable during install or update, Lambda runtime upgraded to Node.js 12.x.

New features in 4.6.0 Improved Kendra integration and Kibana dashboards. Additional settings to filter Kendra responses based on confidence levels

New features in 4.5.0 Kendra Web Crawler, Comprehend PII Detection, Translate Custom Terminology, Increased deployment regions

Upgrade Notes

During an upgrade, we recommend that existing QnABot content first be exported and downloaded from the Content Designer prior to the upgrade. In this release we expect upgrade to be smooth but just in case you should always have your QnABot content preserved.

Prerequisites

  • Run Linux. (tested on Amazon Linux)
  • Install npm >7.10.0 and node >12.15.1. (instructions)
  • Clone this repo.
  • Set up an AWS account. (instructions)
  • Configure AWS CLI and a local credentials file. (instructions)

Getting Started

Two approaches can be used to get started. Deploy from pre-created repositories or clone the repo and build a version yourself.

Pre-created deployment

Click a button to launch QnABot CloudFormation stack in the desired region

Region Launch
Northern Virginia
Oregon
Ireland
Sydney
London
Frankfurt
Singapore
Tokyo
Canada Central

Clone the git repo and build a version

First, install all prerequisites:

npm install 

Next, set up your configuration file:

npm run config

now edit config.json with you information.

param description
region the AWS region to launch stacks in
profile the AWS credential profile to use
namespace a logical name space to run your templates in such as dev, test and/or prod
devEmail(required) the email to use when creating admin users in automated stack launches

Next, use the following command to launch a CloudFormation template to create the S3 bucket to be used for lambda code and CloudFormation templates. Wait for this template to complete (you can watch progress from the command line or AWS CloudFormation console)

npm run bootstrap

Finally, use the following command to launch template to deploy the QnA bot in your AWS account. When the stack has completed you will be able to log into the Designer UI (The URL is an output of the template). A temporary password to the email in your config.json:

npm run up

If you have an existing stack you can run the following to update your stack:

npm run update

Designer UI Compatibility

Currently the only browsers supported are:

  • Chrome
  • FireFox
    We are currently working on adding Microsoft Edge support.

Built With

License

See the LICENSE.md file for details

New features

Version 4.7.1

  • LexV2 built-in Elicit Response bots have been added.
  • Custom settings can now be exported and imported from the Content Designer Settings page.

Version 4.7.0

  • QnABot now supports LexV2 with voice interaction in multiple languages.
    • Two installation/update modes are now available:
      • (i) LexV1 + LexV2 (default, recommended for most AWS regions.
      • (ii) LexV2-only (currently recommended for AWS regions where LexV1 is not available).
    • LexV2 locales are specified via a new CloudFormation parameter
      • The default locales are US English, US Spanish and Canadian French.
  • The QnABot web client now uses LexV2 and supports dynamic bot locale selection from a new title bar menu.
  • Custom LexV2 Elicit Response bots are now supported. The built-in response bots still use LexV1 and are available only when QnABot is installed in LexV1+LexV2 mode.
  • CloudFormation deployment is now available for Canada/Montreal region (LexV2-only mode).
  • Amazon Connect integration in the Canada/Montreal region supports multiple voice languages using LexV2.
  • The Content Designer 'Test All' feature now uses LexV2.
  • Content Designer's "Rebuild Lex Bot" feature now rebuilds both LexV2 and LexV1 bots
  • Non-English LexV2 bot locales are automatically generated with sample utterances translated from English questions using Amazon Translate.
  • Content Designer's Import feature now supports Excel spreadsheets as well as the existing JSON format.
  • QnABot's Elasticsearch cache is now automatically kept warm to improve query time consistency.
  • Negative feedback (thumbs down) messages can now generate notifications (text, email, etc.) using Amazon SNS.

Version 4.6.0

  • Kendra integration is now fully automated during install or update when the new default Kendra Index Id parameter is provided.

  • Kendra custom no_hits item required in earlier releases is no longer required to enable Kendra Fallback and should be removed, configurable confidence thresholds now available for filtering Kendra results.

  • Kibana dashboard now shows additional detail on questions answered via Kendra FAQ and Kendra Fallback.

  • Standard markdown is now automatically converted to Slack markdown when using Slack, Kibana dashboard logs and metrics retention period is now configurable during install or update, Lambda runtime upgraded to Node.js 12.x.

  • Two new settings have been added

    • ALT_SEARCH_KENDRA_FALLBACK_CONFIDENCE_SCORE - Answers will only be returned that or at or above the specified confidence level when using Kendra Fallback
    • ALT_SEARCH_KENDRA_FAQ_CONFIDENCE_SCORE - Synchronized FAQ questions will only be matched to an ElasticSearch question if the Kendra FAQ confidence level is at or above the specified confidence level.

Version 4.5.0

  • Added single click deployment support for four additional regions
  • Changed unencrypted Amazon Elasticsearch instance types to be t3.small.elasticsearch
  • Changed default number of nodes for Amazon Elasticsearch cluster to 4 for better production level cluster performance and resiliency. This can be changed to 2 for development clusters if desired.
  • Added Personal Identifiable Information detection support using Amazon Comprehend - readme
  • Added web indexing support using Amazon Kendra - readme
  • Added Amazon Translate custom terminology support - readme
  • Added multi-language translation with QnABot Kendra fallback processing
  • Added support for signing S3 URLs for bot responses, using handlebar syntax - readme
  • Added support to defining user specified custom settings
  • Lambdahook responses can now be used with document chaining and are translated when multi-language support is enabled
  • Improved support when contractions are used in utterances
  • Kendra Fallback message prefixes are now configurable in QnABot settings
  • Fixed bugs and defects
  • To improve performance, resiliency, and security, the Elasticsearch cluster will default to using ENCRYPTED nodes using the c5.large.elasticsearch instance type. If UNENCRYPTED is selected, the t3.small.elasticsearch instance types will be used. The default number of nodes in a new cluster is now 4 for improved resiliency. The number of cluster nodes can be reduced to 2 for development environments if desired.
  • QnABot distribution regions now available for one click deployment have increased to 8 regions. These are Northern Virginia (us-east-1), Oregon (us-west-2), Ireland (eu-west-1), London (eu-west-2), Frankfurt (eu-central-1), Sydney (ap-southeast-2), Singapore (ap-southeast-1), and Tokyo (ap-northeast-1).

A workshop is available in GitHub that will walk you through setting up this feature.

aws-ai-qna-bot's People

Contributors

johncalhoun avatar rstrahan avatar rdoshi99 avatar dontirun avatar bobpskier avatar pdkn avatar dependabot[bot] avatar mvp-cloud avatar karldthomas avatar mike-last avatar chriscoombs avatar jdhunt avatar maishsk avatar matthewberryman avatar selvadharmes avatar tim-su avatar tremaineeto avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.