Inspiration

The current state of digital news is overcrowded with text, and non-personalised content which makes it hard to focus on one particular story. Yourweb.co solves this problem by creating a more intimate ‘news discussion’ allowing users to be more involved in a headline rather than rapidly skimming over it. The Lex based chatbot facilitates this new user experience by interpreting and eliciting user statements in a natural way. This has allowed an extremely simple interface to be developed around discovering and saving news articles.

What it does

It enable users to discuss and discover current news and save articles for reading later. Users interact with a AWS Lex and AWS Lambda powered bot which has contextual awareness of recent news. The bot discusses recent news with the user based on the profile they have developed in the system and the queues the bot receives throughout the conversation.

How I built it

Please refer to the high level architecture diagram supplied as an image.

On a daily basis, fresh news articles are automatically loaded from the Bing news API into S3 which is accessed by the Lex bot’s Lambda backend (Lambda worker) during runtime. Once a user signs into the service the Lex session is automatically triggered from the client. This generates the initial 'intent' which allows the Lambda worker function to take proactive control of the conversation.

The Lambda worker function is configured to perform logic from all the intents set up in Lex and also the UI activity in the client web app (https://yourweb.co). The reason for this is to enable simpler integration between chat directives and UI directives (e.g. button presses etc.). As a result, a lot of the Lambda worker code is based around managing the status of the user and determining which functions should be invoked.

The goal of the Lambda worker is to provide relevant articles to the user throughout the conversation, so it is regularly placing data into the session attributes and S3 profile for further reference at later stages in the conversation. The Lambda worker is the most complex component in the architecture.

Challenges I ran into

Scaleability was an initial concern due to the high price of the Bing News API, however this was solved by leveraging Cloudwatch Events in AWS to control the loads on the Bing News endpoint. Another challenge was finding the right balance between the Lex actions which can be coordinated from Lambda and the actions which can be configured in the Lex console.

Accomplishments that I'm proud of

I am proud that I have been able to stand-up a personalised service that can infinitely scale for as little as $6 per month running costs.

What I learned

Failing fast is vital to getting a good outcome. For this hackathon, the yourweb.co chatbot was the fourth idea I had developed after doing tech spikes on three previous concepts. Rapid prototyping is critical to enabling better decisions earlier in the project (before too much time has been invested into one particular idea). These other ideas were fine as concepts but after doing the spikes it became evident that they were either too irrelevant, time-consuming or too risky to be attempted in the hackathon.

What's next for yourweb.co

Once the hackathon judging is over, I'll make some further enhancements to the recommendations engine serving up articles for users. I'll also do some exploratory marketing to draw traffic and gather feedback/ analytics from real-life users. I will also expand Lex's utterance configuration for the bot based on this feedback and usage data.

Built With

Share this project:

Updates