How Alexa knows “peanut butter” is one shopping-list item, not two

At a recent press event on Alexa's latest features, Alexa’s head scientist, Rohit Prasad, mentioned multistep requests in one shot, a capability that allows you to ask Alexa to do multiple things at once. For example, you might say, “Alexa, add bananas, peanut butter, and paper towels to my shopping list.” Alexa should intelligently figure out that “peanut butter” and “paper towels” name two items, not four, and that bananas are a separate item.

Typical spoken-language understanding (SLU) systems map user utterances to intents (actions) and slots (entity names). For example, the utterance “What is the weather like in Boston?” has one intent, WeatherInfo, and one slot type, CityName, whose value is “Boston.” This is an example of a “narrow parse”.

Narrow parsers usually have rigid constraints, such as allowing only one intent to be associated with an utterance and only one value to be associated with a slot type. In a paper that we’re presenting at this year’s IEEE Spoken Language Technology conference (SLT 2018), we discuss a way to enable SLU systems to understand compound entities and intents.

We augment an SLU system with a domain-agnostic parser that can identify syntactic elements that establish relationships between different parts of an utterance, or “coordination structures”. In tests comparing our system to an off-the-shelf broad syntactic parser, we show a 26% increase in accuracy.

Off-the-shelf broad parsers are intended to detect coordination structures, but they are often trained on written text with correct punctuation. Automatic speech recognition (ASR) outputs, by contrast, often lack punctuation, and spoken language has different syntactic patterns than written language.

Our new parser is a deep neural network that we train on varied coordination structures in spoken-language data. The training examples are labeled according to the BIO scheme, which indicates groups of words — or “chunks” — that should be treated as ensembles. Most of the words in a sample utterance are labeled with either a B, to indicate the beginning of a chunk, an I, to indicate the inside of a chunk, or an O, to indicate a word that lies outside a chunk. Coordinating conjunctions such as “and” are labeled independently.

BIO_scheme_examples.png._CB459952676_.png
Sample utterances, labeled according to the BIO scheme

Inputs to the network undergo embedding, a process that represents words as points (vectors) in high-dimensional spaces. We experiment with two different types of embeddings: word embeddings, in which words with similar functions are clustered together, and character embeddings, in which words that contain the same subsequences of letters are clustered together. Character embeddings are useful for systems like ours that are intended to generalize across contexts, because they enable educated guesses about the meanings of unfamiliar words on the basis of their roots, prefixes, and suffixes.

The embeddings then pass through a bidirectional long short-term memory. Long short-term memories (LSTMs) are networks that process sequential data in order, and any given output factors in the outputs that precede it. Bidirectional LSTMs run through a given data sequence both forward and backward.

The output of the bi-LSTM is a contextual embedding of each word in the input sentence, which captures information about its position in the sentence. On top of the bi-LSTM layer, we have a dense layer to map each contextual word embedding to a distribution over the output labels, which are the B, I, and O of the BIO scheme.

In our experiments, we evaluated a system that classifies each word of the input according to its most probable output label. But we got better results by passing the label estimates through a conditional-random-field (CRF) layer. The CRF layer learns associations between output labels and chooses the most likely sequence of output labels from all possible sequences.

When we relied directly on the output of the label-prediction layer, it was possible to get incoherent outputs — such as an O tag followed by an I tag — since each label is independently predicted. The CRF layer, however, would learn that such a sequence of output labels is unlikely and assign it a low score.

Instead of building separate parsers for different slot types (such as ListItem, FoodItem, Appliance, etc.), we built one parser that can handle multiple slot types. For example, our parser can successfully identify ListItems in the utterance “add apples peanut butter and jelly to my list” and Appliances in the utterance “turn on the living room light and kitchen light”.

To enable our model to generalize, we used a technique called adversarial training. During training, the output of the bi-LSTM layer passes not only to the densely connected layer that learns to predict BIO labels but to another layer that learns to predict domains, or broad topic categories such as Weather, Music, and Groceries. The network is evaluated not only on how well it predicts BIO labels but on how badly it predicts domain labels. That way, we ensure that it learns chunking cues that are not domain-specific.

To generate data for our experiments, we take annotated single-entity data and replace the single entities with two or more entities of the same slot type with coordinating conjunctions between the penultimate entity and the final entity. For example, the utterance “set the timer for five minutes” might become “set the timer for five and ten minutes”.

We ran an extensive set of experiments with variations in how the word embeddings are initialized (randomly or with pretrained embeddings, such as FastText, that group words together by meaning), whether or not we use character embeddings, and whether or not we use the CRF layer at the top. We tested separately on two-entity, three-entity, and four-or-more-entity utterances and measured accuracy.

We noticed a few general trends: irrespective of the model configuration, accuracy degrades as we move from two- to three- to four-or-more-entity utterances; initialization with pretrained embeddings usually helps; and adding a CRF layer almost always improves accuracy. Our best results — the ones that improved most on the off-the-shelf parser — came from a model that used character embeddings, pretrained FastText embeddings, and a CRF layer.

Acknowledgments: Rahul Goel, Tagyoung Chung, Abhishek Sethi, Arindam Mandal, Spyros Matsoukas

Related content

US, WA, Seattle
Are you interested in shaping the future of entertainment? Prime Video's technology teams are creating best-in-class digital video experience. Prime Video is a first-stop entertainment destination offering customers a vast collection of premium programming in one app available across thousands of devices. Prime members can customize their viewing experience and find their favorite movies, series, documentaries, and live sports – including Amazon MGM Studios-produced series and movies; licensed fan favorites; and exclusive access to coverage of live sports. All customers regardless of whether they have a Prime membership or not, can access programming from subscriptions such as Apple TV, Peacock Premium Plus, HBO Max, FOX One, Crunchyroll and MGM+, as well as more than 900 free ad-support (FAST) Channels, rent or buy titles, and enjoy even more content for free with ads. The Prime Video Personalization and Discovery team matches customers with the right content at the right time, at all touch points throughout the content discovery journey. We are looking for a customer-focused, solutions-oriented Data Scientist to help build new data-driven frameworks to understand what makes new personalization and content discovery innovations successful for users and the business. You'll be part of an embedded science team on projects that are fast-paced, challenging, and ultimately influence what millions of customers around the world see when the log into Prime Video. The ideal candidate brings strong problem-solving skills, stakeholder communication skills, and the ability to balance technical rigor with delivery speed and customer impact. You will build cross-functional support within Prime Video, assess business problems, define metrics, and support iterative scientific solutions that balance short-term delivery with long-term science roadmaps. Key job responsibilities - Use advanced statistical and machine learning techniques to extract insights from complex, large-scale data sets - Design and implement end-to-end data science workflows, from data acquisition and cleaning to model development, testing, and deployment - Support scalable, self-service data analyses by building datasets for analytics, reporting and ML use cases - Partner with product stakeholders and senior science peers to identify strategic data-driven opportunities to improve the customer experience - Communicate findings, conclusions, and recommendations to technical and non-technical stakeholders - Stay up-to-date on the latest data science tools, techniques, and best practices and help evangelize them across the organization
IN, KA, Bengaluru
Amazon Music is an immersive audio entertainment service that deepens connections between fans, artists, and creators. From personalized music playlists to exclusive podcasts, concert livestreams to artist merch, Amazon Music is innovating at some of the most exciting intersections of music and culture. We offer experiences that serve all listeners with our different tiers of service: Prime members get access to all the music in shuffle mode, and top ad-free podcasts, included with their membership; customers can upgrade to Amazon Music Unlimited for unlimited, on-demand access to 100 million songs, including millions in HD, Ultra HD, and spatial audio; and anyone can listen for free by downloading the Amazon Music app or via Alexa-enabled devices. Join us for the opportunity to influence how Amazon Music engages fans, artists, and creators on a global scale. Learn more at https://www.amazon.com/music. The Music Catalog Quality team at Amazon Music serves a key role in developing solutions to ensure and improve the quality of catalog metadata and content across the music streaming experience. We create solutions that detect, measure, and remediate quality issues in music metadata - including artist information, track attributes, versions, content tags, and provide actionable insights that enable continuous improvement of the catalog. We leverage a host of scientific and engineering technologies to accomplish this mission, including Generative AI, classical ML, Natural Language Processing, Computer Vision, and automated data validation pipelines. Key job responsibilities As an Applied Scientist, you will own the design and development of end-to-end systems. You’ll have the opportunity to create technical roadmaps, and drive production level projects that will support Amazon Science. You will work closely with Amazon scientists, and other science interns to develop solutions and deploy them into production. The ideal scientist must have the ability to work with diverse groups of people and cross-functional teams to solve complex business problems. Other responsibilities include: - Collaborate with scientists, engineers, and product managers to define and frame business problems as ML or optimization tasks. - Use machine learning, deep learning, LLMs and Agentic AI techniques to create scalable solutions for business problems - Analyze and extract relevant information from large amounts of Amazon's data to help automate and optimize key processes - Design, development and evaluation of AI models for predictive learning - Research and implement novel machine learning and statistical approaches - Implement scalable data pipelines and model-serving systems. - Analyze experimental results, draw insights, and refine models to improve accuracy and robustness. - Communicate findings and recommendations to technical and non-technical audiences.
IN, KA, Bengaluru
Amazon Music is an immersive audio entertainment service that deepens connections between fans, artists, and creators. From personalized music playlists to exclusive podcasts, concert livestreams to artist merch, Amazon Music is innovating at some of the most exciting intersections of music and culture. We offer experiences that serve all listeners with our different tiers of service: Prime members get access to all the music in shuffle mode, and top ad-free podcasts, included with their membership; customers can upgrade to Amazon Music Unlimited for unlimited, on-demand access to 100 million songs, including millions in HD, Ultra HD, and spatial audio; and anyone can listen for free by downloading the Amazon Music app or via Alexa-enabled devices. Join us for the opportunity to influence how Amazon Music engages fans, artists, and creators on a global scale. Learn more at https://www.amazon.com/music. The Music Catalog Quality team at Amazon Music serves a key role in developing solutions to ensure and improve the quality of catalog metadata and content across the music streaming experience. We create solutions that detect, measure, and remediate quality issues in music metadata - including artist information, track attributes, versions, content tags, and provide actionable insights that enable continuous improvement of the catalog. We leverage a host of scientific and engineering technologies to accomplish this mission, including Generative AI, classical ML, Natural Language Processing, Computer Vision, and automated data validation pipelines. Key job responsibilities As an Applied Scientist, you will own the design and development of end-to-end systems. You’ll have the opportunity to create technical roadmaps, and drive production level projects that will support Amazon Science. You will work closely with Amazon scientists, and other science interns to develop solutions and deploy them into production. The ideal scientist must have the ability to work with diverse groups of people and cross-functional teams to solve complex business problems. Other responsibilities include: - Collaborate with scientists, engineers, and product managers to define and frame business problems as ML or optimization tasks. - Use machine learning, deep learning, LLMs and Agentic AI techniques to create scalable solutions for business problems - Analyze and extract relevant information from large amounts of Amazon's data to help automate and optimize key processes - Design, development and evaluation of AI models for predictive learning - Research and implement novel machine learning and statistical approaches - Implement scalable data pipelines and model-serving systems. - Analyze experimental results, draw insights, and refine models to improve accuracy and robustness. - Communicate findings and recommendations to technical and non-technical audiences.
IN, KA, Bengaluru
Amazon Music is an immersive audio entertainment service that deepens connections between fans, artists, and creators. From personalized music playlists to exclusive podcasts, concert livestreams to artist merch, Amazon Music is innovating at some of the most exciting intersections of music and culture. We offer experiences that serve all listeners with our different tiers of service: Prime members get access to all the music in shuffle mode, and top ad-free podcasts, included with their membership; customers can upgrade to Amazon Music Unlimited for unlimited, on-demand access to 100 million songs, including millions in HD, Ultra HD, and spatial audio; and anyone can listen for free by downloading the Amazon Music app or via Alexa-enabled devices. Join us for the opportunity to influence how Amazon Music engages fans, artists, and creators on a global scale. Learn more at https://www.amazon.com/music. The Music Catalog Quality team at Amazon Music serves a key role in developing solutions to ensure and improve the quality of catalog metadata and content across the music streaming experience. We create solutions that detect, measure, and remediate quality issues in music metadata - including artist information, track attributes, versions, content tags, and provide actionable insights that enable continuous improvement of the catalog. We leverage a host of scientific and engineering technologies to accomplish this mission, including Generative AI, classical ML, Natural Language Processing, Computer Vision, and automated data validation pipelines. Key job responsibilities As an Applied Scientist, you will own the design and development of end-to-end systems. You’ll have the opportunity to create technical roadmaps, and drive production level projects that will support Amazon Science. You will work closely with Amazon scientists, and other science interns to develop solutions and deploy them into production. The ideal scientist must have the ability to work with diverse groups of people and cross-functional teams to solve complex business problems. Other responsibilities include: - Collaborate with scientists, engineers, and product managers to define and frame business problems as ML or optimization tasks. - Use machine learning, deep learning, LLMs and Agentic AI techniques to create scalable solutions for business problems - Analyze and extract relevant information from large amounts of Amazon's data to help automate and optimize key processes - Design, development and evaluation of AI models for predictive learning - Research and implement novel machine learning and statistical approaches - Implement scalable data pipelines and model-serving systems. - Analyze experimental results, draw insights, and refine models to improve accuracy and robustness. - Communicate findings and recommendations to technical and non-technical audiences.
US, CA, San Diego
Do you want to join an innovative team of scientists and engineers who use terabytes of data and create state-of-the-art Generative AI algorithms to push the boundaries of AI creativity? We are building foundational behavioral models for Amazon Stores using Generative AI, LLMs and Large Model training techniques that fuses general world knowledge, customer shopping behavior and Amazon e-commerce domain knowledge. We are looking for scientists who are passionate about technology, innovation, and customer experience, and are ready to make a lasting impact on the industry using intelligent and transformative AI applications. Working closely with cross-functional teams, you will be an essential part of every stage of AI development, from ideation and design to rigorous testing and successful deployment, ensuring our AI projects drive innovation and provide value for our customers. If you’re fired up about being part of a dynamic, driven team, then this is your moment to join us on this exciting journey! Key job responsibilities In this role you will leverage your background and expertise to lead developing foundational behavioral model for Amazon Stores using Generative AI, LLM and Large Model training techniques. On a day-to-day basis, you will: - Research and implement new algorithms and architectures for generative AI applications. - Optimize model performance and scalability for inference and deployment. - Collaborate with other talented applied scientists and engineers to gather and preprocess large datasets and develop an improved training infrastructure that accelerates innovation. - Experiment with SOTA methods to improve generative AI model quality. - Provide technical expertise and guidance to support the integration of generative AI solutions into various products and services.
IN, KA, Bengaluru
The Music Catalog Quality team at Amazon Music serves a key role in developing solutions to ensure and improve the quality of catalog metadata and content across the music streaming experience. We create solutions that detect, measure, and remediate quality issues in music metadata - including artist information, track attributes, versions, content tags, and provide actionable insights that enable continuous improvement of the catalog. We leverage a host of scientific and engineering technologies to accomplish this mission, including Generative AI, classical ML, Natural Language Processing, Computer Vision, and automated data validation pipelines. As an Applied Science Manager on the team, you will lead a team of scientists to define and execute a transformative vision for holistic catalog quality measurement, metadata enrichment, and content integrity. Your team will own the science solutions for foundational quality detection frameworks, metadata validation and correction technologies, state-of-the-art algorithms to identify and resolve catalog anomalies (violative content, duplicative/low value content, misattributed tracks, incorrect metadata), and/or agentic AI solutions that help internal teams quickly surface and fix quality issues to ensure customers receive accurate, complete catalog experiences. Key job responsibilities You independently manage a team of scientists. You identify the needs of your team and effectively grow, hire, and promote scientists to maintain a high-performing team. You have a broad understanding of scientific techniques, several of which may fall out of your specific job function. You define the strategic vision for your team. You establish a roadmap and successfully deliver scientific solutions that innovate on catalog quality detection, metadata enrichment, and content integrity. You define clear goals for your team and effectively prioritize, balancing short-term quality improvements and long-term innovation in catalog intelligence. You establish clear and effective metrics and scientific process to enforce consistent, high-quality artifact delivery and measurable catalog quality improvements. You proactively identify risks and bring them to the attention of your manager, customers, and stakeholders with plans for mitigation before they become roadblocks. You know when to escalate. You communicate ideas effectively, both verbally and in writing, to all types of audiences. You author strategic documentation for your team. You communicate issues and options with leaders in such a way that facilitates understanding and that leads to a decision. You work successfully with customers, leaders, and engineering teams. You foster a constructive dialogue, harmonize discordant views, and lead the resolution of contentious issues. About the team We are a team of scientists and MLEs focused on music catalog quality and metadata intelligence. You will work with colleagues with deep expertise in ML, NLP, CV, Gen AI, and data quality systems with a diverse range of backgrounds. We partner closely with top-notch engineers, product managers, content operations teams, and other scientists with expertise in music metadata, content classification, and building scalable modeling and software solutions that keep the Amazon Music catalog accurate, complete, and trustworthy.
US, CA, San Diego
Do you want to join an innovative team of scientists and engineers who use terabytes of data and create state-of-the-art Generative AI algorithms to push the boundaries of AI creativity? We are building foundational behavioral models for Amazon Stores using Generative AI, LLMs and Large Model training techniques that fuses general world knowledge, customer shopping behavior and Amazon e-commerce domain knowledge. We are looking for scientists who are passionate about technology, innovation, and customer experience, and are ready to make a lasting impact on the industry using intelligent and transformative AI applications. Working closely with cross-functional teams, you will be an essential part of every stage of AI development, from ideation and design to rigorous testing and successful deployment, ensuring our AI projects drive innovation and provide value for our customers. If you’re fired up about being part of a dynamic, driven team, then this is your moment to join us on this exciting journey! Key job responsibilities In this role you will leverage your background and expertise to lead developing foundational behavioral model for Amazon Stores using Generative AI, LLM and Large Model training techniques. On a day-to-day basis, you will: - Research and implement new algorithms and architectures for generative AI applications. - Optimize model performance and scalability for inference and deployment. - Collaborate with other talented applied scientists and engineers to gather and preprocess large datasets and develop an improved training infrastructure that accelerates innovation. - Experiment with SOTA methods to improve generative AI model quality. - Provide technical expertise and guidance to support the integration of generative AI solutions into various products and services.
US, WA, Seattle
Do you want to join an innovative team of scientists and engineers who use terabytes of data and create state-of-the-art Generative AI algorithms to push the boundaries of AI creativity? We are building foundational behavioral models for Amazon Stores using Generative AI, LLMs and Large Model training techniques that fuses general world knowledge, customer shopping behavior and Amazon e-commerce domain knowledge. We are looking for scientists who are passionate about technology, innovation, and customer experience, and are ready to make a lasting impact on the industry using intelligent and transformative AI applications. Working closely with cross-functional teams, you will be an essential part of every stage of AI development, from ideation and design to rigorous testing and successful deployment, ensuring our AI projects drive innovation and provide value for our customers. If you’re fired up about being part of a dynamic, driven team, then this is your moment to join us on this exciting journey! Key job responsibilities In this role you will leverage your background and expertise to lead developing foundational behavioral model for Amazon Stores using Generative AI, LLM and Large Model training techniques. On a day-to-day basis, you will: - Research and implement new algorithms and architectures for generative AI applications. - Optimize model performance and scalability for inference and deployment. - Collaborate with other talented applied scientists and engineers to gather and preprocess large datasets and develop an improved training infrastructure that accelerates innovation. - Experiment with SOTA methods to improve generative AI model quality. - Provide technical expertise and guidance to support the integration of generative AI solutions into various products and services.
US, MA, Boston
The Alexa Edge AI team is looking for a passionate, talented, and innovative senior applied scientist with a strong background in deep learning and speech processing techniques. You will have an enormous opportunity to impact the customer experience, design, architecture, and implementation of an industry-leading product used every day by people you know. As an Applied Scientist, you will leverage Amazon’s heterogeneous data sources and large-scale computing resources to develop novel machine learning algorithms to advance the state of the art in speech and audio processing. Key job responsibilities · Conduct applied research project(s) effectively and know when to ask for help and when to work independently · Engage with an experienced cross-disciplinary staff to conceive and design innovative solutions for consumer products. · Actively participate and contribute to research activities including publications and patents · Work closely with an internal inter-disciplinary team, and outside partners to drive key aspects of product definition, execution and test. · Be proactive, flexible and able to succeed within an open collaborative peer environment
US, CA, Pasadena
We are seeking an Applied Scientist to join the SAF Lab. In this role, you will lead the effort in safe reinforcement learning (RL) including the development of legged locomotion algorithms that internalize safety and are deployable on physical hardware—enabling highly dynamic robots to walk, run, avoid collisions and recover from disturbances with agility and robustness. You will develop RL architectures that interface with physics-based models (for dynamic retargeting and reward shaping), internalize safety constraints in training, sim-to-real transfer and interface with safety filters at run-time. Therefore, your work will sit at the intersection of safety-critical control and learning, and you will collaborate with others in the SAF Lab and Amazon working on perception, planning, whole-body and safety-critical control. This is an opportunity to shape the foundations of safe learning on emerging platforms that will remove bottlenecks to deployment and enable these robots to safely operate around humans. Key job responsibilities • Collaborate with product teams and science leaders to set a science roadmap (with eventual impact on real robots). • Design, train, and deploy reinforcement learning (RL) policies for dynamic legged locomotion including walking, running, stair climbing, and fall recovery on physical robots • Develop sim-to-real transfer pipelines that produce policies robust to the reality gap, including domain randomization, system identification, and adaptive strategies • Integrate control-based methods with RL, as inputs to the RL (dynamic retargeting and control-guided rewards), in training (internalizing safety constraints in training), and as the RL feeds into safety layers and whole-body control • Develop and maintain large-scale training infrastructure for locomotion policy learning, including physics simulation environments, domain randomization and GPU parallelization • Investigate the distillation of locomotion policies, integration with whole-body control, foundation models, VLAs, world models, perception and full-stack autonomy • Evaluate policy performance rigorously through simulation benchmarks, hardware experiments, and failure-mode analysis • Publish research at top-tier robotics and ML venues and contribute to Amazon's scientific reputation in advanced robotics • Collaborate with perception and planning teams to enable terrain-aware and goal-conditioned locomotion behaviors A day in the life Amazon offers a full range of benefits that support you and eligible family members, including domestic partners and their children. Benefits can vary by location, the number of regularly scheduled hours you work, length of employment, and job status such as seasonal or temporary employment. The benefits that generally apply to regular, full-time employees include: 1. Medical, Dental, and Vision Coverage 2. Maternity and Parental Leave Options 3. Paid Time Off (PTO) 4. 401(k) Plan If you are not sure that every qualification on the list above describes you exactly, we'd still love to hear from you! At Amazon, we value people with unique backgrounds, experiences, and skillsets. If you’re passionate about this role and want to make an impact on a global scale, please apply! About the team Work with the inventor of control barrier functions in the Safe Autonomy Frontiers (SAF) Lab. The first industry research lab in safe autonomy, developing a universal safety layer for the next generation of robotic systems: mobile robots, manipulators, mobile manipulators, and future platforms with dynamic stability. You will push the frontiers of performant safety for highly dynamic robots: CBF theory integrated with perception and learning, evaluated on next-generation robots. Your work will underpin robots operating alongside people at Amazon's unprecedented scale.