Mr. Darcy Presents the News
is an Alexa skill that delivers real-time breaking news in an unexpected voice: that of the noble and complex character Fitzwilliam Darcy from Jane Austen's novel Pride and Prejudice.
Alexa, Ask Mr. Darcy for the news
Good morning.
First: the current occupant of the executive branch, President Joseph Biden, will take the opportunity to address the American people in a State of the Union address on March 7, a platform from which he will no doubt extol the virtues of his administration and the alleged "test of democracy" that is the upcoming presidential campaign, a test, one must presume, of the American people's taste for mediocrity and vacuous rhetoric.
Next, ...
The raw data for Mr. Darcy's news reports is the social media posts of popular news organizations. This data is rationalized at intervals into topics according the procedures below, with the highest-importance topics then fed to a Large Language Model (LLM), which generates a story for each topic in the voice of Mr. Darcy. The skill delivers these stories to Alexa customers on demand, using a male UK English text-to-speech voice.
Our simple news tracking system continuously collates tweets from major news organizations (CNN, NBC, New York Times, BBC, etc.) and then at regular intervals during the day, a process is run to generate the top-ranking topics, and generate the text for for Mr. Darcy's bulletin.
How is a news bulletin created?
In order to generate the content of a bulletin at any time from the latest set of tweets, we must: (1) isolate the topics present in the data, that is, given a set of tweets, classify how many distinct topics are represented and which tweets belong to which topic; and then (2) rank each topic in terms of its likely interest to the audience, to determine the most important content for the bulletin.
For the topic classification task (1), we first assume every tweet is a distinct topic, then apply a simple lexical matching mechanism to find possibly related topics, and follow it up with an LLM lookup to resolve cases of ambiguity. This can be done with relatively high accuracy using a small, low-cost LLM, e.g. Amazon's Titan Text Lite model.
For the importance ranking task (2), we prompt an LLM to rank the top 5 topics in the set presented to it. We do this with multiple 'votes' (that is, output completions for the same prompt) in order to provide smoother and more reliable scoring. At present, the OpenAI GPT3.5 model is an effective model for this, given its cost and n choices capability (despite its relatively early data cut-off date of September 2021).
Finally, to generate the output for each story in Mr. Darcy's bulletin, we take each of the top 3-5 topics, and run a text generation task with the topic tweets as input, prompting our LLM to render the content as a news story in the voice of Mr. Darcy. (Our prompt encourages the system to display his infamous arrogance, which often yields a comment of some gravitas after a summary of the story. Our customers seem to like this dimension to the experience.)
Five Capitol riot defendants accused of leading the "first breach" on Jan. 6 have been found guilty at trial. (source: CBS)
↓
The recent trial of the Capitol riot defendants has yielded a most satisfactory outcome, with the jury finding five of the accused guilty of their involvement in the initial breach of the Capitol building. This outcome serves as a testament to the effectiveness of the legal system in upholding justice and holding those responsible for their actions accountable, a notion that is all too frequently disregarded in the face of mob mentality and chaotic upheaval.
What LLMs do you use for generation?
Overall, we found the OpenAI GPT4 and Anthropic Claude 2.1/Instant models to be in general the most 'on voice' in terms of the tone and content of Mr. Darcy's output, and the Meta Llama 2 13B model also consistently good, with the advantage of being more economical to run.
For all models, much better performance was gained from judiciously tailoring the examples in our prompts.
Interestingly, Llama 2 13B also seemed more willing to indulge in outright sarcasm (despite there being no sarcasm in the prompt examples) as in the following:
President Xi Jinping assured Biden that China would not interfere in the 2024 US elections when the two men met in November (source: CNN)
↓
The esteemed President Xi Jinping, a paragon of integrity and statesmanship, has graciously promised President Biden that China will not meddle in the upcoming 2024 U.S. elections, doubtless out of a deep respect for the democratic process and the sovereignty of the American people. One must suppose that this assurance is worth its weight in gold, given the long history of Chinese duplicity and subterfuge in such matters.
OpenAI's GPT system was unreliable for the use case of news story generation, since it frequently refused to generate reports about sensitive topics, e.g. the Israel/Hamas conflict in Palestine.
What systems are involved?
Mr. Darcy presents the News uses the X (formerly Twitter) posts of the following organizations: for US customers CBS, CNN, NBC, The BBC and The New York Times; and for UK customers Channel 4 News, LBC, Sky News and The Daily Telegraph. For each news bulletin, the sources are credited on Alexa devices with screens.
Our story ranking and text generation capabilities are hosted in Amazon AWS, primarily using DynamoDB, Bedrock and Lambda, and delivered as a customer experience via the Alexa Skills Kit infrastructure.
The free version of the skill allows customers to hear one news bulletin of 3 stories per day. The premium add-on delivers multiple news bulletins per day, each with 5 stories, plus real-time weather reports (using the Miss Jane system).