Connect with us

AI

Building a multilingual question and answer bot with Amazon Lex

Avatar

Published

on

You can use Amazon Lex to build a question and answer chatbot. However, if you live in a non-English-speaking country or your business has global reach, you will want a multilingual bot to cater to all your users. This post describes how to achieve that by using the multi-language functionality of your question and answer bot (QnABot).

The QnABot can detect the predominant language in an interaction by using Amazon Comprehend, a natural language processing (NLP) service that uses machine learning to find insights and relationships in text.

The bot then uses Amazon Translate, a neural machine translation service to translate the question to English. Then it can return a preconfigured answer in the end user’s language or translate it back from the default English text.

Although QnABot allows the end-user to interact with an Amazon Lex bot using text or voice, the multilingual feature primarily supports text interactions. Multilingual voice interactions are currently limited to use with Alexa skills.

The solution consists of three easy steps:

  1. Configure the multi-language functionality.
  2. Set up the alternate curated answers in a different language.
  3. Configure your Alexa skill with multiple languages.

For instructions on creating and customizing your bot, see Create a Question and Answer Bot with Amazon Lex and Amazon Alexa or the Q&A Self-Paced Guide. You can also see the following videos on YouTube:

Prerequisites

To implement this solution, you must have an AWS account. If you don’t have a professional account, the AWS Free Tier lets you gain experience with the AWS platform, products, and services.

You also need to deploy QnABot. If you have not already done so, launch the QnABot on an AWS CloudFormation stack in one of the available Regions.

When specifying your stack name, include QnA in the name, for example, MultiLangQnABot.

After you successfully deploy your CloudFormation stack, complete the following steps:

  1. Open the content designer page of your chatbot.

If this is the first time accessing the chatbot design console, you can find the correct URL on the AWS CloudFormation console on the Output tab of your bot stack. Look for the value for the ContentDesignerURL key. You should also receive an email with temporary credentials to access the QnABot designer.

  1. On the designer page, choose the menu icon.
  2. Under Tools, choose Import.
  3. Expand the Examples/Extensions
  4. Next to blog-samples, choose Load.

Configuring the multi-language functionality

You are now ready to configure the multi-language functionality. Complete the following steps:

  1. In the content designer page, under Tools, choose Settings.
  2. For the ENABLE_MULTI_LANGUAGE_SUPPORT parameter, change the value from false to true.
  3. Choose Save.
  4. To test the bot, open the client webpage.
  5. From the designer page, under Tools, choose QnABot Client.
  6. Enter the following questions (in English, Spanish, and French):
    • How do I modify Q and A Bot content ?
    • ¿Cómo modifico el contenido de Q y A Bot ?
    • Comment modifier le contenu Q et A Bot ?

The chatbot answers each time in the language you used, as shown in the following animation.

The QnABot is successfully using Amazon Translate to translate the answer automatically into the user’s native language.

Setting up alternate curated answers in a different language

You might need to provide a more natural experience and want to add a curated answer in the native language of your choice. To further customize the translation for each question, you can use the {{handlebar}} functionality. The QnABot provides the {{handlebar}} function ifLang, which takes the locale as a quoted parameter. You can use any of the languages that Amazon Translate supports. For more information, see What Is Amazon Translate?

For example, to customize the translation in Spanish, the ifLang function uses es as the locale parameter. See the following code:

{{#ifLang 'es'}} Su traducción al español
{{/ifLang}}

Additionally, if an unknown language is detected, you can support that with a default response by using the defaultLang function. See the following code:

{{#defaultLang}} Your default language answer
{{/defaultLang}}

As an example, modify the question you used earlier. Go back to the content designer and complete the following steps:

  1. Under Tools, choose Edit.
  2. Select 001 and choose the pencil icon on the right.
  3. Replace the text in the answer with the following code:
    {{#ifLang 'es'}}
    Use las herramientas de 'Question and Test' de 'Content Designer' para encontrar sus documentos existentes y editarlos directamente en la consola. También puede exportar documentos existentes como un archivo JSON, realizar cambios en el archivo y volver a importar.
    {{/ifLang}}
    {{#ifLang 'fr'}}
    Utilisez les outils 'Question and Test' de 'Content Designer' pour trouver vos documents existants et les modifier directement dans la console. Vous pouvez également exporter des documents existants sous forme de fichier JSON, apporter des modifications au fichier et réimporter.
    {{/ifLang}}
    {{#defaultLang}} Use the Content Designer Question and Test tools to find your existing documents and edit them directly in the console. You can also export existing documents as a JSON file, make changes to the file, and re-import.
    {{/defaultLang}}
    

    Multi-language and handlebars, in general, also support markdown answers. For example, you could modify the preceding code to highlight the name of the interface that isn’t translated. See the following code:

    {{#ifLang 'es'}}
    Use las herramientas de ***'Question and Test'*** de ***'Content Designer'*** para encontrar sus documentos existentes y editarlos directamente en la consola. También puede exportar documentos existentes como un archivo JSON, realizar cambios en el archivo y volver a importar.
    {{/ifLang}}
    {{#ifLang 'fr'}}
    Utilisez les outils ***'Question and Test'*** de ***'Content Designer'*** pour trouver vos documents existants et les modifier directement dans la console. Vous pouvez également exporter des documents existants sous forme de fichier JSON, apporter des modifications au fichier et réimporter.
    {{/ifLang}}
    {{#defaultLang}} Use the ***Content Designer Question and Test*** tools to find your existing documents and edit them directly in the console. You can also export existing documents as a JSON file, make changes to the file, and re-import.
    {{/defaultLang}}
    
  4. Choose Advanced and enter the new code in the Markdown Answer box.

  5. Choose Update.

If you try to ask your questions again, the answers are different because the chatbot is using your curated version.

You can also import the sample or extension named Language / Multiple Language Support.

This adds two questions to the system: Language.000 and Language.001. The first question allows the end-user to set their preferred language explicitly; the latter resets the preferred language and allow the QnABot to choose the locale based on the automatically detected predominant language.

Debugging the answers in a different language

You can use the ENABLE_DEBUG_RESPONSES setting to see how local language questions are translated to English by QnABot, and to tune the content as needed to ensure QnABot finds the best answer to a non-English question.

Complete the following steps to set up and test:

  1. In the content designer page, under Tools, choose Settings.
  2. For the ENABLE_DEBUG_RESPONSES parameter, change the value from false to true.
  3. Choose Save.
  4. To test the bot, open the client webpage.
  5. From the designer page, under Tools, choose QnABot Client.
  6. Try one of the question we used before, you can read the translation and use this information to tune your answer.

Configuring your Alexa skill with multiple languages

You first need to create your Alexa skill. For instructions, see Create a Question and Answer Bot with Amazon Lex and Amazon Alexa.

When your Alexa skill is working, add the additional languages by completing the following steps:

  1. On the Alexa developer console, open your skill.
  2. From the drop-down menu with your default language, choose Language settings.
  3. Add all the languages you want to support and choose Save.
  4. Under CUSTOM, choose JSON Editor.
  5. Copy the JSON from the editor, switch to the other language you want to support, and enter it in the editor pane (this overwrites the default).
  6. Choose Save Model.
  7. Choose Invocation and change the invocation name.
  8. Choose Save Model.
  9. Repeat these steps for any language you want to support.
  10. Build the model.

Testing your Alexa skill

You can now test your Alexa skill in other languages.

  1. On the Alexa developer console, select your skill.
  2. Choose Test.
  3. Change the language and type the invocation name of your skill for that language.
  4. After Alexa gives her initial greeting, ask the question you used before or any other question you added in the content designer.

Alexa answers you in the selected language.

Now your multilingual chatbot can be published on your website or as an Alexa skill. To integrate the QnABot in your website, you can use lex-web-ui. For instructions, see Deploy a Web UI for your Chatbot.

Conclusion

This post shows you how to configure and use the out-of-the-box feature of your QnABot to localize answers in any language Amazon Translate supports. It is an inexpensive way to deploy a multi-language chatbot, and you don’t need to adapt it to accommodate new Amazon Lex features.

As of this writing, this approach works for text-based interactions only; support for voice is limited to use with Alexa skills only.

For more information about experimenting with the capabilities of QnABot, see the Q&A Self-Paced Guide.


About the Authors

Fabrizio is a Specialist Solutions Architect for Database and Analytics in the AWS Canada Public Sector team. He has worked in the analytics field for the last 20 years, and has recently, and quite by surprise, become a Hockey Dad after moving to Canada.

As a Solutions Architect at AWS supporting our Public Sector customers, Raj excites customers by showing them the art of the possible of what they can build on AWS and helps accelerate their innovation. Raj loves solving puzzles, mentoring, and supporting hackathons and seeing amazing ideas come to life.

Source: https://aws.amazon.com/blogs/machine-learning/building-a-multilingual-question-and-answer-bot-with-amazon-lex/

Source: https://plato-ai.network/building-a-multilingual-question-and-answer-bot-with-amazon-lex/

AI

Cartoon: Cloud Dating

Avatar

Published

on

Cartoon: Cloud Dating

New KDnuggets cartoon looks at how AI can transform love and romance.


New KDnuggets cartoon gives you a respite from the virus and politics and issues of the day, and looks at how AI can transform love and romance.

Cartoon: Cloud Dating

A Scientist:

Our AI has come up with “Dating in the cloud”. It scans your social media posts and comes up with a great profile for you, automatically inflating your resume and making you more attractive. And no need to decie who pays for the meal!”

Here are other
KDnuggets AI, Big Data, Data Science, and Machine Learning Cartoons
.

and KDnuggets posts tagged
cartoon.

See also other recent KDnuggets Cartoons:

Source: https://www.kdnuggets.com/2020/10/cartoon-cloud-dating.html

Continue Reading

AI

How AI Revolutionize the Way Video Games Developed and Played

Avatar

Published

on

Artificial intelligence is simplifying our lives and changing the way we perform everyday tasks. An AI revolution has already taken place in many industries, like healthcare and marketing. But is it going to affect the future of video games as well? The simple answer is yes.

“Although AI has been an important part of video games since their birth in the ’50s, it’s only lately developed to a point where it can be used to control complex characters.” 

The technology can now process information from players and make the environment more suitable for their needs.  And what can we expect for video games in the future? Can we soon see self-thinking characters with complex countertactics in first-person shooter games? Or all the human staff replaced by robots in online websites with games like Eye of Horus? Let’s take a closer look at how exactly artificial intelligence will revolutionize the gaming industry. Ready?

Will Video Games Get Smarter?

To be honest, there hasn’t been a radical change in how AI governs the behaviour of various virtual entities or powers the procedural generation. AI’s most important components are still pathfinding and finite state machines.

Pathfinding is basically getting from one point to another in the simplest way, and it’s used in all games. And a finite state machine is built for non-playable characters (NPCs), and it allows them to change between different states.

However, some new video games are now also using behaviour and decision trees that have become more sophisticated recently. And although most developers are operating with the same basic concepts (pathfinding and finite-state), they can utilize them on bigger scales thanks to higher processing powers in 2020. 

Games Will Become More Adaptable to Smartphones

A gaming console is not the only equipment to play games on. A smartphone offers the unique possibility to play on the go, so it has become an increasingly popular option for gaming. And since the processing power of mobile phones grows every year, the games for these devices keep getting better and more immersive. 

However, video game fans still need a PC or a console to play the latest games since the weaker filling is not enough to enable mobile platforms to run them. But here’s where AI comes to play.

Every mobile game developer who creates new video games for smartphones is constantly coming up with new AI algorithms and the games keep getting smarter. Looking at mobile games only 3 years ago, we can see immense improvements. Let’s take a look at some key improvements in games made possible by advanced AI. 

Environments Are Getting More Authentic

Everyone’s probably noticed that video games are getting more realistic every year. The environments get more responsive and richer in detail. And that’s all thanks to AI. Using machine learning, AI can respond to any actions a player takes in the game more accurately. AI itself can generate environments that predict your expectations.

For example, the scripted plots that follow only one possible sequence of events are hardly present in any modern game. Instead, it’s up to the player’s decision on which direction the game takes. The plot has many possible directions. This means that you can play the game many times, and the scenario will always be fresh.

However, surprisingly enough, a powerful AI might not provide the most fun gaming experience. Because here’s the thing: if AI gets too unpredictable, the non-player characters it leads can start to direct the players to unnecessary routes. To places that lead to nowhere. It may be a fun experiment, but ultimately players are loving gaming because of the thrill of advancing to the next level. So most probably

AI in games will keep getting more intelligent to interact with players more convincingly. But it will still be completely controlled to keep everything on track. 

Improved Visuals 

The video graphics in modern games are so good that sometimes you can even mix your sense of what’s virtual and what’s reality. This has obviously not been achieved overnight. It’s made possible by hundreds of developers constantly working on new solutions. But we can hope AI to considerably accelerate the process by automating it.

Maybe in the future, we can have software that generates a game environment by scanning real cities. Just imagine having battles with zombies on the streets of your own hometown. 

Conclusion

In the future, we can expect more advanced AI in games making the non-player characters react to your actions with more variety. In first-person shooter games, NPCs can soon make more decisions and coordinate tactical attacks against the player. We can also expect more automized gaming sites. 

And AI is not only powering the characters and scenarios in games. It’s also put to work to develop games faster and cheaper than ever before. And that’s all revolutionary in the gaming business. Are you ready for it?

How do you think video games will look like in the future? Completely powered by AI? Leave comments below, we’d love to hear your thoughts.

                                                           — Thomas Glare endeavoured to explore the world of tech and is currently in his master’s program of Cyber Security who loves to create slot machine games for android.

Also, Read Inspiring AI Tech’s that Transformed Digital World

Source: https://www.aiiottalk.com/artificial-intelligence/how-ai-revolutionize-the-way-video-games-developed-and-played/

Continue Reading

AI

Internet of Things Impact in 2021

Avatar

Published

on

The internet of things — smart devices that connect to the internet to share and receive data — is probably one of the biggest tech success stories of the past 10 years. 

While most consumers know about IoT from consumer-oriented smart devices — like home assistants and security systems — the tech is also vital to many industries. From remote patient monitors to technology that collects factory data and controls massive industrial machinery, sending information over the internet has major benefits for all types of companies.

“The IoT revolution isn’t done yet. 2021 is likely to be another big year for it. We may soon see some of the biggest changes to date as developers find new ways to apply the tech to other industries.” 

Based on the IoT industry’s current momentum and direction, these eight changes are some of the most likely to happen next year.

1. New, More Interoperable Smart Home Devices

As the range of smart home devices grows, interoperability — having tools from different developers that can “talk” with each other — will become much more important.

Manufacturers of IoT devices are making communication between them a key design consideration. It may soon be more normal to coordinate devices from a handful of developers rather than depend on all-in-one solutions that manage your home environment or provide extra security. Instead, smart homeowners may be able to string together complex IoT tech systems, customizing based on their needs and preferences.

2. Adoption of IoT Will Be Almost Universal

According to a new report from Microsoft, 91% of global businesses have adopted IoT technology, up from 85% the year before. The same report showed that more than half of all companies plan to invest even more in IoT technology going forward.

The growing range of IoT solutions — from office management tech to new maintenance tools — means that any business can benefit from IoT tech regardless of industry. 

In 2021, it could be unusual to work with a company that doesn’t use the internet of things in one way or another. By the end of that year, we may see something close to 100% adoption of IoT.

3. 5G and Edge Computing Will Make Near-Real-Time Analysis Possible

After a slow rollout in 2019, major carriers are beginning to deliver 5G coverage on a national scale.

The speed of 5G, plus edge computing tech — which establishes nodes on the edge of the network that can be used for simple calculations — may make close-to-real time analytics in IoT devices possible. This ultra-fast communication will make the technology like driverless cars and real-time industrial sensors more practical going forward.

4. Hospitals Will Adopt a Range of IoT Tech

Over the past few years, developers have started to create various IoT devices for health care professionals. These devices — like internet-connected patient monitors or health-tracking wearables — make it easy for doctors and hospital staff to track a patient’s health, no matter where they are in the building. This could help staff check up on people across floors from one workstation or respond faster to a health crisis.

Shortly, real-time location systems for health care, which allow hospitals to track patients, manage assets and ensure compliance, may become central to the industry. At the least, it could become another valuable tool for health care professionals.

5. Cybersecurity Will Become a Serious Concern

As IoT devices proliferate, they’ll also become a bigger target for hackers. IoT security has improved significantly in the past few years, but they remain uniquely vulnerable to attacks. These safety risks make IoT devices a major opportunity for hackers wanting to break into a secure home or business network.

For developers and companies using IoT devices, keeping IoT tech secure will become critical. Investment in cybersecurity technology will likely grow to levels higher than anything we’ve seen so far.

6. Big-Name Retailers Will Implement Smart Store Technology

Following the semi-successful launch of Amazon’s line of cashier-less stores, Amazon Go, retailers have started to invest more in smart technology for their brick-and-mortar locations.

There are smart shelves, for example, outfitted with weight sensors and cameras to detect when products have run out. Similar tech can automatically check if there are carts that need to be pulled in or customers waiting to check out.

The data from these devices, coupled with AI-powered analytics, may make retail management more efficient. Right now, the tech is still experimental — but a few brands, like Walmart, are already testing smart store management at a few locations.

7. Predictive Maintenance Will Remain Key for Heavy Industry

Predictive maintenance is one of the more practical applications of the internet of things, and a decent number of industrial businesses already use it. The owner of heavy machinery or industrial infrastructure — like a robot arm, transformer or earth-mover — installs special sensors on certain pieces of high-value equipment. 

These sensors gather data on operational characteristics, like vibration, sound or temperature. Over time, this data analysis can give owners a heads-up when equipment is behaving unusually — a sign that it may need emergency maintenance or repairs.

The predictive maintenance market has grown fast over the past few years, and industry analysts estimate it will be worth more than $12 billion by 2025 — up from just $4 billion in 2020. 2021 will probably be a key year for the industry — one where we’ll see continued adoption of predictive maintenance tools and platforms.

8. Self-Driving Car Tests Will Ramp Up

More companies are getting involved in self-driving vehicles in one way or another. Ride-sharing companies, Big Tech businesses and logistics experts are all invested in making vehicles that can drive themselves.

Demand for self-driving cars, as well as other issues — like the ongoing shortage of truck drivers — will likely push companies to expand their tests in 2021. These vehicles still need some serious testing, and its likely tests won’t be done for a while. However, some of those experimental autonomous cars could be on the road by the end of 2021. 

How the IoT Could Reshape Businesses in 2021

The internet of things is likely to continue having a major influence on the economy through next year. New IoT devices, plus supporting techs like 5G and edge computing, mean that just about any business, regardless of industry, will be able to take advantage of what these tools can offer. 

Consumers are also likely to see big benefits as well. While self-driving cars aren’t expected to hit the market until later in the decade, other consumer IoT devices will probably become much more user-friendly. For smart home fanatics who want to outfit their living space with gadgets that can adjust the temperature, dim lights and keep an eye on the front porch, big changes to interoperability will make life better than ever.

Also, Read Future of IoT Devices

Source: https://www.aiiottalk.com/internet-of-things/impact-of-iot/

Continue Reading
Cleantech2 hours ago

GM Unveils Factory ZERO

Cleantech3 hours ago

Volvo Trucks Receives Grants to Deploy VNR Electric Trucks in Southern California

Energy4 hours ago

Freeport-McMoRan’s Steve Higgins Elected as Chairman of the Board of the International Copper Association

Energy4 hours ago

Nufarm and CROP.ZONE Announce Cooperation to Bring Alternative Weed Control to Major European Markets

Energy4 hours ago

Global Belt and Chain Drives Market, 2020-2024: Growth Opportunities in Collaboration & Use of Newer Materials Enabling Broader Capabilities

Energy4 hours ago

New Report Shows Critical Impact of Oil and Gas Industry in Los Angeles County

Big Data4 hours ago

Best Apps to Check Internet Speed

Energy5 hours ago

Ultra Safe Nuclear Technologies Delivers Advanced Nuclear Thermal Propulsion Design To NASA

AR/VR5 hours ago

The Virtual Arena: The Ascendance of Arena-Scale Entertainment – Part 1

AR/VR6 hours ago

Pimax Secures $20m in Series B Funding Round

Fintech7 hours ago

Minimum Wage Workers Can Now Get Guaranteed Payday Loans No Matter What In Canada

Energy7 hours ago

Volvo Trucks Awarded $21.7M from U.S. EPA and South Coast AQMD to Deploy 70 Class 8 VNR Electric Zero-Emission Trucks

Energy7 hours ago

Trilliant Partners with 1NCE for a Cost-Effective Cellular Solution to Cover the Last Mile for IIoT

Energy7 hours ago

LyondellBasell Hosts Annual Global Care Day Supporting Food Security

Energy7 hours ago

Insider Buying Signals Gold Industry Momentum

Energy7 hours ago

In New Book, Veteran Journalist Shows How to End California’s Water Wars, Protect Habitats and Meet State’s Water Needs

Blockchain7 hours ago

How Does the Future Look for Cryptocurrencies in the Financial Market?

Cyber Security8 hours ago

Simple Steps To Protect Your Business Data Across Mobile Devices

Blockchain10 hours ago

How Blockchain Can Help Your Business Grow

Cyber Security11 hours ago

Quelques conseils pour améliorer la sécurité informatique afin de ne pas perdre des données personnelles

Aviation11 hours ago

Norwegian’s New Airbus A321LR Fleet – What To Expect

Ripple Price
Blockchain12 hours ago

Charted: Ripple (XRP) Technicals Suggest a Crucial Breakdown Below $0.24

Fintech12 hours ago

Insurtech Bolttech Expands Its Footprint to South Korea With LG U+

Aviation12 hours ago

Remember The Interjet-Aeromar Codeshare? Its Over

Blockchain13 hours ago

Savvy Traders Are Capitalizing on Two New Crypto Assets, Says Bitcoin Bull Tyler Swope – Here’s How

Aviation13 hours ago

One Of The World’s Busiest International Routes Is Less Than 300km Long

Aviation13 hours ago

Western Sydney cover up possible, hints top bureaucrat

Ethereum
Blockchain14 hours ago

TA: Ethereum Could Narrowly Avoid a Major Drop if it Closes Above $380

Aviation14 hours ago

A Look Inside Drake’s Crazy New Private Boeing 767 Jet

Aviation14 hours ago

Tasmania on track to open to NSW on 2 November

Aviation15 hours ago

Cathay Pacific Weighs Further Job And Pay Cuts

Aviation16 hours ago

What Is A Tail Strike And Why Can They Be Dangerous?

Bitcoin Price
Blockchain16 hours ago

TA: Bitcoin Hesitates Below $11,550, But Upside Break To $12K Seems Likely

Blockchain16 hours ago

Top DEXs Record 197% Average Monthly Trading Volume Increase As DeFi Hype Drives Growth

Blockchain16 hours ago

Bitstamp To Provide Crime Insurance for Crypto Asset Safety

Blockchain17 hours ago

Bitcoin Price Prediction: BTC/USD Struggles to Break $11,500 Resistance, May Set the Stage for Upside Momentum

check-out-thorchain-rune-shapeshift-ceo-erik-voorhees-says.jpg
Blockchain17 hours ago

“Check Out Thorchain (RUNE),” ShapeShift CEO Erik Voorhees Says

Aviation17 hours ago

Melbourne To Top Singapore Airlines’ Flight List In December – Here’s The Catch

Blockchain18 hours ago

Kraken Daily Market Report for October 18 2020

Aviation19 hours ago

United Airlines Moving Forward With Boeing 787 Polaris Retrofits

Trending