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

IN, KA, Bangalore
Does the thought of improving one of the world’s most complex logistic systems inspire you? Is your passion to sift through hundreds of systems, processes, and data sources to solve the puzzle and identify the next big opportunity? Are you a creative big thinker who is passionate about using data to direct decision making and solve complex and large-scale challenges? Are you fascinated by the interactions between operations and strategy? Do you feel like your skills uniquely qualify you to bridge communication between teams with competing priorities? If so, then this position is for you! Come help Amazon create state-of-the-art science-driven technologies for delivering packages to the doorstep of our customers! The Last Mile Routing & Planning organization builds the software, algorithms and tools that make the “magic” of home delivery happen: our flow, sort, dispatch and routing intelligence systems are responsible for the billions of daily decisions needed to plan and execute safe, efficient and frustration-free routes for drivers around the world. Our team supports deliveries (and pickups!) for Amazon Logistics, Same Day, Amazon Grocery, Lockers, and other new initiatives across the world. Key job responsibilities In this role, your main focus will be to apply algorithms, synthesize information, identify business opportunities, provide data-driven insights and communicate business and technical requirements within the team and across stakeholder groups. You will partner closely with other scientists and engineers in a collegial environment with a clear path to business impact. We have an exciting portfolio of research areas including vehicle routing, planning for electric and autonomous vehicles, district and stops planning, ultra-fast deliveries, fleet planning, and forecasting solutions for different delivery programs leveraging the latest OR, ML, and Generative AI methods, at a global scale. Successful candidates will have a deep knowledge of Operations Research and/or Machine/Deep Learning methods, experience in applying these methods to large-scale business problems, the ability to map models into production-worthy code in Python or Java, the communication skills necessary to explain complex technical approaches to a variety of stakeholders and customers, and the excitement to take iterative approaches to tackle big research challenges.
US, NY, New York
We are seeking an Applied Scientist to lead the development of evaluation frameworks and data collection protocols for robotic capabilities. In this role, you will focus on designing how we measure, stress-test, and improve robot behavior across a wide range of real-world tasks. Your work will play a critical role in shaping how policies are validated and how high-quality datasets are generated to accelerate system performance. You will operate at the intersection of robotics, machine learning, and human-in-the-loop systems, building the infrastructure and methodologies that connect teleoperation, evaluation, and learning. This includes developing evaluation policies, defining task structures, and contributing to operator-facing interfaces that enable scalable and reliable data collection. The ideal candidate is highly experimental, systems-oriented, and comfortable working across software, robotics, and data pipelines, with a strong focus on turning ambiguous capability goals into measurable and actionable evaluation systems. Key job responsibilities - Design and implement evaluation frameworks to measure robot capabilities across structured tasks, edge cases, and real-world scenarios - Develop task definitions, success criteria, and benchmarking methodologies that enable consistent and reproducible evaluation of policies - Create and refine data collection protocols that generate high-quality, task-relevant datasets aligned with model development needs - Build and iterate on teleoperation workflows and operator interfaces to support efficient, reliable, and scalable data collection - Analyze evaluation results and collected data to identify performance gaps, failure modes, and opportunities for targeted data collection - Collaborate with engineering teams to integrate evaluation tooling, logging systems, and data pipelines into the broader robotics stack - Stay current with advances in robotics, evaluation methodologies, and human-in-the-loop learning to continuously improve internal approaches - Lead technical projects from conception through production deployment - Mentor junior scientists and engineers About the team Fauna Robotics, an Amazon company, is building capable, safe, and genuinely delightful robots for everyday life. Our goal is simple: make robots people actually want to live and interact with in everyday human spaces. We believe that future won’t arrive until building for robotics becomes far more accessible. Today, too much effort is spent reinventing the fundamentals. We’re changing that by developing tightly integrated hardware and software systems that make it faster, safer, and more intuitive to create real-world robotic products. Our work spans the full stack: mechanical design, control systems, dynamic modeling, and intelligent software. The focus is not just functionality, but experience. We’re building robots that feel responsive, expressive, and genuinely useful. At Fauna, you’ll work at the frontier of this space, helping define how robots move, manipulate, and interact with people in natural environments. It’s an opportunity to solve hard problems across hardware and software with a team focused on making robotics accessible and joyful to build. If you care about making robotics real for everyone and building systems that are as delightful as they are capable, we’re interested in hearing from you.
US, CA, Sunnyvale
Industrial is seeking exceptional talent to help develop the next generation of advanced robotics systems that will transform automation at Amazon's scale. We're building revolutionary robotic systems that combine innovative AI, sophisticated control systems, and advanced mechanical design to create adaptable automation solutions capable of working safely alongside humans in dynamic environments. This is a unique opportunity to shape the future of robotics and automation at unprecedented scale, working with world-class teams pushing the boundaries of what's possible in robotic manipulation, locomotion, and human-robot interaction. This role presents an opportunity to shape the future of robotics through innovative applications of deep learning and large language models. We leverage advanced robotics, machine learning, and artificial intelligence to solve complex operational challenges at unprecedented scale. Our fleet of robots operates across hundreds of facilities worldwide, working in sophisticated coordination to fulfill our mission of customer excellence. We are pioneering the development of robotics foundation models that: - Enable unprecedented generalization across diverse tasks - Integrate multi-modal learning capabilities (visual, tactile, linguistic) - Accelerate skill acquisition through demonstration learning - Enhance robotic perception and environmental understanding - Streamline development processes through reusable capabilities The ideal candidate will contribute to research that bridges the gap between theoretical advancement and practical implementation in robotics. You will be part of a team that's revolutionizing how robots learn, adapt, and interact with their environment. Join us in building the next generation of intelligent robotics systems that will transform the future of automation and human-robot collaboration. As an Applied Scientist, you will develop and improve machine learning systems that help robots perceive, reason, and act in real-world environments. You will leverage state-of-the-art models (open source and internal research), evaluate them on representative tasks, and adapt/optimize them to meet robustness, safety, and performance needs. You will invent new algorithms where gaps exist. You’ll collaborate closely with research, controls, hardware, and product-facing teams, and your outputs will be used by downstream teams to further customize and deploy on specific robot embodiments. Key job responsibilities As an Applied Scientist in the Foundations Model team, you will: - Leverage state-of-the-art models for targeted tasks, environments, and robot embodiments through fine-tuning and optimization. - Execute rapid, rigorous experimentation with reproducible results and solid engineering practices, closing the gap between sim and real environments. - Build and run capability evaluations/benchmarks to clearly profile performance, generalization, and failure modes. - Contribute to the data and training workflow: collection/curation, dataset quality/provenance, and repeatable training recipes. - Write clean, maintainable, well commented and documented code, contribute to training infrastructure, create tools for model evaluation and testing, and implement necessary APIs - Stay current with latest developments in foundation models and robotics, assist in literature reviews and research documentation, prepare technical reports and presentations, and contribute to research discussions and brainstorming sessions. - Work closely with senior scientists, engineers, and leaders across multiple teams, participate in knowledge sharing, support integration efforts with robotics hardware teams, and help document best practices and methodologies.
US, CA, San Francisco
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 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, Seattle
About Sponsored Products and Brands The Sponsored Products and Brands (SPB) team at Amazon Ads is re-imagining the advertising landscape through generative AI technologies, revolutionizing how millions of customers discover products and engage with brands across Amazon.com and beyond. We are at the forefront of re-inventing advertising experiences, bridging human creativity with artificial intelligence to transform every aspect of the advertising lifecycle from ad creation and optimization to performance analysis and customer insights. We are a passionate group of innovators dedicated to developing responsible and intelligent AI technologies that balance the needs of advertisers, enhance the shopping experience, and strengthen the marketplace. If you're energized by solving complex challenges and pushing the boundaries of what's possible with AI, join us in shaping the future of advertising. About our team The General Shopping Intelligence (GSI) team is a highly motivated, collaborative, and fun-loving group with a strong entrepreneurial spirit and bias for action. We provide advanced real-time machine learning services that connect shoppers with the right ads across all platforms and surfaces worldwide. Through deep understanding of both shoppers and products, we help shoppers discover new products they love, enable advertisers to reach their customers most efficiently, and help Amazon continuously innovate on behalf of all customers. We are seeking a motivated Applied Scientist who loves to innovate at the intersection of customer experience, deep learning, generative AI and high-scale machine learning systems. If you're energized by solving complex challenges and pushing the boundaries of what's possible with AI, join us in shaping the future of advertising. Key job responsibilities As an Applied Scientist, you will: * Leverage Generative AI and Large Language Models (LLMs) to mine complex behavioral data, deriving deep, actionable shopper insights that identify customer experience gaps and unlock new business opportunities. * Design and develop scalable machine learning and GenAI models focused on shopper intent and preference modeling, ensuring a rapid path from prototype to production. * Partner closely with engineering teams to architect and deploy end-to-end GenAI solutions into production, integrating advanced insights directly into real-time, customer-facing systems. * Drive the scalability, efficiency, and automation of large-scale model training and real-time inference systems, pioneering the LLM infrastructure required to support next-generation GenAI workloads at Amazon Ads scale. * Design and run rigorous A/B experiments to quantify the business and customer impact of GenAI-driven shopper insights, performing advanced statistical analysis to guide iterative production rollouts. * Conduct applied research in novel generative AI techniques (e.g., fine-tuning, RAG, agentic workflows) to optimize the shopper experience and drive performance across all aspects of the Sponsored Products and Brands business.
US, WA, Seattle
AWS Applied AI Solutions (AAIS) is where science meets customer obsession at scale. We build the intelligent systems that power AWS services used by millions, combining research in machine learning, agentic AI, and applied science with the operational rigor required to deliver enterprise grade experiences. Within AAIS, Amazon WorkSpaces is our cloud based virtual desktop service that delivers secure, managed computing to over one million daily users across the globe, enabling organizations to provision, manage, and scale desktops with the reliability and performance their workforce depends on. We are looking for an Applied Scientist to be part of the tiger team building the capacity modelling for Amazon WorkSpaces, owning and advancing the science behind it. You will design, build, and continuously improve the forecasting and optimization models that ensure the right compute, storage, and networking resources are available at the right time, in the right regions, at the lowest possible cost, without ever compromising the end user experience. This is a high impact individual contributor role for someone who thrives at the intersection of applied research and production systems. You will define the scientific roadmap for capacity intelligence, turning reactive provisioning into a predictive, self optimizing engine that anticipates demand before customers feel any constraint. Key job responsibilities Define and drive the scientific strategy for capacity modelling, establishing the research agenda that transforms how WorkSpaces forecasts demand, plans supply, and allocates resources across a globally distributed infrastructure. Build advanced demand forecasting models that predict workspace usage across multiple time horizons, from intraday spikes to long range growth trajectories, incorporating signals such as customer onboarding patterns, seasonal trends, regional expansion, and macroeconomic indicators. Design supply optimization frameworks that determine optimal resource placement, instance mix, and pre warming strategies, balancing availability, performance, and cost by reasoning over hardware constraints, pricing dynamics, and service level objectives. Develop causal and probabilistic models that move beyond trend extrapolation to true understanding of demand drivers, enabling the organization to distinguish organic growth from one time events, anticipate shifts in usage patterns, and quantify uncertainty in planning decisions. Architect simulation and scenario planning systems that allow business and engineering leaders to run what if analyses, stress test capacity plans against disruption scenarios, and evaluate trade offs between investment timing, risk tolerance, and customer experience. Pioneer the integration of machine learning with operations research, combining deep learning based forecasting with mathematical optimization to jointly solve the demand prediction and resource allocation problem in a way that neither discipline can achieve alone. Establish evaluation frameworks and monitoring systems that measure forecast accuracy, capacity utilization, and cost efficiency in production, creating tight feedback loops that drive continuous model improvement and build organizational trust in science driven planning. Influence the broader organization's capacity strategy by translating model outputs into actionable recommendations for leadership, identifying opportunities to extend capacity intelligence patterns to adjacent services, and mentoring scientists and engineers across the team. About the team As part of the AWS solutions organization, we have a vision to provide business applications, leveraging Amazon's unique experience and expertise, that are used by millions of companies worldwide to manage day-to-day operations. We will accomplish this by accelerating our customers' businesses through delivery of intuitive and differentiated technology solutions that solve enduring business challenges. we blend vision with curiosity and Amazon's real-world experience to build opinionated, turnkey solutions. Where customers prefer to buy over build, we become their trusted partner with solutions that are no-brainers to buy and easy to use. Diverse Experiences AWS values diverse experiences. Even if you do not meet all of the preferred 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. Why AWS? Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform. We pioneered cloud computing and never stopped innovating — that’s why customers from the most successful startups to Global 500 companies trust our robust suite of products and services to power their businesses. Inclusive Team Culture AWS values curiosity and connection. Our employee-led and company-sponsored affinity groups promote inclusion and empower our people to take pride in what makes us unique. Our inclusion events foster stronger, more collaborative teams. Our continual innovation is fueled by the bold ideas, fresh perspectives, and passionate voices our teams bring to everything we do. 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. Work/Life Balance We value work-life harmony. Achieving success at work should never come at the expense of sacrifices at home, which is why we strive for flexibility as part of our working culture. When we feel supported in the workplace and at home, there’s nothing we can’t achieve.
US, WA, Seattle
As part of the AWS Applied AI Solutions organization, we have a vision to provide end user applications, leveraging Amazon's unique experience and expertise, that are used by millions of companies worldwide to manage day-to-day operations. We will accomplish this by accelerating our customers' businesses through delivery of intuitive and differentiated technology solutions that solve enduring business challenges. We blend vision with curiosity and Amazon's real-world experience to build opinionated, turnkey solutions. Where customers prefer to buy over build, we become their trusted partner with solutions that are easy to adopt and easy to use. The Team Join the next science revolution at AWS Life Sciences Applied AI Solutions, where you'll work alongside world-class scientists to build AI that transforms how therapeutics are discovered, developed, and brought to patients. We're out to revolutionize how medicines are discovered, developed, and brought to patients, powered by a new generation of AI. Our team tackles some of the hardest open problems at the intersection of frontier AI and life sciences. We apply biological foundation models, large language models, and agentic reasoning systems to life sciences problems, then put them into the hands of pharma, biotech, and diagnostics customers as applications and managed services they can fine-tune, tailor, and deploy on their own data. The science challenges are deep: how do you design agentic systems that reason correctly over complex biological, regulatory, and clinical logic? How do you enable customers to tailor foundation models to their proprietary data and get better outputs with less effort? How do you adapt models to reason faithfully in high-stakes scientific and regulatory domains? Today we're focused on two areas. In drug design, our products (including Amazon Bio Discovery) accelerate discovery by giving bench scientists AI-guided protein engineering and antibody design capabilities. In clinical trials, we're building AI that automates and optimizes regulatory and clinical development workflows. We combine frontier research with production-scale delivery to put breakthrough science into the hands of customers solving humanity's hardest problems. We value scientific rigor, encourage publication, and support conference participation. If you want to do research that ships, this is the team. The Role We are seeking an exceptional Principal Applied Scientist to set the scientific direction for our life sciences AI portfolio. You will be the scientific leader who defines research agendas, architects novel approaches, and delivers models and methods that give our customers capabilities that did not previously exist. This is a rare role that combines deep expertise in LLM reasoning and agentic AI with applied impact in life sciences. You will innovate on how large language models reason, plan, and act in complex scientific domains, while applying domain knowledge in biology to ensure models produce scientifically valid outputs. The problems span multiple fronts: - How do you build LLM-based agentic systems that correctly reason over clinical protocols, regulatory standards, and complex multi-step scientific workflows? - How do you develop model customization and training methods that let customers get state-of-the-art results from foundation models? - How do you adapt and extend protein and antibody models so customers can fine-tune on proprietary sequence data and get therapeutically relevant outputs? You will work across drug discovery (protein engineering, antibody design) and clinical trial operations (agentic automation, structured reasoning, domain adaptation). You will own end-to-end scientific solutions from research through production, and your work will directly shape the tools that thousands of scientists use daily. Key job responsibilities - Set the scientific vision and research agenda for LLM reasoning, agentic AI, and biological model customization across the portfolio - Innovate on LLM reasoning, planning, and agentic approaches for complex scientific and regulatory workflows - Develop model customization methods (fine-tuning, RLHF, retrieval augmentation, domain adaptation) that enable customers to train better models on their own data with less effort - Advance methods to adapt and extend biological foundation models for customer-specific therapeutic applications - Solve open research problems in faithful reasoning, multi-step planning, and tool use in high-stakes scientific domains - Partner with Life Sciences domain experts and customers to understand their hardest scientific challenges and translate those into tractable research problems - Publish at top-tier venues and build the team's external scientific reputation - Mentor applied scientists across the team while maintaining significant personal research contribution - Collaborate with product and engineering to ensure research translates into shipped products that serve customers at scale - Influence multi-year research roadmaps through deep scientific expertise and customer understanding A day in the life - Push a new reasoning approach into production that measurably improves outputs for a pharma customer's workflow - Design and run experiments to validate a novel fine-tuning method, then ship it as a capability customers can use immediately - Unblock a delivery milestone by diagnosing why a model is failing on a new class of inputs and implementing a fix - Meet with a customer's scientific team to scope what the next model release needs to do for them - Review a teammate's experimental results, sharpen the approach, and help get it over the finish line - Publish results from shipped work at a top venue, closing the loop between research and impact - Prototype a new idea that could become the next major capability in the product
US, WA, Seattle
Interested in modeling and understanding customer behavior through machine learning, artificial intelligence, and data mining over TB scale data with huge business impact on millions of customers? Join our team of Scientists developing models to model customer behavior and optimize the customer experience with Amazon Prime. This includes understanding who our customers are, long-term value of the Prime membership program, and creating the right personalized framework for content and subscription optimization. As an AI/ML expert, you will partner directly with product owners to intake, build, and directly apply your modeling solutions. There are numerous scientific and technical challenges you will get to tackle in this role, such as optimizing/fine-tuning GenAI/LLM solutions for Prime personalization, building GenAI foundation models, global scalability of models, combinatorial optimization, cold start problem, accelerated experimentation, short/long term goals modeling, and multi-step optimization leading to reinforcement learning of the customer journey. We employ techniques from GenAI/LLMs, supervised/semi-supervised learning, deep learning, transformer architectures, using outcomes from causal Econometric modeling, and Reinforcement learning. As the central science team within Prime, our expertise gets routinely called upon to weigh in on a variety of topics. We also emphasize the need and value of scientific research and have developed a strong publication and patent record (internally/externally) which you will be a part of. You will also utilize and be exposed to the latest in ML technologies and infrastructure: AWS technologies (EMR/Spark, Sagemaker, DynamoDB, S3, ClaudeCode), various AI/ML algorithms and techniques (Deep Learning, GenAI/LLMs, transformers, supervised/unsupervised/semi-supervised/reinforcement learning), and statistical modeling techniques. - Stay abreast of current literature in the field and advance/build novel science solutions leveraging SoTA solutions. - Build and develop AI/ML models and supporting infrastructure at TB scale, in coordination with software engineering teams. - Leverage Deep Learning and GenAI solutions for building foundation models and personalized optimization solution. - Develop offline policy estimation tools and integrate with measurement systems/econometric models. - Establish scalable, efficient, automated processes for large scale data analyses, science development, science validation and model implementation. - Analyze and extract relevant information from large amounts of Amazon’s historical business data to help automate and optimize key processes. - Work closely with the business to understand their problem space, identify the opportunities and formulate the problems. - Use AI/machine learning, data mining, statistical techniques and others to create actionable, meaningful, and scalable solutions for the business problems. - Design, develop and evaluate highly innovative models and statistical approaches to understand and predict customer behavior and to solve business problems. Key job responsibilities Key job responsibilities - Stay abreast of current literature in the field and advance/build novel science solutions leveraging SoTA solutions. - Build and develop AI/ML models and supporting infrastructure at TB scale, in coordination with software engineering teams. - Leverage Deep Learning and GenAI solutions for building foundation models and personalized optimization solution. - Develop offline policy estimation tools and integrate with measurement systems/econometric models. - Establish scalable, efficient, automated processes for large scale data analyses, science development, science validation and model implementation. - Analyze and extract relevant information from large amounts of Amazon’s historical business data to help automate and optimize key processes. - Work closely with the business to understand their problem space, identify the opportunities and formulate the problems. - Use AI/machine learning, data mining, statistical techniques and others to create actionable, meaningful, and scalable solutions for the business problems. - Design, develop and evaluate highly innovative models and statistical approaches to understand and predict customer behavior and to solve business problems.
US, WA, Seattle
We are seeking a Principal Applied Scientist to own the scientific vision across Agentic WorkSpaces. This is a foundational role spanning the full portfolio — Personal, Applications, and Core, and the agentic surfaces (WS4Builders and WorkSpaces for Agents). You will define how we measure, improve, and guarantee the performance of AI agents and human-AI teams. A core part of the role is defining the science agenda itself — identifying which problems are most worth solving and where the highest-leverage bets lie. Directions worth exploring might include Organizational Intelligence (turning institutional knowledge into agent-consumable skills), AI Agent Experience / AiAX (agent observability and autonomous remediation), and contextual, behavioral security that adapts enforcement in real time for human and agent sessions — but these are illustrative examples, not a fixed roadmap, and many other directions are possible. You will help define which ones we pursue. The problems you will solve do not have established industry patterns. You will set the direction for the science of how AI agents and people perceive, reason about, and act reliably within computing environments at enterprise scale. Key job responsibilities - Set the long-term scientific vision: Define what best-in-class agent performance, evaluation, and learning look like across Agentic WorkSpaces — for computer-using agents and human-AI teams alike. Identify the unsolved scientific problems, chart a multi-year research roadmap, and secure buy-in from VP-level leadership. - Solve highly ambiguous, novel problems: Independently frame and deliver solutions to foundational challenges in agent perception, reasoning, evaluation, reliability, and human-AI collaboration — problems where neither the approach nor the success criteria are pre-defined. - Own the evaluation and measurement foundation: Build the benchmarks, datasets, and metrics that quantify agent and team accuracy, cost, productivity, and safety across the portfolio and diverse enterprise workflows, and that gate what we ship. - Drive cross-organizational scientific alignment: Work across partner teams (AgentCore, Bedrock model teams, Identity, Security, the MCP ecosystem) and across the Applied AI Solutions product portfolio to shape how models and agent frameworks are applied, and ensure scientific decisions compose into a coherent system. - Deliver measurable business impact: Ensure research translates to customer outcomes: higher task accuracy, lower cost-per-action, faster time-to-production, measurable productivity for human-AI teams, and the trust that lets enterprises scale agent workflows. - Raise the scientific bar: Establish rigor in experimentation, evaluation, and reproducibility. Mentor and grow senior scientists and engineers. Set the standard for applied science quality across the organization. - Advance the state of the art: Contribute to the external technical community through publications, patents, and open-source contributions that position AWS as the leader in the science of secure agent-computer interaction and human-AI teamwork. About the team AWS Applied AI Solutions' (AAIS) vision is every business innovating with Amazon AI teammates. Our mission is to build delightful AI solutions that improve human capabilities and business outcomes. The Agentic WorkSpaces organization within AAIS envisions a world where people, teams, and AI collaborate securely from anywhere to create unprecedented value for every organization. We build lovable products that empower every business to unlock the full potential of human-AI teamwork, driving smarter decisions, greater creativity, more value, and faster innovation with confidence. Amazon Agentic WorkSpaces (AAWS) is building the world's most lovable, secure, and trusted always-on workspace where AI agents and humans work as partners behind enterprise-grade security. Our portfolio spans persistent desktops (Personal), application streaming (Applications), and Core, and is evolving into the governed operating environment for the hybrid workforce: humans get AI-native desktops for their role, and agents get governed desktops scoped to their task, with administrators managing both as one. This surface includes WS4Builders (an AI-native environment for builders) and WorkSpaces for Agents (W4A) — enabling AI agents to work the way humans do, with access to real applications, real interfaces, and real computing environments. Enterprises want to use AI agents for critical business workloads that touch legacy desktop applications and mainframes, yet 75% of organizations run legacy applications that lack modern APIs, and 90% of corporate data remains locked in systems never designed for agents. Agentic WorkSpaces solves this: it gives enterprises a secure, governed environment where agents and humans operate both legacy and modern applications directly, just as an employee would, without costly migrations.
US, WA, Seattle
We are seeking a Senior Manager, Applied Science to build and lead the science organization across Agentic WorkSpaces. This is a foundational leadership role spanning the full portfolio — Personal, Applications, and Core, and the agentic surfaces (WS4Builders and WorkSpaces for Agents). You will hire, grow, and lead a team of applied scientists who define how we measure and improve the performance of AI agents and human-AI teams. A core part of the role is defining the science agenda itself — identifying which problems are most worth solving and where the highest-leverage bets lie. Directions worth exploring might include Organizational Intelligence (turning institutional knowledge into agent-consumable skills), AI Agent Experience / AiAX (agent observability and autonomous remediation), and contextual, behavioral security that adapts enforcement in real time for human and agent sessions — but these are illustrative examples, not a fixed roadmap, and many other directions are possible. You and your team will define which ones we pursue. The problems your team will solve do not have established industry patterns. You will set the scientific direction and build the team that determines how AI agents and people perceive, reason about, and act reliably within computing environments at enterprise scale. What You Will Do Build and lead the applied science team. Hire, develop, and retain a high-caliber team of applied scientists spanning the Agentic WorkSpaces portfolio. Set the bar for scientific talent, create the growth paths, and build the culture that makes AAWS a destination for the best agent and human-AI researchers. Own the science strategy across the portfolio. Direct the research agenda for how we measure and improve agents and human-AI teams: the benchmarks, task suites, and metrics (accuracy, cost-per-task, task completion, productivity) that turn subjective "it works" judgments into rigorous, reproducible measurement that gates what we ship. Define and drive high-leverage research directions. Work with your team to identify the problems most worth solving and shape the science agenda. Directions worth exploring might include how agents combine deterministic tool use (MCP) with visual reasoning from computer use; Organizational Intelligence and workflow learning (learning from expert recordings, voice annotations, and SOPs); and AI Agent Experience / AiAX (detecting when agents are stuck or degrading productivity and autonomously remediating) — these are illustrative starting points, and your team will weigh them against many other possibilities. Translate science into shipped product. Partner with engineering, product, and program leaders to move models, evaluation, and learning systems from prototype into a decade-old production service operating at massive scale, without compromising the reliability that customers depend on. Represent science in leadership and to customers. Be the scientific voice in org-level planning and roadmap decisions across AAWS, and engage directly with enterprise customers on how agent performance, safety, and human-AI productivity are measured and earned. Key job responsibilities Build and lead the applied science team. Hire, develop, and retain a high-caliber team of applied scientists spanning the Agentic WorkSpaces portfolio. Set the bar for scientific talent, create the growth paths, and build the culture that makes AAWS a destination for the best agent and human-AI researchers. Own the science strategy across the portfolio. Direct the research agenda for how we measure and improve agents and human-AI teams: the benchmarks, task suites, and metrics (accuracy, cost-per-task, task completion, productivity) that turn subjective "it works" judgments into rigorous, reproducible measurement that gates what we ship. Define and drive high-leverage research directions. Work with your team to identify the problems most worth solving and shape the science agenda. Directions worth exploring might include how agents combine deterministic tool use (MCP) with visual reasoning from computer use; Organizational Intelligence and workflow learning (learning from expert recordings, voice annotations, and SOPs); and AI Agent Experience / AiAX (detecting when agents are stuck or degrading productivity and autonomously remediating) — these are illustrative starting points, and your team will weigh them against many other possibilities. Translate science into shipped product. Partner with engineering, product, and program leaders to move models, evaluation, and learning systems from prototype into a decade-old production service operating at massive scale, without compromising the reliability that customers depend on. Represent science in leadership and to customers. Be the scientific voice in org-level planning and roadmap decisions across AAWS, and engage directly with enterprise customers on how agent performance, safety, and human-AI productivity are measured and earned. Set the long-term scientific vision and team strategy: Define what best-in-class agent performance, evaluation, and learning look like across Agentic WorkSpaces — for computer-using agents and human-AI teams alike. Chart a multi-year research roadmap, and build the team and plan to deliver it. Secure buy-in from VP-level leadership. Hire and grow scientific talent: Own recruiting, calibration, development, and retention for the science team. Mentor scientists toward senior and principal scope, and raise the scientific bar across the organization. Direct research on highly ambiguous, novel problems: Guide the team through foundational challenges in agent perception, reasoning, evaluation, reliability, and human-AI collaboration — problems where neither the approach nor the success criteria are pre-defined. Drive cross-organizational alignment: Work across partner teams (AgentCore, Bedrock model teams, Identity, Security, the MCP ecosystem) and across the Applied AI Solutions product portfolio, with product and engineering leadership, to ensure scientific decisions compose into a coherent product. Deliver measurable business impact: Ensure your team's research translates to customer outcomes: higher task accuracy, lower cost-per-action, faster time-to-production, measurable productivity for human-AI teams, and the trust that lets enterprises scale agent workflows. Establish scientific rigor and operational excellence: Set the standard for experimentation, evaluation, and reproducibility, and the mechanisms that keep the science organization productive and accountable. Advance the state of the art: Enable and champion contributions to the external technical community through publications, patents, and open-source work that position AWS as the leader in the science of secure agent-computer interaction and human-AI teamwork. About the team AWS Applied AI Solutions' (AAIS) vision is every business innovating with Amazon AI teammates. Our mission is to build delightful AI solutions that improve human capabilities and business outcomes. The Agentic WorkSpaces organization within AAIS envisions a world where people, teams, and AI collaborate securely from anywhere to create unprecedented value for every organization. We build lovable products that empower every business to unlock the full potential of human-AI teamwork, driving smarter decisions, greater creativity, more value, and faster innovation with confidence. Amazon Agentic WorkSpaces (AAWS) is building the world's most lovable, secure, and trusted always-on workspace where AI agents and humans work as partners behind enterprise-grade security. Our portfolio spans persistent desktops (Personal), application streaming (Applications), and Core, and is evolving into the governed operating environment for the hybrid workforce: humans get AI-native desktops for their role, and agents get governed desktops scoped to their task, with administrators managing both as one. This surface includes WS4Builders (an AI-native environment for builders) and WorkSpaces for Agents (W4A) — enabling AI agents to work the way humans do, with access to real applications, real interfaces, and real computing environments. Enterprises want to use AI agents for critical business workloads that touch legacy desktop applications and mainframes, yet 75% of organizations run legacy applications that lack modern APIs, and 90% of corporate data remains locked in systems never designed for agents. Agentic WorkSpaces solves this: it gives enterprises a secure, governed environment where agents and humans operate both legacy and modern applications directly, just as an employee would, without costly migrations.