Date post: | 05-Apr-2017 |
Category: |
Technology |
Upload: | jflemingnj |
View: | 53 times |
Download: | 0 times |
AN AMAZON ALEXA SKILLBY: TROOP 58 – OCEANPORT, NJ
CREATED FOR THE SUSTAINABLE JERSEYCODING FOR COMMUNITY COMPETITION
My Town Hall
Municipal Need Statement
• The borough of Highland Park, NJ put out a challenge to create a software solution which would “reduce the amount of calls and information requests to municipal staff and be proactive about providing information to citizens”
• Their recommendation was to create an Amazon Alexa Skill, served via an Amazon Echo, Dot or Tap device, which could be placed in the town hall and answer commonly asked questions that people may have
• Specifically we were guided by the borough representative to try to develop a solution which could respond to any question someone may have regarding the town
• Ideally “If you could train Alexa to read our Web site it would be awesome!”
• Other ideas were to include the ability to answer questions dealing with navigating or functioning within the Borough Hall (e.g. How do I get to the Mayor’s office)
Solution Concept
We approached our solution design by considering the ideal scenario requested from the borough (ability to answer any question someone may have about the town)
We wanted to design a solution which could answer questions which were dynamically stored so as to support a flexible question and answer model
Ideally, the towns using this solution should be able to provide their own questions, specific to their town, and their own answers to those questions
However, as we delved into the solution design within the scope of the Amazon Alexa framework, we realized that this ideal scenario would not be achievable due to the specific configuration model required of the framework
An Amazon Alexa Skill functions through the mapping of someone’s speech to specific ‘utterances’ which are configured within the skill, therefore we had to define specific types of questions which could be answered by the skill
We limited the initial prototype to questions about locations/departments and scheduled events within the town, however the design of the solution is highly scalable and extensible, so as to support additional question types as needed
How My Town Hall Works
The solution is deployed into the Amazon Web Services cloud as an Amazon Alexa Skill, which is a service created to provide functionality to the Amazon Alexa artificial intelligence product which is made available through Amazon’s Echo, Dot and Tap devices
The solution is triggered when somebody asks Alexa a question in the form of “Alexa, ask My Town Hall <question>” where <question> is a pre-defined list of phrases which are configured within the skill service
Once triggered, the solution will look up the answer in a cloud hosted database repository, retrieve the answer and relay the answer vocally
For example asking the question “Alexa, ask My Town Hall where is the borough hall?”, the answer would be “The borough hall is located at 221 South 5th Ave”
Asking the question, “Alexa, ask My Town Hall when is the Unity Celebration Event?” the answer would be “The Unity Celebration is on March 26, at 11 AM”
The actual answers given by Alexa would be managed entirely by the town or borough administration
This will impact the communities it serves by providing valuable information to community residents without taking time away from the administration to address commonly asked questions
Solution Architecture
The My Town Hall Alexa Skill is built entirely on within the Amazon Web Services (AWS) eco-system, providing for a cost-effective, scalable infrastructure which fits well within the Amazon Alexa framework
The solution is currently running in the AWS free-tier, with financial charges being suppressed unless there is sufficient load on the system to warrant them
Municipalities looking to leverage the solution could choose an infrastructure configuration within AWS with a pricing model which fits their needs and budget
The solution architecture consists of the following components/layers Amazon Alexa Skill – Set of configurations defining the types of questions that Alexa should expect,
interpreted speech from users, and the service functions to which questions should be directed API Gateway – Provides an web-based end point for Lambda service functions with which the
administrative pages interact Lambda Functions – Services with pre-defined interfaces for supporting Alexa and web-based
requests. Provide the core logic of the solution RDS Database – Cloud hosted database storing the answers to questions provided by municipalities Admin Web Pages – Pages providing a UI for managing the answers to questions. Leverages AJAX
to eliminate the need for deploying to a web server
My Town Hall Deployment
The majority of the solution is deployed and managed in the cloud, however an Amazon Echo, Dot or Tap device would be required to use the solution vocally, as it’s intended
The My Town Hall solution could be deployed in two ways1. Attached to a specific Amazon developer account and configured for use on specific
devices. With this approach, municipalities could place the device(s) in specific buildings (e.g. the town hall) and visitors to those buildings could interact with the system there
2. Deployed publicly for use by residents within their homes. With this model, the solution would need to be extended to support multiple municipalities
In its current state, the device is only supporting one municipality, specifically Highland Park, but the solution could be easily extended to support multiple municipalities. This could be accomplished by doing the following Adding columns to the database tables as necessary to track answers by municipality Supporting the pass-through of municipality identifiers as parameters across the service
layers Modifying the Alexa Skill to prompt a user for their municipality and storing it in a session
variable
Testing the Solution
The My Town Hall skill can be tested without an Amazon Echo device using the Amazon Developer Portal. This portal provides a web interface you can use to type a question and get the response from Alexa. You can access this test interface by following the instructions below Access the Amazon Developer portal at http://developer.amazon.com Login with
Username: [email protected] Password: Su5ta1nabl3
Click on the Alexa tab at the top of the page Under Alexa Skills Kit click Get Started Click on My Town Hall Click on Test on the left Under ‘Enter Utterance’, ask questions like: “What are the hours of the town hall”
(see the questions.txt file in the Troop 58 Google Drive mytownhall/alexa folder for additional questions)
Click on Ask My Town Hall Click on the Listen button in the response panel to hear the answer spoken back
Testing the Administration
Admin pages were created for administering Events and Locations You can find them in the Troop 58 CFC Google Drive folder in
mytownhall/admin as admin-locations.html and admin-events.html You can double click on the files to open them in a web browser
directly as long as you are on a computer that is connected to the internet
Click into a field to update that field, a form field control will be displayed (note: name values are specifically tied to the questions which are asked and cannot be changed via the admin pages)
Changing values will directly change the answers given by Alexa, the pages use AJAX to update the data, so there is no save button required
The pages use an open-source framework called Editablegrid to dynamically render the table used for managing the values, so it may take a second to load
Uniqueness
Our solution is unique because it leverages a new type of technology to address a common issue
The solution can be easily extended functionally, scaled for varying loads of volume and easily adapted for other towns
Information can be easily managed by the administration without the need for additional infrastructure
It was created by a group of boy scouts from Troop 58 in Oceanport as part of a Programming merit badge program
Any questions/issues please contact John Fleming at [email protected]
Thank you
DEMO PRESENTATION
My Town Hall
AN AMAZON ALEXA SKILLBY: TROOP 58 – OCEANPORT, NJ
CREATED FOR THE SUSTAINABLE JERSEYCODING FOR COMMUNITY COMPETITION
My Town Hall Demo Presentation
Highland Park Challenge
Line for Borough Clerk
I just need to know
where the mayor’s office is!
Highland Park Solution
Line for Borough Clerk
I just need to know
where the mayor’s office is!
To get to the mayor’s
office, do downstairs and make a
right, proceed…
Solution Architecture
AMAZON
ALEXA DEVICE
API GATEWAY
LAMBDA FUNCTION
S
RDS DB
SECURE AMAZON AWS ECO -SYSTEM
Project Approach
Challenge selectionDiscussed steps in software designIncluded concepts from scouting
Programming merit badge programSolution DesignCoded in StagesTestingPresentation
Locations/Departments
Information provided based on Address, Phone, Hours for locations & departments
Questions can be asked in different ways When is the library open? What are the hours of the library?
Data managed through admin page https://sites.google.com/site/troop58oceanport/documents/admin
-locations.html
Events/Calendar
Description, Dates, Times, Location, Contact InfoInformation about an event
What is the unity celebration event? Where is the unity celebration event? Who can I talk to about the unity celebration event?
Information about a timeframe What’s happening next week? Timeframe options: this week, next week, this month, next month,
today, tomorrow
Data managed through admin page https://sites.google.com/site/troop58oceanport/documents/admin-events.html
One-Off Question and Answer
One-off questions and answers How do I get to the mayor’s office?
Adding new events, locations, questions requires updates to Alexa skill and database
Data managed through admin page https://sites.google.com/site/troop58oceanport/documents/admin
-questions.html
Next Steps
Additional features required Dynamic Management of Questions Multi-Town Support Security Data Validation Refine Alexa App Presentation
Deployment Single Account per Town Public Certification via Amazon Varying Cost Model based on Utilization and Device(s)
Thank You!
Questions??