Improving LLM pretraining with better data organization

“Best-fit packing” adapts bin-packing to avoid unnecessary truncation of training documents, improving LLM performance across a wide range of tasks and reducing hallucination.

The documents used to train a large language model (LLM) are typically concatenated to form a single “superdocument”, which is then divided into sequences that match the model's context length. This improves training efficiency but often results in unnecessary truncations, where individual documents are broken up across successive sequences.

Related content
Contiguous parameter management and prefetched activation offloading expand the MiCS tool kit.

In paper we’re presenting at this year’s International Conference on Machine Learning (ICML 2024), titled “Fewer truncations improve language modeling”, we report an in-depth study of this common concatenation-chunking document-processing method. We found that it severely impairs the model's ability to understand contextual coherence and factual consistency. This not only affects the model's performance on downstream tasks but also increases the risk of hallucinations.

To address this issue, we propose best-fit packing, an innovative document-processing strategy that optimizes document combinations to eliminate unnecessary text truncations. In experiments, we compared a model trained using best-fit packing to one trained in the ordinary way on six downstream tasks: reading comprehension, natural-language inference, context following, summarization, commonsense and closed-book question answering, and program synthesis. We found that best-fit packing monotonically improves performance on an array of 22 sub-tasks, by as much as 15% (program synthesis) to 17% (context following). Importantly, best-fit packing also reduces closed-domain hallucination effectively by up to 58.3%.

Best-fit packing.png
A comparison of best-fit packing (left), which seeks to minimize document truncation, with the standard approach to large-language-model training, which concatenates training documents and then divides them into fixed-length sequences.

Consequences of truncation

In the analysis reported in our paper, we identified several problems caused by document truncation, including undefined names, ungrounded content, and missing knowledge.

Related content
Prompt engineering enables researchers to generate customized training examples for lightweight “student” models.

Undefined names: In programming languages like Python, truncation may separate definitions of variables from their invocations, introducing syntax errors and causing some variables to be undefined. As a consequence, the model may learn misleading patterns and possibly hallucinate on downstream tasks.

Ungrounded content: Truncation damages data integrity. In the example below, for instance, a reference (“the earthquake on Monday morning”) is separated from its antecedent, resulting in unfaithful generation.

Missing knowledge: Truncation hinders knowledge acquisition. In the example below, the model cannot learn the location of the ICML conference because the conference name and location occur in different training sequences.

Truncation errors.png
Examples of three common truncation errors: (a) undefined names, (b) ungrounded content, and (c) missing knowledge.

Best-fit packing

To address this issue, we propose optimizing the assignment of documents to training sequences so as to eliminate unnecessary truncations, while minimally increasing the number of sequences relative to concatenation. This is a variation of the well-known bin-packing problem, which is NP-hard in general, but we use a heuristic called the best-fit-decreasing (BFD) algorithm that tends to work well in practice. We thus call our method best-fit packing.

The normal implementation of BFD has quasi-linear time complexity, which is not efficient enough for LLM pretraining, which typically involves millions of documents. By taking advantage of the unique nature of pretraining data, however, we were able to optimize BFD so that it scales linearly with data size, ensuring its applicability to large-scale pretraining datasets. Further, we show that in practical applications, best-fit packing generates approximately the same number of training sequences as the traditional method, while significantly reducing data loss caused by truncation.

Truncations per document.png
Truncations per document as a function of document length, for both best-fit packing (pack) and concatenation (concat), for natural-language data (top) and programming-language data (bottom). The natural-language data is evaluated with context lengths of both 2,000 and 8,000.

Curious to know how we achieve it? Let’s dive deep!

Best-fit packing — an example

Following the standard bin-packing nomenclature, we call each training sequence a “bin”, and each bin has a capacity equal to the LLM’s context size. The goal is to assign a combination of whole documents to each bin so as to minimize the wasted bin capacity.

First, we divide any document that’s larger than the LLM context into context-length chunks, plus a remainder. Then we sort the documents (and document fragments) from largest to smallest. Finally, we work our way down the sorted list, assigning each document to the bin whose available space is as close to the document size as possible.

Related content
Novel “checkpointing” scheme that uses CPU memory reduces the time wasted on failure recovery by more than 92%.

To maximize efficiency, we use three data structures to manage the assignment of documents to bins: a binary tree and two tables. We can use this design because (1) the maximum bin size is the model’s context size, so the tree won’t be too deep, and (2) we do not need to distinguish bins with the same remaining capacity, which simplifies the the tree. Instead, we use the tables to map bin capacities to bins.

Consider a simple example, in which the context size (the bin size) is eight. The binary tree has eight leaves, corresponding to the eight possibilities for available space in any given bin. (In a real LLM, the context size is on the order of thousands of tokens, so the tree would have thousands of leaves.)

Each parent node of the tree has an associated number, indicating the size of the largest available bin slot among its descendants. The number associated with the parent’s right child is always greater than or equal to the number associated with the left child.

Initially, the value of the rightmost node in each layer of the tree is eight, and all the other nodes have values of zero. This means that all the available bin slots have a capacity of eight.

Best-fit initialization.png
The initial states of the three data structures we use to implement best-fit packing. The rightmost node of each layer of the tree has a value of eight, and all other nodes have values of zero, indicating that all the bins are empty (i.e., are at maximum capacity).

Now consider a later state, when four documents of size eight, six, six, and four have been packed. The two bins containing documents of size six have available slots of size two (8 – 6), and the bin containing a document of size four has an available slot of size four (8 – 4). These sizes are represented by the numbers two and four at leaves two and four of the tree. Multiple bins remain empty, so leaf eight has a value of eight, too.

Note that the value two at leaf two indicates only that at least one bin slot of size two is available; it doesn’t indicate how many such slots there are or where they can be found. That information is contained in the tables.

Tree after packing.png
The state of the data structures after four documents of sizes six, six, four, and eight have been packed.

Now consider a document of size three, which we wish to assign to a bin. To find the best available bin slot, simply go left at each node of the tree, unless going left leads to a node whose value is less than the document size, in which case, go right.

Document packing.png
Tree traversal identifies the available bin slot that best fits the new document.

The best fit for a document of size three is a slot of size four, and in the “space-to-bins” table, we see that there is one bin — bin three — with a slot of that size. So there we place the document.

Finally, we update all three data structures to reflect the new placement:

Data structure update.png
Data structure updates after the document (item four) of size three has been packed. The tree leaf corresponding to slot sizes of four is reset to zero, and the tree leaf corresponding to slot sizes of one is set to one. The tables are updated accordingly.

Results

To evaluate the effect of bin-packing on downstream tasks, we pretrained models of 7 billion and 13 billion parameters with context lengths of 2,000 and 8,000 on text and code using both best-fit packing and concatenation. We then tested both sets of models on our six downstream tasks. On average, across multiple datasets, context lengths, and metrics, best-fit packing offered better performance on all six tasks. The biggest gains came in reading comprehension (+4.7%), natural-language inference (+9.3%), context following (+16.8%), and program synthesis (+15.0%).

Related content
In a series of papers, Amazon researchers performed a theoretical analysis of a simplified problem that led to a learnable learning-rate scheduler, applied that scheduler to a more complex neural model, and distilled the results into a practical algorithm.

We also found that best-fit packing helped prevent closed-domain hallucination, particularly in program synthesis tasks, where it reduced "undefined name" errors by up to 58.3%, indicating a more complete understanding of program structure and logic.

Additionally, models trained with best-fit packing were better at following instructions, such as adhering to length constraints. And best-fit packing helped the model acquire “tail knowledge” that is truncation sensitive due to scarcity in training data. Indeed, this result suggests a possible reason for why LLMs struggle to learn long-tail knowledge.

While the experiments conducted in our paper primarily focused on LLM pretraining, best-fit packing is broadly applicable to fine tuning as well. Determining the benefits it can offer during fine tuning is an intriguing topic for future study.

Research areas

Related content

US, VA, Arlington
How do you measure what makes a great leader? How do you evaluate a development program when outcomes take years to materialize and clean experimental conditions are rarely available? How do you take a scientific methodology that a researcher validated carefully in one context and turn it into a system that any HR team across a company of over a million employees can run on their own? These are the kinds of questions the Senior Talent and Transformation Science team works on inside Amazon's People eXperience and Technology organization, and they are questions that matter: the systems this team builds shape how Amazon identifies, develops, and invests in its most senior leaders. As an Applied Scientist on this team you are the person who closes the gap between a validated scientific methodology and a system that runs in production without a scientist standing next to it. The architectural decisions about how scientific methods get encoded into software, the engineering quality bar for the code that implements them, and the reliability of the pipelines that other teams depend on are yours to own. You will work alongside Senior and Principal Research Scientists, an Amazon Scholar, Product Management, and a Senior Applied Scientist who bring deep expertise in behavioral science, psychometrics, and causal inference, and you will be the driving force behind turning that expertise into working, deployable systems for our Amazon executives. The problems you will be building for are genuinely hard and largely unsolved. Scoring a simulation-based leadership assessment with an LLM requires both measurement rigor and a production system that behaves consistently at scale. Estimating the effect of a talent program on leader outcomes requires both a defensible identification strategy and an analytical pipeline someone else can run and trust. Building a self-serve tool that lets a PXT team evaluate a new feature without calling a scientist requires both sound methodology and software that is robust enough to operate without expert supervision. If you want to do work that is technically demanding, scientifically cutting edge, and consequential for real leaders in a large organization, this is that role. Key job responsibilities • Own the production implementation of the team's scientific systems from end to end. When the team validates a new assessment methodology, evaluation framework, or causal identification strategy, you are the scientist who translates it into code that runs reliably, scales, and does not require a scientist standing next to it to operate. • Make the architectural and tooling decisions that determine how scientific methods get encoded into software on this team, choosing abstractions, data structures, and system designs that make the team's scientific components testable, maintainable, and extensible over time. • Define and hold the engineering quality bar for scientific code across the team, establishing and modeling best practices for testing, documentation, reproducibility, and peer review of code in a research team that does not have dedicated software development engineers. • Build the LLM-powered pipelines that operationalize the team's people science, including prompt orchestration, retrieval grounding, automated scoring, and LLM-as-judge evaluation harnesses, writing the implementation yourself and owning the quality and reliability of those systems once deployed. • Extend and adapt scientific techniques at the product level when established approaches fall short. When scoring a simulation-based assessment, estimating a program effect under unusual identification constraints, or evaluating a novel AI feature requires a methodological contribution that does not yet exist, you devise and implement that solution. • Partner with the Research Scientists during methodology design to surface implementation feasibility and trade-offs early, contributing your own scientific judgment on what can be built rigorously within real production constraints before design decisions become expensive to reverse. • Build reusable scientific components, services, and templates that encode methodology once and allow downstream teams to run it without scientist involvement, making the team's research operational infrastructure rather than a bespoke consulting engagement. • Contribute to the design and execution of quasi-experimental evaluations of people programs, owning the analytical implementation and the code pipelines that produce defensible causal evidence from observational and field data. • Mentor scientists on the team on software engineering practices and applied implementation, and participate actively in peer review of experiment designs, analytical approaches, and scientific code written by others. • Communicate implementation trade-offs and system design decisions clearly to product and HR partners in written documents that connect technical choices to business outcomes. A day in the life Your day is anchored in building and testing. You might spend the morning working through a thorny implementation problem, figuring out how to encode a psychometric scoring model into a pipeline that holds up under the messiness of real production data, debugging an LLM evaluation harness that is behaving inconsistently across assessment scenarios, or refactoring a causal estimation component so that another team can run it without calling you first. In the afternoon a Research Scientist might pull you into a methodology design conversation, and your job in that room is not just to follow along but to push back on approaches that would be difficult or brittle to implement, and to propose alternatives that preserve scientific rigor while actually being buildable. You might then shift to reviewing a colleague's code, writing documentation that makes a deployed pipeline understandable to someone who was not in the room when it was designed, or working through a data pipeline problem that is blocking the team's ability to evaluate a new product feature. At the end of most days something that was not working is now working, and the science the team does is a little more durable and a little more independent of any one person than it was in the morning.
US, CA, Culver City
Prime Video is an industry leading, high-growth business and a critical driver of Amazon Prime subscriptions, which contributes to customer loyalty and lifetime value. Prime Video is a digital video streaming and download service that offers Amazon customers the ability to rent, purchase or subscribe to a huge catalog of videos. In addition, Prime Video offers a variety of live sport streaming services in multiple locales. The Prime Video Economist team is looking for an Economist to support PV content valuation. As an economist focusing on Prime Video, you will be responsible for understanding the value that the business creates for our customers and to develop new, disruptive innovations to grow global Prime Video usage and customer value. This role requires an individual with strong quantitative modeling skills and the ability to apply statistical/machine learning, structural models, and experimental design methods to large amount of individual level data. The candidate should have strong communication skills, be able to work closely with stakeholders and translate data-driven findings into actionable insights. The successful candidate will be a self-starter comfortable with ambiguity, with strong attention to detail and ability to work in a fast-paced and ever-changing environment. Key job responsibilities The candidate's responsibilities will include: - Build scalable analytic solutions using state of the art tools based on large datasets - Build causal inference models, conduct statistical/machine learning analyses, or design experiments to measure the value of the business and its many features - Partner closely with Business, Finance, Science, and Tech partners to build prototypes and implement production solutions - Independently identify new opportunities for leveraging economic insights and models in the Video business - Develop and execute product workplans from concept, prototype to production incorporating feedback from customers, scientists and business leaders - Write both technical white papers and business-facing documents to clearly explain complex technical concepts to audiences with diverse business/scientific backgrounds
US, NY, New York
We are seeking a Human-Robot Interaction (HRI) Applied Scientist to develop cutting-edge interactions that make robots feel alive, personal, and fun. In this role, you will focus on verbal and non-verbal conversational systems, social dynamics, memory, and long-term relationship formation between robots, their environments, and the people they interact with. Your contributions will be essential in advancing robotics by enabling expressive, socially intelligent, and trustworthy interactions between robots and humans. Key job responsibilities - Develop interactive systems that leverage large language models, multimodal inputs and outputs, reinforcement learning from human feedback, or other advanced techniques to achieve fluid, engaging, and socially appropriate robot behavior - Design and implement intelligent conversational systems that handle turn-taking, grounding, interruption, and incorporates context drawn from a robot's physical environment and shared history with a user - Integrate perceptual sensor streams including gaze, facial expression, gesture, posture, and more to understand social context and produce coherent, lifelike interactions. - Develop memory and personalization systems that allow robots to form lasting relationships with individual users, learn their environments, and adapt their behavior over weeks and months - Stay updated on advancements in HRI, NLP, multimodal AI, and cognitive and social science to apply cutting-edge techniques to robot interaction challenges - Lead technical projects from conception through production deployment - Mentor junior scientists and engineers - Bridge research initiatives with practical engineering implementation
US, CA, San Francisco
Amazon is on a mission to redefine the future of automation — and we're looking for exceptional talent to help lead the way. We are building the next generation of advanced robotic systems that seamlessly blend cutting-edge AI, sophisticated control systems, and novel mechanical design to create adaptable, intelligent automation solutions capable of operating safely alongside humans in dynamic, real-world environments. At Amazon, we leverage the power of machine learning, artificial intelligence, and advanced robotics to solve some of the most complex operational challenges at a scale unlike anywhere else in the world. Our fleet of robots spans hundreds of facilities globally, working in sophisticated coordination to deliver on our promise of customer excellence — and we're just getting started. As a Scientist in Robot Navigation, you will be at the forefront of this transformation — architecting and delivering navigation systems that are intelligent, safe, and scalable. You will bring deep expertise in learning-based planning and control, a strong understanding of foundation models and their application to embodied agents, and as well as have in-depth understanding of control-theoretic approaches such as model predictive control (MPC)-based trajectory planning. You will develop navigation solutions that seamlessly blend data-driven intelligence with principled control-theoretic guarantees. Our vision is bold: to build navigation systems that allow robots to move fluidly and safely through dynamic environments — understanding context, anticipating change, and adapting in real time. You will lead research that bridges the gap between cutting-edge academic advances and production grade deployment, collaborating with world-class teams pushing the boundaries of robotic autonomy, manipulation, and human-robot interaction. Join us in building the next generation of intelligent navigation systems that will define the future of autonomous robotics at scale. Key job responsibilities - Design, develop, and deploy perception algorithms for robotics systems, including object detection, segmentation, tracking, depth estimation, and scene understanding - Lead research initiatives in computer vision, sensor fusion and 3D perception - Collaborate with cross-functional teams including robotics engineers, software engineers, and product managers to define and deliver perception capabilities - Drive end-to-end ownership of ML models — from data collection and labeling strategy to training, evaluation, and deployment - Mentor junior scientists and engineers; contribute to a culture of technical excellence - Define and track key metrics to measure perception system performance in real-world environments - Publish research findings in top-tier venues (CVPR, ICCV, ECCV, ICRA, NeurIPS, etc.) and contribute to patents A day in the life - Train ML models for deployment in simulation and real-world robots, identify and document their limitations post-deployment - Drive technical discussions within your team and with key stakeholders to develop innovative solutions to address identified limitations - Actively contribute to brainstorming sessions on adjacent topics, bringing fresh perspectives that help peers grow and succeed — and in doing so, build lasting trust across the team - Mentor team members while maintaining significant hands-on contribution to technical solutions About the team Our team is a group is a diverse group of scientists and engineers passionate about building intelligent machines. We value curiosity, rigor, and a bias for action. We believe in learning from failure and iterating quickly toward solutions that matter.
US, NY, New York
We are seeking a Human-Robot Interaction (HRI) Applied Scientist to develop cutting-edge interactions that make robots feel alive, personal, and fun. In this role, you will focus on verbal and non-verbal conversational systems, social dynamics, memory, and long-term relationship formation between robots, their environments, and the people they interact with. Your contributions will be essential in advancing robotics by enabling expressive, socially intelligent, and trustworthy interactions between robots and humans. Key job responsibilities - Develop interactive systems that leverage large language models, multimodal inputs and outputs, reinforcement learning from human feedback, or other advanced techniques to achieve fluid, engaging, and socially appropriate robot behavior - Design and implement intelligent conversational systems that handle turn-taking, grounding, interruption, and incorporates context drawn from a robot's physical environment and shared history with a user - Integrate perceptual sensor streams including gaze, facial expression, gesture, posture, and more to understand social context and produce coherent, lifelike interactions. - Develop memory and personalization systems that allow robots to form lasting relationships with individual users, learn their environments, and adapt their behavior over weeks and months - Stay updated on advancements in HRI, NLP, multimodal AI, and cognitive and social science to apply cutting-edge techniques to robot interaction challenges - Lead technical projects from conception through production deployment - Mentor junior scientists and engineers - Bridge research initiatives with practical engineering implementation
IN, KA, Bengaluru
Every product a customer returns is a moment where Amazon either recovers value or writes it off — and India's ReCommerce business is on a multi-million-dollar mission to recover more of it, more intelligently, at scale. Machine learning is the core lever: predicting whether a returned unit is sellable without a human touching it, detecting damage and fraud inside sealed packaging from images, routing each unit to its highest-value disposition, and pricing recovered inventory dynamically. India's returns network is large, fast-growing, and structurally different from other geographies — a rich, high-impact environment for an Applied Scientist to build models that move real financial and customer-experience metrics. We are hiring an Applied Scientist to build and adapt the ML that powers India ReCommerce. You will work at the intersection of two mandates: building India-first models for problems unique to our market, and adapting proven Worldwide models to India's data, catalog, and operational reality — recalibrating them where distribution, language, and process differ. You will own problems end-to-end, from framing and data through modeling, evaluation, and production deployment, partnering closely with engineering, product, and operations. Key job responsibilities Build ML models for automated returns grading — predicting the salability of returned units from structured and unstructured signals so units can be evaluated with zero or minimal human touch, improving speed, accuracy, and recovery value. Develop computer-vision models for defect detection, condition assessment, and anomaly/fraud identification (including inside sealed packaging), and for establishing chain-of-custody and damage attribution across the returns journey. Build disposition-prediction and routing models that direct each unit to its highest-value recovery path (resale, repair, liquidation, donation, recycle) as early as possible in the network. Develop pricing and recovery-optimization models for liquidation and resale, moving from flat rates toward dynamic, grade- and condition-aware pricing. Adapt Worldwide ML models to India — retraining, recalibrating, and re-evaluating for India's return distribution, catalog, languages, and operational constraints, and closing the gaps that prevent a direct lift-and-shift. Own the full model lifecycle — problem framing, data pipelines, feature engineering, training, offline/online evaluation, monitoring, and retraining — with rigorous attention to calibration, drift, and business-metric impact. Partner cross-functionally with engineering (to productionize), product (to frame problems and measure impact), and operations (to ground models in how the network actually runs), and use modern GenAI/LLM tooling to accelerate research and delivery. A day in the life You start by reviewing the performance of a grading model in production — checking calibration and drift against last week's returns, and confirming the recovery-value lift is holding. Mid-morning, you dig into a computer-vision problem: improving detection of a damage type that's driving write-offs, using images captured across the returns journey. In the afternoon you work with a Worldwide science team to bring one of their models to India — scoping what retraining and recalibration India's data requires — then pair with an engineer to move your latest model toward production behind a clean evaluation gate. You close by framing a new problem with a product partner: quantifying the opportunity, defining the label and success metric, and sketching the modeling approach. About the team India ReCommerce owns the systems and science that turn returned and unsellable inventory into recovered value and a better customer experience. You will join a team building an increasingly automated, ML-driven returns network — leveraging Worldwide platforms where they fit and building India-first capabilities where they don't. It is a high-ownership environment with a direct line from your models to measurable business and customer outcomes.
US, WA, Seattle
Our organization in Amazon Robotics builds robots that perform contact-rich manipulation safely and reliably in complex, unstructured environments, at Amazon scale. Our scientists and engineers push the boundaries of robotic manipulation to handle enormous object diversity, bringing deep expertise across planning, control, perception, and machine learning. We learn from real-world data at a scale that few teams in robotics can access. We are seeking an experienced Senior Applied Scientist to help guide a small team advancing reinforcement learning for manipulation. We are creating robots that learn how to push, flip, rearrange, and dexterously insert items with unparalleled robustness, speed, and reliability. Our goal is to deploy robots that will work across Amazon's global network and can handle the full diversity of items that Amazon sells. You will set the technical direction for how we learn these behaviors, from simulation training through reliable execution on physical robots, and you will demonstrate new manipulation capabilities on real hardware at scale. This team's mission reaches beyond any single product: to invent and apply manipulation capabilities that generalize to many future robotics applications. The robots our organization already deploys at scale give you a rare proving ground to collect data, run experiments, and get new policies onto real hardware faster than almost anywhere in the field. You will raise the bar for scientific rigor and engineering quality, and mentor other scientists as the team grows. Key job responsibilities - Set the technical direction for learning non-prehensile and contact-rich manipulation policies, from testing the latest advances in the field through demonstrated capability on hardware. - Oversee the development of reinforcement learning approaches that address the long tail of diverse, demanding manipulation conditions. - Own the path from simulation training to reliable, real-time execution on physical robots, making evidence based calls on where learned approaches should replace engineered ones. - Demonstrate new manipulation capabilities on real robots at scale, and turn one-off results into repeatable methods. - Establish the standards, evaluation practices, and data-informed improvement loops that the team builds on. - Mentor scientists and engineers, and raise the bar for applied science rigor and engineering quality. - Partner across control, perception, and hardware to integrate learned behaviors into working systems. - Represent Amazon in academia through publications and scientific presentations. A day in the life Amazon offers a full range of benefits that support you and eligible family members, including domestic partners. 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
IN, MH, Mumbai
Amazon Science gives you insight into the company’s approach to customer-obsessed scientific innovation. Amazon fundamentally believes that scientific innovation is essential to being the most customer-centric company in the world. It’s the company’s ability to have an impact at scale that allows us to attract some of the brightest minds in artificial intelligence and related fields. Our scientists continue to publish, teach, and engage with the academic community, in addition to utilizing our working backwards method to enrich the way we live and work. Please visit https://www.amazon.science for more information. About Amazon Prime Video “Many of the problems we face have no textbook solution, and so we-happily-invent new ones.” – Jeff Bezos
 The Amazon Prime Video team is shaping the future of digital video entertainment. We are seeking a Data Scientist to uncover key insights on how consumers watch videos on Amazon. The ideal candidate will be an expert in the areas of data science, machine learning and statistics, having hands-on experience with multiple improvement initiatives as well as balancing technical and business judgment to make the right decisions about technology, models and methodologies. As consumers increasingly consume digital video, we need to make agile decisions based on what content appeals to our customers. As a Data Scientist at Amazon Prime Video APAC and ANZ analytics team, you will have the opportunity to work on one of the world's largest consumer data sets, influence the long term evolution of our analytics capability and support the expansion of Amazon's digital video business. The Data Scientist will work closely with other research scientists, machine-learning experts, and economists to design and run experiments, research new algorithms, and find new ways to improve optimization across all our associate facing tools. 
 A successful candidate will be able to understand and manage key operational and technical concepts. They will have excellent project and communication skills, and motivation to achieve results in a fast-paced environment. Candidates should demonstrate a passion for working on behalf of customers, have a record of accomplishment of timely delivery of large-scale projects, and have the ability to influence multiple global teams. Autonomy, judgment, influence, and leadership skills are essential. This person will be responsible for ensuring we meet our key deliverables, on time with high quality, and communicating status to internal and external stakeholders. Key Responsibilities - Support the Content team on business reporting, ad hoc analysis, statistical inference and predictive modelling for all Prime Video APAC and ANZ. - Mine and analyze data pertaining to customers viewing experiences to identify critical business insight and make recommendations to optimize content selection. - Proactively develop new ML models using streaming, video, audio and textual data to understand and predict customer streaming behaviour - Translate analytic insights into concrete, actionable recommendations for business or product improvement. Develop and present these as papers to senior stakeholders. - Liaise with your peers in other prime video territories to develop solutions that greatly benefit our global customers - This role will be based in Mumbai, India
US, WA, Seattle
Join us at the forefront of Amazon's sustainability initiatives to work on environmental and social advancements that support Amazon's long-term worldwide sustainability strategy. At Amazon, we're working to be the most customer-centric company on earth. To get there, we need exceptionally talented, bright, and driven people. We are looking for a Senior Research Scientist to join our growing Sustainability team to drive the science behind value chain decarbonization. This role will establish Amazon's scientific methodologies for sector- and cross-sectoral decarbonization mechanisms and establish benchmarks for automated validation and risk assessment. As a Senior Research Scientist, you will be responsible for independently leading assessments of environmental issues across the full spectrum of Amazon businesses and evaluating sustainability impacts across the value chain. You will independently develop quality frameworks and methodologies that enable Amazon to scale procurement of high-quality environmental interventions while maintaining scientific rigor and environmental integrity. Key job responsibilities - Develop quality assessment frameworks for complex environmental interventions, baseline-setting approaches, and measurement methodologies - Build quantitative benchmark and statistical models that enable scalable evaluation across heterogeneous data sources - Create attribution methodologies for supply chain interventions across Amazon's diverse footprint - Develop social and environmental safeguard criteria that integrate community impact assessments - Collaborate with cross-functional teams including procurement, sustainability operations, and business units to translate scientific methodologies into operational requirements - Work under the direction of senior business leaders while acting as lead Subject Matter Expert for value chain decarbonization science, including designing and leading research, data collection, modeling, documentation, interpretation, and validation About the team Diverse Experiences: Worldwide Sustainability values diverse experiences. Even if you do not meet all of the qualifications and skills listed in the job description, we encourage candidates to apply. If your career is just starting, hasn’t followed a traditional path, or includes alternative experiences, don’t let it stop you from applying. Inclusive Team Culture: It’s in our nature to learn and be curious. Our employee-led affinity groups foster a culture of inclusion that empower us to be proud of our differences. Ongoing events and learning experiences, including our Conversations on Race and Ethnicity (CORE) and AmazeCon (inclusive diversity) conferences, inspire us to never stop embracing our uniqueness. Mentorship & Career Growth: We’re continuously raising our performance bar as we strive to become Earth’s Best Employer. That’s why you’ll find endless knowledge-sharing, mentorship and other career-advancing resources here to help you develop into a better-rounded professional.
CN, 31, Shanghai
Worldwide Global Selling has been helping individuals and businesses increase sales and reach new customers around the globe. Today, more than 50% of Amazon's total unit sales come from third-party selection. The Global Selling team in China is responsible for recruiting local businesses to sell on Amazon's 19+ overseas marketplaces and supporting local Sellers' success and growth on Amazon. Our vision is to be the first choice for all types of Chinese business to go globally. The Worldwide Global Selling Analytics, Intelligence, and Technology (WWGS-AIT) team serves as the research, automation, and insight arm of the International Seller Service data hub, enabling rapid delivery of growth insights through strategic investments in regional data foundations, self-service business intelligence solutions, and artificial intelligence tools. The WWGS-AIT team is positioned to establish AI-ready foundational capabilities across the WWGS organization while maintaining excellence in business insight generation, and self-service BI/AI application development. WWGS-AIT is looking for a Data Scientist to design and build seller-facing AI agents that turn our AI-ready data foundation into intelligent, conversational experiences for Amazon's global sellers. You will own the intelligence layer of these agents end-to-end, from modeling and retrieval to evaluation and launch, working alongside applied scientists, data engineers, and the Seller Assistant platform team to put trustworthy AI directly into sellers' hands. Key job responsibilities - Design, build, and iterate seller-facing AI agents (LLM-powered) that help Chinese sellers grow globally, reasoning over WWGS-AIT's AI-ready data foundation and knowledge base. - Develop the intelligence layer of agents: retrieval-augmented generation (RAG) over our knowledge management system, tool-use / function-calling orchestration, prompt engineering, and model fine-tuning or adaptation where needed. - Ground agent responses in standardized metrics and unified seller profiles to guarantee consistency and accuracy across agents; design and enforce guardrails that prevent hallucination and protect sensitive, compliance-restricted data. - Build rigorous evaluation frameworks (golden datasets, offline evaluation, and online experimentation) to measure and continuously improve agent quality, safety, and seller impact. - Develop seller-intelligence models (segmentation, entity resolution / One-ID, ranking and recommendation) that power personalized agent experiences. - Partner with WWGS Tech and the Seller Assistant platform team to productionize agents and tools (e.g., via MCP), defining the model and intelligence contract while engineering operates the runtime. - Collaborate with business, product, and cross-functional partners to translate seller pain points into agent capabilities and measurable business outcomes. - Stay current with advances in GenAI and agentic systems, and bring applied research into production.