How Project P.I. helps Amazon remove imperfect products

A combination of generative AI and computer vision imaging tunnels is helping Amazon proactively improve the customer experience.

Although there are hundreds of millions of products stored in Amazon fulfillment centers, it’s very rare for customers to report shipped products as damaged. However, Amazon’s culture of customer obsession means that teams are actively working to find and remove even that relatively small number of imperfect products before they’re delivered to customers.

Related content
Using causal random forests and Bayesian structural time series to extrapolate from sparse data ensures that customers get the most useful information as soon as possible.

One of those teams includes scientists who are using generative AI and computer vision, powered by AWS services such as Amazon Bedrock and Amazon SageMaker, to help spot, isolate, and remove imperfect items.

Inside Amazon fulfillment centers across North America, products ranging from dog food and phone cases to T-shirts and books pass through imaging tunnels for a wide variety of uses, including sorting products based on their intended destination. Those use cases have been extended to include the use of artificial intelligence to inspect individual items for defects.

For example, optical character recognition (OCR) — the process that converts an image of text into a machine-readable text format — checks expiration dates on product packaging to ensure expired items are not sent to customers. Computer vision (CV) models — trained with reference images from the product catalog and actual images of products sent to customers — pore over color and monochrome images for signs of product damage such as bent book covers.

Amaozn Science Project P.I. Private Investigator

Additionally, a recent breakthrough solution leverages the ability of generative AI to process multimodal information by synthesizing evidence from images captured during the Amazon fulfillment process and combining it with written customer feedback to trigger even faster corrective actions.

This effort, referred to collectively as Project P.I., which stands for “private investigator”, encompasses the team’s vision of using a detective-like toolset to uncover both defects and, wherever possible, their cause — to address the issue at its root before a product reaches the customer.

"We want to equip ourselves with the most powerful, scalable tools and levers to help us protect our customers’ trust,” said Pingping Shan, director of perfect order experience at Amazon.

Defect detection

Project P.I. is an outgrowth of Amazon’s product quality program, and the tools and systems developed by the team’s scientists include machine learning models that assist selling partners with listing products with accurate information.

“The product quality team is constantly looking for ways to both reduce the burden on the sellers and to proactively verify the condition of inventory in fulfillment centers,” Shan said.

An early solution was an OCR model that checks the labeling information when inventory arrives and compares that to the information in Amazon’s database. If a mismatches occurs — such as a pallet of dog food with an earlier sell-by date than the date in the database — the team can isolate and inspect the pallet and prevent any expired products from reaching the customer.

When an item-level defect is detected, Amazon takes several steps to resolve the issue, including investigating whether the item is one in a defective batch and, if so, isolating the batch from the rest of the items, explained Angela Ke, a senior product manager.

“We want to make sure that customers don’t have to experience issues with product quality. That’s really the vision of Project P.I.,” she said. “We want to get it right for customers the first time, so we want to inspect the products before they leave our fulfillment center, and we incorporate AI to streamline the workflow.”

Customer feedback aids model training

Despite the team’s best efforts, sometimes product quality issues only become known after an item has been delivered to customers, noted Mark Ma, a principal product manager. Those arise in cases where customers have filed a return noting the issue. In those instances, the team tracks down the batch the product came from, verifies the issue, removes those items from fulfillment center shelves, issues refunds, and communicates the issue to the seller.

“We know that that correcting the defects after they happen is not the best way to protect and improve the customer experience. That’s why we started exploring what kind of data we can gather further upstream,” he said. Those discussions eventually led to leveraging the tunnel images to better identify products with defects and take surgical and proactive action to address them — before they’re packaged and shipped.

Related content
DocFormerV2 makes sense of documents using local features, outperforming much bigger models.

One of the early challenges with that approach entailed training CV models to correctly identify defects, noted Vincent Gao, a senior science manager on the product quality team.

“It’s like finding a needle in a haystack,” he said. “We needed a model that could accurately identify those among all the other normal products. Otherwise, we could be finding a lot of false positives making the fulfillment process inefficient.”

Gao’s team turned to an ensemble approach that combines self-supervised models with supervised transformer models —a neural-network architecture that uses attention mechanisms to improve performance on machine learning tasks — to spot the difference between normal and defective items. By learning what the “correct” product looks like from fulfillment center images associated with normal orders, the model can compare an item on its way to be packaged against its “normal” image and provide a measurement of how much it differs.

This approach allowed the team to more reliably spot obvious product defects, such as a book with a torn cover or an empty canister of tennis balls, yet it still couldn’t account for some of the fine grain details like a mislabeled T-shirt size or bent box.

To achieve that, the team turned to customer feedback to help train a variety of ML models that can spot the difference between normal and defective items. This more detailed, labeled data was used to refine the model to detect the types of defects customers notice.

“Using that, we are able to be more targeted on the areas that we want to identify so that we can enable the models to learn more on those finer details,” Gao said.

Leveraging generative AI

Today, the science team is leveraging breakthroughs in generative AI to make product defect detection more scalable and robust. For example, the team launched a multimodal large language model (MLLM) that’s been trained to identify damage such as broken seals, torn boxes, and bent book covers, and report in plain language the damage it detects.

The LLM is working side-by-side with the visual language model to analyze data from different sources and modalities to help us make a decision.
Vincent Gao

“We use the MLLM to ingest and understand the images from fulfillment centers to identify damage patters with zero-shot learning capability — meaning the model can recognize something it has not seen in training. That is a significant plus when it comes to identifying damage patterns given their vast variation,” Ma explained. “Then we use the model to summarize common damage patterns, which enable us to work more upstream with our selling partners and manufactures to proactively address these issues.”

With traditional CV technologies, a model would be trained for each damage scenario – broken seal, torn box, etc. – Gao said, resulting in an unscalable ensemble of dozens to hundreds of models. The MLLM, on the other hand, is a single and scalable unified solution.

“That’s the new power we now have on top of the classic computer vision,” Shan said.

The Project P.I. team has also recently put into production a generative AI system that uses an MLLM to investigate the root cause of negative customer experiences. The system first reviews customer feedback about the issue and then analyzes product images collected by the tunnels and other data sources to confirm the root cause.

Related content
Novel architectures and carefully prepared training data enable state-of-the-art performance.

For example, if a customer contacts Amazon because they ordered twin-size sheets but received king-size, the generative AI system cross-references that feedback with fulfillment center images. The system will ask questions such as, “Is the product label visible in the image?” “Does the label read king or twin?”

The system’s vision-language model in turn looks at the images, extracts the text from the label, and answers the questions. The LLM converts the answers into a plainspoken summary of the investigation.

“The LLM is working side-by-side with the visual language model to analyze data from different sources and modalities to help us make a decision,” said Gao. “We can actually have the LLM trigger the vision-language model to finish all the different verification tasks.”

Proof of concept in the fulfillment center

Since May 2022, the product quality team has been rolling out their item-level product defect detection solutions using imaging tunnels at several fulfillment centers in North America.

The results have been promising. The system has proven itself adept at sorting through the millions of items that pass through the tunnels each month and accurately identifying both expired items and issues such as wrong color or size.

Related content
First model to work across a wide range of products uses a second U-Net encoder to capture fine-grained product details.

In the future, the team aims to implement near real-time product defect detection with local image processing. In this scenario, defective items could be pulled off the conveyor belt and a replacement item automatically ordered, thus eliminating disruptions to the fulfillment process.

“Ultimately, we want to be behind the scenes. We don’t need our customers to know this is going on,” said Keiko Akashi, a senior manager of product management at Amazon. “The customer should be getting a perfect order and not even know that the expired or damaged item existed.”

Sidelining defective items will also result in fewer returns, which has an added sustainability benefit, noted Gao.

“We want to intercept the wrong items or defective items,” he said. “That translates to less back and forth shipping overhead, while also delivering a better customer experience.”

New avenues for investigation

Seamless integration of these solutions across the Amazon fulfillment center network will require refinements to the AI models such as the ability to parse a potential misperception of a defect from an actual defect. For example, a “manufactured on” date might be conflated with an “expiration” date or sneakers that arrive without a shoebox are the wrong item instead of a step to reduce packaging, noted Ke.

Related content
Amazon teams up with RTI International, Schlumberger, and International Paper on a project selected by the US Department of Energy to scale carbon capture and storage for the pulp and paper industry.

What’s more, there are challenges adapting CV models to the unique nuances of each fulfillment center and region, such as the size and color of the totes used to convey items around fulfillment centers, and the ability to extract data across a multitude of languages.

“There’s a lot of information that’s written in words,” Ke explained. “So how do we make sure that the model is picking up the right language and translating it correctly? That’s another challenge our science team is trying to solve.”

As the team has gone down this road, they’ve amassed data that shows the defects sometimes are the result of what happens outside of Amazon’s fulfillment centers.

“It could have been a carrier issue,” noted Akashi. “When customers say, ‘Hey, it came damaged,’ we can look into our outbound images and see that nothing has gone wrong. Then we can go figure out what else is going on.”

The team also plans to make data on defects more easily accessible to selling partners, Akashi added. For example, if Amazon discovered a seller accidentally put stickers with the wrong size on a product, Amazon would communicate the issue to help prevent the error from happening again.

“There’s an opportunity to get this information in front of our selling partners so they have visibility to their own inventory, and they can also have more succinct root causes to why these returns are happening,” she explained. “We’re excited that the data that we’re gathering and the AI models we are creating will benefit our customers and selling partners."

Research areas

Related content

US, WA, Seattle
Are you excited to play a strategic role in defining the customer experience on Tablets? Come join a dynamic, customer-obsessed, world-class science team to completely reshape the customer experience on our tablets. Key job responsibilities Using Amazon’s large-scale computing resources, you will design and deploy state-of-the-art recommendation models. You will ask research questions about customer behavior, design state-of-the-art models that help customers discover content, and deploy these models to production alongside other engineers. You will participate in the Amazon ML community and mentor other engineers with a strong interest in and knowledge of ML and generative AI. Your work will directly benefit customers! A day in the life We are looking for a passionate, hard-working, and talented Applied Scientist who has experience developing state-of-the-art models and deploying them to production. You will have an opportunity to make an enormous impact on the design, architecture, and implementation of products used everyday by real customers! About the team The Alexa Tablet team is a world-class team that delivers high-quality, innovative products that are loved by our customers. Our team focuses on spinning many of Amazon’s flywheels with bar-raising mobile experiences on our tablets. Over the last 12 years, we have built 4.0+ star rated products, and we continue to look for ways to scale our business. Join us as we continue our ambitious journey which will give you the opportunity to deliver disruptive products with global impact.
IN, KA, Bengaluru
Amazon.com’s Product Detail Page team is looking for talented, motivated and passionate applied scientist to be part of the design and development of a highly scalable multi-tiered shopping application to provide the best possible online shopping experience for Amazon customers world-wide. Our team is comprised of talented applied scientists, developers, testers, program managers, designers and product managers tasked with the singular goal to create THE world's best buying experience. Scientists on this team develop the next-generation technologies and experiences that change how millions interact and shop online. To provide the best possible online shopping at the scale of the web requires ideas from every area of computer science, including distributed computing, large-scale system design, machine learning, natural language processing, data compression and user interface design; the list goes on and is growing every day. We need our scientists to be versatile and always eager to tackle new problems as we continue to push technology forward. Our team leverages sophisticated econometric, machine learning, and big data technologies to help customers to discover the right products at the right prices from millions of trusted sellers billions of times a day. If you are looking for a career-defining opportunity on one of the most customer centric and business impacting teams within Amazon, we’d love to hear from you. We are looking for an Applied Scientist to help build the next generation of Detail Page optimization algorithms. These new set of algorithms will incorporate the continually changing preferences of our customers and continue to scale with numerous new programs that Amazon is introducing for our customers. You will work with multiple Amazon businesses and programs to identify big business opportunities and propose new business features and technical systems to improve customer experience on Amazon Detail Page, Search Page and many other widgets throughout the website. You will be responsible for the quality of algorithm design and will get the opportunity to present your ideas and share results of your deliverables with Amazon executives on a frequent basis. You will get an opportunity to work with senior scientists to define and enforce broad, company-wide technical standards in optimization techniques, statistical modeling and simulation techniques, and/or data analytics.
US, WA, Seattle
Applied Scientist II (AMZ1513176) (Multiple Positions), Amazon Data Services, Inc., Seattle, WA. Participate in the design, development, evaluation, deployment and updating of data-driven models and analytical solutions for machine learning (ML) and/or natural language (NL) applications. Develop and/or apply statistical modeling techniques (e.g. Bayesian models and deep neural networks), optimization methods, and other ML techniques to different applications in business and engineering. Routinely build and deploy ML models on available data. Research and implement novel ML and statistical approaches to add value to the business. Mentor junior engineers and scientists. (AMZ1513176) 40 hrs/week, Mon-Fri, 8:00 a.m. - 5:00 p.m. Salary Range: $163,617 - $193,200/yr. Amazon.com is an Equal Opportunity – Affirmative Action Employer – Minority/Female/Disability/Veteran/Gender Identity/Sexual Orientation MINIMUM REQUIREMENTS: Master's degree or foreign equivalent in Computer Science, Machine Learning, Statistics, or a related field and (1) one year of research or work experience in the job offered, or as a Research Scientist, Research Assistant, Software Engineer, or a related occupation. Employer will accept a Bachelor's degree or foreign equivalent in Computer Science, Machine Learning, Statistics, or a related field and (5) five years of research or work experience in a related occupation as equivalent to the Master's degree and one year of research or work experience. Must have (1) one year of research or work experience in the following skill(s): programming in Java, C++, Python, or equivalent programming language; and conducting the analysis and development of various supervised and unsupervised machine learning models for moderately complex projects in business, science, or engineering. Employer will accept any suitable combination of education, training or experience. Multiple Positions Available. Amazon is a total compensation company. Depending on the position offered, equity, sign-on payments, and other forms of compensation may be provided as part of a total compensation package, in addition to a full range of medical, financial, and/or other benefits. For more information, visit: https://www.aboutamazon.com/workplace/employee-benefits.#0000
US, WA, Seattle
nnovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the extreme. We focus on creating entirely new products and services with a goal of positively impacting the lives of our customers. No industries or subject areas are out of bounds. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. Here at Amazon, we embrace our differences. We are committed to furthering our culture of inclusion. We have thirteen employee-led affinity groups, reaching 40,000 employees in over 190 chapters globally. We are constantly learning through programs that are local, regional, and global. Amazon’s culture of inclusion is reinforced within our 16 Leadership Principles, which remind team members to seek diverse perspectives, learn and be curious, and earn trust. Our team highly values work-life balance, mentorship and career growth. We believe striking the right balance between your personal and professional life is critical to life-long happiness and fulfillment. We care about your career growth and strive to assign projects and offer training that will challenge you to become your best.
US, WA, Bellevue
Are you curious about turning complex data into actionable insights that shape how millions of customers experience Amazon? Do you enjoy building analytical models, testing hypotheses, and seeing your work drive real business decisions? We are looking for a Data Scientist to join our team at Amazon. In this role, you will apply statistical techniques, machine learning, and data analysis to solve well-defined business problems and deliver measurable improvements. You will work with large-scale datasets from multiple sources, build and validate models, and create metrics that quantify impact. This is an opportunity for a self-starter who is comfortable with ambiguity in data, thrives on collaboration with science and engineering partners, and is eager to grow their craft in a fast-paced environment. Key job responsibilities - Use statistical methods, machine learning algorithms, and data analysis techniques to translate well-defined business problems into data science solutions that improve processes and systems. - Gather, clean, and integrate large datasets from multiple sources to build and validate models, ensuring data integrity and adherence to best practices throughout the pipeline. - Design and deliver metrics, visualizations, and reports that compare results against benchmarks and original project goals, enabling clear and informed decision-making for stakeholders. - Collaborate with business, science, and engineering teams to understand customer needs, identify opportunities, and develop scalable analytical solutions using tools such as Python, R, or SQL. - Evaluate opportunities to integrate generative artificial intelligence tools into workflows, refining outputs and applying responsible practices to augment productivity and solution quality. About the team Our team is focused on using data science to help Amazon make smarter, faster decisions that benefit customers. We build analytical models and machine learning solutions that operate at scale, and we value rigorous methodology paired with clear communication. You will join a collaborative group of scientists and engineers who are passionate about learning from one another and pushing the boundaries of what data can do. If you are excited about growing your career in an inclusive, supportive environment where your contributions have tangible impact, we would love to hear from you.
CH, Zurich
Are you a MS or PhD student interested in a 2026 Applied Science Internship in the field of Robotics? Do you enjoy diving deep into hard technical problems and coming up with solutions that enable successful products that improve the lives of people in a meaningful way? If this describes you, come join our research teams at Amazon. Key job responsibilities As an Applied Science Intern, you will have access to large datasets with billions of images and video to build large-scale machine learning systems. Additionally, you will analyze and model terabytes of text, images, and other types of data to solve real-world problems and translate business and functional requirements into quick prototypes or proofs of concept. We are looking for scientists capable of using a variety of domain expertise combined with machine learning and statistical techniques to invent, design, evangelize, and implement state-of-the-art solutions for never-before-solved problems.
US, NY, New York
Twitch is looking for an Applied Scientist to lead computer vision and video manipulation work within Amazon Publisher Monetization (APM). You will apply large language models (LLMs), vision-language models (VLMs), and traditional computer vision techniques to build products that directly improve how millions of Twitch creators produce content and how viewers engage with it. This is a high-visibility project backed by senior leadership, and you will have the autonomy to evaluate both first-party and third-party solutions to deliver the highest quality results quickly. If you thrive in a fast-paced, startup-like environment where your scientific decisions shape the product roadmap, we want to hear from you. Key job responsibilities Design and deploy computer vision and video manipulation models using LLMs, VLMs, and traditional techniques, taking solutions from research prototype to production. Partner with senior Product and Twitch leadership to translate customer needs into well-defined scientific problems and deliver end-to-end solutions. Evaluate and integrate generative AI capabilities across Amazon Bedrock and third-party platforms, selecting the approach that maximizes product quality. Drive the team's scientific agenda by proposing new initiatives, authoring technical documents, and contributing to external publications. Mentor fellow scientists and engineers through code reviews, design guidance, and technical assessments that raise the overall quality bar. A day in the life You will split your time roughly evenly between independent research and collaborative sessions. Mornings often start with focused solo work — benchmarking a new VLM, writing model code, or analyzing experiment results. Midday you join working sessions with Product and Twitch leadership to align on requirements or review progress. Afternoons shift between pairing with engineers on production integration and mentoring teammates on evaluation methodology. Weekly science reviews and bi-weekly roadmap syncs keep the team aligned without over-scheduling your calendar. About the team The APM science team supports all of Amazon's Publisher Monetization efforts, building the models and systems behind Twitch's creator tools and ad experiences. The team includes applied scientists, software engineers, and product managers who collaborate daily to move ideas from whiteboard to production. We operate with a startup mentality — moving fast, wearing multiple hats, and iterating closely with Twitch and Product partners. We are accelerating investment in computer vision and generative AI, and this role will be central to that expansion.
TW, TPE, Hsinchu City
Are you passionate about robotics and research? Do you want to solve real customer problems through innovative technology? Do you enjoy working on scalable research and projects in a collaborative team environment? Do you want to see your science solutions directly impact millions of customers worldwide? At Amazon, we hire the best minds in technology to innovate and build on behalf of our customers. Customer obsession is part of our company DNA, which has made us one of the world's most beloved brands. We’re looking for current PhD or Master students with a passion for robotic research and applications to join us as Robotics Applied Scientist II Intern/Co-ops in 2027 to shape the future of robotics and automation at an unprecedented scale across. For these positions, our Robotics teams at Amazon are looking for students with a specialization in one or more of the research areas in robotics such as: robotics, robotics manipulation (e.g., robot arm, grasping, dexterous manipulation, end of arm tools/end effector), autonomous mobile robots, mobile manipulation, movement, autonomous navigation, locomotion, motion/path planning, controls, perception, sensing, robot learning, artificial intelligence, machine learning, computer vision, large language models, human-robot interaction, robotics simulation, optimization, and more! We're looking for curious minds who think big and want to define tomorrow's technology. At Amazon, you'll grow into the high-impact engineer you know you can be, supported by a culture of learning and mentorship. Every day brings exciting new challenges and opportunities for personal growth. By applying to this role, you will be considered for Robotics Applied Scientist II Intern/Co-op (2027) opportunities across various Robotics teams at Amazon with different robotics research focus, with internship positions available for multiple locations, durations (3 to 6+ months), and year-round start dates (winter, spring, summer, fall). Amazon intern and co-op roles follow the same internship structure. "Intern/Internship" wording refers to both interns and co-ops. Amazon internships across all seasons are full-time positions during vacation, and interns should expect to work in office, Monday-Friday, up to 40 hours per week typically between 9am-6pm. Specific team norms around working hours will be communicated by your manager. Interns should not have other employment during the Amazon work-day. Applicants should have a minimum of one quarter/semester/trimester remaining in their studies after their internship concludes. The robotics internship join dates, length, location, and prospective team will be finalized at the time of any applicable job offers. In your application, you will be able to provide your preference of research interests, start dates, internship duration, and location. While your preference will be taken into consideration, we cannot guarantee that we can meet your selection based on several factors including but not limited to the internship availability and business needs of this role.
US, WA, Seattle
Amazon Prime Air is seeking an Applied Scientist Manager to lead the team developing our next-generation drone navigation system. You will lead a team of 8–12 Applied Scientists, Research Scientists and Software Development Engineers who invent, model, develop, test, and deploy the state estimation algorithms. Your team will own the full algorithm lifecycle: early prototypes and modeling, simulation and hardware-in-the-loop testing, then flight test and deployment across a rapidly growing delivery network. You will also manage the feedback loop that brings real-world operational data back into the team to inform next generation of algorithm improvements. Because our navigation software is safety-critical, you will work closely with the Controls, Perception, Safety, Simulation and Flight Test teams to deliver robust, fully verified algorithms. This role combines deep technical leadership with people leadership. You will hire and develop science-focused engineers, run a fast-paced agile development team and help shape the technical roadmap for autonomous navigation at Prime Air. Key job responsibilities - Lead a team of 8–12 Applied Scientists, Research Scientists and Software Development Engineers developing novel navigation and state estimation algorithms, including Kalman filtering (EKF/UKF, error-state), tightly and loosely coupled GNSS/INS integration, multi-sensor fusion and observability analysis, integrity monitoring (RAIM, fault detection and exclusion), and visual navigation (VIO/VSLAM). - Drive day-to-day execution across the full development lifecycle: prototyping, modeling, simulation testing, hardware-in-the-loop testing, flight test and deployment to the production fleet. - Lead the team in a scrum-style agile process: set sprint priorities, manage dependencies and deliver against program milestones. - Build mechanisms that capture operational learnings from our delivery network, such as flight data, anomalies and performance trends, and feed them into the requirements and design of each new generation of algorithms. - Set technical direction and raise the bar on scientific rigor. - Partner with Flight controls, Perception, Hardware, Safety, Simulation and Flight Operations teams to define interfaces, requirements and verification evidence. - Hire, mentor and develop Applied Scientists, Research Scientists and SDEs, building a diverse, high-performing team with a strong safety culture. - Communicate technical strategy, trade-offs, risks and results clearly in writing and in reviews with senior leadership.
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the next-level. We focus on creating entirely new products and services with a goal of positively impacting the lives of our customers. No industries or subject areas are out of bounds. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. Here at Amazon, we embrace our differences. We are committed to furthering our culture of inclusion. We have thirteen employee-led affinity groups, reaching 40,000 employees in over 190 chapters globally. We are constantly learning through programs that are local, regional, and global. Amazon’s culture of inclusion is reinforced within our 16 Leadership Principles, which remind team members to seek diverse perspectives, learn and be curious, and earn trust. Our team highly values work-life balance, mentorship and career growth. We believe striking the right balance between your personal and professional life is critical to life-long happiness and fulfillment. We care about your career growth and strive to assign projects and offer training that will challenge you to become your best.