<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Romina Elena Mendez Escobar</title>
    <description>The latest articles on DEV Community by Romina Elena Mendez Escobar (@r_elena_mendez_escobar).</description>
    <link>https://dev.to/r_elena_mendez_escobar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F719582%2F2d700dae-2335-4c2f-9a32-4435184a4f4f.jpeg</url>
      <title>DEV Community: Romina Elena Mendez Escobar</title>
      <link>https://dev.to/r_elena_mendez_escobar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/r_elena_mendez_escobar"/>
    <language>en</language>
    <item>
      <title>Automated API Load Testing on AWS: Grafana k6 and AI-Powered Reporting with Amazon Bedrock</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Mon, 26 Oct 2026 09:36:06 +0000</pubDate>
      <link>https://dev.to/aws-builders/automated-api-load-testing-on-aws-grafana-k6-and-ai-powered-reporting-with-amazon-bedrock-39g</link>
      <guid>https://dev.to/aws-builders/automated-api-load-testing-on-aws-grafana-k6-and-ai-powered-reporting-with-amazon-bedrock-39g</guid>
      <description>&lt;h1&gt;
  
  
  1. Introduction
&lt;/h1&gt;

&lt;p&gt;When developing an application or service, one of the common questions we face is how many concurrent requests it can handle and how the services it depends on will respond. Even if we verify that all functionalities work correctly, this does not guarantee that the system will maintain its performance as demand increases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh5osb8tssl2840w4gypo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh5osb8tssl2840w4gypo.png" alt=" " width="799" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is why software testing goes beyond verifying &lt;strong&gt;functional requirements&lt;/strong&gt;. It also allows us to evaluate aspects such as performance, stability, and responsiveness. In particular, &lt;strong&gt;load testing&lt;/strong&gt; is not simply about pushing a system until it fails, but rather about understanding how it behaves under different conditions and identifying when it stops meeting the expected requirements.&lt;/p&gt;

&lt;p&gt;In the previous article, we built a service to identify duplicate products using Amazon Bedrock, S3 Vectors, and DynamoDB, including an AWS Lambda function to perform real-time searches. During our initial tests, the service responded within a few seconds, but one question remained unanswered: &lt;strong&gt;how would it behave if many users accessed it simultaneously?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To answer this question, in this second part, we will expose the service through Amazon API Gateway and evaluate its behavior under load. Before running the tests, however, we need to define what we want to measure and which criteria we will use to evaluate the results. To do this, we will introduce some fundamental concepts of Site Reliability Engineering (SRE). We will then automate load testing with Grafana k6 on AWS and, finally, generate a report in which generative AI will help us interpret the collected metrics.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. Understanding Site Reliability Engineering (SRE)
&lt;/h1&gt;

&lt;h2&gt;
  
  
  2.1. What Is SRE?
&lt;/h2&gt;

&lt;p&gt;Before evaluating how our API behaves under load, we need to establish what acceptable performance and reliability actually mean. A service may continue responding to requests, but that does not necessarily mean it is meeting the expected performance requirements.&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;Site Reliability Engineering (SRE)&lt;/strong&gt; comes into play. Originally developed at Google, SRE is a discipline that applies software engineering principles to operating and maintaining reliable systems. It focuses on defining measurable objectives, selecting indicators that reflect service behavior, and using automation to reduce repetitive operational tasks.&lt;br&gt;
For our use case, these concepts provide a foundation for moving beyond simply checking whether the API responds. Instead, we can evaluate specific indicators such as &lt;strong&gt;response times, error rates, and performance under different load conditions.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  2.2. Seven Principles of SRE
&lt;/h2&gt;

&lt;p&gt;SRE is built on a set of principles that guide how reliable services are designed, operated, and maintained. These range from defining reliability objectives and managing risk to automation, monitoring, and keeping systems as simple as possible.&lt;br&gt;
The following infographic summarizes seven of these principles, based on Google's Site Reliability Engineering book.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftauu3h72llmx1970myjy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftauu3h72llmx1970myjy.png" alt=" " width="800" height="679"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Illustration by the author. Based on Google's Site Reliability Engineering book.&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  2.3. Capacity Planning and Performance
&lt;/h2&gt;

&lt;p&gt;Service reliability depends not only on availability but also on the ability to handle demand while maintaining acceptable performance. In this context, SRE includes several practices aimed at anticipating problems, optimizing resources, and reducing the impact of changes in production.&lt;/p&gt;

&lt;p&gt;Among these practices, we can highlight:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Capacity Planning:&lt;/strong&gt; ensuring that a system has sufficient resources and redundancy to handle expected demand without compromising availability objectives. To support this, Google recommends regular load testing to assess the actual capacity of a service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency and Performance:&lt;/strong&gt; understanding how performance changes as load increases, identifying potential degradation, and finding opportunities to optimize resource utilization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Change Management:&lt;/strong&gt; reducing the risks associated with changes in production. According to Google's documented experience, approximately 70% of service outages are caused by changes to live systems, highlighting the importance of detecting problems early.
These practices are directly related to our use case, as we aim to evaluate our API's performance under different load conditions.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  2.4. SLI, SLO, and SLA
&lt;/h2&gt;

&lt;p&gt;Evaluating a service's capacity and performance requires more than simply running tests and collecting metrics. We also need to define what we want to measure and which service levels we consider acceptable.&lt;/p&gt;

&lt;p&gt;In this context, SRE introduces three related concepts: &lt;strong&gt;SLI (Service Level Indicator), SLO (Service Level Objective), and SLA (Service Level Agreement)&lt;/strong&gt;. Together, they connect technical measurements with service objectives and commitments.&lt;/p&gt;

&lt;p&gt;The following infographic summarizes what each concept represents, the question it helps answer, and a practical example of how it can be applied.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frttv7rad2h3kcmf4am3d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frttv7rad2h3kcmf4am3d.png" alt=" " width="800" height="679"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Illustration by the author. Based on Google's SRE framework.&lt;/code&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  3. Grafana k6: A Tool for Performance Testing
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Grafana k6&lt;/strong&gt; is an open-source tool developed in Go and maintained by Grafana Labs, designed to perform load and performance testing on applications, APIs, and microservices. Test scenarios are defined using JavaScript, making it easier to automate tests and integrate them into development workflows.&lt;/p&gt;

&lt;p&gt;Although we often associate these tools with stress testing, k6 allows us to evaluate how a system behaves under different load conditions, without necessarily pushing it to the point of failure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbmac9f7m31oy85ka3de5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbmac9f7m31oy85ka3de5.png" alt=" " width="800" height="697"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Illustration by the author. Based on Grafana k6 documentation.&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  3.1. Types of Load Tests
&lt;/h2&gt;

&lt;p&gt;Depending on what we want to evaluate, we can define different test scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smoke:&lt;/strong&gt; verify that the system responds correctly under minimal load.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Average-load:&lt;/strong&gt; evaluate system behavior under normal operating conditions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stress:&lt;/strong&gt; assess how the system responds under high load.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Soak:&lt;/strong&gt; identify potential performance degradation when load is sustained over extended periods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spike:&lt;/strong&gt; evaluate how the system responds to sudden increases in traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breakpoint:&lt;/strong&gt; progressively increase the load to identify the point at which the system stops meeting the expected criteria.
These scenarios allow us to analyze different aspects of system performance. We should also consider that an application often depends on multiple components and services, meaning that performance degradation can originate from different parts of its architecture.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  3.2. Main Components of k6
&lt;/h2&gt;

&lt;p&gt;To execute these tests, k6 provides several components that allow us to configure load, validate responses, collect metrics, and integrate results with other tools.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd6z1yuz1tgjo1uhecyuv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd6z1yuz1tgjo1uhecyuv.png" alt=" " width="800" height="679"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Illustration by the author. Based on Grafana k6 documentation.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can group them into four main components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚙️ Options:&lt;/strong&gt; define how a test will be executed. They allow us to configure scenarios, load stages, virtual users (VUs), duration, iterations, and acceptance thresholds. These options enable us to reproduce the different types of tests described earlier.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;✅ Checks:&lt;/strong&gt; validate conditions on received responses, such as HTTP status codes or response content. A failed check is recorded in the metrics but does not automatically stop the test execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📊 Metrics:&lt;/strong&gt; collect information about system behavior, including response times, request counts, and error rates. k6 provides built-in metrics and supports custom metrics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Integrations:&lt;/strong&gt; allow tests to be incorporated into CI/CD pipelines and results to be exported to storage, monitoring, and visualization tools.
In our case, we will use &lt;strong&gt;CSV and JSON&lt;/strong&gt; to store the results and subsequently process the metrics included in the final report.&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  4. Architecture
&lt;/h1&gt;

&lt;p&gt;Our load testing solution builds on the &lt;code&gt;game-catalog-resolve-product&lt;/code&gt; Lambda function developed in the &lt;a href="https://dev.to/aws-builders/identical-or-similar-ai-powered-product-matching-with-amazon-bedrock-and-s3-vectors-3pm"&gt;previous article&lt;/a&gt;, which uses Amazon Bedrock, S3 Vectors, and DynamoDB to identify duplicate products.&lt;/p&gt;

&lt;p&gt;In this second part, we expose the function through &lt;strong&gt;Amazon API Gateway (HTTP API)&lt;/strong&gt; with IAM authorization, requiring k6 requests to be signed using AWS credentials.&lt;/p&gt;

&lt;p&gt;The testing process is automated using AWS Step Functions, which orchestrates k6 execution on Amazon ECS Fargate and subsequent report generation through an AWS Lambda function. Test scripts and results are stored in Amazon S3, while Amazon ECR stores the container images.&lt;/p&gt;

&lt;p&gt;The entire infrastructure is defined using Terraform, and the code is available on GitHub, making the solution reproducible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqe7cphkd94zlmzoorcmo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqe7cphkd94zlmzoorcmo.png" alt=" " width="800" height="676"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Architecture diagram by the author.&lt;/code&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  5. Use Case: Automated Load Testing
&lt;/h1&gt;

&lt;p&gt;In this use case, we will run different load testing scenarios against our API. To do this, we use Grafana k6 running inside a Docker container to send requests and collect performance metrics. Once the tests are complete, a Python-based process calculates the results and generates a PDF report that includes an interpretation provided by Amazon Bedrock.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flnvw8bdecjt4my333z41.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flnvw8bdecjt4my333z41.png" alt=" " width="800" height="679"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Illustration by the author.&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  5.1. The Repository
&lt;/h2&gt;

&lt;p&gt;The project is available on GitHub: &lt;a href="https://github.com/RominaElenaMendezEscobar/game-catalog-k6" rel="noopener noreferrer"&gt;game-catalog-k6&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RominaElenaMendezEscobar" rel="noopener noreferrer"&gt;
        RominaElenaMendezEscobar
      &lt;/a&gt; / &lt;a href="https://github.com/RominaElenaMendezEscobar/game-catalog-k6" rel="noopener noreferrer"&gt;
        game-catalog-k6
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Load testing a GenAI API on AWS with k6: scenarios defined in JSON (smoke, load, stress, spike) run on ECS Fargate and orchestrated by Step Functions. Metrics from k6 and CloudWatch are collected by Lambda, and Amazon Bedrock generates an analysis of the results. Tests an API Gateway endpoint backed by Lambda, Amazon Bedrock and S3 Vectors.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;⚡ Automated API Load Testing on AWS: Grafana k6 and AI-Powered Reporting with Amazon Bedrock&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Serverless pipeline that runs &lt;strong&gt;Grafana k6&lt;/strong&gt; load tests against an API on &lt;strong&gt;Amazon ECS Fargate&lt;/strong&gt;
orchestrated by &lt;strong&gt;AWS Step Functions&lt;/strong&gt;, and generates a &lt;strong&gt;PDF report&lt;/strong&gt; where &lt;strong&gt;Amazon Bedrock&lt;/strong&gt;
interprets the metrics. All the infrastructure is defined with &lt;strong&gt;Terraform&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/RominaElenaMendezEscobar/game-catalog-k6/img/1-k6-preview.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRominaElenaMendezEscobar%2Fgame-catalog-k6%2FHEAD%2Fimg%2F1-k6-preview.png" alt="img"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;📝 &lt;strong&gt;Article:&lt;/strong&gt;
🔗 &lt;strong&gt;Part 1 (the API under test):&lt;/strong&gt; &lt;a href="https://dev.to/aws-builders/identical-or-similar-ai-powered-product-matching-with-amazon-bedrock-and-s3-vectors-3pm" rel="nofollow"&gt;Identical or Similar? AI-Powered Product Matching with Amazon Bedrock and S3 Vectors&lt;/a&gt; · &lt;a href="https://github.com/RominaElenaMendezEscobar/aws-games-products" rel="noopener noreferrer"&gt;repository&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🎯 What it does&lt;/h2&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Runs a load test&lt;/strong&gt; with k6 in a container on ECS Fargate, using a configurable scenario (smoke, load, stress, spike).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stores every run&lt;/strong&gt; in its own S3 folder, with the results and an exact copy of the scenario used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generates a PDF report&lt;/strong&gt;: metrics are computed by code; Amazon Bedrock only interprets them, and the figures it quotes are validated against the computed metrics.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The thresholds…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RominaElenaMendezEscobar/game-catalog-k6" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
Its structure includes the k6 scripts, test scenarios, report generator, and infrastructure defined using Terraform.&lt;br&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;game-catalog-k6/
├── Dockerfile, entrypoint.sh
├── search.js, sigv4.js
├── scenarios/
├── queries.json
├── report/
│   └── config/
├── terraform/
└── build-and-push.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal is to make this solution reusable for testing other APIs without modifying the underlying infrastructure or the report generation process. To do this, we only need to configure three elements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;The API we want to test&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;The requests we want to send&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;The load testing scenarios&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5.2. Configuring Tests for Another API
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Identify the API: &lt;code&gt;api_id&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;In our case, we use Amazon API Gateway (HTTP API) with IAM authorization. The service URL follows this structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://&amp;lt;api-id&amp;gt;.execute-api.us-east-1.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The API identifier can be found in the AWS Management Console under API Gateway → Your API → API details.&lt;br&gt;
To configure the project, we specify it in &lt;code&gt;terraform/terraform.tfvars&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;api_id = "&amp;lt;api-id&amp;gt;"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terraform uses this identifier to construct the API URL and configure the necessary permissions for the k6 container to invoke the API using IAM-signed requests.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Define the Requests: queries.json
&lt;/h3&gt;

&lt;p&gt;Once we have identified the API, we need to define which requests we want to send.&lt;br&gt;
Our API accepts text searches through &lt;code&gt;POST /search&lt;/code&gt;. To define the requests executed during testing, we use the &lt;code&gt;queries.json&lt;/code&gt; file, which contains different video game searches in English and Spanish.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fifa 14 ps3 digital code"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fifa 14 ps3 codigo digital"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"es"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gta vice city ps2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"el mario kart de la wii"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"es"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the API expects a different request structure, we will also need to adapt the request body in search.js.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Configure the Load: &lt;code&gt;scenarios&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Once we have defined what to request, we need to establish how the load will be applied. For this, we use JSON files in the scenarios/ directory, each with its own configuration.&lt;/p&gt;

&lt;p&gt;Each JSON file defines a different load testing scenario:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;smoke.json — Smoke Test:&lt;/strong&gt; 1 virtual user for 1 minute to verify basic functionality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;load.json — Load Test:&lt;/strong&gt; 5 virtual users for 5 minutes to evaluate system behavior under steady load.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;stress.json — Stress Test:&lt;/strong&gt; gradually increases the load from 5 to 40 virtual users over 6 minutes to identify performance degradation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;spike.json — Spike Test:&lt;/strong&gt; increases the load from 0 to 50 virtual users in 30 seconds to evaluate how the system responds to sudden traffic spikes.
Each scenario can be customized by adjusting the number of virtual users, test duration, load pattern, and performance thresholds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each file allows us to configure virtual users, test duration, load patterns, and performance thresholds.&lt;br&gt;
For example, &lt;code&gt;smoke.json&lt;/code&gt; contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"smoke"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1 user for 1 minute: checks that the API works before adding load."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"queries_file"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"queries.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/search"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"think_time_seconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"executor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"executor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"constant-vus"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"vus"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1m"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"thresholds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"http_req_failed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"rate&amp;lt;0.01"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"http_req_duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"p(95)&amp;lt;5000"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main parameters are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;endpoint:&lt;/strong&gt; the API path to which requests will be sent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;think_time_seconds:&lt;/strong&gt; the pause between requests made by each virtual user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;executor:&lt;/strong&gt; defines the load pattern, number of virtual users, and test duration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;thresholds:&lt;/strong&gt; allows us to define acceptance criteria for the metrics. In this example, an error rate below 1% and a p95 response time below 5 seconds.
These thresholds allow us to translate our performance objectives into measurable acceptance criteria during testing, following the SLI and SLO concepts introduced earlier.
We can modify existing scenarios or create new JSON files to evaluate different load conditions while reusing the same k6 code.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5.3. Deploying the Infrastructure with Terraform
&lt;/h2&gt;

&lt;p&gt;Once the configuration files are ready, we can deploy the solution using AWS CloudShell, with the tools needed to run Terraform and build Docker images.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Install Terraform (First Time Only)
&lt;/h3&gt;

&lt;p&gt;AWS CloudShell does not include Terraform by default. We can download it to our home directory, which persists across sessions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sLo&lt;/span&gt; /tmp/terraform.zip https://releases.hashicorp.com/terraform/1.9.8/terraform_1.9.8_linux_amd64.zip
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/bin &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; unzip &lt;span class="nt"&gt;-o&lt;/span&gt; /tmp/terraform.zip &lt;span class="nt"&gt;-d&lt;/span&gt; ~/bin
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export PATH="HOME/bin:$PATH"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc
terraform version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Create the Infrastructure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/RominaElenaMendezEscobar/game-catalog-k6.git
&lt;span class="nb"&gt;cd &lt;/span&gt;game-catalog-k6/terraform
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'api_id = "&amp;lt;api-id&amp;gt;"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; terraform.tfvars
terraform init
terraform apply &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;aws_ecr_repository.k6 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;aws_ecr_repository.report
../build-and-push.sh

terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The deployment is performed in three stages: first, we create the Amazon ECR repositories; next, we build and push the container images; and finally, we deploy the remaining resources.&lt;/p&gt;

&lt;p&gt;Terraform provisions the required infrastructure, including Amazon ECS Fargate, AWS Step Functions, AWS Lambda, Amazon S3, and IAM roles and permissions. It also uploads the test scenarios and queries that k6 will use to Amazon S3.&lt;/p&gt;




&lt;h2&gt;
  
  
  5.4. Running a Load Test
&lt;/h2&gt;

&lt;p&gt;With the infrastructure deployed, we can start a test execution using AWS Step Functions, specifying the scenario we want to run.&lt;br&gt;
For example, to execute &lt;code&gt;load.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws stepfunctions start-execution &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--state-machine-arn&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;terraform output &lt;span class="nt"&gt;-raw&lt;/span&gt; state_machine_arn&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--input&lt;/span&gt; &lt;span class="s1"&gt;'{"scenario": "load", "label": "baseline"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjwhjnzg1f9zp8ihu9mrg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjwhjnzg1f9zp8ihu9mrg.png" alt=" " width="454" height="416"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Screenshot by the author. AWS Management Console.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The state machine orchestrates three steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PrepareRun:&lt;/strong&gt; takes the scenario and label provided in the input and generates a unique identifier based on the date and time (&lt;code&gt;run_id&lt;/code&gt;). This identifier is used in the following two steps to ensure that the results and report are associated with the same test execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RunLoadTest:&lt;/strong&gt; starts the k6 container on Amazon ECS Fargate, executes the selected scenario, and stores the results in Amazon S3.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GenerateReport:&lt;/strong&gt; processes the results using an AWS Lambda function, calculates the metrics, and generates a PDF report with an interpretation provided by Amazon Bedrock.
Each execution is stored in a separate folder, following a structure such as &lt;code&gt;runs/&amp;lt;scenario&amp;gt;/&amp;lt;date&amp;gt;/&lt;/code&gt;, along with the configuration used for the test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuytkh6khrx0b45zib0pl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuytkh6khrx0b45zib0pl.png" alt=" " width="800" height="261"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Screenshot by the author. Amazon S3 bucket showing the files and results generated by the automated load testing pipeline.&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Generated by k6 (RunLoadTest):
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;k6-summary.json:&lt;/strong&gt; a summary of the test, including aggregated metric values (averages, percentiles, error rates) and threshold evaluation results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;k6-results.csv:&lt;/strong&gt; detailed data for each request, including when it was sent, how long it took, and whether it failed. This data is used to generate time-series charts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;run-info.json:&lt;/strong&gt; execution metadata, including the scenario, label, timestamps, k6 version, and container image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;scripts/:&lt;/strong&gt; an exact copy of the scripts and scenarios used, allowing us to reproduce the test configuration even if the original files are modified later.
#### Generated by the Report Lambda (GenerateReport):&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;metrics.json:&lt;/strong&gt; metrics calculated by the code using the files generated during the test.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ai-analysis.json:&lt;/strong&gt; the interpretation generated by Amazon Bedrock, along with the results of the numerical validation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;report.pdf:&lt;/strong&gt; the final report, combining all the information above.
To run a different test scenario, we only need to change the scenario value in the Step Functions execution input.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5.5. Report Generation
&lt;/h2&gt;

&lt;p&gt;Once the test is complete, the pipeline processes the k6 results and generates a PDF report that combines the calculated metrics with an interpretation provided by Amazon Bedrock.&lt;br&gt;
For this stage, we use an &lt;strong&gt;AWS Lambda function deployed as a container image&lt;/strong&gt;, as we need several Python libraries: &lt;code&gt;pandas&lt;/code&gt; for data processing, &lt;code&gt;matplotlib&lt;/code&gt; for generating charts, and &lt;code&gt;fpdf2&lt;/code&gt; for creating the PDF document.&lt;/p&gt;

&lt;p&gt;Unlike traditional ZIP-based deployments, which have a 250 MB uncompressed size limit, AWS Lambda supports container images of up to 10 GB. This makes it easier to package the code and its dependencies into a reproducible environment while maintaining a serverless execution model.&lt;/p&gt;

&lt;p&gt;The following infographic summarizes the main benefits of this approach.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F17ig054r7wj94mpp8ujd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F17ig054r7wj94mpp8ujd.png" alt=" " width="799" height="444"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Illustration by the author. Based on AWS Lambda documentation.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The container image is built using a &lt;code&gt;Dockerfile&lt;/code&gt; and pushed to Amazon ECR. Terraform then configures the AWS Lambda function to use this image, as illustrated in the following workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwio0em10jxhbr07q31w7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwio0em10jxhbr07q31w7.png" alt=" " width="799" height="444"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Illustration by the author. Based on AWS documentation.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can view an example of the generated PDF report at the following link:&lt;br&gt;
&lt;a href="https://github.com/RominaElenaMendezEscobar/game-catalog-k6/blob/main/output/s3/game-catalog-loadtest/runs/smoke/2026-10-23--22-44-20/report.pdf" rel="noopener noreferrer"&gt;github.com report.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4wm0lvyv6w7yjqgi9mnw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4wm0lvyv6w7yjqgi9mnw.png" alt=" " width="800" height="760"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Report generated by the author using Python, Grafana k6, and Amazon Bedrock.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The report consists of several pages organized into the following sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Test Context:&lt;/strong&gt; the executed scenario (load, duration, and thresholds) and the test environment (k6 version, container image, and location of the results).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Results and Metrics:&lt;/strong&gt; requests, throughput, error rates, p50, p95, and p99 latencies, threshold compliance, and a breakdown of each phase of a request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance Charts:&lt;/strong&gt; response times over time, latency distribution, percentiles, request time breakdown, throughput, errors, and virtual users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI-Powered Analysis:&lt;/strong&gt; an interpretation of the metrics generated by Amazon Bedrock, along with validation of the numerical values referenced in the analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metrics Glossary:&lt;/strong&gt; definitions of each metric, how it is calculated, an example, and why it matters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is important to emphasize that &lt;strong&gt;all metrics are calculated using Python code&lt;/strong&gt; based on the k6 results. Amazon Bedrock is used only to interpret these values and generate the narrative analysis, with an additional validation step to verify the numerical values mentioned in the generated text.&lt;/p&gt;




&lt;h1&gt;
  
  
  6. Conclusions
&lt;/h1&gt;

&lt;p&gt;In this article, we started with a question: how does an API behave as concurrency increases? To answer it, we implemented an automated load testing pipeline that allows us to evaluate API performance under different load scenarios and analyze the results.&lt;/p&gt;

&lt;p&gt;This exercise allowed us to put some &lt;strong&gt;Site Reliability Engineering (SRE)&lt;/strong&gt; concepts into practice: defining which aspects of the service we want to measure (SLIs), establishing what service levels we consider acceptable (SLOs), and using Grafana k6 to translate those objectives into measurable thresholds during testing.&lt;/p&gt;

&lt;p&gt;Beyond running load tests, we also need to interpret a considerable amount of performance data. To address this, we incorporated &lt;strong&gt;generative AI&lt;/strong&gt; to facilitate the analysis and generate a report that summarizes the key findings without requiring an in-depth understanding of every metric. It is important to emphasize that the metrics are calculated by code, while AI is used only to interpret them, maintaining a clear separation between the collected data and the generated conclusions.&lt;/p&gt;

&lt;p&gt;Another important aspect is the solution's reusability. By modifying the API, queries, and load testing scenarios, we can use the same pipeline to evaluate other services. In addition, preserving the configuration and results of each execution provides traceability and facilitates future comparisons.&lt;/p&gt;

&lt;p&gt;However, this MVP has some limitations and opportunities for improvement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Geographic Coverage:&lt;/strong&gt; tests are executed from a single AWS Region, so they do not necessarily reflect the experience of geographically distributed users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test Duration:&lt;/strong&gt; short test scenarios may produce limited sample sizes, which can affect the stability of percentiles such as p95 and p99.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Interpretation:&lt;/strong&gt; the analysis depends on the model and prompt used. It would be interesting to evaluate different models and refine the instructions based on the type of insights we want to obtain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD Integration and Observability:&lt;/strong&gt; the pipeline is not yet integrated into a CI/CD process. As a future improvement, we could automate testing across application versions, compare results to detect performance regressions, and incorporate Amazon CloudWatch metrics for AWS Lambda and Amazon Bedrock.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Ultimately, the goal is not simply to determine how many requests an API can handle, but to establish a reproducible process that allows us to &lt;strong&gt;measure its behavior, identify potential performance degradation, and evaluate how its performance evolves as we introduce changes.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Beyer, B. et al. (2016).&lt;/strong&gt; Site Reliability Engineering, capítulo 4: Service Level Objectives. &lt;a href="https://sre.google/sre-book/service-level-objectives/" rel="noopener noreferrer"&gt;https://sre.google/sre-book/service-level-objectives/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grafana Labs. (s. f.).&lt;/strong&gt; Grafana k6. &lt;a href="https://grafana.com/oss/k6/" rel="noopener noreferrer"&gt;https://grafana.com/oss/k6/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grafana Labs. (s. f.).&lt;/strong&gt; Load test types. Documentación de Grafana k6. &lt;a href="https://grafana.com/docs/k6/latest/testing-guides/test-types/" rel="noopener noreferrer"&gt;https://grafana.com/docs/k6/latest/testing-guides/test-types/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Web Services. (s. f.).&lt;/strong&gt; Lambda quotas. Documentación de AWS Lambda. &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Méndez Escobar, R. E. (2026).&lt;/strong&gt; Identical or Similar? AI-Powered Product Matching with Amazon Bedrock and S3 Vectors. DEV Community. &lt;a href="https://dev.to/aws-builders/identical-or-similar-ai-powered-product-matching-with-amazon-bedrock-and-s3-vectors-3pm"&gt;https://dev.to/aws-builders/identical-or-similar-ai-powered-product-matching-with-amazon-bedrock-and-s3-vectors-3pm&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>aws</category>
      <category>testing</category>
      <category>programming</category>
    </item>
    <item>
      <title>Identical or Similar? AI-Powered Product Matching with Amazon Bedrock and S3 Vectors</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Wed, 21 Oct 2026 11:49:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/identical-or-similar-ai-powered-product-matching-with-amazon-bedrock-and-s3-vectors-3pm</link>
      <guid>https://dev.to/aws-builders/identical-or-similar-ai-powered-product-matching-with-amazon-bedrock-and-s3-vectors-3pm</guid>
      <description>&lt;h1&gt;
  
  
  1. Introduction
&lt;/h1&gt;

&lt;p&gt;A few weeks ago, someone asked me a question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How can I use AI to improve my inventory if I have similar or duplicate products, but their names aren't written exactly the same way?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To explore how to solve this problem, we'll use video games as an example.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ First spoiler:&lt;/strong&gt; that's the type of data we'll be working with in this article.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1r6pm02900c8fw8h721k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1r6pm02900c8fw8h721k.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Call of Duty: Black Ops&lt;/em&gt; and &lt;em&gt;Call of Duty: Black Ops 2&lt;/em&gt; have almost identical titles, but they are &lt;strong&gt;different games&lt;/strong&gt;. They are not duplicates.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Black Ops 2&lt;/em&gt; and &lt;em&gt;Black Ops II&lt;/em&gt; are &lt;strong&gt;exactly the same game&lt;/strong&gt;, even though a computer sees them as two different text strings.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;FIFA 14&lt;/em&gt; for PlayStation 3 and &lt;em&gt;FIFA 14&lt;/em&gt; for Xbox 360 have the same title, but the &lt;strong&gt;platform is different&lt;/strong&gt;, so they may represent distinct commercial products.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, what does it really mean for two products to be duplicates?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Two records may describe &lt;strong&gt;the same product&lt;/strong&gt; even if their names are different.&lt;/li&gt;
&lt;li&gt;Nearly identical names may refer to &lt;strong&gt;different products&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The same product may be sold in &lt;strong&gt;different presentations or formats&lt;/strong&gt;, which we may need to keep separate depending on the business rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each use case may require different business rules. Some differences may seem obvious to a person, but when we're dealing with thousands of records, we can't rely on someone detecting them manually.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ Second spoiler:&lt;/strong&gt; AI isn't going to solve everything.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We could send all the information about each product to an AI model and ask it to determine whether it's a duplicate. But processing an entire catalog this way can be expensive, and we can't guarantee that the responses will always be consistent.&lt;/p&gt;

&lt;p&gt;In other projects, I have worked with text normalization, regular expressions, and similarity techniques. These remain useful tools, and in many cases, they are sufficient. For this MVP, I wanted to explore a different approach: using rules to handle straightforward cases, while reserving AI for more ambiguous scenarios that cannot be resolved by a rule.&lt;/p&gt;

&lt;p&gt;That's why, before we start building the solution, there are three questions I want to answer:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How can we distinguish truly duplicate products from those that are simply similar?&lt;/li&gt;
&lt;li&gt;When does AI add value, and when is it better to use traditional rules?&lt;/li&gt;
&lt;li&gt;Can we build an MVP on AWS using a serverless architecture while keeping costs under control?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To answer these questions, we'll build a solution that combines AI with traditional rules. We'll walk through the process, from data analysis and normalization to architecture design, comparison logic, and evaluation of the results.&lt;/p&gt;

&lt;p&gt;Because detecting duplicates isn't simply about finding similar names. First, we need to understand what we're comparing and what it actually means for two products to be the same.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. The Business Problem
&lt;/h1&gt;

&lt;p&gt;Poor product data quality is not an isolated problem. Various studies highlight the difficulties companies face in keeping information consistent, up to date, and accessible across their systems.&lt;br&gt;
For example, in 2026, &lt;a href="https://www.gs1uk.org/insights/thought-leadership/constructions-product-information-problem" rel="noopener noreferrer"&gt;GS1 UK published a report on product information management in the construction sector&lt;/a&gt;, based on research involving more than 300 professionals and 15 prominent figures from the industry.&lt;br&gt;
Some of its findings include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;£3.8 billion&lt;/strong&gt; estimated potential annual losses resulting from inefficient product data management in the UK construction industry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;60%&lt;/strong&gt; of respondents say that inefficiencies in managing this information are hindering progress.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The problem is not limited to construction. The &lt;a href="https://riwi.com/2024-product-information-management-report-2/" rel="noopener noreferrer"&gt;2024 Product Information Management Report by RIWI&lt;/a&gt;, based on a survey of more than 300 professionals, found that 37% identified bringing products to market as one of their main pain points.&lt;/p&gt;


&lt;h3&gt;
  
  
  What consequences can this have for a product catalog?
&lt;/h3&gt;

&lt;p&gt;When products are not identified consistently, several problems can arise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stock:&lt;/strong&gt; units of the same product may be spread across multiple records, making it difficult to determine actual inventory levels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing:&lt;/strong&gt; comparing offers for the same product across suppliers or sales channels can become more difficult.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search:&lt;/strong&gt; users may encounter multiple listings for the same product or fail to find it when searching with a different variation of its name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reviews:&lt;/strong&gt; ratings and reviews may be distributed across different listings of the same product.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why the objective of this project is more specific: to explore how to detect potential duplicates in a catalog, distinguish them from products that should remain separate, and evaluate whether combining AI with traditional rules can address part of the problem without driving up costs.&lt;/p&gt;


&lt;h1&gt;
  
  
  3. How Do We Manage Product Information?
&lt;/h1&gt;

&lt;p&gt;When a company sells products through multiple channels, keeping information up to date and consistent can become a challenge. Product Information Management (PIM) systems are designed to manage this process.&lt;/p&gt;


&lt;h2&gt;
  
  
  3.1. 🗂️ What Is a PIM?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A PIM&lt;/strong&gt; allows companies to centralize, enrich, organize, and distribute product information from a single location. It can manage product names, descriptions, technical specifications, images, and other attributes needed to sell a product. &lt;a href="https://business.adobe.com/blog/perspectives/product-information-management" rel="noopener noreferrer"&gt;Adobe explains here&lt;/a&gt; how these systems work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6mwcf01j5ofju0rtnml7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6mwcf01j5ofju0rtnml7.png" alt=" " width="800" height="696"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source: Author's own diagram.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Consider, for example, a company that sells video games through its own website and marketplaces such as Amazon or eBay. Product information may come from different suppliers and in different formats, so it needs to be organized before being published across each channel.&lt;br&gt;
Although this article introduces the concept of PIM, depending on the organization, product information may be managed in an Excel spreadsheet, a database table, enterprise systems such as a CRM or SAP MM, or specialized solutions like a PIM.&lt;br&gt;
The idea is to explore a solution that can be accessed through an API, for example, to help perform data quality checks and detect potential duplicates, regardless of where the product information is managed.&lt;/p&gt;


&lt;h1&gt;
  
  
  4. MVP Design Principles
&lt;/h1&gt;

&lt;p&gt;Before starting to build the solution, I had to make several decisions: which data to use, which part of the catalog to process, and how to combine AI with traditional rules without driving up costs.&lt;br&gt;
These are the principles that defined the scope and design of the MVP:&lt;/p&gt;
&lt;h5&gt;
  
  
  1. A public, realistic dataset.
&lt;/h5&gt;

&lt;p&gt;I used the product metadata from &lt;a href="https://amazon-reviews-2023.github.io/" rel="noopener noreferrer"&gt;Amazon Reviews 2023&lt;/a&gt;, in the Video Games category. I chose this category because it covers many different scenarios: the same game can be sold for different platforms (Nintendo, PlayStation, Xbox or PC), in different editions (standard, deluxe or collector’s), in physical or digital format, or as a refurbished product.&lt;/p&gt;
&lt;h5&gt;
  
  
  2. A limited scope based on an external criterion.
&lt;/h5&gt;

&lt;p&gt;For the MVP, I selected a subset of products based on the 20 best-selling video game franchises according to Wikipedia. To identify the records, I used regular expressions that look for the names of these franchises and their variants in the dataset titles. This keeps the data volume manageable and makes the selection criterion reproducible.&lt;/p&gt;
&lt;h5&gt;
  
  
  3. Cost as a design variable.
&lt;/h5&gt;

&lt;p&gt;I chose a serverless AWS architecture, with on-demand processing and low-cost AI models. Every technical decision is also evaluated for its impact on cost, from data preparation to model calls.&lt;/p&gt;
&lt;h5&gt;
  
  
  4. Rules first, AI where it adds value.
&lt;/h5&gt;

&lt;p&gt;To avoid unnecessary costs, I first analyze the data and apply deterministic rules to the cases that can be solved simply. The language model is reserved for cases that require interpreting text, recognizing abbreviations or evaluating ambiguous matches.&lt;/p&gt;
&lt;h5&gt;
  
  
  5. Explicit business criteria.
&lt;/h5&gt;

&lt;p&gt;Deciding whether two products are the same, a variant or different products is not just a technical question: it depends on the business. In this MVP, those criteria are defined in the prompts and in the pipeline rules, with examples that guide the model. They are a proposal for this case study: in a production environment, they must be reviewed and validated with the business teams of each organization.&lt;/p&gt;
&lt;h5&gt;
  
  
  6. A pipeline to evaluate, not a finished system.
&lt;/h5&gt;

&lt;p&gt;This MVP is a practical approach to building a data pipeline for detecting duplicate products. The goal is not a perfect system, but to check whether the approach is viable and to measure its technical behavior: how long it takes, how much it costs, which share of the decisions is resolved with rules and which needs a model, and how extraction quality evolves across prompt versions. I also review specific cases to understand where it succeeds and where it fails.&lt;/p&gt;


&lt;h1&gt;
  
  
  5. Architecture
&lt;/h1&gt;

&lt;p&gt;Before going into the details of each step, it is worth looking at the complete solution. The goal of the architecture is to transform a disorganized product catalog into one where each listing is associated with the actual product it represents, making that information available for real-time queries.&lt;br&gt;
To achieve this, the solution combines batch processing, which processes the entire catalog at once, with a real-time component that handles new products or search queries as they arrive.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxyuwmhc8zw1zudak6ykp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxyuwmhc8zw1zudak6ykp.png" alt=" " width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Source: Architecture diagram created by the author.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The image above shows the solution architecture, organized into three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input:&lt;/strong&gt; starts with the Amazon Reviews 2023 dataset. We apply the selection criteria defined for the MVP and the data quality rules identified during the EDA, discarding records that do not meet the requirements or fall outside the project's scope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pipeline:&lt;/strong&gt; processes the products from start to finish. It extracts their attributes using a language model, converts them into vectors, searches for similar products, and determines whether they are duplicates, variants, or different products. Finally, it assigns each product a product identifier and a family identifier, storing the results in DynamoDB, a NoSQL database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inference:&lt;/strong&gt; allows us to query the catalog or evaluate new products. It receives a natural language search query, such as &lt;code&gt;FIFA 14 PS3 digital code&lt;/code&gt;, or the details of a new product, and determines whether it matches an existing product, is a variant, or is a new product. The response includes the corresponding identifiers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One principle guided all our decisions: a fully serverless architecture that allows on-demand processing without managing dedicated servers.&lt;br&gt;
For a catalog that is updated periodically, as in this case, this approach allows us to adjust resource consumption to actual needs, with costs primarily associated with data storage, operations performed, and resources used during each execution.&lt;/p&gt;

&lt;p&gt;The following AWS services are grouped according to the diagram's legend:&lt;/p&gt;
&lt;h5&gt;
  
  
  🟩 Storage
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon S3:&lt;/strong&gt; stores the data from each stage in its own folder, allowing us to trace each product and reprocess data from any step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon S3 Vectors:&lt;/strong&gt; stores product vectors and performs similarity searches without requiring us to manage a vector database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon DynamoDB:&lt;/strong&gt; stores each product with its product and family identifiers, enabling millisecond key-based queries for the real-time component.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  🟨 Compute / AI
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Bedrock&lt;/strong&gt;, with three models, each selected for a specific task:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nova Micro:&lt;/strong&gt; extracts the attributes of each product. It is the most cost-effective model and is used for all attribute extraction calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Titan Text Embeddings V2:&lt;/strong&gt; converts each product into a vector.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nova Lite:&lt;/strong&gt; handles ambiguous cases. It has stronger reasoning capabilities than Nova Micro and is used only for a small proportion of product pairs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  🟪 Pipeline
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS Lambda:&lt;/strong&gt; executes each processing step as an independent function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS Step Functions:&lt;/strong&gt; orchestrates the pipeline steps, retries temporary failures, and displays the status of each execution.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  🟥 Security
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS IAM:&lt;/strong&gt; each Lambda function has its own role with the minimum permissions required (for example, reading only from the input folder and writing only to the output folder).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS KMS:&lt;/strong&gt; encrypts data at rest.&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;
  
  
  🟦 Logs
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon CloudWatch:&lt;/strong&gt; centralizes logs from all Lambda functions and Step Functions. It is the first place to look when a step fails, and it also allows us to examine metrics such as execution duration or memory usage for each run.&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  6. Use Case Development
&lt;/h1&gt;
&lt;h2&gt;
  
  
  6.1. 🔍 What Is EDA?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Exploratory Data Analysis (EDA)&lt;/strong&gt; is a process that helps us better understand a dataset before applying models or making decisions. Through different exploration and visualization techniques, we can identify patterns, discover relationships between variables, detect anomalies, and assess data quality.&lt;br&gt;
Although we often associate EDA with the early stages of Machine Learning projects, the concept is not new. Statistician John W. Tukey formalized it in his book Exploratory Data Analysis, published in 1977.&lt;/p&gt;
&lt;h5&gt;
  
  
  🎯 Why is it important?
&lt;/h5&gt;

&lt;p&gt;Because it helps us understand the data before working with it, identify outliers, detect inconsistencies, and question our initial assumptions. Instead of assuming that the data has the expected structure or quality, we explore it to discover what it is actually telling us.&lt;/p&gt;
&lt;h5&gt;
  
  
  🤖 And what about generative AI projects?
&lt;/h5&gt;

&lt;p&gt;It can be tempting to send raw data to a model with a prompt and hope for the best. But every unnecessary field adds tokens that we pay for with each call, and every inconsistent data point is a potential error that the model can propagate. EDA helps us decide which data to send, what to correct beforehand using simple rules, and which part of the catalog to process.&lt;br&gt;
For this use case, I performed ten checks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F50hnip2hj669kdlhqqf8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F50hnip2hj669kdlhqqf8.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source: Author's own infographic.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The findings that had the greatest impact on the design were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;main_category&lt;/code&gt; does not describe the product:&lt;/strong&gt; it refers to the store department. The platform is taken from &lt;code&gt;categories&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;There are hidden nulls:&lt;/strong&gt; thousands of products have an empty categories list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not everything in Games is actually a game&lt;/strong&gt;: there are controllers, statues, and bundles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accessory titles are full of keywords&lt;/strong&gt;: so comparing titles directly does not work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some fields seem useful, but are not&lt;/strong&gt;: &lt;code&gt;Pricing&lt;/code&gt; is a legal notice, and &lt;code&gt;Date First Available&lt;/code&gt; is not the release date.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These findings lead to an initial conclusion: before looking for duplicates, we need to understand what each field represents and distinguish the products that can actually be compared.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;📓 Would you like to explore the full analysis?&lt;/strong&gt; The &lt;code&gt;eda_video_games.ipynb&lt;/code&gt; notebook, including the code and charts, is available in the project repository. There, you will also find the files needed to continue implementing the architecture.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  6.2. ☁️ Infrastructure Deployment
&lt;/h2&gt;

&lt;p&gt;With the data analyzed, the next step is to create the resources required by the pipeline.&lt;br&gt;
Ideally, we would define the entire infrastructure as code using Terraform, AWS SAM, or CDK and deploy it with a single command. To keep this MVP simple, I created the resources through the AWS Console and included the scripts and AWS CLI commands in the repository to reproduce the deployment.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧰 Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before getting started, you will need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account with access to Amazon Bedrock in us-east-1 and the Nova Micro, Nova Lite, and Titan Text Embeddings V2 models enabled.&lt;/li&gt;
&lt;li&gt;AWS CLI v2, configured with the permissions required to create the resources.&lt;/li&gt;
&lt;li&gt;The meta_Video_Games.jsonl file from the Amazon Reviews 2023 dataset.&lt;/li&gt;
&lt;li&gt;Clone the repository and navigate to the project directory:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/RominaElenaMendezEscobar/aws-games-products.git
&lt;span class="nb"&gt;cd &lt;/span&gt;aws-games-products
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RominaElenaMendezEscobar" rel="noopener noreferrer"&gt;
        RominaElenaMendezEscobar
      &lt;/a&gt; / &lt;a href="https://github.com/RominaElenaMendezEscobar/aws-games-products" rel="noopener noreferrer"&gt;
        aws-games-products
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A serverless AI solution on AWS to identify similar products and distinguish duplicates, variants, and different items using Amazon Bedrock, embeddings, business rules, and S3 Vectors.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/r0mymendez" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b96fd4ea89ea15fcec30a4f86382eef0bbd17454aa3a8d4de8c8c5e92b55cf6c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275792532304d6525323041253230436f666665652d737570706f72742532306d79253230776f726b2d4646444430303f7374796c653d666c6174266c6162656c436f6c6f723d313031303130266c6f676f3d6275792d6d652d612d636f66666565266c6f676f436f6c6f723d7768697465" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🎮 Identical or Similar? AI-Powered Product Matching with Amazon Bedrock and S3 Vectors&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Is it the same product?&lt;/strong&gt; A serverless pipeline that detects duplicate and variant listings in an e-commerce catalog, combining a language model, vector search and simple rules, with cost as a design constraint.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/RominaElenaMendezEscobar/aws-games-products/img/game_preview.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRominaElenaMendezEscobar%2Faws-games-products%2FHEAD%2Fimg%2Fgame_preview.png" alt="img"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The use case is a video game catalog: the same game can be sold for different platforms, in different editions and formats, as a budget reprint or refurbished, and its title can be written in many ways ("GTA: Vice City" vs "Grand Theft Auto: Vice City", "Black Ops II" vs "Black Ops 2"). Some of those listings are the same product; others look almost identical but are not.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;📝 This repository accompanies the article &lt;a href="https://dev.to/aws-builders/identical-or-similar-ai-powered-product-matching-with-amazon-bedrock-and-s3-vectors-3pm" rel="nofollow"&gt;Identical or Similar? AI-Powered Product Matching with Amazon Bedrock and S3 Vectors&lt;/a&gt;].&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📊 Results at a glance&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Processed with the final version of the pipeline (prompt v8) on the…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RominaElenaMendezEscobar/aws-games-products" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  📁 Repository Structure
&lt;/h3&gt;

&lt;p&gt;The resources are organized by service under &lt;code&gt;aws/&lt;/code&gt;. Each Lambda function has its own directory containing the code, permissions policy &lt;code&gt;(policy-role.json)&lt;/code&gt;, and required configuration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws/
├── S3/                 → data bucket
├── S3Vectors/          → vector bucket and index
├── DynamoDB/           → products table
├── lambda/             → 8 functions + deployment script
└── step-function/      → pipeline definition and its role
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The deployment follows this order: storage → Lambda functions → Step Functions, as each stage depends on resources created earlier.&lt;/p&gt;




&lt;h3&gt;
  
  
  6.2.1. 🟩 Storage
&lt;/h3&gt;

&lt;h4&gt;
  
  
  6.2.1.1 Amazon S3 · &lt;code&gt;game-catalog-dedup&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;This bucket stores the intermediate data generated during the different pipeline stages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash aws/S3/create_s3_bucket.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  6.2.1.2 Amazon S3 Vectors · &lt;code&gt;game-catalog-vectors / index games-v2&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;This is where the product embeddings are stored. First, we create the vector bucket and then the index, which uses 1,024-dimensional vectors compatible with the Titan Text Embeddings V2 configuration and cosine distance.&lt;br&gt;
The &lt;code&gt;title&lt;/code&gt; and &lt;code&gt;base_title&lt;/code&gt; fields are configured as non-filterable metadata: they are preserved in the results but cannot be used as filtering criteria in the index.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3vectors create-vector-bucket &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--vector-bucket-name&lt;/span&gt; game-catalog-vectors

aws s3vectors create-index &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--vector-bucket-name&lt;/span&gt; game-catalog-vectors &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--index-name&lt;/span&gt; games-v2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-type&lt;/span&gt; float32 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--dimension&lt;/span&gt; 1024 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--distance-metric&lt;/span&gt; cosine &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--metadata-configuration&lt;/span&gt; &lt;span class="s1"&gt;'{"nonFilterableMetadataKeys": ["title", "base_title"]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  6.2.1.3 Amazon DynamoDB · &lt;code&gt;game-catalog-products&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;The table stores products identified by &lt;code&gt;parent_asin&lt;/code&gt; and uses on-demand capacity. Two global secondary indexes allow us to query the results by identifier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;canonical_id-index:&lt;/code&gt; all listings representing the same product.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;family_id-index:&lt;/code&gt; all variants of the same game.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash aws/DynamoDB/create_dynamodb_table.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  6.2.2. 🟥 Permissions and Configuration
&lt;/h3&gt;

&lt;p&gt;Each function has its own IAM role with least-privilege permissions. The policies are defined in the &lt;code&gt;policy-role.json&lt;/code&gt; file in each directory and specify which services each Lambda can access. Each role also includes the AWS managed policy &lt;code&gt;AWSLambdaBasicExecutionRole&lt;/code&gt;, so the function can send logs to CloudWatch. The deployment script (6.2.3) creates the roles and attaches both policies.&lt;br&gt;
Before deploying, review the ARNs in each &lt;code&gt;policy-role.json&lt;/code&gt; and replace &lt;code&gt;&amp;lt;account_number&amp;gt;&lt;/code&gt; with your own AWS account ID. Also check the resource names and the Region.&lt;/p&gt;


&lt;h3&gt;
  
  
  6.2.3. 🟪 Lambda Functions
&lt;/h3&gt;

&lt;p&gt;All eight functions use Python 3.12. To simplify deployment, I prepared a script that creates each function's IAM role from its &lt;code&gt;policy-role.json&lt;/code&gt; file, packages the code, and creates the Lambda function or updates it if it already exists.&lt;/p&gt;

&lt;p&gt;The script receives the function’s folder, its name, the memory and the timeout, and optionally a Lambda Layer ARN and the ephemeral storage size:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./aws/lambda/deploy_lambda.sh &amp;lt;folder&amp;gt; &amp;lt;&lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="nt"&gt;-name&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &amp;lt;memory-MB&amp;gt; &amp;lt;timeout-s&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;layer-arn] &lt;span class="o"&gt;[&lt;/span&gt;ephemeral-MB]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are the commands to deploy the eight functions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;aws/lambda
./deploy_lambda.sh &amp;lt;folder&amp;gt; &amp;lt;&lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="nt"&gt;-name&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &amp;lt;memory-MB&amp;gt; &amp;lt;timeout-s&amp;gt; &lt;span class="o"&gt;[&lt;/span&gt;layer-arn] &lt;span class="o"&gt;[&lt;/span&gt;ephemeral-MB]
./deploy_lambda.sh ETL01-game-catalog-etl              game-catalog-etl                     2048 900 &amp;lt;pandas-layer-arn&amp;gt; 2048
./deploy_lambda.sh SP01-game-catalog-prepare-batch     game-catalog-prepare-batch           1024 180 &lt;span class="s2"&gt;""&lt;/span&gt; 1024
./deploy_lambda.sh SP02-game-catalog-extract-ondemand  game-catalog-extract-ondemand-access  512 900
./deploy_lambda.sh SP03-game-catalog-parse-results     game-catalog-parse-results           1024 300 &lt;span class="s2"&gt;""&lt;/span&gt; 1024
./deploy_lambda.sh SP04-game-catalog-embed             game-catalog-embed                    512 900
./deploy_lambda.sh SP05-game-catalog-decide-pairs      game-catalog-decide-pairs            1024 900
./deploy_lambda.sh SP06-game-catalog-build-clusters    game-catalog-build-clusters          1024 900
./deploy_lambda.sh RT01-game-catalog-resolve-product   game-catalog-resolve-product          512 60

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ The ETL Lambda function uses &lt;code&gt;pandas&lt;/code&gt;, which is not included in the default Lambda runtime. It requires the AWS-managed &lt;strong&gt;AWSSDKPandas-Python312&lt;/strong&gt; layer (in the Lambda console: Layers → Add a layer → AWS layers) and &lt;strong&gt;2 GB of ephemeral storage&lt;/strong&gt;, as it writes the cleaned catalog to &lt;code&gt;/tmp&lt;/code&gt; before uploading it to S3.&lt;br&gt;
The configuration depends on the task: the ETL Lambda requires more memory to process the dataset, while functions that invoke models may need longer execution times. The real-time query Lambda has a shorter timeout.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  6.2.4. 🟪 Step Functions · &lt;code&gt;game-catalog-dedup-pipeline&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Finally, we create the Standard state machine &lt;code&gt;game-catalog-dedup-pipeline&lt;/code&gt;, which coordinates the six processing stages. Its role has permission to invoke only the six Lambda functions used by the pipeline (&lt;code&gt;LambdaInvokeScopedAccessPolicy.json&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam create-role &lt;span class="nt"&gt;--role-name&lt;/span&gt; game-catalog-dedup-pipeline-role &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--assume-role-policy-document&lt;/span&gt; file://aws/step-function/trust-policy.json

aws iam put-role-policy &lt;span class="nt"&gt;--role-name&lt;/span&gt; game-catalog-dedup-pipeline-role &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--policy-name&lt;/span&gt; LambdaInvokeScopedAccessPolicy &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--policy-document&lt;/span&gt; file://aws/step-function/LambdaInvokeScopedAccessPolicy.json

aws stepfunctions create-state-machine &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; game-catalog-dedup-pipeline &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--definition&lt;/span&gt; file://aws/step-function/game-catalog-dedup-pipeline.json &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--role-arn&lt;/span&gt; &amp;lt;step-functions-role-arn&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--type&lt;/span&gt; STANDARD &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  6.2.5. 📥 Upload the Raw Data
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3 &lt;span class="nb"&gt;cp &lt;/span&gt;data/meta_Video_Games.jsonl s3://game-catalog-dedup/raw/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6.3. 🛠️ Data Preparation
&lt;/h2&gt;

&lt;p&gt;After exploring the dataset, the next step is to prepare it for the duplicate detection pipeline.&lt;br&gt;
The EDA helped us understand its structure, identify data quality issues, and determine which attributes could be useful. Based on these findings, I divided the preparation process into two stages: first, cleaning and filtering the data; then, selecting the catalog we would use for the MVP.&lt;/p&gt;


&lt;h3&gt;
  
  
  6.3.1. 🧹 Data Cleaning and Filtering (ETL)
&lt;/h3&gt;

&lt;p&gt;A Lambda function applies the rules defined during the EDA before any AI model is involved. The goal is to prevent incomplete records or unnecessary fields from affecting subsequent processing stages.&lt;br&gt;
The main operations are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Discard products without titles or categories.&lt;/strong&gt; Without this information, it becomes more difficult to identify the product and determine whether it falls within the experiment's scope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove columns without useful information.&lt;/strong&gt; This reduces the amount of data we need to store and process, avoiding the need to carry empty fields into subsequent stages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Convert prices to numeric values.&lt;/strong&gt; When available, this conversion makes prices easier to analyze and ensures a consistent data type.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filter the &lt;code&gt;Games&lt;/code&gt; category.&lt;/strong&gt; We keep only records belonging to this dataset category, reducing the initial dataset before selecting the franchises.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These operations do not identify duplicates yet. They prepare the data so that subsequent stages can compare products using more consistent information.&lt;/p&gt;

&lt;p&gt;This stage is important because it defines the information the model will receive: if a piece of data arrives incomplete or incorrect, the error carries over into the extraction, the search, and the decision-making process.&lt;/p&gt;


&lt;h3&gt;
  
  
  6.3.2. 🎯 Why the 20 Best-Selling Video Game Franchises?
&lt;/h3&gt;

&lt;p&gt;As mentioned in the MVP design principles, I used the 20 best-selling video game franchises as a reference to define the scope of the dataset.&lt;br&gt;
This choice was intentional: I wanted to work with franchises that would allow us to explore different duplicate and variant scenarios, such as annual releases, titles published for different consoles, re-releases, and versions with similar names.&lt;br&gt;
For example, FIFA has successive releases that should not be confused with one another, while the Mario and The Legend of Zelda franchises include games released for different Nintendo consoles. In these cases, similar titles do not necessarily identify the same product.&lt;br&gt;
Additionally, limiting the catalog helps control the volume of data and the cost of model invocations during experimentation.&lt;/p&gt;

&lt;p&gt;The dataset is progressively reduced at each stage:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;📦 Original dataset: 137,269 products&lt;/li&gt;
&lt;li&gt;🧹 Products with titles and categories: 124,624&lt;/li&gt;
&lt;li&gt;🎮 Products in the Games category: 46,530&lt;/li&gt;
&lt;li&gt;🏆 Products from the 20 best-selling franchises: 3,740&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;
  
  
  6.3.3. 📦 Storing Each Stage's Results Separately
&lt;/h3&gt;

&lt;p&gt;Each stage stores its results in a separate Amazon S3 folder (&lt;code&gt;raw/&lt;/code&gt;,&lt;code&gt;clean/&lt;/code&gt;,&lt;code&gt;mvp/&lt;/code&gt;…). In addition, the pipeline stages store their outputs in an execution-specific subfolder, such as &lt;code&gt;attributes/top20-v8/&lt;/code&gt;.&lt;br&gt;
This separation offers two practical advantages:&lt;br&gt;
First, it allows us to reuse the results of a stage without repeating the entire processing workflow.&lt;br&gt;
Second, it makes it easier to compare different pipeline executions and identify what has changed between versions.&lt;br&gt;
This proved especially useful when refining the prompt: I could rerun subsequent stages using the already prepared data, without repeating the catalog cleaning process every time I modified the model instructions.&lt;/p&gt;


&lt;h2&gt;
  
  
  6.4. 🧠 Prompt Design and Evaluation
&lt;/h2&gt;

&lt;p&gt;Once the data is prepared, the next step is to define how we will use AI. The goal is not to ask a model to find duplicates directly across the entire catalog, but rather to break the problem down into more specific tasks.&lt;br&gt;
To achieve this, I designed two prompts: one to normalize the attributes of each product and another to determine whether two candidate products are duplicates, variants, or different products.&lt;br&gt;
However, before selecting the models and writing the instructions, there were several requirements the solution needed to meet.&lt;/p&gt;


&lt;h3&gt;
  
  
  6.4.1. 📋 What Do We Expect from AI?
&lt;/h3&gt;

&lt;p&gt;The first requirement was consistency. If two listings describe the same video game, we need the model to generate normalized attributes that allow us to recognize them as the same product, even when their original titles are different.&lt;br&gt;
We also needed structured output that followed a predefined schema and could be processed programmatically without requiring manual interpretation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxkbehed07ke1njqka50n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxkbehed07ke1njqka50n.png" alt=" " width="800" height="696"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source: Author's own infographic.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The main requirements were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Normalize products:&lt;/strong&gt; extract the base title, platform, edition, format, region, publisher, and product type.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintain structured output:&lt;/strong&gt; return valid JSON with the fields and values expected by the pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apply business rules:&lt;/strong&gt; distinguish an edition from a re-release, a physical product from a digital one, and a video game from an accessory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid unnecessary assumptions:&lt;/strong&gt; do not invent attributes when the available information is insufficient to determine them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control costs and execution time:&lt;/strong&gt; choose the appropriate model for each task and avoid unnecessary model calls.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  6.4.2. ✂️ Two Prompts for Two Different Tasks
&lt;/h3&gt;

&lt;p&gt;During testing, I decided to separate the process into two tasks: normalizing each product's attributes and evaluating candidate pairs that require further analysis. I also found that I could use different models depending on the task: Nova Micro for attribute extraction and Nova Lite for resolving ambiguous cases.&lt;/p&gt;


&lt;h4&gt;
  
  
  6.4.2.1. How Do We Invoke a Model from AWS Lambda?
&lt;/h4&gt;

&lt;p&gt;One of the advantages of Amazon Bedrock is that we can invoke a model through its Converse API without having to manage the underlying model infrastructure. In this case, the prompt is sent as a system message, while the product listing is sent as a user message.&lt;br&gt;
The basic implementation in Python is straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bedrock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;converse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;modelId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;us.amazon.nova-micro-v1:0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;SYSTEM_PROMPT&lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;build_payload&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;))}]}],&lt;/span&gt;
    &lt;span class="n"&gt;inferenceConfig&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;temperature&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;maxTokens&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;attributes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;output&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;build_payload&lt;/code&gt; function sends only the fields I selected during the EDA: title, store, categories, four keys from &lt;code&gt;details&lt;/code&gt;, and three product features. This way, we avoid sending unnecessary information to the model.&lt;br&gt;
This snippet shows the basic model invocation. The complete implementation also needs to handle response validation and error management.&lt;/p&gt;


&lt;h4&gt;
  
  
  6.4.2.2. SYSTEM_PROMPT: Product Normalization (Nova Micro)
&lt;/h4&gt;

&lt;p&gt;This prompt uses Amazon Nova Micro and runs on every product in the catalog. Its purpose is to transform an original product listing into a set of normalized attributes that we can use in subsequent stages.&lt;br&gt;
For example, a product listing might contain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GTA : Vice City - platinum [Playstation 2]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"categories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Video Games"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Legacy Systems"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"PlayStation Systems"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"PlayStation 2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Games"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The expected output would have a structure similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"product_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"game"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"base_title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Grand Theft Auto: Vice City"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"platform"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PlayStation 2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"edition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Standard"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"format"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"physical"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"region"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"unknown"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"publisher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Rockstar Games"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"confidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"high"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the model normalizes the title and platform, while other attributes are determined according to the rules defined in the prompt. For instance, the Platinum label is treated as a budget re-release and normalized to Standard for this MVP. Other values may be inferred from the available information, so it is important to consider the limitations of these inferences.&lt;br&gt;
The key is not simply to clean up the title, but to ensure that equivalent products are represented consistently without losing important distinctions, such as the platform.&lt;br&gt;
📍 This prompt is used by the &lt;code&gt;game-catalog-prepare-batch&lt;/code&gt; (batch) and &lt;code&gt;game-catalog-resolve-product&lt;/code&gt; (on-demand) Lambda functions, both for the initial catalog processing and for resolving subsequent queries.&lt;/p&gt;


&lt;h4&gt;
  
  
  6.4.2.3. DECISION_PROMPT: Candidate Pair Comparison (Nova Lite)
&lt;/h4&gt;

&lt;p&gt;This prompt uses Amazon Nova Lite and is reserved for ambiguous cases that require additional evaluation.&lt;br&gt;
After normalization and candidate retrieval, not every match is straightforward. Two titles may be very similar while referring to different video games.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A: Mario &amp;amp; Sonic at the Olympic Games [Nintendo Wii]
B: Mario and Sonic at the Olympic Winter Games - Nintendo Wii
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Although they share many words, these titles refer to different games. The presence of Winter is a meaningful distinction that we should not ignore.&lt;br&gt;
The prompt must return a structured decision, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"relation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"different"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"reason"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The base titles of the games are different."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📍 This prompt is used by the &lt;code&gt;game-catalog-decide-pairs&lt;/code&gt; (batch) and &lt;code&gt;game-catalog-resolve-product&lt;/code&gt; (on-demand) Lambda functions. By reserving Nova Lite for ambiguous pairs, we avoid using a more expensive model for every record in the catalog.&lt;/p&gt;




&lt;h3&gt;
  
  
  6.4.3. 🏗️ How I Built the Extraction Prompt
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;SYSTEM_PROMPT&lt;/code&gt; was organized into five parts:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhx30ssebl56hf6i4nm3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhx30ssebl56hf6i4nm3f.png" alt=" " width="800" height="382"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source: Author's own diagram.&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role:&lt;/strong&gt; a product data specialist who responds only in JSON.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Purpose:&lt;/strong&gt; explains that the output will be used to detect duplicates and that consistency matters more than preserving the original title.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rules:&lt;/strong&gt; each rule comes from an EDA finding or an observed error: labels in brackets, product condition (“Renewed”) is not an edition, budget re-releases are considered the same product, sequel numbers are part of the title.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schema:&lt;/strong&gt; the fields and their allowed values, including a predefined list of platforms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Examples:&lt;/strong&gt; two complete cases using franchises outside the evaluated dataset, to assess whether the model generalizes rather than simply copying the answers.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  6.4.4. 🧪 Testing Plan in Amazon Bedrock
&lt;/h3&gt;

&lt;p&gt;To develop and test the prompts, I used the Amazon Bedrock Playground, which allows you to change the prompt, model, and parameters and see the response immediately, &lt;strong&gt;without writing a single line of code&lt;/strong&gt;. Its comparison mode displays two models side by side using the same input, along with token consumption and latency.&lt;br&gt;
This was especially useful during experimentation: I could modify a rule, rerun a problematic case, and check whether the result improved or a new error appeared.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F911jh8rjily2r4qzav9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F911jh8rjily2r4qzav9e.png" alt=" " width="800" height="435"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source: Screenshot captured by the author from the Amazon Bedrock console (AWS).&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To evaluate the models' behavior and improve the prompts, I organized the tests across several dimensions:&lt;/p&gt;
&lt;h5&gt;
  
  
  🤖 Model Comparison
&lt;/h5&gt;

&lt;p&gt;I tested Amazon Nova Micro and Nova Lite with equivalent inputs to evaluate their performance on extraction and comparison tasks.&lt;br&gt;
The final decision was to use Nova Micro to normalize all products and reserve Nova Lite for ambiguous pairs. This way, the model with stronger reasoning capabilities is used only when it can provide additional value.&lt;/p&gt;
&lt;h5&gt;
  
  
  🌡️ Generation Parameters
&lt;/h5&gt;

&lt;p&gt;I used a temperature of 0 to reduce response variability during testing. This is useful when comparing prompt versions, although it does not guarantee that every execution will produce identical results.&lt;/p&gt;
&lt;h5&gt;
  
  
  📦 One Product per Call or Multiple Products Together
&lt;/h5&gt;

&lt;p&gt;Grouping ten products into a single call could have reduced the number of extraction calls from approximately 3,740 to 374. However, during testing, I observed that the model could mix information between records, incorrectly modify titles, or return results without properly associating them with their identifiers.&lt;br&gt;
For this reason, I kept one call per product and used eight concurrent calls. This decision increases the number of requests but makes it easier to maintain the correspondence between each input and its result.&lt;/p&gt;
&lt;h5&gt;
  
  
  🌍 Queries in Different Languages
&lt;/h5&gt;

&lt;p&gt;Although the catalog is primarily in English, I also wanted to test how the system would respond to searches written in Spanish.&lt;br&gt;
I tested queries such as &lt;code&gt;pokemon esmeralda game boy advance&lt;/code&gt;, &lt;code&gt;fifa 14 ps3 código digital&lt;/code&gt;, and &lt;code&gt;el mario kart de la wii&lt;/code&gt;. The goal was to evaluate whether the model could interpret these expressions and normalize them to the vocabulary and attributes used in the catalog.&lt;br&gt;
These tests are relevant for a system that not only processes existing records but can also receive search queries written by users.&lt;/p&gt;
&lt;h5&gt;
  
  
  🧪 Edge Cases and Regression Testing
&lt;/h5&gt;

&lt;p&gt;Each new version was tested against previously failing cases and control cases that already worked, to ensure that fixing one issue did not introduce another. These included titles without numbers, titles that already use digits (“FIFA 23”, “NBA 2K17”), and letters that are part of a game's name (“Pokémon X”, “Call of Duty: WWII”, “Mega Man X”).&lt;/p&gt;
&lt;h5&gt;
  
  
  🧠 Influence of Conversation Context
&lt;/h5&gt;

&lt;p&gt;During testing, I noticed another important detail: the Playground can preserve conversation history. When I tested many products consecutively in the same chat, previous responses could influence subsequent ones.&lt;br&gt;
In one test, the model stopped correctly normalizing Roman numerals after several examples. Since each Lambda invocation is independent, this behavior did not reflect the actual conditions of the pipeline.&lt;br&gt;
To avoid misleading comparisons, tests needed to use the same message sent by the application, without previous conversational context, starting a new conversation whenever necessary.&lt;/p&gt;
&lt;h5&gt;
  
  
  💰 Tokens, Costs, and Execution Time
&lt;/h5&gt;

&lt;p&gt;The Amazon Bedrock Playground allowed me to observe token consumption and call latency to estimate costs before running the full pipeline.&lt;br&gt;
I later compared these estimates with the actual results. I also measured the extraction time for all 3,740 products, which was 8 minutes and 26 seconds, mainly constrained by Bedrock's requests-per-minute quota.&lt;br&gt;
These measurements allowed me to evaluate technical decisions beyond response quality, taking both cost and processing time into account.&lt;/p&gt;
&lt;h5&gt;
  
  
  📊 Results
&lt;/h5&gt;

&lt;p&gt;The prompt went through eight versions. Here are some of the differences between the first run on the 20 franchises (version 6) and the final version (version 8):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Games with no identified platform:&lt;/strong&gt; from 5.3% to 1.1%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Games with no identified format:&lt;/strong&gt; from 8.3% to 3.1%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Input tokens per product:&lt;/strong&gt; from approximately 620 to 1,500.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Estimated cost of extracting 3,740 products:&lt;/strong&gt; from approximately $0.12 to $0.24.
##### 💡 Lessons Learned&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Examples work better than abstract rules&lt;/strong&gt;. I tried four different ways of instructing the model to convert Roman numerals into digits (“Black Ops II” → “Black Ops 2”). A simple rule, one explaining the purpose, and a more detailed version all failed in some cases. With two examples, the model correctly converted “Black Ops II”, “Final Fantasy VII”, and “GTA V”, while also preserving “Mega Man X”, where the X is part of the name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Examples can also teach the model what you don't want&lt;/strong&gt;. A single example containing &lt;code&gt;"platform": "unknown"&lt;/code&gt; was enough for the model to leave the platform unidentified for 14% of the games. After correcting the examples to reflect the actual data format, that figure dropped to 1%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;“Don't guess” is not always the best instruction&lt;/strong&gt;. An &lt;code&gt;unknown&lt;/code&gt; value may seem like the safest choice, but in the comparison rules it acts as a wildcard and can cause different products to be grouped together. For the format attribute, an explicit business assumption worked better: in this marketplace, digital products are always labeled as such, so products without a digital label are treated as physical.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test under the same conditions as production&lt;/strong&gt;. The same product produced different results in the Playground and the pipeline because I sent only the title in the Playground, while the pipeline also included categories. Tests are only reliable when they use the actual application input.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure every change&lt;/strong&gt;. Every prompt improvement comes with a token cost, and a new rule can break something that previously worked. Comparing metrics across versions was what allowed me to detect regressions in time.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  6.5. ⚙️ The Pipeline
&lt;/h2&gt;

&lt;p&gt;The catalog is processed by an &lt;strong&gt;AWS Step Functions state machine&lt;/strong&gt; that orchestrates six Lambda functions. Each function performs a single task, reads the previous stage's output from S3, and stores its results in a separate folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqk4fp4iu19uwsy8zlahm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqk4fp4iu19uwsy8zlahm.png" alt=" " width="539" height="517"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source: Screenshot captured by the author from the AWS Step Functions console (AWS).&lt;/code&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  6.5.1.❓Why Did I Choose Step Functions?
&lt;/h3&gt;

&lt;p&gt;I chose Step Functions to coordinate the processing for six reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Orchestration:&lt;/strong&gt; executes the steps in the defined order and passes the required parameters to each function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error handling:&lt;/strong&gt; allows us to configure retries for temporary failures, such as certain Bedrock throttling errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traceability:&lt;/strong&gt; provides a visual representation of each step's status, inputs, outputs, and any errors that occur.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution isolation:&lt;/strong&gt; each execution has a &lt;code&gt;run_name&lt;/code&gt; and stores its results in separate S3 paths, allowing us to compare versions without overwriting the results of other executions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Serverless architecture:&lt;/strong&gt; there is no need to provision or manage servers to coordinate the pipeline. The services manage the underlying infrastructure and scale according to processing needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost control:&lt;/strong&gt; processing runs on demand, without maintaining dedicated infrastructure while idle. This allows us to adjust resource consumption and pay for the resources used, including Lambda invocations, Step Functions state transitions, Bedrock calls, and storage. &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://aws.amazon.com/step-functions/pricing/" rel="noopener noreferrer"&gt;AWS explains the Step Functions pricing model here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h3&gt;
  
  
  6.5.2. 🔄 The Six Stages of the Pipeline
&lt;/h3&gt;

&lt;p&gt;Before the Step Functions workflow begins, the &lt;code&gt;game-catalog-etl&lt;/code&gt; Lambda function cleans the original dataset (&lt;code&gt;raw/&lt;/code&gt;) and stores the products within the defined scope in &lt;code&gt;mvp/&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;PrepareRequests&lt;/strong&gt; · &lt;code&gt;game-catalog-prepare-batch&lt;/code&gt;&lt;br&gt;
Filters the 20 franchises and generates one extraction request per product, including the extraction prompt and only the relevant fields.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📥 &lt;code&gt;mvp/&lt;/code&gt; → 📤 &lt;code&gt;bedrock-input/&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;ExtractAttributes&lt;/strong&gt; · &lt;code&gt;game-catalog-extract-ondemand-access&lt;/code&gt;&lt;br&gt;
Sends each request to &lt;strong&gt;Nova Micro&lt;/strong&gt;, using eight concurrent calls, and stores the model's response.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📥 &lt;code&gt;bedrock-input/&lt;/code&gt; → 📤 &lt;code&gt;bedrock-output/&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;ParseResults&lt;/strong&gt; · &lt;code&gt;game-catalog-parse-results&lt;/code&gt;&lt;br&gt;
Validates the JSON returned by each request, separates video games from other products (bundles, DLC, accessories, etc.), and generates an extraction quality report.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📥 &lt;code&gt;bedrock-output/&lt;/code&gt; → 📤 &lt;code&gt;attributes/, reports/&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CreateEmbeddings&lt;/strong&gt; · &lt;code&gt;game-catalog-embed&lt;/code&gt;&lt;br&gt;
Converts each game into a vector using &lt;strong&gt;Titan Text Embeddings V2&lt;/strong&gt; and stores it in the &lt;strong&gt;S3 Vectors&lt;/strong&gt; index, along with its attributes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📥 &lt;code&gt;attributes/&lt;/code&gt; → 📤 &lt;code&gt;S3 Vectors&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;DecidePairs&lt;/strong&gt; · &lt;code&gt;game-catalog-decide-pairs&lt;/code&gt;&lt;br&gt;
Finds the nearest neighbors of each game and determines the relationship between each pair using deterministic rules or &lt;strong&gt;Nova Lite&lt;/strong&gt; for cases in the gray area.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📥 S3 Vectors → 📤 &lt;code&gt;pairs/, reports/&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;BuildClusters&lt;/strong&gt; · &lt;code&gt;game-catalog-build-clusters&lt;/code&gt;&lt;br&gt;
Groups related pairs and assigns each product a &lt;code&gt;canonical_id&lt;/code&gt; (same product) and a &lt;code&gt;family_id&lt;/code&gt; (same game).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📥 &lt;code&gt;pairs/, attributes/&lt;/code&gt; → 📤 &lt;code&gt;clusters/&lt;/code&gt;, &lt;code&gt;reports/&lt;/code&gt;, &lt;code&gt;DynamoDB&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;
  
  
  6.5.3. 🎛️ Execution Configuration
&lt;/h3&gt;

&lt;p&gt;To run the pipeline, we start a Step Functions execution with the following input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bucket"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"game-catalog-dedup"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"run_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"top20-v8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title_contains"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bmario&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;btetris&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bpok[eé]mon&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bcall of duty&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bgrand theft auto&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b|&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bgta&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bminecraft&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bfifa&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bassassin'?s creed&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bresident evil&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bfinal fantasy&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bwii (sports|fit|play|party|music)&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;blego&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bthe sims&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bnba 2k"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bzelda&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bmadden&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bneed for speed&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bsonic&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bmonster hunter&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;bred dead&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;b"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"model_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"us.amazon.nova-micro-v1:0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"prompt_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"v8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"index_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"games-v2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"decision_model_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"us.amazon.nova-lite-v1:0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"pairs_run"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pairs-top20-v8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"clusters_run"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"clusters-top20-v8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"attribute_keys"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"attributes/top20-v8/attributes_games.jsonl"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What each parameter represents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;bucket:&lt;/strong&gt; the S3 bucket where data from all stages is read and stored.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;run_name:&lt;/strong&gt; the execution name. Everything generated is stored under this name (for example, &lt;strong&gt;attributes/top20-v8/&lt;/strong&gt;), keeping each version separate so it can be compared with previous ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;title_contains:&lt;/strong&gt; the patterns used to select products within the scope, in this case, the 20 franchises. These are regular expressions; \b represents a word boundary, preventing false matches such as “gta” appearing within another word.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;model_id:&lt;/strong&gt; the model used to extract attributes (Nova Micro).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;prompt_version:&lt;/strong&gt; the extraction prompt version. It is stored alongside each result to track which version generated it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;index_name:&lt;/strong&gt; the S3 Vectors index where vectors are stored and queried.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;decision_model_id:&lt;/strong&gt; the model used to resolve ambiguous cases in the gray area (Nova Lite).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pairs_run and clusters_run:&lt;/strong&gt; the folder names where the pair decisions and final clusters are stored.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;attribute_keys:&lt;/strong&gt; the attributes file used by the final stage to build the clusters.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  6.5.4. ⏱️ Execution Time and Scalability
&lt;/h3&gt;

&lt;p&gt;Processing all 3,740 products in the MVP took 14 minutes and 4 seconds. Attribute extraction was the slowest stage, taking 8 minutes and 26 seconds, mainly due to Bedrock's available requests-per-minute quota. The remaining stages took anywhere from a few seconds to a few minutes.&lt;/p&gt;

&lt;p&gt;There is an important limitation to consider when scaling the solution: a single Lambda invocation cannot run for more than 15 minutes. To process a larger catalog, such as the more than 46,000 products in the Games category, it would be advisable to distribute requests across batches and control concurrency. &lt;strong&gt;Step Functions Distributed Map&lt;/strong&gt; is one option for orchestrating this processing, adjusting concurrency according to model quotas and service limits.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📄 The Lambda source code, permissions, memory configuration, and maximum execution times are available in the repository.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  6.6. ⚖️ How Do We Determine Whether Two Products Are the Same?
&lt;/h2&gt;

&lt;p&gt;The central idea behind the design is to separate two questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔎 Which products are similar?&lt;/strong&gt; Vector search answers this question.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚖️ Are they the same product?&lt;/strong&gt; The attributes determine the answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If we relied on similarity alone, FIFA 14 for PS3 and FIFA 14 for Xbox 360 would be classified as duplicates because their vectors are very close. However, they are different products, each with its own stock and price. Vector distance helps us find candidates, while attributes help us make the final decision.&lt;br&gt;
This process takes place in the last three stages of the pipeline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;CreateEmbeddings:&lt;/strong&gt; converts normalized attributes into vectors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DecidePairs:&lt;/strong&gt; finds candidates and determines the relationship between each pair.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BuildClusters:&lt;/strong&gt; groups related products and assigns identifiers.&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;
  
  
  6.6.1. 🔎 Finding Candidates
&lt;/h3&gt;

&lt;p&gt;To find similar products, each game is converted into an &lt;strong&gt;identity text&lt;/strong&gt; using its normalized attributes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;base title | platform | edition | format
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Grand Theft Auto: Vice City | PlayStation 2 | Standard | physical
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Normalized attributes are used instead of the original title so that two listings written differently can generate the same representation when they describe the same product. This helps reduce naming inconsistencies and improves candidate retrieval through vector similarity search.&lt;/p&gt;

&lt;p&gt;Next, &lt;strong&gt;Amazon Titan Text Embeddings V2&lt;/strong&gt; converts this representation into a vector. &lt;strong&gt;Amazon S3 Vectors&lt;/strong&gt; returns the 20 nearest neighbors for each product in the index, and we keep those with a cosine distance below 0.25.&lt;/p&gt;

&lt;p&gt;A distance of zero indicates identical vectors; the greater the distance, the lower the similarity between them.&lt;br&gt;
This threshold helps reduce the number of comparisons, but &lt;strong&gt;it does not determine on its own whether two products are duplicates&lt;/strong&gt;. That decision is made in the next stage by evaluating their attributes and applying the defined business rules.&lt;/p&gt;


&lt;h4&gt;
  
  
  6.6.1.1. How Do We Generate the Identity Text and Embeddings?
&lt;/h4&gt;

&lt;p&gt;The implementation is divided into two functions: one builds the text from the normalized attributes, and the other invokes the Bedrock embedding model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;identity_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;parts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;base_title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;platform&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;edition&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="n"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;format&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; | &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;parts&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;unknown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;embed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bedrock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;modelId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amazon.titan-embed-text-v2:0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inputText&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dimensions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;normalize&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;body&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;embedding&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;identity_text&lt;/code&gt; function omits unknown attributes: if one listing does not specify the format and another does, including &lt;code&gt;"unknown"&lt;/code&gt; would make their identity texts different and push apart two products that might actually be the same. The &lt;code&gt;embed function&lt;/code&gt; sends the text to Titan Text Embeddings V2 and returns the generated vector.&lt;br&gt;
For this MVP, I configured 1,024 dimensions to match the S3 Vectors index.&lt;/p&gt;


&lt;h3&gt;
  
  
  6.6.2. 🌳 Determining the Relationship
&lt;/h3&gt;

&lt;p&gt;Once we have identified the candidate products, the next step is to determine the relationship between them. &lt;strong&gt;Similar titles are not enough: we need to check whether they represent the same product, a variant, or different games.&lt;/strong&gt;&lt;br&gt;
To do this, we combine business rules with an AI model that intervenes only when the rules are not sufficient.&lt;br&gt;
The following decision tree summarizes the logic implemented in the MVP.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdm5xbyftntkrg5fdpkze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdm5xbyftntkrg5fdpkze.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Source: Decision diagram created by the author.&lt;/code&gt;&lt;/p&gt;


&lt;h4&gt;
  
  
  6.6.2.1. Do the Base Titles Match?
&lt;/h4&gt;

&lt;p&gt;First, we normalize the titles to prevent differences in capitalization, apostrophes, or punctuation from affecting matching. For example, “Link’s Awakening” and “Links Awakening” are considered equivalent after normalization.&lt;/p&gt;


&lt;h4&gt;
  
  
  6.6.2.2. Are the Attributes Compatible?
&lt;/h4&gt;

&lt;p&gt;If the base titles match, we compare the platform, edition, format, and region.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the attributes are compatible, we classify the pair as a &lt;strong&gt;duplicate.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;If any known attribute differs, we classify the pair as a &lt;strong&gt;variant.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this implementation, two attributes are considered compatible when they match or when one of them is unknown. This rule makes it easier to work with incomplete product listings, although it also introduces a risk: an unknown value may hide a real difference. Therefore, the classification needs to be evaluated alongside the results and any errors identified.&lt;/p&gt;


&lt;h4&gt;
  
  
  6.6.2.3. What Happens When the Titles Don't Match?
&lt;/h4&gt;

&lt;p&gt;If the base titles differ but the vectors are very close, we enter a gray area. For this MVP, we use a distance below 0.08 as the threshold for sending these pairs to Amazon Nova Lite.&lt;br&gt;
The model evaluates whether the titles describe the same product or refer to different games. When the conditions for this evaluation are not met, the pair is classified as different.&lt;/p&gt;


&lt;h4&gt;
  
  
  6.6.2.4. The Complete Rule in Code
&lt;/h4&gt;

&lt;p&gt;The three steps described above are implemented in a single function, following the same sequence as the decision tree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;rule_decision&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;distance&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Returns (relation, reason), or None when the pair goes to Nova Lite.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;normalize_title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;base_title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nf"&gt;normalize_title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;base_title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]):&lt;/span&gt;
        &lt;span class="n"&gt;diffs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;platform&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;edition&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;format&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nf"&gt;compatible&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="p"&gt;]&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;diffs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;duplicate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;same base_title and compatible attributes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;variant&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;differs in &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;diffs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;distance&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.08&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;  &lt;span class="c1"&gt;# gray zone: Nova Lite decides
&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;different&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;different base_title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;normalize_title&lt;/strong&gt; and &lt;strong&gt;compatible&lt;/strong&gt; functions apply the rules from steps 1 and 2: the first normalizes the titles, and the second checks whether two attributes match or whether one of them is unknown. When &lt;strong&gt;rule_decision&lt;/strong&gt; returns &lt;strong&gt;None&lt;/strong&gt;, the pair is sent to Nova Lite together with the &lt;strong&gt;DECISION_PROMPT&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📄 The full code is in &lt;code&gt;aws/lambda/SP05-game-catalog-decide-pairs/lambda_function.py&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the final run, 10,209 of the 10,449 candidate pairs (97.7%) were classified using deterministic rules applied to the attributes extracted by the AI, and only 240 pairs (2.3%) required an additional evaluation with Nova Lite.&lt;/p&gt;

&lt;p&gt;This result shows that combining AI-based attribute extraction with deterministic rules can significantly reduce the number of additional model calls. However, these figures describe how the decisions were made, not how accurately the system identified duplicates.&lt;/p&gt;

&lt;p&gt;In addition, the distance thresholds used in this MVP (0.25 to select candidates and 0.08 for the gray zone) were set empirically, based on cases observed during development. For a production implementation, a labeled reference set would be needed to check whether these thresholds are appropriate for each use case.&lt;/p&gt;




&lt;h3&gt;
  
  
  6.6.3. 🧩 Grouping Related Products
&lt;/h3&gt;

&lt;p&gt;Once the pairs have been classified, we need to turn these individual relationships into groups that we can query and use later.&lt;/p&gt;

&lt;p&gt;In this MVP, we create two levels of grouping:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🏷️ canonical_id:&lt;/strong&gt; identifies listings that represent the same commercial product.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;👨‍👩‍👧 family_id:&lt;/strong&gt; groups duplicates and their variants, such as the same game available on different platforms, in different editions, or in different formats.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This distinction helps us answer two questions that are often confused: how many listings represent the same product, and how many products belong to the same game family.&lt;/p&gt;




&lt;h2&gt;
  
  
  6.7. ⚡ Inference and Real-Time Queries
&lt;/h2&gt;

&lt;p&gt;So far, the pipeline has processed the entire catalog in a single run. But the result is more than just a duplicate detection report: once processing is complete, we have a &lt;strong&gt;product database&lt;/strong&gt; in &lt;strong&gt;DynamoDB&lt;/strong&gt;, where each listing is associated with its corresponding product and family, and a &lt;strong&gt;vector index in S3 Vectors&lt;/strong&gt; containing each game's vector representation.&lt;/p&gt;

&lt;p&gt;With these two components, we can query the catalog in real time. This also opens the door to integrating the solution with systems used to manage product information, such as a PIM or ERP.&lt;/p&gt;

&lt;p&gt;Some possible scenarios include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🛒 A purchasing team searches for “fifa 14 ps3 digital” and finds the correct listing, even if it is written differently in the catalog.&lt;/li&gt;
&lt;li&gt;📦 A supplier submits a new product, and before it is added to the catalog, the system indicates whether it already exists or is a variant of another product.&lt;/li&gt;
&lt;li&gt;🌍 Someone searches in Spanish within a catalog written in English.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To support these scenarios, the Lambda function has two modes: &lt;strong&gt;search&lt;/strong&gt;, which receives a free-text query and identifies the corresponding product, and &lt;strong&gt;product registration&lt;/strong&gt;, which receives the complete details of a new product, determines whether it already exists, and stores it with its identifiers.&lt;/p&gt;




&lt;h3&gt;
  
  
  6.7.1. 🔍 How Search Works
&lt;/h3&gt;

&lt;p&gt;The important point is that the search &lt;strong&gt;does not directly compare the user's query with the catalog's product titles&lt;/strong&gt;. Instead, it first converts the query into the same format used to represent products in the catalog and only then performs the comparison. Let's look at an example.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. The User's Query
&lt;/h4&gt;

&lt;p&gt;The following query is in Spanish, uses an abbreviation (“ps3”), and does not look like the product titles in the catalog, which are written in English and follow many different naming conventions.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;fifa 14 ps3 codigo digital&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Extract Attributes as JSON
&lt;/h4&gt;

&lt;p&gt;The query is sent to &lt;strong&gt;Nova Micro&lt;/strong&gt; using the same extraction prompt as the pipeline. The model returns the normalized attributes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"product_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"game"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"base_title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"FIFA 14"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"platform"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PlayStation 3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"edition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Standard"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"format"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"digital"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"region"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"unknown"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key transformation has already happened: &lt;strong&gt;“ps3”&lt;/strong&gt; has become &lt;strong&gt;“PlayStation 3”&lt;/strong&gt;, and “codigo digital” has been interpreted as &lt;strong&gt;format: digital&lt;/strong&gt;. The user's query now uses the same vocabulary as the catalog.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Build the Identity Text and Vector
&lt;/h4&gt;

&lt;p&gt;Using these attributes, we build the same identity text format used for every game in the catalog, and &lt;strong&gt;Titan&lt;/strong&gt; converts it into a vector:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FIFA 14 | PlayStation 3 | Standard | digital
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4. Find Candidate Products
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;S3 Vectors&lt;/strong&gt; returns the candidates with the highest vector similarity. Among them is the listing “FIFA 14 - PS3 [Digital Code]”, which has the same normalized identity text as the query and therefore a distance of zero, along with other physical versions of FIFA 14.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Retrieve the Identifiers
&lt;/h4&gt;

&lt;p&gt;For each candidate, we query DynamoDB to retrieve its canonical_id (which commercial product it represents) and family_id (which game it belongs to).&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Determine the Relationship
&lt;/h4&gt;

&lt;p&gt;Using the same rules as the pipeline, we compare the query against each candidate: the digital listing is a duplicate because its title, platform, and format match, while the physical copies are variants because the format is different.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Output
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"decision"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"duplicate"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"canonical_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CAN-B00GGUW312"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"family_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"FAM-B00CD90R7M"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"identity_text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"FIFA 14 | PlayStation 3 | Standard | digital"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"matched_with"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"FIFA 14 - PS3 [Digital Code]"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"distance"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"rule"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response does more than identify the product: the &lt;strong&gt;family_id&lt;/strong&gt; also allows us to retrieve all its variants (other platforms, physical copies, and different editions).&lt;/p&gt;

&lt;h4&gt;
  
  
  🧪 More Examples
&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;game-catalog-resolve-product&lt;/strong&gt; Lambda function allows us to test different queries and see how the system identifies a product and retrieves its variants. The following images show some examples of the responses.&lt;/p&gt;

&lt;p&gt;Two fields are especially important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;canonical_id:&lt;/strong&gt; identifies a specific commercial product. Listings that share this identifier are considered duplicates, even when their original titles are written differently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;family_id:&lt;/strong&gt; groups products belonging to the same game family, including variants across different platforms, editions, or formats.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This distinction allows us to query not only duplicate listings but also the different versions of the same game.&lt;br&gt;
For example, when querying the Assassin’s Creed III family in DynamoDB, we find &lt;strong&gt;8 listings grouped into 4 commercial products:&lt;/strong&gt; Xbox 360, PlayStation 3, PC in physical format, and PC via digital code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr96ol7hhbsirojjbn8rz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr96ol7hhbsirojjbn8rz.png" alt=" " width="800" height="412"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source: Screenshot captured by the author from the AWS Lambda console (AWS).&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh59ixbi9lc9b64qah8gz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh59ixbi9lc9b64qah8gz.png" alt=" " width="799" height="472"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;Source: Screenshot captured by the author from the AWS Lambda console (AWS).&lt;/code&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  7. Results
&lt;/h1&gt;

&lt;p&gt;The pipeline processed &lt;strong&gt;3,740 product listings in 14 minutes and 4 seconds&lt;/strong&gt;, from preparing the requests to creating the product clusters.&lt;/p&gt;




&lt;h2&gt;
  
  
  7.1. ⏱️ Execution Time
&lt;/h2&gt;

&lt;p&gt;According to the AWS Step Functions execution history, the most time-consuming stages were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ExtractAttributes:&lt;/strong&gt; 8 min 26 s, to extract and normalize attributes using Nova Micro.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CreateEmbeddings:&lt;/strong&gt; 4 min 21 s, to generate embeddings and store them in S3 Vectors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DecidePairs:&lt;/strong&gt; 55 s, to evaluate 10,449 candidate pairs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of the remaining stages took less than 15 seconds. Attribute extraction was mainly constrained by Bedrock's requests-per-minute quota, while embedding generation was the second most time-consuming stage.&lt;/p&gt;




&lt;h2&gt;
  
  
  7.2. ⚖️ Rules Before AI in the Decision Step
&lt;/h2&gt;

&lt;p&gt;In the final run, &lt;strong&gt;10,209 of the 10,449 candidate pairs (97.7%)&lt;/strong&gt; were classified using deterministic rules applied to the attributes previously extracted by the AI model, and only &lt;strong&gt;240 pairs (2.3%)&lt;/strong&gt; required an additional evaluation with Nova Lite.&lt;br&gt;
This approach reserves the model for ambiguous cases and avoids unnecessary model calls. These decisions were reviewed through specific cases, but not validated one by one; measuring their accuracy would require a labeled reference dataset, as discussed in the conclusions.&lt;/p&gt;




&lt;h2&gt;
  
  
  7.3. 💰 Attribute Extraction Cost
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;game-catalog-extract-ondemand-access&lt;/strong&gt; Lambda function collects the input and output token counts returned by Bedrock. The execution summary, available in the &lt;strong&gt;ExtractAttributes&lt;/strong&gt; step output in Step Functions, recorded:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3,740 products successfully processed, with no errors.&lt;/li&gt;
&lt;li&gt;5,661,802 input tokens.&lt;/li&gt;
&lt;li&gt;264,153 output tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Based on these figures and Amazon Nova Micro pricing in us-east-1, the estimated extraction cost is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input:&lt;/strong&gt; 5.66 million tokens × $0.035 per million = &lt;strong&gt;$0.20&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output:&lt;/strong&gt; 0.264 million tokens × $0.14 per million = &lt;strong&gt;$0.04&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Total extraction cost:&lt;/strong&gt; approximately &lt;strong&gt;$0.24&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This calculation covers attribute extraction only. The total pipeline cost also includes embeddings, Nova Lite decisions, Lambda and Step Functions executions, and storage.&lt;/p&gt;




&lt;h2&gt;
  
  
  7.4. 📈 Prompt Evolution
&lt;/h2&gt;

&lt;p&gt;Prompt engineering was an important part of this project. I used the Amazon Bedrock Playground to test instructions and examples, compare models, review errors, and refine the prompt without having to modify or deploy the code after each iteration. I then validated the changes by running the complete pipeline.&lt;/p&gt;

&lt;p&gt;Between versions 6 and 8, the extraction metrics improved (Section 6.4.4), with fewer games missing an identified platform or format.&lt;/p&gt;

&lt;p&gt;These metrics indicate an improvement in attribute extraction, although they do not, on their own, demonstrate greater accuracy in duplicate detection.&lt;/p&gt;




&lt;h1&gt;
  
  
  8. Conclusions
&lt;/h1&gt;

&lt;p&gt;This MVP allowed me to demonstrate that deterministic rules, embeddings, and language models can be combined to detect potential duplicates without sending every comparison to an AI model.&lt;/p&gt;

&lt;p&gt;It also showed that cost does not depend solely on the model selected. Data preparation, attribute selection, prompt design, and the rules used to handle straightforward cases all have a direct impact on resource consumption and execution time.&lt;/p&gt;

&lt;p&gt;During the development of this MVP, I tested various products, edge cases, and prompt versions using a subset of the catalog. These tests made it possible to refine the extraction rules and evaluate the technical behavior of the pipeline, but they do not replace a systematic assessment of accuracy using labeled data.&lt;/p&gt;

&lt;p&gt;However, the results should be interpreted within the scope of the experiment. Before using a similar solution with a real-world catalog, I would focus on several areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;📊 Measure accuracy:&lt;/strong&gt; create a reference dataset with pairs labeled as duplicates, variants, or different products.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🧪 Expand testing:&lt;/strong&gt; cover more edge cases, such as titles with subtle differences or queries containing limited information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🧩 Use more data:&lt;/strong&gt; experiment with descriptions, images, and additional attributes, evaluating their impact on quality and cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🤖 Compare models:&lt;/strong&gt; evaluate alternatives based on accuracy, latency, and cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📈 Scale processing:&lt;/strong&gt; review Bedrock quotas, concurrency, and options such as batch inference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🏗️ Automate infrastructure:&lt;/strong&gt; define the deployment using Terraform, AWS SAM, or CDK.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🗂️ Version prompts:&lt;/strong&gt; use Amazon Bedrock Prompt Management to maintain traceability across prompt versions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;👥 Incorporate feedback and human review:&lt;/strong&gt; allow users to validate results and manually review the most ambiguous cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This exercise shows that identifying duplicate or similar products is not just about finding matches between their names, but about understanding which attributes define their identity and how to combine them with business rules. AI can help us solve the most complex cases, but its real value appears when we use it as part of a solution that also takes data quality, efficiency and costs into account.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;⚠️ Note:&lt;/strong&gt; this project is an exploratory &lt;code&gt;MVP&lt;/code&gt; and is not intended for production use as is. Keep in mind that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The figures come from a single run on a subset of 3,740 products, so the results may vary with other catalogs.&lt;/li&gt;
&lt;li&gt;The rules work on the attributes extracted by the model: if the extraction fails, the error propagates to the search and the decision.&lt;/li&gt;
&lt;li&gt;The thresholds, rules and business criteria were defined empirically.&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;p&gt;Before applying a similar approach to a real catalog, it should be adapted to each organization's business rules, the models should be evaluated, and the accuracy of the results should be measured with your own data.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  9.  📚References
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Adobe. (s. f.)&lt;/strong&gt;. Product information management (PIM). &lt;a href="https://business.adobe.com/blog/perspectives/product-information-management" rel="noopener noreferrer"&gt;https://business.adobe.com/blog/perspectives/product-information-management&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Reviews 2023&lt;/strong&gt;. (s. f.). Amazon Reviews 2023. &lt;a href="https://amazon-reviews-2023.github.io/" rel="noopener noreferrer"&gt;https://amazon-reviews-2023.github.io/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Web Services. (s. f.)&lt;/strong&gt;. Amazon Bedrock pricing. Recuperado el 20 de octubre de 2026, de &lt;a href="https://aws.amazon.com/bedrock/pricing/" rel="noopener noreferrer"&gt;https://aws.amazon.com/bedrock/pricing/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Web Services. (s. f.)&lt;/strong&gt;. AWS Step Functions pricing. Recuperado el 20 de octubre de 2026, de &lt;a href="https://aws.amazon.com/step-functions/pricing/" rel="noopener noreferrer"&gt;https://aws.amazon.com/step-functions/pricing/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GS1 UK. (s. f.)&lt;/strong&gt;. Construction’s product information problem. &lt;a href="https://www.gs1uk.org/insights/thought-leadership/constructions-product-information-problem" rel="noopener noreferrer"&gt;https://www.gs1uk.org/insights/thought-leadership/constructions-product-information-problem&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IBM. (s. f.)&lt;/strong&gt;. Exploratory data analysis (EDA). &lt;a href="https://www.ibm.com/think/topics/exploratory-data-analysis" rel="noopener noreferrer"&gt;https://www.ibm.com/think/topics/exploratory-data-analysis&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;RIWI. (2024). 2024 product information management report. &lt;a href="https://riwi.com/2024-product-information-management-report-2/" rel="noopener noreferrer"&gt;https://riwi.com/2024-product-information-management-report-2/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tukey, J. W. (1977)&lt;/strong&gt;. Exploratory data analysis. Addison-Wesley.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wikipedia contributors.&lt;/strong&gt; (s. f.). List of best-selling video game franchises. Wikipedia. Recuperado el 20 de octubre de 2026, de &lt;a href="https://en.wikipedia.org/wiki/List_of_best-selling_video_game_franchises" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/List_of_best-selling_video_game_franchises&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>aws</category>
      <category>database</category>
      <category>rag</category>
    </item>
    <item>
      <title>When Product Strategy Meets AI: What Happens to Metrics, Alignment and Decisions?</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Sat, 10 Oct 2026 11:36:36 +0000</pubDate>
      <link>https://dev.to/r_elena_mendez_escobar/when-product-strategy-meets-ai-what-happens-to-metrics-alignment-and-decisions-381b</link>
      <guid>https://dev.to/r_elena_mendez_escobar/when-product-strategy-meets-ai-what-happens-to-metrics-alignment-and-decisions-381b</guid>
      <description>&lt;h1&gt;
  
  
  1. Introduction
&lt;/h1&gt;

&lt;p&gt;I have worked on application analytics projects, and there is one question that comes up again and again: &lt;strong&gt;what does it mean for our product to be successful?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It seems like a simple question, but agreeing on the answer can be much more difficult than it appears.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu33mxq9hl7a8roj8zs1r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu33mxq9hl7a8roj8zs1r.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Marketing may focus on attracting new users and encouraging them to return. Product may prioritize feature adoption and user experience. Fraud and Security teams may focus on reducing risks and protecting the application. They all contribute to the success of the product, but each department looks at it from a different perspective and has its own priorities.&lt;/p&gt;

&lt;p&gt;This diversity of objectives is also reflected in the questions that arise when analyzing data: What should we measure? Which indicators are relevant? How do we know if we are moving in the right direction? These questions are not always easy to answer when each team starts from a different definition of success.&lt;/p&gt;

&lt;p&gt;Data governance can help establish common criteria for managing, interpreting, and using information. However, there is a question we need to address first: &lt;strong&gt;before agreeing on how to measure results, we need to agree on what we want to achieve as an organization.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How can we establish a shared direction that connects the priorities of different teams with a common objective, without losing sight of their specific needs?&lt;/p&gt;

&lt;p&gt;In this article, I will explore how the North Star Framework can help answer that question, how to put it into practice through a workshop, and how generative artificial intelligence can support the process, from defining a primary metric to analyzing results and planning new initiatives.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. When Measuring More Doesn't Mean Understanding Better
&lt;/h1&gt;

&lt;p&gt;Today, we have tools that allow us to collect and analyze large volumes of information about how people use our products. We can measure downloads, active users, retention, conversions, or feature usage. However, having all these indicators does not necessarily mean we understand what is working or what we should improve.&lt;/p&gt;

&lt;p&gt;The challenge is not only deciding which metrics to use, but &lt;strong&gt;understanding what they tell us about the product and how they relate to the objectives we want to achieve.&lt;/strong&gt; An indicator may show positive results for one team without necessarily representing an improvement in the user experience or the value users receive.&lt;/p&gt;

&lt;p&gt;For example, increasing the number of app downloads may seem like a good result. But what happens if those new users never return? Can we consider the product to be growing sustainably?&lt;/p&gt;

&lt;p&gt;These questions lead us to distinguish between &lt;strong&gt;measuring product activity and measuring the value it actually generates.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The North Star Framework proposes addressing this challenge by establishing a shared direction: identifying a primary metric that represents the value users receive and connecting it to the factors that different teams can influence.&lt;/p&gt;

&lt;p&gt;It is not about measuring less or replacing the indicators each department needs, but about &lt;strong&gt;giving them a common context that allows us to interpret results, connect decisions, and understand how each initiative contributes to the success of the product.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  &amp;nbsp;3. What Is the North Star Framework?
&lt;/h1&gt;

&lt;p&gt;The North Star Framework is a methodology that helps organizations identify what product success means and how to measure it, using the value users receive as a reference point.&lt;/p&gt;

&lt;p&gt;Its starting point is the &lt;strong&gt;North Star Metric (NSM),&lt;/strong&gt; a primary metric that aims to reflect the value a product delivers to its customers and its relationship with sustainable business growth.&lt;/p&gt;

&lt;p&gt;However, the framework goes beyond selecting a single indicator. It also helps identify the factors that influence this metric, establish relationships between them, and guide the decisions and initiatives of different teams.&lt;/p&gt;




&lt;h2&gt;
  
  
  3.1 Origin and Evolution of the Concept
&lt;/h2&gt;

&lt;p&gt;The concept of the North Star Metric became popular in the field of growth hacking, driven by Sean Ellis, as a way to identify the metric that best represents the core value a product offers to its users.&lt;/p&gt;

&lt;p&gt;Later, &lt;strong&gt;Amplitude&lt;/strong&gt; developed and promoted &lt;code&gt;the North Star Framework&lt;/code&gt;, expanding the concept of a primary metric into a more structured methodology.&lt;/p&gt;

&lt;p&gt;This approach incorporates what are known as &lt;code&gt;input metrics&lt;/code&gt;, which help identify the factors that teams can influence to impact the North Star, as well as different models of value creation depending on the type of product and practices for connecting strategy with the decisions made by each department.&lt;/p&gt;

&lt;p&gt;In this way, the North Star is no longer just a reference indicator but becomes the center of a framework that &lt;strong&gt;connects user value, product metrics, and business decisions.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3.2 What Does a North Star Metric Bring?
&lt;/h2&gt;

&lt;p&gt;Defining a &lt;code&gt;North Star Metric&lt;/code&gt; is not simply about choosing an indicator that represents product success. Its true value lies in helping us understand how the decisions and &lt;strong&gt;actions of different teams contribute to creating value for users and driving business growth.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This approach allows us to move from analyzing metrics in isolation to interpreting them as part of a shared strategy. Below, we can identify six key benefits of adopting a North Star Metric.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fng3r7d7vtz0z2onbuvgx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fng3r7d7vtz0z2onbuvgx.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ultimately, &lt;strong&gt;it is not about measuring less, but about measuring with a clear purpose.&lt;/strong&gt; The North Star does not replace the indicators that each team needs to manage its activities, but rather provides a strategic context for understanding how they relate to one another and how they contribute to the success of the product.&lt;/p&gt;




&lt;h2&gt;
  
  
  3.3 North Star Metric vs. One Metric That Matters (OMTM)
&lt;/h2&gt;

&lt;p&gt;Although both concepts aim to focus attention on a relevant metric, &lt;strong&gt;the main difference lies in their purpose and the time horizon they represent.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;North Star Metric (NSM)&lt;/strong&gt; provides a long-term strategic direction. It aims to reflect the value the product delivers to its users and serves as a reference point for connecting the decisions of different teams with the overall business objectives.&lt;/p&gt;

&lt;p&gt;On the other hand, the &lt;strong&gt;One Metric That Matters (OMTM)&lt;/strong&gt; allows teams to focus their efforts on a specific priority during a defined period. Unlike the North Star, it does not aim to represent the overall success of the product, but rather to help a team address a specific challenge and evaluate the results of the actions implemented.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvkh4mjdn4raaflokellu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvkh4mjdn4raaflokellu.png" alt=" " width="799" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For an OMTM to be useful, it should meet three conditions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Be specific:&lt;/strong&gt; focus on a concrete, measurable outcome rather than a broad objective such as “improving retention.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Have a defined time frame:&lt;/strong&gt; establish a working period, such as a few weeks or a quarter, that allows progress to be evaluated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Address a current priority:&lt;/strong&gt; adapt to the product's needs and change when the expected results are achieved or new challenges arise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Both metrics can coexist and complement each other.&lt;/strong&gt; While the North Star establishes the strategic direction we aim to achieve, the OMTM helps identify where to focus efforts at a given moment.&lt;/p&gt;

&lt;p&gt;In this way, an organization can maintain a shared long-term vision without losing the flexibility needed to respond to specific challenges and opportunities.&lt;/p&gt;




&lt;h2&gt;
  
  
  3.4 How Do We Know If We've Chosen a Good North Star Metric?
&lt;/h2&gt;

&lt;p&gt;So far, we have explored what a North Star Metric represents and how it can help establish a shared direction. But this leads us to an important question: &lt;strong&gt;how do we know if the metric we have chosen truly reflects the success of our product?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi45q0tx2uyieuevt8f2q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi45q0tx2uyieuevt8f2q.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is no universal metric that works for every organization. The choice depends on the product, the needs of its users, and the business strategy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amplitude&lt;/strong&gt; proposes a series of criteria that can help us evaluate potential metrics. Rather than treating them as a checklist of requirements, I find it interesting to use them as questions that encourage us to reflect on what we want to measure.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Are we measuring the value the customer receives?&lt;/strong&gt; A good North Star should represent a real benefit for those who use the product, rather than simply the number of interactions they have within it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is it connected to our strategy?&lt;/strong&gt; The metric should reflect what we aim to achieve as an organization and remain relevant beyond the priorities of a specific team.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Does it help us anticipate success?&lt;/strong&gt; Not all indicators serve the same purpose. Metrics such as Monthly Recurring Revenue (MRR) or Average Revenue per User (ARPU) allow us to evaluate business results, but they do not necessarily help us understand whether we are creating the conditions for sustainable growth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can we influence its evolution?&lt;/strong&gt; It is important that teams can identify actions capable of improving it. Measuring external factors over which we have no control may provide context, but it is unlikely to help guide our decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Is it understandable across the entire organization?&lt;/strong&gt; A North Star should be easy to explain without relying on complex technical definitions. If each team interprets it differently, it will be difficult to use it as a shared reference point.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can we measure it reliably?&lt;/strong&gt; We need a clear definition and data that allow us to track its evolution. However, there is something I consider important: we should not choose a metric simply because we currently have the data needed to calculate it. Sometimes, measuring what truly matters requires tracking new events, improving data quality, or developing additional analytical capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This does not mean that these indicators are useless. They can be essential for evaluating specific initiatives, but we need to question whether they are suitable for representing the product's primary objective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choosing a North Star Metric should not be a competition between departmental indicators, but an opportunity to build a shared vision of what success means.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And this brings us to a question worth exploring separately: when does a metric that appears positive become a vanity metric?&lt;/p&gt;




&lt;h2&gt;
  
  
  3.5 Vanity Metrics: What Are We Trying to Demonstrate?
&lt;/h2&gt;

&lt;p&gt;In many organizations, each team uses indicators to evaluate and demonstrate the results of its work. Marketing may highlight user growth, Product may focus on feature adoption, and Sales may emphasize increased conversions. All these results can be positive, but &lt;strong&gt;does that mean the product as a whole is successful?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is where the risk of so-called vanity metrics arises: indicators that show favorable results but, when analyzed in isolation, do not necessarily reflect the value users receive or help us make better decisions.&lt;/p&gt;

&lt;p&gt;A common example is the number of Daily Active Users (DAU). Having more and more people open an application may seem like a good sign, but &lt;strong&gt;does it mean they are actually getting value from it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The answer depends on the context. For some applications, frequency of use may be essential, while for others, what matters is that users complete a task or fulfill a specific need. Even within the same product, the relevance of a metric can change depending on its stage of maturity. A newly launched application may prioritize user acquisition, while a more established one may focus on retention.&lt;/p&gt;

&lt;p&gt;That is why &lt;strong&gt;a metric is not inherently a vanity metric, but becomes one depending on what it represents, how we interpret it, and what we use it for.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The challenge is not to stop measuring the performance of each team, but to avoid confusing positive results from individual indicators with the overall success of the product. The North Star Framework helps us connect these different perspectives with a shared objective.&lt;/p&gt;




&lt;h1&gt;
  
  
  4. From Framework to Practice: How to Organize a Workshop
&lt;/h1&gt;

&lt;p&gt;So far, we have explored what the North Star Framework is and which criteria can help us identify a metric that represents the value our product generates. But there is an important question: &lt;strong&gt;how do we define that metric when each team has its own priorities and interpretations of success?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One way to address this challenge is through a collaborative workshop, as suggested by Amplitude in its documentation, that brings together different perspectives and helps transform ideas, data, and hypotheses into a shared direction.&lt;/p&gt;

&lt;p&gt;To illustrate how I would put this process into practice, I designed a hypothetical exercise based on a language learning application like Duolingo. It does not represent the company's internal processes, but will serve as an example throughout the different stages of the workshop.&lt;/p&gt;




&lt;h1&gt;
  
  
  4.1 Who Participates
&lt;/h1&gt;

&lt;p&gt;The first step is to identify the &lt;code&gt;stakeholders&lt;/code&gt; who should participate in the workshop. To build a shared vision, we need to bring together different perspectives on the product, including areas such as Marketing, Product, Business, Data, Engineering, and, depending on the context, Fraud or Security.&lt;/p&gt;

&lt;p&gt;We can use tools such as the &lt;strong&gt;Power–Interest Matrix&lt;/strong&gt; to identify relevant stakeholders and understand their level of influence and interest. However, we should not select participants solely based on their hierarchical position, but also on the knowledge and experience they can contribute.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faarmmeyeyfhbpvjvoihv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faarmmeyeyfhbpvjvoihv.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The goal is not for everyone to share the same priorities, but for their different perspectives to contribute to defining a common direction.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And these differences are reflected not only in each team's objectives, but also in the beliefs and assumptions that each person brings to the workshop.&lt;/p&gt;




&lt;h2&gt;
  
  
  4.2 The Beliefs and Assumptions We Bring to the Workshop
&lt;/h2&gt;

&lt;p&gt;Once we have identified the stakeholders, there is another aspect we need to consider: &lt;strong&gt;each person comes to the workshop with their own ideas about what makes the product successful.&lt;/strong&gt; Some are supported by data, while others come from experience, intuition, or the priorities of each team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amplitude's North Star Playbook&lt;/strong&gt; identifies different types of beliefs that can influence these conversations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 👥 Customers:&lt;/strong&gt; what we believe our users need and value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 🔗 Causality:&lt;/strong&gt; which actions we think lead to certain outcomes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 📈 Market:&lt;/strong&gt; how we believe the market will evolve and what opportunities may arise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 🤖 Technology:&lt;/strong&gt; which trends could transform our product.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 🏁 Competition:&lt;/strong&gt; what we think other players are doing or planning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 💎 Value Proposition:&lt;/strong&gt; what we believe differentiates our product.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The problem is not having these beliefs, but confusing them with facts that we have not yet validated.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, in our hypothetical language learning application, someone might say: “Users come back because they want to maintain their learning streaks.” This may sound reasonable, but do we have data to support it, or are we starting from an assumption?&lt;/p&gt;

&lt;p&gt;Making these differences visible allows us to identify what we know, what we need to validate, and which hypotheses should guide our analysis.&lt;/p&gt;

&lt;p&gt;And this is especially important in a workshop involving different departments: &lt;strong&gt;our goal is not to let the opinion of the person with the most influence prevail, but to build decisions based on collective knowledge and the available evidence.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4.3 Before the Workshop: Creating the Right Environment
&lt;/h2&gt;

&lt;p&gt;Once we have selected the participants and identified the different perspectives they can contribute, we need to prepare an environment that encourages participation and the exchange of ideas.&lt;/p&gt;

&lt;p&gt;In a workshop where we aim to define a shared direction, &lt;strong&gt;the way the conversation unfolds can be just as influential as the ideas that emerge from it.&lt;/strong&gt; That is why it is important to establish certain conditions from the beginning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 🤝 Build trust:&lt;/strong&gt; create a space where people can share ideas, ask questions, and challenge assumptions without fear of being judged.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 📏 Establish clear rules:&lt;/strong&gt; agree on the time allocated to each activity, respect speaking turns, and encourage discussions focused on ideas rather than individuals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 🏢 Balance hierarchies:&lt;/strong&gt; prevent the opinions of those in positions of greater responsibility from influencing everyone else. One alternative is to collect ideas individually before opening the discussion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;〰️ 🔕 Avoid interruptions:&lt;/strong&gt; set aside dedicated time and space to maintain focus and continuity throughout the activities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The goal is not to eliminate differences of opinion, but to allow all perspectives to be expressed before reaching a conclusion.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With these conditions in place, we can begin working on the activities that will help us transform different ideas into a proposed North Star and its input metrics.&lt;/p&gt;




&lt;h2&gt;
  
  
  4.4 During the Workshop: From Ideas to a North Star Metric
&lt;/h2&gt;

&lt;p&gt;Once we have identified the participants, recognized the different beliefs, and established the conditions for working together, we can begin the workshop.&lt;/p&gt;

&lt;p&gt;To illustrate the process, I will use a hypothetical example based on a language learning application like Duolingo. It is not intended to represent how the company works internally, but rather to help us visualize how we can move from different perspectives to a North Star Metric and its input metrics.&lt;/p&gt;

&lt;p&gt;We will organize the workshop into three stages: &lt;strong&gt;divergence, convergence, and hypothesis definition.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4.4.1. Divergence: Generating Ideas
&lt;/h3&gt;

&lt;p&gt;The first objective is to gather different perspectives without trying to reach a conclusion immediately.&lt;/p&gt;

&lt;p&gt;We can start with a question that encourages reflection:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What do we believe drives the success of our application?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And complement it with some additional questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;〰️ Why do we believe users continue using the application?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;〰️ At what point do they feel they are actually learning?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;〰️ What factors might cause them to abandon it?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;〰️ What would motivate them to return after a break?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To carry out this activity, we can use the &lt;code&gt;3-12-3&lt;/code&gt; Brainstorming technique: three minutes to write down ideas individually, twelve minutes to share and develop them in pairs, and three minutes to present the main proposals to the group.&lt;/p&gt;

&lt;p&gt;An interesting practice is to use two different colors of sticky notes to &lt;strong&gt;distinguish ideas supported by data from those that are still assumptions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At this stage, we are not trying to determine who is right, but rather to gather different perspectives and prevent some ideas from being dismissed before they have been heard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbq26vs9uap5rr3cv59fw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbq26vs9uap5rr3cv59fw.png" alt=" " width="799" height="607"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4.4.2. Convergence: Grouping and Prioritizing
&lt;/h3&gt;

&lt;p&gt;Once we have collected the ideas, the next step is to organize them to identify what they have in common and how they relate to one another. At this stage, we are no longer trying to generate new proposals, but rather to &lt;strong&gt;find patterns that help us understand which factors could contribute to the product's success.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To do this, we can use Affinity Mapping, a technique that involves grouping ideas based on their themes or similarities.&lt;/p&gt;

&lt;p&gt;Returning to our language learning application example, we could identify different groups related to motivation and learning habits, how easy it is to get started, the ability to resume lessons after a break, or users' perception of their own progress.&lt;/p&gt;

&lt;p&gt;As we organize these ideas, we can also begin to distinguish between &lt;strong&gt;the outcomes we want to achieve and the actions or factors that could help us achieve them.&lt;/strong&gt; For example, encouraging users to return daily may be a desired outcome, while timely reminders or features related to learning streaks could be factors that influence this behavior.&lt;/p&gt;

&lt;p&gt;However, not all ideas will be equally relevant or supported by the same level of evidence. To identify which ones participants consider most important, we can use Dot Voting, a technique in which each person receives a limited number of votes to select the proposals they consider priorities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Voting does not determine which ideas are correct, but rather which ones deserve greater attention.&lt;/strong&gt; If a proposal receives many votes but is still based on assumptions, we have an interesting hypothesis that needs to be validated before making decisions.&lt;/p&gt;

&lt;p&gt;During this process, questions or topics may also arise that we cannot resolve at that moment. To prevent the conversation from losing focus, we can use a Parking Lot to record these issues and revisit them later.&lt;/p&gt;

&lt;p&gt;In this way, we move from a collection of individual ideas to an initial organization of potential outcomes, influencing factors, and hypotheses that will serve as a starting point for defining a North Star Metric and its input metrics.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjbboltokwbol1u8yi9fy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjbboltokwbol1u8yi9fy.png" alt=" " width="799" height="607"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4.4.3. Defining the Hypothesis: Connecting the Metrics
&lt;/h3&gt;

&lt;p&gt;With the ideas grouped and prioritized, we can begin to build a hypothesis about which factors contribute to the product's success.&lt;/p&gt;

&lt;p&gt;The goal is to identify a North Star Metric that represents the value we want to create and connect it to a limited set of input metrics that we can influence.&lt;/p&gt;

&lt;p&gt;To express this relationship, we can use a phrase such as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“If we do all of this right, then…”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This exercise encourages us to explain why we believe that improving certain factors will contribute to the outcome we want to achieve.&lt;/p&gt;

&lt;p&gt;From there, we can identify opportunities for improvement, propose potential interventions, and define how we would measure their results.&lt;/p&gt;

&lt;p&gt;It is important to remember that &lt;strong&gt;not every idea automatically becomes a metric, and not every relationship we propose has been proven.&lt;/strong&gt; The outcome of the workshop is a shared hypothesis that we will later need to validate with data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy9sse5p5oir9hwu5vhzm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy9sse5p5oir9hwu5vhzm.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4.4.4. Documenting: The Workshop's Memory
&lt;/h3&gt;

&lt;p&gt;At the end of the workshop, it is important to document not only the decisions made, but also &lt;strong&gt;how we arrived at them:&lt;/strong&gt; the ideas proposed, the groups identified, the votes, the hypotheses that still need to be validated, and the reasons why certain alternatives were discarded.&lt;/p&gt;

&lt;p&gt;This documentation allows us to maintain traceability of decisions and revisit the reasoning that led us to define our North Star and its input metrics.&lt;/p&gt;

&lt;p&gt;But there is another aspect I consider important: &lt;strong&gt;metrics are defined within a specific context, and that context can change.&lt;/strong&gt; That is why it is also useful to record the product's stage of maturity, the features it offered, who its users were, and what the business priorities were at that time.&lt;/p&gt;

&lt;p&gt;Consider, for example, how Duolingo has evolved: it went from offering language courses to incorporating new learning experiences, other disciplines, and AI powered features. These changes can influence how people use the product and the value they expect to receive.&lt;/p&gt;

&lt;p&gt;The same can happen due to external factors. The emergence of new technologies, changes in the market, or evolving user needs may mean that a metric that was once relevant needs to be reviewed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Documenting the context allows us to understand why we made certain decisions and recognize when it is necessary to question them again.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4.4.5. After the Workshop: Validating and Reviewing
&lt;/h3&gt;

&lt;p&gt;The workshop allows us to build a shared vision, but the metrics and relationships we have identified still need to be validated with data. Reaching an agreement does not necessarily mean that our hypotheses are correct.&lt;/p&gt;

&lt;h4&gt;
  
  
  Validating the Hypotheses
&lt;/h4&gt;

&lt;p&gt;Once the session is over, we can transform ideas and assumptions into concrete hypotheses that allow us to analyze which factors influence our North Star.&lt;/p&gt;

&lt;p&gt;This involves reviewing the available data, identifying what information is missing, and defining how we will test whether the proposed relationships actually hold true.&lt;/p&gt;

&lt;p&gt;Here, generative AI can help us organize workshop notes, structure hypotheses, and prepare questions for analysis. However, &lt;strong&gt;validation requires evidence and the judgment of the teams&lt;/strong&gt;, not just an interpretation generated by AI.&lt;/p&gt;

&lt;h4&gt;
  
  
  Reviewing Periodically
&lt;/h4&gt;

&lt;p&gt;Organizations evolve, products incorporate new features, and user needs change. That is why a North Star should not be considered a permanent decision.&lt;/p&gt;

&lt;p&gt;It is advisable to establish periodic reviews to evaluate whether the metric continues to represent the value the product generates and whether the defined inputs remain relevant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The goal is not to change metrics constantly, but to ensure that we continue measuring what truly matters.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  5. A Real Case to Understand Input Metrics: Duolingo's Growth Model
&lt;/h1&gt;

&lt;p&gt;In the previous section, we explored how we can use a workshop to define our North Star Metric and identify the factors we believe influence it. But &lt;strong&gt;how can we connect a primary metric to more specific indicators that help us understand what drives its results?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To better understand this, I will use the growth model that Duolingo published in 2023 as a reference. It is an interesting example of how a company can leverage its product data to understand user behavior and guide its decisions.&lt;/p&gt;

&lt;p&gt;Faced with stagnating growth in &lt;strong&gt;Daily Active Users (DAU),&lt;/strong&gt; Duolingo's Data Science team developed a Growth Model based on a Markov model to analyze how users transitioned between different activity states.&lt;/p&gt;

&lt;p&gt;Rather than looking only at the total number of active users, the model distinguishes &lt;strong&gt;seven states based on user behavior:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;New Users:&lt;/strong&gt; users who open the application for the first time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Current Users:&lt;/strong&gt; users who are active today and were also active during the past week.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reactivated Users:&lt;/strong&gt; users who return after more than a week of inactivity, but within the past month.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resurrected Users:&lt;/strong&gt; users who return after more than 30 days of inactivity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;At-risk WAUs (Weekly Active Users):&lt;/strong&gt; users who were active during the past week, but not today.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;At-risk MAUs (Monthly Active Users):&lt;/strong&gt; users who were active during the past month, but not during the past week.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dormant Users:&lt;/strong&gt; users who have not used the application for at least 30 days.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2s3iiusfc93y5gwd1ne0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2s3iiusfc93y5gwd1ne0.png" alt=" " width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;Illustration of the Duolingo Growth Model: Technical Details&lt;/center&gt;




&lt;p&gt;What makes this model interesting is that it does not simply classify users, but also allows us to analyze &lt;strong&gt;how they move from one state to another&lt;/strong&gt; and which factors may contribute to their continued use of the product, their return after a break, or their decision to stop using it.&lt;/p&gt;

&lt;p&gt;To study these transitions, Duolingo uses different retention metrics, including four worth highlighting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;CURR (Current User Retention Rate):&lt;/strong&gt; measures the retention of regular users.&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;NURR (New User Retention Rate):&lt;/strong&gt; analyzes the retention of new users.&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;RURR (Reactivated User Retention Rate):&lt;/strong&gt; measures the retention of users who return after a relatively short break.&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;SURR (Resurrected User Retention Rate):&lt;/strong&gt; analyzes the retention of users who return after an extended period of inactivity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using these metrics, Duolingo ran simulations to understand which ones could have the greatest impact on DAU. In its analysis, the team identified that improving CURR offered a particularly significant opportunity and used A/B experiments to evaluate strategies aimed at improving retention.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I find interesting about this example is how a general metric can be broken down into more specific indicators that help identify where to take action.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can also apply this logic to the North Star Framework. We do not always need to create new metrics from scratch. Many organizations already have indicators related to acquisition, activity, retention, or conversion. The challenge may lie in selecting the most relevant ones, understanding how they relate to each other, and connecting them to the value we want to create for our users.&lt;/p&gt;

&lt;p&gt;In other cases, we will need to introduce new ways of measuring or review existing metrics as our product evolves.&lt;/p&gt;

&lt;p&gt;It is important to clarify that &lt;code&gt;Duolingo's Growth Model&lt;/code&gt; is a product analytics model and not necessarily its official North Star Framework. However, it helps illustrate how we can identify factors that influence a primary metric and use them to guide our decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But selecting a limited set of input metrics does not mean that other indicators are no longer important.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An application still needs to analyze other dimensions, such as user acquisition, feature adoption, user experience, retention, and product quality.&lt;/p&gt;

&lt;p&gt;These complementary metrics provide context to help us interpret results, identify problems, and understand what is happening beyond our North Star.&lt;/p&gt;




&lt;h1&gt;
  
  
  6. From the North Star to Contextual Metrics
&lt;/h1&gt;

&lt;p&gt;So far, we have explored how a North Star Metric can help us establish a shared direction and how its input metrics allow us to identify the factors that contribute to achieving it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But the success of an application cannot be understood through a single indicator or a limited set of metrics.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Teams need to analyze different aspects of the product: how users arrive, what happens during their first interactions, which features they use, why they return, and whether they encounter technical issues that affect their experience.&lt;/p&gt;

&lt;p&gt;These metrics provide context and allow us to interpret results from different perspectives. For example, a decline in retention could be related to performance issues, difficulties during onboarding, or changes in the behavior of certain user segments.&lt;/p&gt;

&lt;p&gt;The following infographic brings together some of the KPIs we can use to analyze different dimensions of an application, from acquisition and activation to engagement, retention, and product quality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgku2jd2x3s4pgnmic9h6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgku2jd2x3s4pgnmic9h6.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The North Star helps us maintain a strategic direction, while contextual metrics allow us to understand what is happening within the product and which aspects we need to investigate.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is not about constantly analyzing every indicator, but rather selecting those that provide relevant information to interpret results and make better decisions.&lt;/p&gt;




&lt;h1&gt;
  
  
  7. How AI Can Support the North Star Framework
&lt;/h1&gt;

&lt;p&gt;The North Star Framework does not end when we define a metric. It is an ongoing process that requires analyzing results, testing hypotheses, communicating decisions, and reviewing whether we are still creating value for our users.&lt;/p&gt;

&lt;p&gt;Throughout this process, &lt;strong&gt;artificial intelligence can help us work with information, explore different perspectives, and transform data into useful knowledge to support decision-making.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;However, it is important to distinguish between generative AI and other artificial intelligence techniques. While machine learning can be used to detect anomalies, identify patterns, or build predictive models, generative AI offers other capabilities, such as summarizing information, facilitating its interpretation, and allowing people to interact with data through natural language.&lt;/p&gt;

&lt;p&gt;The following infographic summarizes five stages in which AI can support the application of the framework, while keeping validation and final decisions in human hands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgm2rhxydy5kxru4pggg9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgm2rhxydy5kxru4pggg9.png" alt=" " width="800" height="904"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🧭 1. Define the North Star
&lt;/h3&gt;

&lt;p&gt;During workshops, generative AI can serve as a supporting tool to organize ideas and broaden participants' perspectives.&lt;/p&gt;

&lt;p&gt;For example, we can provide it with information about the product, interviews, surveys, user feedback, and internal documentation to identify recurring themes, compare opinions, and detect potential contradictions.&lt;/p&gt;

&lt;p&gt;It can also help us transform workshop ideas into metric proposals and evaluate them using the framework's criteria.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What makes this interesting is not having AI choose our North Star, but using it to help us ask better questions and explore alternatives we may not have considered.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🔬 2. Validate the Metric and Identify Its Inputs
&lt;/h3&gt;

&lt;p&gt;Once we have defined the candidate metrics, we need to verify whether they represent the value we want to create and whether we can measure them reliably.&lt;/p&gt;

&lt;p&gt;Generative AI can help us review definitions, identify ambiguities, and translate business questions into SQL queries that must subsequently undergo technical validation.&lt;/p&gt;

&lt;p&gt;We can also complement this work with machine learning techniques to explore relationships between variables, identify patterns, and estimate which indicators are most strongly associated with changes in our North Star.&lt;/p&gt;

&lt;p&gt;However, &lt;strong&gt;finding a correlation does not mean proving causation.&lt;/strong&gt; The relationships identified need to be tested through appropriate analysis and, when relevant, experimentation.&lt;/p&gt;




&lt;h3&gt;
  
  
  🗣️ 3. Explain Results to Different Teams
&lt;/h3&gt;

&lt;p&gt;One of the challenges of working with metrics is ensuring that people with different responsibilities and levels of technical knowledge can understand and interpret them.&lt;/p&gt;

&lt;p&gt;Here, generative AI can help transform complex analyses into explanations tailored to each audience, connecting changes in the North Star with input metrics and contextual indicators.&lt;/p&gt;

&lt;p&gt;It also allows people to explore data by asking questions in natural language, without requiring everyone to know how to write SQL queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The goal is not for every team to analyze the same indicators, but for them to understand how their metrics relate to the product's results.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  📡 4. Monitor and Understand Changes
&lt;/h3&gt;

&lt;p&gt;Once the metrics have been implemented, we need to track their evolution and understand what happens when results change.&lt;/p&gt;

&lt;p&gt;We can use analytics tools to detect anomalies and combine their outputs with generative AI to prepare reports, summarize trends, and identify potential areas for investigation.&lt;/p&gt;

&lt;p&gt;But there is one question I consider particularly important: &lt;strong&gt;are we observing a real change in user behavior or a problem with our data?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A sudden decline in activity may be caused by a change in the product, but it could also result from instrumentation errors, events that are no longer being recorded, or issues in data pipelines.&lt;/p&gt;

&lt;p&gt;That is why monitoring should not be limited to business indicators. We also need to consider data quality and technical changes that may affect how results are interpreted.&lt;/p&gt;

&lt;p&gt;AI can help us connect this information and suggest possible explanations, but these hypotheses must be verified before being presented as conclusions.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔁 5. Review and Plan New Initiatives
&lt;/h3&gt;

&lt;p&gt;Finally, the results of our analysis should help us decide what to do next.&lt;/p&gt;

&lt;p&gt;Generative AI can support the formulation of hypotheses, the preparation of improvement proposals, the design of experiments, and the documentation of lessons learned.&lt;/p&gt;

&lt;p&gt;It can also help us explore scenarios, such as analyzing what might happen if we improve retention or reduce difficulties during onboarding.&lt;/p&gt;

&lt;p&gt;These estimates can be useful for prioritizing initiatives, provided they are based on appropriate models and subsequently compared with actual results.&lt;/p&gt;

&lt;p&gt;AI Supports the Process, but Does Not Replace Decisions&lt;br&gt;
There is one principle that applies across all these stages: &lt;strong&gt;AI does not replace product knowledge, data quality, or the judgment of teams.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If each department uses different definitions for the same metric, introducing AI will not automatically resolve that lack of agreement. It could even amplify inconsistencies and generate incorrect interpretations.&lt;/p&gt;

&lt;p&gt;Similarly, optimizing an indicator without understanding what it represents may lead us to improve the numbers without creating more value for our users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The true potential of combining AI with the North Star Framework lies in helping organizations connect data, knowledge, and decisions while maintaining a shared direction without losing sight of the value they want to create.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  8. Conclusions: Beyond Metrics and Technology
&lt;/h1&gt;

&lt;p&gt;Throughout this article, we have explored how the North Star Framework can help us establish a shared direction, connect product metrics with the value users receive, and transform different perspectives into more aligned decisions. However, while defining a good metric is an important step, it does not guarantee that an organization will work toward the same goal, especially when team priorities, incentives, and dynamics are not aligned.&lt;/p&gt;

&lt;h2&gt;
  
  
  8.1 When Individual Goals Do Not Guarantee Collective Success
&lt;/h2&gt;

&lt;p&gt;Metrics allow us to evaluate results, but they can also influence how people work and make decisions. When a team's performance depends on certain indicators, it is natural for them to focus their efforts on improving those metrics, even if doing so does not always contribute directly to the overall objective.&lt;/p&gt;

&lt;p&gt;To illustrate this, I want to revisit an example I once heard involving football, where a striker can be evaluated by the number of goals they score and a goalkeeper by the goals they prevent. Let's imagine three scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3 to 4:&lt;/strong&gt; the striker scores three goals and achieves an excellent individual result, but the team loses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;0 to 0:&lt;/strong&gt; the goalkeeper keeps a clean sheet and achieves their objective, but the team does not win.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 to 1:&lt;/strong&gt; the striker scores fewer goals and the goalkeeper concedes one, but the team wins.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If we look only at individual metrics, we might conclude that the striker performed better in the first scenario and the goalkeeper in the second. However, when we consider the collective result, the interpretation changes because, as a team, our goal is to win the match.&lt;/p&gt;

&lt;p&gt;This does not mean that the striker's goals or the goalkeeper's saves are no longer relevant, but rather that &lt;strong&gt;we need to understand how they contribute to the shared objective.&lt;/strong&gt; Something similar happens in organizations, where Marketing may achieve its acquisition targets, Product may improve feature adoption, and other departments may meet their own KPIs, without those improvements necessarily translating into a better user experience.&lt;/p&gt;

&lt;p&gt;The challenge, therefore, is not to eliminate individual metrics, but to find a balance that allows us to evaluate each team's responsibilities without losing sight of the outcome we want to achieve as an organization.&lt;/p&gt;

&lt;h2&gt;
  
  
  8.2 People Are Also Part of the Equation
&lt;/h2&gt;

&lt;p&gt;This reflection leads us to consider another dimension that is often left out of measurement models: the human and organizational context in which objectives are defined and results are interpreted.&lt;/p&gt;

&lt;p&gt;Organizations are made up of people with different experiences, motivations, responsibilities, and ways of understanding success. That is why relationships between teams, trust, communication, and organizational culture also influence the decisions being made and how data is used.&lt;/p&gt;

&lt;p&gt;Furthermore, when we talk about building a product, we usually think primarily of Product, Technology, or Marketing teams, but its success is also influenced by other departments, such as Human Resources, Administration, or those responsible for organizational management. Even if they are not directly involved in developing a feature, their decisions can influence working conditions, motivation, and the ability of those teams to collaborate.&lt;/p&gt;

&lt;p&gt;For example, a performance evaluation system that rewards only the achievement of individual goals may end up encouraging behaviors that favor one department's results while making collaboration with other teams more difficult. In this context, metrics can become a way to demonstrate performance rather than helping us understand whether we are creating real value, bringing us back to the risk of vanity metrics.&lt;/p&gt;

&lt;p&gt;That is why &lt;strong&gt;aligning metrics also means understanding the incentives and dynamics of the people who work with them.&lt;/strong&gt; We can define a shared North Star, but if evaluation systems, priorities, or working conditions push teams in different directions, it will be difficult for that common objective to translate into consistent decisions and actions.&lt;/p&gt;

&lt;h2&gt;
  
  
  8.3 AI Can Help Us Think, but Not Decide for Us
&lt;/h2&gt;

&lt;p&gt;This organizational complexity also brings a new opportunity: artificial intelligence, which can help us organize information, identify patterns, test hypotheses, and make data more accessible. However, its usefulness is not limited to analyzing metrics. It can also extend to the way we make decisions.&lt;/p&gt;

&lt;p&gt;During the ideation stages, for example, generative AI can help us review participants' proposals, identify potential contradictions, or highlight perspectives that were not considered. This can be particularly useful when hierarchical differences, individual interests, or shared assumptions influence the conversation, as it allows us to introduce new questions and challenge some of the conclusions we reach.&lt;/p&gt;

&lt;p&gt;Nevertheless, we must remember that AI can also reproduce biases present in the information it receives and that its interpretations are not necessarily correct. That is why &lt;strong&gt;its role should be to expand our capacity for analysis and reflection without replacing product knowledge, data quality, or human judgment.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Similarly, if each department uses different definitions for the same metric, introducing AI will not automatically resolve that lack of agreement and could even amplify inconsistencies. And if we focus solely on optimizing indicators without understanding what they represent, we may end up improving dashboard results without actually improving the experience of our users.&lt;/p&gt;

&lt;h1&gt;
  
  
  A Final Reflection
&lt;/h1&gt;

&lt;p&gt;After exploring these concepts, I believe the greatest challenge is not necessarily finding the perfect metric, but building an organization capable of agreeing on what success means, identifying the factors that contribute to achieving it, and reviewing its decisions as the product, people, and their context evolve.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;The North Star Framework&lt;/code&gt; can provide a structure to guide this process, and AI can help us analyze information and challenge our hypotheses, but neither of these tools replaces the need to build agreements, establish trust, and understand how different responsibilities contribute to a common purpose.&lt;/p&gt;

&lt;p&gt;Because, ultimately, &lt;strong&gt;it is not just about aligning metrics, but about aligning people, decisions, and objectives around the value we want to create.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  9. References
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amplitude.&lt;/strong&gt; (s. f.). North Star Playbook: The guide to discovering your product’s North Star. &lt;a href="https://amplitude.com/books/north-star/" rel="noopener noreferrer"&gt;https://amplitude.com/books/north-star/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duolingo.&lt;/strong&gt; (2023). The Duolingo Growth Model. &lt;a href="https://blog.duolingo.com/growth-model-duolingo/" rel="noopener noreferrer"&gt;https://blog.duolingo.com/growth-model-duolingo/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Koithra, J.&lt;/strong&gt; (2025, March 6). Navigating product growth with the North Star Framework. Institute of Product Leadership. &lt;a href="https://www.productleadership.com/blog/navigating-product-growth-with-north-star-framework/" rel="noopener noreferrer"&gt;https://www.productleadership.com/blog/navigating-product-growth-with-north-star-framework/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product Hackers.&lt;/strong&gt; (s. f.). Hacking Growth con Sean Ellis [Episodio de pódcast]. &lt;a href="https://producthackers.com/es/podcast/hacking-growth-sean-ellis/" rel="noopener noreferrer"&gt;https://producthackers.com/es/podcast/hacking-growth-sean-ellis/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redacción Emprendedores.&lt;/strong&gt; (2021, 26 de mayo). «North Star»: la métrica definitiva para medir el crecimiento bajo la metodología «growth hacking». Emprendedores. &lt;a href="https://emprendedores.es/ayudas/empezartv-north-star-metrica-medir-crecimiento-growth-hacking/" rel="noopener noreferrer"&gt;https://emprendedores.es/ayudas/empezartv-north-star-metrica-medir-crecimiento-growth-hacking/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simborg, M.&lt;/strong&gt; (2018, December 10). What is a North Star metric? Mixpanel. &lt;a href="https://mixpanel.com/blog/north-star-metric/" rel="noopener noreferrer"&gt;https://mixpanel.com/blog/north-star-metric/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>product</category>
      <category>data</category>
      <category>management</category>
    </item>
    <item>
      <title>When Talent Meets AI: What Happens to Learning, Experience and Early Careers?</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Mon, 21 Sep 2026 16:04:39 +0000</pubDate>
      <link>https://dev.to/r_elena_mendez_escobar/when-talent-meets-ai-what-happens-to-learning-experience-and-early-careers-54jc</link>
      <guid>https://dev.to/r_elena_mendez_escobar/when-talent-meets-ai-what-happens-to-learning-experience-and-early-careers-54jc</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Working with AI has something particular about it: &lt;strong&gt;we not only have to keep learning, we also have to learn how to unlearn.&lt;/strong&gt; The speed at which technology is evolving means that accumulating knowledge is no longer enough. We also need the adaptability to question what we know, let go of ways of working that no longer make sense, and learn again.&lt;/p&gt;

&lt;p&gt;But there is one question I find increasingly difficult to ignore: &lt;strong&gt;Can we learn at the same pace as technology evolves?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsg93ch6tosvyc8pqp9yo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsg93ch6tosvyc8pqp9yo.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI needs good prompts that describe what we are trying to achieve, but it also requires something much harder to automate: knowing when to ask another question, what information is missing, which alternatives should be compared, and how to evaluate the result. This can make experienced professionals even more productive because their existing knowledge allows them to get more value from these tools.&lt;/p&gt;

&lt;p&gt;And this is where a paradox emerges: &lt;strong&gt;if we want experienced professionals tomorrow, someone has to hire and develop the juniors of today.&lt;/strong&gt; At the same time, we constantly talk about reskilling and upskilling as responses to the future of work, yet it is still not entirely clear who should be responsible for making that transition possible.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reskilling&lt;/strong&gt; means developing a new set of skills to move into a different role or career.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upskilling&lt;/strong&gt; means developing new capabilities within the work we already do.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, rather than trying to predict which jobs will disappear or which skills we will need tomorrow, I wanted to look at what is actually happening. Not the hype. Not the panic. The data.&lt;/p&gt;

&lt;p&gt;That leads me to three questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What do the data actually tell us about the jobs AI is creating, changing and displacing?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;If companies need new skills faster than ever, why might entry-level roles be particularly vulnerable?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Who should be responsible for preparing people for this transition: companies, governments, universities, or all of them?&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What kind of impact can AI have on a role?
&lt;/h2&gt;

&lt;p&gt;Before looking at what is happening to junior professionals, it is worth making one distinction: &lt;strong&gt;not every role exposed to AI will necessarily have the same future.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first dimension comes from the &lt;strong&gt;AI Occupational Exposure Index (AIOE) [4]&lt;/strong&gt;, which measures the relationship between AI capabilities and the skills required across different occupations. Researchers at the International Monetary Fund (IMF) later introduced a complementarity dimension, helping distinguish between occupations where AI is more likely to enhance human work and those where it has greater potential to substitute for a significant share of tasks. PwC later incorporated both dimensions into its Global AI Jobs Barometer 2025 to analyse the potential effects of AI across occupations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F44c1c66a13e449olz06c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F44c1c66a13e449olz06c.png" alt=" " width="800" height="501"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;source:Source: Author’s adaptation based on PwC, The Fearless Future: 2025 Global AI Jobs Barometer.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;PwC uses these two dimensions to distinguish between occupations with greater potential for &lt;strong&gt;augmentation&lt;/strong&gt; and those with greater potential for &lt;strong&gt;automation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In PwC’s analysis, an occupation is considered to have &lt;strong&gt;high AI exposure&lt;/strong&gt; when its exposure index is above 0.5. From there, a complementarity score above 0.5 places the occupation in the augmented category, while a score below 0.5 places it in the automated category.&lt;/p&gt;

&lt;p&gt;However, this matrix should not be interpreted as a definitive prediction about the future of a profession. &lt;strong&gt;It is a starting point for understanding how AI may affect a role&lt;/strong&gt;, because technological exposure is not the only factor shaping what ultimately happens. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regulation may limit which tasks can be performed by AI.&lt;/li&gt;
&lt;li&gt;Professional accountability may require certain decisions to remain in human hands.&lt;/li&gt;
&lt;li&gt;Sector characteristics, professional norms and levels of autonomy can influence how AI is adopted.&lt;/li&gt;
&lt;li&gt;The way an organization structures its processes can also significantly change the outcome.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As a result, two roles with a similar level of AI exposure may evolve in very different ways.&lt;/p&gt;

&lt;p&gt;This is where the classification becomes particularly useful for thinking about talent. &lt;strong&gt;Instead of simply asking whether a role is “at risk” from AI, we can start asking which tasks are being automated, which are being augmented, and which increasingly depend on human knowledge, experience and judgement.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That distinction will be important for understanding what is happening to junior professionals.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. The challenge facing junior professionals
&lt;/h1&gt;

&lt;p&gt;If AI can significantly increase the productivity of an experienced professional, it is worth asking what happens to those who are still building that foundation. The technological transition is not affecting work evenly. Instead, it may be reshaping the threshold for entering the labour market.&lt;/p&gt;

&lt;p&gt;Several recent sources point in this direction. In the Anthropic Economic Index survey, &lt;code&gt;Cadences (June 2026)&lt;/code&gt;, more than one third of respondents estimated that a more junior colleague had a greater than 60% chance of losing their job. A separate Anthropic analysis published in March 2026 also identified an approximately 14% slowdown in hiring among workers aged 22 to 25 in AI-exposed occupations following the launch of ChatGPT, without an equivalent slowdown among more experienced workers.&lt;/p&gt;

&lt;p&gt;LinkedIn’s &lt;code&gt;AI Labor Market&lt;/code&gt; Update from August 2026 points to a similar pattern. Entry-level hiring in AI-augmented occupations declined by between 3 and 10 percentage points more than overall hiring within those same occupations.&lt;/p&gt;

&lt;p&gt;The contraction affected several areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🎨 Design and interface:&lt;/strong&gt; hiring for UX Designer and UI Designer roles fell by between 34% and 49% year over year in the United States and India.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔍 Analysis and management:&lt;/strong&gt; entry-level hiring for Data Analyst roles fell by 27% in the United Kingdom, while hiring for Project Manager roles declined by 39% in France and 29% in Germany.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🛠️ Software development:&lt;/strong&gt; entry-level Software Engineer roles fell by 32% in Germany, while Frontend Developer roles declined by 39% in India.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pattern is also visible at a more local level. In Barcelona, the Digital Talent Overview 2026 shows that between 2023 and 2025, job postings for junior profiles fell by 26.93%, while demand increased for mid-level (+21.68%) and senior (+15.04%) profiles.&lt;/p&gt;

&lt;p&gt;These figures do not prove that AI alone is responsible for the change, but they do suggest that &lt;strong&gt;entry-level workers are facing a different labour-market dynamic from more experienced professionals.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is also another perspective that hiring data alone cannot capture.&lt;/p&gt;

&lt;p&gt;From my experience working on software projects, I increasingly see the assumption that introducing AI automatically means accelerating implementation. And to some extent, that is true. We can generate code, build prototypes and automate certain tasks much faster.&lt;/p&gt;

&lt;p&gt;But building software still requires much more than writing code: understanding requirements, designing the architecture, working with data, developing, deploying, testing, monitoring and maintaining the solution. Once AI is introduced, new requirements also emerge around evaluation, telemetry and observability to make sure the system behaves as expected.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AI can accelerate the construction of a solution, but it does not remove the need for engineering.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This creates another tension. If projects become shorter and teams are expected to deliver faster, it may become harder to integrate junior professionals precisely because a larger share of the remaining work requires autonomy, decision-making and contextual understanding from the outset.&lt;/p&gt;

&lt;p&gt;At the same time, we are working with technologies that continue to evolve rapidly, meaning that everyone, including senior professionals, is still learning.&lt;/p&gt;




&lt;h1&gt;
  
  
  3. The experience paradox
&lt;/h1&gt;

&lt;p&gt;The evidence above suggests that entry-level professionals may be facing increasing pressure. But the question does not end with hiring. &lt;strong&gt;If organisations increasingly value experience, autonomy and judgement, how are people supposed to develop those capabilities in the first place?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3.1. Does AI make us more productive, or does it change what productivity means?
&lt;/h2&gt;

&lt;p&gt;The same sources discussed earlier also reveal another side of the story: &lt;strong&gt;AI is not only affecting who gets hired, but also how work is performed once someone is in the role.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Digital Talent Overview 2026&lt;/code&gt; helps illustrate this shift in the context of software development, where AI is already being used across several everyday tasks. Among the 372 software development and digital professionals surveyed in the Barcelona metropolitan area, 74.20% considered AI effective for generating documentation and 74.19% for explaining or understanding existing code.&lt;/p&gt;

&lt;p&gt;Yet faster execution does not mean that the output can simply be accepted as it is. 87.80% of respondents said they always or almost always review AI-generated code before accepting or integrating it. In addition, 68.92% reported that these tools can produce code that appears correct at first glance but is not reliable, while 63.25% said that achieving high-quality results still requires substantial effort in prompting, correction and refinement.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;These findings suggest that productivity gains do not eliminate the need for human judgement: AI can make certain tasks faster, but the output still needs to be understood, reviewed and validated.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;strong&gt;Anthropic Economic Index&lt;/strong&gt; adds a broader perspective. Beyond the concerns about early-career employment discussed in the previous section, the Cadences survey also explored how active Claude users perceived AI to be changing their own work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl7k6sxongja8ja75wonq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl7k6sxongja8ja75wonq.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This reveals an important tension: &lt;strong&gt;AI can accelerate certain parts of the work, but that speed does not remove the need to understand, review and validate what it produces.&lt;/strong&gt; In software development, generating code or documentation may take less time, but deciding whether a solution is correct, secure, maintainable and appropriate for a specific context still requires knowledge and judgement.&lt;/p&gt;

&lt;p&gt;That ability to evaluate an output, identify potential issues, compare alternatives and understand their implications is precisely one of the capabilities that professional experience helps us develop.&lt;/p&gt;




&lt;h2&gt;
  
  
  3.2. What happens when the work that used to teach us starts to disappear?
&lt;/h2&gt;

&lt;p&gt;For years, many professional careers followed a fairly natural progression. Junior professionals often started with relatively simple tasks such as implementing features, fixing bugs, writing documentation or working on well-defined problems. Over time, those tasks helped them understand systems, recognize patterns, learn why certain decisions had been made and gradually develop judgement.&lt;/p&gt;

&lt;p&gt;AI is beginning to intervene precisely in some of those early layers of work. If a tool can generate code, explain a function, create documentation or solve a task that was previously assigned to a junior professional, we gain speed. But we also change one of the traditional ways in which that professional used to learn.&lt;/p&gt;

&lt;p&gt;This connects with another pattern in the sources analysed: AI tends to absorb tasks based on knowledge that can be codified more easily, while capabilities such as judgement, negotiation, contextual understanding and evaluating alternatives depend much more heavily on experience.&lt;/p&gt;

&lt;p&gt;The hiring patterns discussed earlier add another dimension to this challenge. If organisations increasingly seek professionals who can contribute greater autonomy and experience from the outset, they may also need to think more deliberately about how early-career professionals are given opportunities to develop those capabilities.&lt;/p&gt;

&lt;p&gt;That does not mean every junior task will disappear, nor that the only way to become senior is to follow exactly the same career path as before. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;But it does raise an important question: if some of the tasks we used to learn through are disappearing or changing, how do we build that experience now?&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  4. If work is changing, we also need to rethink how we learn
&lt;/h1&gt;

&lt;p&gt;Today, terms such as reskilling and upskilling are often used almost automatically whenever we talk about the impact of AI on employment. But &lt;strong&gt;what they really mean, when they apply and how they should be implemented&lt;/strong&gt; are questions that come up frequently in conversations with colleagues and teams.&lt;/p&gt;

&lt;p&gt;We have courses, training programmes, mentoring and many other ways of learning. The challenge is not simply having access to them, but &lt;strong&gt;knowing how to combine and structure them,&lt;/strong&gt; because people do not all start from the same place or learn in the same way. The key is to understand what each person needs to learn, what knowledge they already have, and how they can build new capabilities while the nature of work itself is changing.&lt;/p&gt;

&lt;p&gt;Before thinking about specific techniques, it is useful to distinguish the type of development we are trying to achieve:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;🌱 Upskilling&lt;/strong&gt;. Developing new capabilities to improve or expand what we already do. For example, a lawyer using AI to analyse documents or prepare an initial contract review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔄 Reskilling&lt;/strong&gt;. Developing the capabilities needed to move into a different role. For example, someone working in operations preparing to transition into a role related to data analysis or automation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Cross-skilling&lt;/strong&gt;. Building knowledge in an adjacent area that complements an existing profile. For example, a marketing professional learning the fundamentals of data analysis to better interpret campaigns and collaborate with technical teams.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚠️ Deskilling&lt;/strong&gt;. The movement can also happen in the opposite direction. If technology systematically takes over certain tasks, some capabilities may be practised less often and gradually weaken. For example, if we consistently leave the initial assessment of a problem to AI, we may lose some of the practice that previously helped us develop judgement.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The following image is not intended to be a closed academic taxonomy. It brings together professional development concepts, learning mechanisms, methodologies and practices that can be used to design different learning journeys. They do not all belong to the same category, nor do they need to be used independently. Many of them complement each other and can form part of the same learning process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1hgohqyq06ybpql0zdfd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1hgohqyq06ybpql0zdfd.png" alt=" " width="800" height="974"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One simple way to read the image is to think about &lt;strong&gt;which aspect of learning each block addresses:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Alongside expertise [Who do you learn from?]:&lt;/strong&gt; Learning alongside more experienced people through mentoring, coaching, shadowing or pair working.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progressive challenge [How do you stretch?]:&lt;/strong&gt; Gradually increasing difficulty, autonomy or responsibility through stretch assignments, scaffolding or deliberate practice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning by doing [How do you build skill?]:&lt;/strong&gt; Developing capabilities through projects, simulations and real-world situations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feedback &amp;amp; reflection [How do you improve?]:&lt;/strong&gt; Using feedback and reflection to understand what works and what needs to change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning in the flow of work [When does knowledge arrive?]:&lt;/strong&gt; Accessing knowledge at the moment it is needed through microlearning, support resources or self-directed learning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Social learning [Who helps learning spread?]:&lt;/strong&gt; Sharing experiences and solutions through peer learning, communities of practice or interest groups.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The important point is that &lt;strong&gt;we do not need to choose just one of these approaches.&lt;/strong&gt; Different learning mechanisms can be combined depending on the person, the knowledge they already have and the capabilities they need to develop.&lt;/p&gt;

&lt;p&gt;In this context, deskilling introduces another dimension. Some tasks may be practised less often because they become partially or fully automated. That is not necessarily negative. It can free up time and reduce repetitive work. But it does change &lt;strong&gt;which capabilities we continue to exercise and which ones stop being part of everyday learning.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And this opens up a broader question: &lt;strong&gt;if people start from different experiences, knowledge and ways of learning, should we begin to think about more personalised learning pathways?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI itself could play a dual role here: not only transforming the skills we need, but also helping us &lt;strong&gt;adapt content, pace, practice and support to each person.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Could AI also help us personalise the way we learn and develop new capabilities?&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  5. Redesigning early-career pathways in the age of AI
&lt;/h1&gt;

&lt;p&gt;So far, we have looked at training, upskilling and the different ways people can learn within the flow of work. But there is a more structural question: &lt;strong&gt;what happens if the pathway through which someone enters a role, learns and builds experience is also changing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The report Artificial Intelligence and the Future of Entry-Level Work, published by the World Economic Forum in collaboration with PwC in 2026, addresses precisely this challenge. Its starting point is that the impact of AI on entry-level roles will not depend only on what the technology can do, but also &lt;strong&gt;on the decisions we make about hiring, job design, talent development and education.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The report proposes four interconnected dimensions for thinking about those decisions: &lt;code&gt;Job Access&lt;/code&gt;, &lt;code&gt;Job Design&lt;/code&gt;, &lt;code&gt;Talent Pipelines&lt;/code&gt; and &lt;code&gt;Education System Alignment&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What I find particularly interesting about this framework is that it shifts the conversation from “which skills should we teach?” to a broader question: &lt;strong&gt;how do we build pathways that allow people to enter the workforce, learn, gain experience and progress professionally in an environment where AI can also perform part of the work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fweqq0g95z7utlfvkncqh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fweqq0g95z7utlfvkncqh.png" alt=" " width="800" height="785"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;n the image, I have summarised some of the concepts I consider most relevant within each dimension. They do not represent every recommendation in the report, but rather a selection of mechanisms that help illustrate how these pathways could evolve. [5] &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5.1. Job Access: keeping the entry doors open
&lt;/h2&gt;

&lt;p&gt;The challenge begins even before learning takes place: &lt;strong&gt;to build experience, people first need the opportunity to gain it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keeping entry points into the labour market open means deliberately considering how people access their first opportunities while AI changes entry-level roles and tasks. Some of the practices that can support this include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🚪 Entry-level hiring.&lt;/strong&gt; Embedding early-career hiring into workforce and talent planning, rather than allowing it to disappear as an unintended consequence of automation decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;⚙️ Work experience.&lt;/strong&gt; Creating opportunities for people to gain practical experience and demonstrate their capabilities, particularly when “previous experience” itself becomes a barrier to entry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🚧 Alternative pathways.&lt;/strong&gt; Complementing traditional routes with internships, apprenticeships, placements and other mechanisms that provide different ways into the workforce.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎓Access to AI tools.&lt;/strong&gt; Providing access to AI tools and training so that the ability to experiment and develop these capabilities does not depend entirely on an individual’s personal resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Dropbox provides an interesting example of this approach.&lt;/strong&gt; The company expanded its internship and new-graduate programmes by 25% and chose to reinvest part of the productivity gains associated with AI into higher-value work, while continuing to preserve entry routes for early-career talent.&lt;/p&gt;




&lt;h2&gt;
  
  
  5.2. Job Design: redesigning work so people can keep learning
&lt;/h2&gt;

&lt;p&gt;Once someone gains their first opportunity, a second question emerges: what kind of work allows them to continue developing capabilities while AI takes on part of the workload?&lt;/p&gt;

&lt;p&gt;Redesigning entry-level roles means deciding how work should be distributed between people and technology, and which experiences should be intentionally preserved because they remain important for developing judgement, autonomy and contextual understanding. Some of the practices that can support this include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Human–AI collaboration&lt;/strong&gt;. Designing tasks and workflows around what people contribute, what AI can take on and how both can work together effectively.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate vs retain&lt;/strong&gt;. Deliberately deciding which tasks to automate and which to preserve because they remain important for developing professional judgement, domain knowledge or the ability to detect errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Judgement &amp;amp; decision-making&lt;/strong&gt;. Shifting part of the work away from mechanical execution and towards interpreting results, evaluating alternatives and making decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning by doing&lt;/strong&gt;. Preserving opportunities to practise in real situations, particularly when AI begins to take over some of the tasks that traditionally helped people learn.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hitachi provides a clear example of this approach.&lt;/strong&gt; The company automates repetitive and transactional work, while intentionally preserving experiences that help build judgement, critical thinking and business understanding. In engineering, for example, early-career professionals continue to develop programming fundamentals before relying heavily on AI-generated code, so that they can validate and challenge what the technology produces.&lt;/p&gt;

&lt;h1&gt;
  
  
  5.3. Talent Pipelines: building new forms of progression
&lt;/h1&gt;

&lt;p&gt;If entry-level roles are changing, and the tasks within them are changing as well, another challenge emerges: &lt;strong&gt;how do we build the experience people need to continue progressing professionally?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rethinking talent pipelines means moving away from the assumption that development happens only through a traditional hierarchical sequence and considering more flexible pathways based on capabilities, exposure and mobility. Some of the practices that can support this include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Capability-based progression.&lt;/strong&gt; Making progression depend more on demonstrated capabilities and impact, rather than only on tenure or job title.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-linear movement.&lt;/strong&gt; Allowing development to happen through movement across projects, functions or domains, rather than only by climbing a vertical career ladder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-functional exposure.&lt;/strong&gt; Exposing people to different teams, problems and contexts to broaden their understanding of the business and develop complementary capabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mentoring &amp;amp; mobility.&lt;/strong&gt; Combining support from more experienced professionals with internal mobility opportunities that allow people to build knowledge across different contexts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Dentsu Japan shows one way of making this type of progression visible.&lt;/strong&gt; The organisation created four internal levels of AI capability development, AI Basic, AI Facilitator, AI Master and Chief AI Master, to recognise progression beyond job title alone.&lt;/p&gt;

&lt;p&gt;The report also highlights &lt;strong&gt;Allianz&lt;/strong&gt;, which uses intergenerational mentoring tandems to combine the digital fluency of younger professionals with the experience, business context and professional judgement of more senior colleagues.&lt;/p&gt;




&lt;h2&gt;
  
  
  5.4. Education Alignment: bringing education closer to real work
&lt;/h2&gt;

&lt;p&gt;The final dimension extends the challenge beyond organisations. If the capabilities required by the labour market are changing faster, &lt;strong&gt;education and training also need to remain connected to the evolving nature of work.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Aligning education with the labour market means creating more continuous mechanisms of collaboration between education providers, employers and other actors in the ecosystem to reduce the distance between what people learn and what they eventually need to apply. Some of the practices that can support this include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Work-integrated learning.&lt;/strong&gt; Embedding projects, practical experience and real-world problems into education so that learning is not separated from application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Employer partnerships.&lt;/strong&gt; Building more continuous relationships between employers and education providers to share how roles, technologies and capability requirements are evolving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Co-designed curricula.&lt;/strong&gt; Designing parts of educational programmes with input from employers and industry specialists to reduce the gap between education and work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skills frameworks.&lt;/strong&gt; Using shared frameworks to describe required capabilities and provide employers, educators and individuals with a common language.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Singapore provides a particularly interesting example of this approach.&lt;/strong&gt; Its ecosystem combines labour-market data, National Skills Frameworks and skills-based job matching tools to connect employers, education providers and individuals.&lt;/p&gt;

&lt;p&gt;The report also highlights examples such as &lt;strong&gt;Merck&lt;/strong&gt;, which works with universities to define required capabilities and connect educational programmes with hiring opportunities, and &lt;strong&gt;Guanghua School of Management&lt;/strong&gt;, which has incorporated AI, applied projects, internships and employer collaboration into its educational model.&lt;/p&gt;




&lt;h1&gt;
  
  
  6. Conclusions: if work is changing, the way we build experience needs to change too
&lt;/h1&gt;

&lt;p&gt;After looking at how AI is affecting roles, entry-level positions and traditional ways of learning in different ways, one idea runs through the entire article: &lt;strong&gt;the transformation is not happening only in the tasks we perform, but also in the way we build the experience needed to perform them well.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 Are we changing what it means to be junior or senior?
&lt;/h2&gt;

&lt;p&gt;For a long time, many career paths followed a relatively predictable logic. Junior professionals started with more limited and repetitive tasks that allowed them to practise, make mistakes and gradually understand a system, while more experienced professionals took on decision-making, coordination and supervision.&lt;/p&gt;

&lt;p&gt;AI is beginning to change that distribution. Some of the coding, documentation, initial analysis and information gathering that used to form part of the learning ground can now be completed much faster. At the same time, approaches such as vibe coding make it possible to build solutions at a speed that would have been difficult to imagine only a few years ago. Yet they still require us to understand what we are trying to build, provide the right context, review the output and recognise when something that looks correct actually is not.&lt;/p&gt;

&lt;p&gt;This creates an interesting paradox: &lt;strong&gt;experienced professionals may begin performing tasks directly again that they previously delegated, while people at the beginning of their careers may encounter supervision and validation tasks earlier&lt;/strong&gt;, even though they are still developing the judgement required to perform them well.&lt;/p&gt;

&lt;p&gt;The traditional boundaries between what we consider a junior role and a senior role therefore begin to look less clear. &lt;strong&gt;If we automate part of the work through which experience was traditionally acquired, we will need to find new ways to build that experience.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Does learning also mean unlearning?
&lt;/h2&gt;

&lt;p&gt;Years ago, a manager I worked with used to say that one of the biggest challenges technology creates for experienced professionals is learning how to unlearn. Over time, that idea has become increasingly relevant to me.&lt;/p&gt;

&lt;p&gt;Experience remains valuable, but not because it allows us to repeat indefinitely what we already know how to do. Its value also lies in recognising &lt;strong&gt;which knowledge remains useful, which practices need to change and when a way of working needs to be reconsidered.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;People at the beginning of their careers face a different situation. They are often building their foundational knowledge at the same time as these new tools become part of the normal way of working. That does not mean one group is better prepared than the other. &lt;strong&gt;Their starting points and learning needs are different.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this context, deskilling also becomes increasingly relevant. Automating a task can free up time, reduce repetitive work and allow people to focus on higher-value problems. At the same time, however, it can mean that certain capabilities are practised less often. The question should not necessarily be how to avoid that process altogether, but rather &lt;strong&gt;which capabilities we can afford to practise less and which ones we need to preserve&lt;/strong&gt; because they will remain essential for supervision, questioning and decision-making.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Will we all continue learning in the same way?
&lt;/h2&gt;

&lt;p&gt;These different starting points also challenge a fairly common practice: &lt;strong&gt;designing large-scale training programmes that are essentially the same for everyone.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From my experience as both a professional and an educator, it is becoming increasingly clear that different groups have different needs, even when they work within the same organisation. Their prior knowledge differs, their experience differs, the problems they solve differ, and so does the way they develop new capabilities.&lt;/p&gt;

&lt;p&gt;AI could play a particularly interesting role here. The same technology that is accelerating the need to learn can also help us &lt;strong&gt;personalise content, exercises, pace, feedback and support&lt;/strong&gt; according to what each person already knows and what they still need to develop.&lt;/p&gt;

&lt;p&gt;Bill Gates has highlighted this potential when discussing systems capable of understanding a person’s interests and learning style, measuring their comprehension, and adapting content and feedback accordingly. The opportunity is not simply to digitise the training we already have, but to begin thinking about &lt;strong&gt;much more personalised learning pathways.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🌍 What if AI could also expand opportunity?
&lt;/h2&gt;

&lt;p&gt;After discussing automation, junior roles, deskilling and changing career pathways, it would be easy to end this analysis by focusing only on the risks. Yet the same technology creating these tensions can also expand what is possible.&lt;/p&gt;

&lt;p&gt;Yann LeCun captured this perspective in a simple phrase: &lt;strong&gt;“AI will amplify human intelligence.”&lt;/strong&gt; The idea matters because it shifts the conversation away from replacement and towards the expansion of human capabilities.&lt;/p&gt;

&lt;p&gt;That potential may be especially significant in areas where resources remain scarce. Education and healthcare are two clear examples. Bill Gates has argued that AI can play an important role in sectors where there is a major shortage of professionals, helping expand access to support, knowledge and learning opportunities that are not currently available equally to everyone.&lt;/p&gt;

&lt;p&gt;This does not remove the challenges explored throughout the article, but it allows us to close the discussion from a different perspective. We have seen that not every job will be affected in the same way, that junior positions are facing particular pressures, that experience remains important for providing context and judgement, and that some of the tasks traditionally used to build that experience are changing.&lt;/p&gt;

&lt;p&gt;That is why &lt;strong&gt;responding with more courses, upskilling or reskilling may not be enough.&lt;/strong&gt; We may also need to rethink how people learn through work, how roles are designed, how career pathways are built and how education and the labour market remain connected.&lt;/p&gt;

&lt;p&gt;AI can transform roles, accelerate work and expand our ability to learn. &lt;strong&gt;It can also force us to question structures that we have taken for granted for decades.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Technology can expand our possibilities... The question is how we choose to use them.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;[1] &lt;strong&gt;Digital Applied Team.&lt;/strong&gt; (2026, July 1). AI won’t take your job, but it will reshape it. Digital Applied. &lt;a href="https://www.digitalapplied.com/blog/anthropic-economic-index-jobs-change-not-vanish-2026" rel="noopener noreferrer"&gt;https://www.digitalapplied.com/blog/anthropic-economic-index-jobs-change-not-vanish-2026&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[2] &lt;strong&gt;World Economic Forum.&lt;/strong&gt; (2025, January 7). Future of Jobs Report 2025: 78 million new job opportunities by 2030 but urgent upskilling needed to prepare workforces. &lt;a href="https://www.weforum.org/press/2025/01/future-of-jobs-report-2025-78-million-new-job-opportunities-by-2030-but-urgent-upskilling-needed-to-prepare-workforces/" rel="noopener noreferrer"&gt;https://www.weforum.org/press/2025/01/future-of-jobs-report-2025-78-million-new-job-opportunities-by-2030-but-urgent-upskilling-needed-to-prepare-workforces/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[3] &lt;strong&gt;LinkedIn Economic Graph.&lt;/strong&gt; (2026, August). AI Labor Market Update: August 2026. LinkedIn. &lt;a href="https://economicgraph.linkedin.com/workforce-data/publications" rel="noopener noreferrer"&gt;https://economicgraph.linkedin.com/workforce-data/publications&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[4] &lt;strong&gt;PwC.&lt;/strong&gt; (2025). The fearless future: Global AI Jobs Barometer 2025: Methodology appendix. &lt;a href="https://www.pwc.com/gx/en/issues/artificial-intelligence/job-barometer/2025/methodology-report.pdf" rel="noopener noreferrer"&gt;https://www.pwc.com/gx/en/issues/artificial-intelligence/job-barometer/2025/methodology-report.pdf&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[5] &lt;strong&gt;World Economic Forum.&lt;/strong&gt; (2026, June 22). Artificial intelligence and the future of entry-level work: A framework for safeguarding and reinventing early career pathways. In collaboration with PwC. &lt;a href="https://www.weforum.org/publications/artificial-intelligence-and-the-future-of-entry-level-work-a-framework-for-safeguarding-and-reinventing-early-career-pathways/" rel="noopener noreferrer"&gt;https://www.weforum.org/publications/artificial-intelligence-and-the-future-of-entry-level-work-a-framework-for-safeguarding-and-reinventing-early-career-pathways/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[6] &lt;strong&gt;United Nations Security Council.&lt;/strong&gt; (2024, December 19). Security Council, seventy-ninth year: 9821st meeting, Thursday, 19 December 2024, New York (S/PV.9821). United Nations. &lt;a href="https://digitallibrary.un.org/record/4070651" rel="noopener noreferrer"&gt;https://digitallibrary.un.org/record/4070651&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[7] &lt;strong&gt;Gates, B.&lt;/strong&gt; (2023, March 21). The age of AI has begun. Gates Notes. &lt;a href="https://www.gatesnotes.com/the-age-of-ai-has-begun" rel="noopener noreferrer"&gt;https://www.gatesnotes.com/the-age-of-ai-has-begun&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;[8] &lt;strong&gt;Mobile World Capital Barcelona.&lt;/strong&gt; (2026, May 27). Digital Talent Overview 2026. &lt;a href="https://mobileworldcapital.com/en/trends/digital-talent-overview-2026/" rel="noopener noreferrer"&gt;https://mobileworldcapital.com/en/trends/digital-talent-overview-2026/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>career</category>
      <category>learning</category>
      <category>mentorship</category>
    </item>
    <item>
      <title>When Fashion Meets AI: What Happens to Creativity, Business and Authenticity?</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Mon, 31 Aug 2026 10:50:10 +0000</pubDate>
      <link>https://dev.to/r_elena_mendez_escobar/when-fashion-meets-ai-what-happens-to-creativity-business-and-authenticity-2b3h</link>
      <guid>https://dev.to/r_elena_mendez_escobar/when-fashion-meets-ai-what-happens-to-creativity-business-and-authenticity-2b3h</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Some time ago, I completed the &lt;a href="https://www.insidelvmh.com/certificate" rel="noopener noreferrer"&gt;INSIDE LVMH certification&lt;/a&gt;, &lt;strong&gt;a program focused on the luxury industry that gave me the opportunity to learn how some of the group’s leading brands, such as Louis Vuitton, Dior and Fendi, operate&lt;/strong&gt;. It was my first deep dive into everything that happens behind a brand: creativity, technology, production, supply chain, marketing and customer experience.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fln92ch4ewwzd0bvahxp1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fln92ch4ewwzd0bvahxp1.png" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;em&gt;AI-generated illustration created with Google Gemini&lt;/em&gt;&lt;/center&gt;




&lt;p&gt;Since then, I’ve become especially interested in how the fashion industry is integrating AI into these processes and what impact it could have on an industry where creativity, technology and business are so closely interconnected.&lt;/p&gt;

&lt;p&gt;Some of the questions that inspired me were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What happens when an industry built around creativity, people and trends starts using AI?&lt;/li&gt;
&lt;li&gt;Is AI simply a tool to accelerate production processes, or will it also change what we value about fashion?&lt;/li&gt;
&lt;li&gt;If fashion has already been questioned for decades over the beauty standards portrayed in its campaigns, what happens when those models can be entirely created or modified using AI?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. AI is changing the fashion business
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The impact of AI on fashion goes far beyond virtual runways, image generation or automated advertising campaigns. Its real impact begins much earlier, transforming the supply chain and even the way products themselves are conceived.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Today, the most agile brands use data analytics, machine learning and AI to &lt;strong&gt;capture trends in real time, anticipate consumer demand, optimize inventory and accelerate the creation of visual content.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This phenomenon reaches its clearest expression in the ultra-fast fashion model. An analysis by researchers from Stanford Graduate School of Business [1] shows that &lt;strong&gt;the real advantage of giants such as Shein and Temu does not lie in producing or shipping garments faster than traditional brands such as Zara. Instead, their advantage comes from designing at an exceptionally fast pace.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Their competitive edge lies in &lt;strong&gt;design speed&lt;/strong&gt;. These companies use data analytics and machine learning models to track trends across the internet and social media, and then use AI to rapidly generate thousands of designs ready to be tested in the market.&lt;/p&gt;

&lt;p&gt;This efficiency enables them to adopt a &lt;strong&gt;volume-based strategy&lt;/strong&gt;: rather than betting on a small number of carefully selected collections, they launch a massive range of options and let the market itself determine what works.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. From the design to the campaign: AI becomes the fashion studio
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;So far, we have seen how artificial intelligence can help brands detect trends, anticipate demand and accelerate the design of new products, but its impact does not end there.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI is also beginning to change &lt;strong&gt;how those products are presented, communicated and brought to consumers.&lt;/strong&gt; In other words, the transformation is not limited to the supply chain or the design process: &lt;strong&gt;AI is also entering the creative studio.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One interesting example is &lt;strong&gt;Zalando&lt;/strong&gt;, which is using generative AI to transform its content production process through digital twins. According to the company, the time required to produce certain images has fallen &lt;strong&gt;from 6–8 weeks to just 3–4 days&lt;/strong&gt;, while production costs for those images have been reduced by approximately &lt;strong&gt;90%.&lt;/strong&gt; [2]&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2bfm2ohfqida80d3i6vr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2bfm2ohfqida80d3i6vr.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;em&gt;AI-generated illustration created with Google Gemini&lt;/em&gt;&lt;/center&gt;




&lt;p&gt;In this case, Zalando uses the term &lt;strong&gt;digital twins&lt;/strong&gt; to refer to virtual representations of real models that make it possible to create new scenarios, compositions and images without having to physically repeat each production.&lt;/p&gt;

&lt;p&gt;As someone who works in technology, there is something about this transformation that feels especially familiar to me. In software projects, we constantly think about three variables: &lt;strong&gt;scope, time and cost.&lt;/strong&gt; When a technology significantly changes one of them, it usually ends up changing the way we design and execute the entire project as well.&lt;/p&gt;

&lt;p&gt;If producing a campaign no longer takes weeks but only a few days, a brand can do more than simply reduce costs. It can &lt;strong&gt;experiment with more ideas, test different versions, adapt the same campaign to different markets and react much faster to a trend.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI, therefore, does not just reduce costs: &lt;strong&gt;it changes the speed at which a brand can create and make creative decisions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A traditional fashion production brings together many different professionals: photographers, producers, makeup artists, hairstylists, stylists, models and other creative roles. If part of that process can be generated, adapted or repeated digitally, &lt;strong&gt;some tasks may be reduced, others transformed, and new roles are likely to emerge.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The question, then, is no longer simply how much a brand can save by using AI.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If AI reduces the time and cost of producing fashion content, what will change first: the way brands create, the way professionals work, or the way we consume?&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. When the image looks real, what are we actually seeing?
&lt;/h2&gt;

&lt;p&gt;We have already seen how AI can accelerate design and content production. But there is another, less visible consequence: &lt;strong&gt;it is becoming increasingly difficult to tell how much of a fashion image comes from a real production and how much has been created or modified digitally.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A campaign may start with a real model and use a &lt;strong&gt;digital twin&lt;/strong&gt;, combine real photographs with AI-generated elements or, in some cases, feature &lt;strong&gt;a completely artificial person.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0beczc5hxm6kmzrtcfok.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0beczc5hxm6kmzrtcfok.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;em&gt;AI-generated illustration created with Google Gemini&lt;/em&gt;&lt;/center&gt;




&lt;p&gt;This does not necessarily mean that the campaign is misleading. For a brand, it may simply be a new creative tool that makes it possible to produce content faster, test different ideas or adapt a campaign to different markets.&lt;/p&gt;

&lt;p&gt;But it raises a new question for those of us looking at these images:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do we need to know when a fashion image has been created or modified using AI?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This question has already reached the regulatory sphere with the EU AI Act, which establishes transparency obligations for certain types of AI-generated or manipulated content, including content that may be considered deepfakes. Since August 2, 2026, these obligations have started to apply, introducing new rules on how users should be informed when they interact with certain AI-generated or manipulated content. [4]&lt;/p&gt;

&lt;p&gt;The debate also extends to the industry itself. &lt;strong&gt;EuroCommerce&lt;/strong&gt;, which represents major retail companies including H&amp;amp;M, Inditex and Zalando, has argued that certain AI-generated advertising images should not automatically be treated as deepfakes when they are used to showcase products and are not intended to mislead consumers. [4]&lt;/p&gt;

&lt;p&gt;I find this discussion particularly interesting because &lt;strong&gt;neither side of the debate has to be seen as simply black or white.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For consumers, knowing when an image has been generated or modified using AI can provide greater transparency and allow them to decide what kind of content they want to engage with.&lt;/p&gt;

&lt;p&gt;For companies, indiscriminately labelling any AI-generated content as a deepfake may not accurately reflect the purpose of an advertising image and could create confusion between the authenticity of the product being promoted and the way that product has been visually represented.&lt;/p&gt;

&lt;p&gt;In fashion ecommerce, one of the most fundamental expectations is that &lt;strong&gt;what appears on screen should correspond to the product that eventually arrives at home.&lt;/strong&gt; Fashion photography has always relied on lighting, editing and retouching to construct a particular representation of a garment, but AI can take this much further, modifying not only the environment or the person, but also specific visual attributes of the product itself.&lt;/p&gt;

&lt;p&gt;This raises an increasingly relevant question: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To what extent does an AI-generated or AI-modified image remain a faithful representation of what we are actually buying?&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  4. Before AI, fashion was already editing images
&lt;/h2&gt;

&lt;p&gt;Long before generative AI entered the conversation, the fashion industry was already debating how some campaign images were digitally altered, raising questions around visual representation, authenticity and beauty standards that had existed for years.&lt;/p&gt;

&lt;p&gt;From advertisements considered &lt;strong&gt;inappropriate for portraying extremely thin models&lt;/strong&gt; to photographs in which the subjects themselves questioned how their appearance had been changed, &lt;strong&gt;these cases show that debates around visual representation, authenticity and beauty standards have been present in the industry for years.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some particularly relevant examples include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Gucci, 2016:&lt;/strong&gt; The Advertising Standards Authority (ASA) banned an image from Gucci’s Cruise 2016 campaign following a complaint. The regulator considered that the model appeared “unhealthily thin,” noting, among other things, that the pose elongated her torso and visually emphasized a very small waist. Gucci argued that the model had a slim, but not unhealthy, physique. The advertisement could not appear again in that form. [5]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dior, 2012:&lt;/strong&gt; The ASA banned a Dior advertisement featuring Natalie Portman for a mascara product because the digital retouching of her eyelashes could exaggerate the results the product was able to achieve. Dior acknowledged that the eyelashes had been digitally altered, while the ASA found that there was insufficient evidence to demonstrate that the effect shown was achievable with the product. [6]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zendaya, 2015:&lt;/strong&gt; Zendaya publicly criticized Modeliste Magazine for digitally altering her body, making her hips and legs appear slimmer. The magazine ultimately withdrew the issue and later published the unretouched photographs. [7]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lupita Nyong’o, 2017:&lt;/strong&gt; Lupita Nyong’o publicly criticized Grazia after the magazine altered her cover photograph by removing her natural hair. She explained that she wanted her appearance to reflect her identity and questioned the idea that her natural hair had to be changed to fit certain editorial standards. [8]&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These cases show that digital manipulation in fashion imagery did not begin with AI, and that questions around representation, expectations and authenticity were already part of the conversation. The difference is that generative tools significantly expand what can be altered or created. It is no longer only about modifying an existing image, but about generating the person, the setting or even the entire campaign from scratch.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Opening the AI Toolbox: From the Fashion Lifecycle to the Technologies Behind It
&lt;/h2&gt;

&lt;p&gt;We have already explored some of the most visible effects of artificial intelligence in fashion: brands reacting faster to trends, campaigns that can be produced in just a few days, digital models, and new questions around authenticity and representation.&lt;/p&gt;

&lt;p&gt;But behind all these examples, the same word keeps appearing: &lt;strong&gt;AI.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before looking further at its impact on the industry, it is worth opening that black box for a moment and understanding what technologies are involved, &lt;strong&gt;what they require as input, what they produce as output, and where they can create value within the fashion business.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 Mapping AI across the fashion lifecycle
&lt;/h3&gt;

&lt;p&gt;AI can be incorporated into almost every stage of a fashion product’s lifecycle, although &lt;strong&gt;not every technique is designed to solve the same type of problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following map provides a simplified view of some of the key points where &lt;strong&gt;different AI capabilities can create value across the fashion product lifecycle.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faqrw9ibsq9yllxrg4j1h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faqrw9ibsq9yllxrg4j1h.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In practice, this journey is not completely linear.&lt;/p&gt;

&lt;p&gt;Each stage generates data, images, designs, digital assets or information about consumer behavior that can later become an input for another part of the process.&lt;/p&gt;

&lt;p&gt;For example, a trend identified through market data can become a design concept. That concept can generate different visual proposals, evolve into a 3D asset, and eventually be used for prototyping, a campaign or ecommerce.&lt;/p&gt;

&lt;p&gt;Consumer interactions with those products generate new data that can then feed into the next cycle.&lt;/p&gt;

&lt;p&gt;For that reason, rather than thinking of AI as an isolated tool, it is more useful to look at &lt;strong&gt;how different capabilities can connect across the entire product lifecycle.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  5.2 From the lifecycle to the AI techniques
&lt;/h3&gt;

&lt;p&gt;Once we understand where AI can be applied, another question emerges:&lt;/p&gt;

&lt;p&gt;What techniques make these applications possible?&lt;br&gt;
There is no single technology behind “AI for fashion.” Depending on the objective, a solution may combine image generation and modification, computer vision, generative models, pose estimation, 3D reconstruction, simulation, data integration and other capabilities.&lt;/p&gt;

&lt;p&gt;The following map focuses specifically on some of the techniques related to visual content generation and transformation, fashion-specific applications, 3D representation, and Digital Twins.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr2d4oabq79tetzc1r8a6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr2d4oabq79tetzc1r8a6.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;This technical perspective can be connected to the previous lifecycle through five broad groups of capabilities. For each one, we can ask three questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚙️ Techniques:&lt;/strong&gt; what technologies or methods are used?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔄 Input → Output:&lt;/strong&gt; what information does the system need, and what result does it produce?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Industry application:&lt;/strong&gt; who could use it, at what stage of the lifecycle, and what problem can it help solve?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This distinction is important because the same technical capability can have very different applications depending on where it is incorporated within the process.&lt;/p&gt;


&lt;h3&gt;
  
  
  5.2.1 💭 Create Image: From ideas to visual concepts
&lt;/h3&gt;

&lt;p&gt;At the creative stage, &lt;strong&gt;image generation can transform an idea, a description or a visual reference into a visual concept&lt;/strong&gt; without requiring an immediate physical production.&lt;/p&gt;

&lt;p&gt;This can be especially valuable during the early stages of the creative process, when many possibilities still exist and different directions need to be explored before decisions are made.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚙️ Techniques:&lt;/strong&gt; text-to-image and diffusion-based generative models, combined with visual references or other conditioning mechanisms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔄 Input → Output:&lt;/strong&gt; text prompt and/or visual references → generated 2D image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Industry application:&lt;/strong&gt; designers, creative teams and marketing departments can use these capabilities during Concept, Design &amp;amp; Development, and Marketing &amp;amp; Content to explore moodboards, campaign compositions, scenarios, visual styles or early concepts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of its main values lies in the ability to &lt;strong&gt;explore and iterate through different alternatives quickly before investing time and resources in a full production.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is not necessarily about replacing the final production, but about &lt;strong&gt;expanding the range of possibilities a team can explore during the early stages of the process.&lt;/strong&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  5.2.2 ✨ Modify Image: Extending what already exists
&lt;/h3&gt;

&lt;p&gt;Much of a brand’s visual content already exists before AI comes into play. Product photography, campaigns, ecommerce images and other visual assets can be &lt;strong&gt;reused, adapted or transformed&lt;/strong&gt; for different products, markets, formats and channels.&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;image modification&lt;/strong&gt; techniques become especially relevant.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚙️ Techniques:&lt;/strong&gt; image-to-image, inpainting, outpainting, super-resolution and style transfer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔄 Input → Output:&lt;/strong&gt; existing image + instructions, masks or visual references → modified or extended image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Industry application:&lt;/strong&gt; photographers, creative teams, ecommerce and marketing teams can use these techniques mainly in Marketing &amp;amp; Content and Ecommerce &amp;amp; Sales to adapt existing photographs, modify specific elements, remove objects, extend compositions, change visual characteristics or prepare content for different formats and markets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main opportunity lies in &lt;strong&gt;reusing existing assets and generating multiple variations without repeating the entire production process.&lt;/strong&gt; This can reduce time and costs while also allowing the same production to be adapted to much more specific needs.&lt;/p&gt;


&lt;h3&gt;
  
  
  5.2.3. 👗 Fashion Applications: From digital content to consumer experiences
&lt;/h3&gt;

&lt;p&gt;In fashion, some solutions go &lt;strong&gt;beyond a single technique&lt;/strong&gt; and combine different AI and computer vision capabilities to address specific industry use cases.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚙️ Techniques:&lt;/strong&gt; Virtual try-on can combine image generation, garment warping, pose estimation and different conditioning mechanisms. Synthetic humans can use generative models and identity control techniques. Sketch-to-design and pattern generation can combine image generation with references and domain-specific constraints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔄 Input → Output:&lt;/strong&gt; person + garment → composed image; prompt/reference/pose → synthetic person; sketch → realistic design; text/reference → textile pattern.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Industry application:&lt;/strong&gt; designers, product teams, ecommerce teams and consumers can use these applications across different stages, especially in Design &amp;amp; Development, Marketing &amp;amp; Content, and Ecommerce &amp;amp; Sales.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Virtual try-on, for example, brings AI directly into the consumer experience: it allows users to visualize how a garment might look on a particular person before making a purchase. This can help improve the user experience and, depending on the implementation, reduce purchases that may later end in returns.&lt;/p&gt;

&lt;p&gt;In addition, these systems can generate new data on how consumers interact with products: which garments they try on, which ones they reject and which products they ultimately purchase. This opens the possibility of connecting the digital experience with new insights for other stages of the lifecycle.&lt;/p&gt;


&lt;h3&gt;
  
  
  5.2.4. 🧊 3D Generation: Moving from images to product representations
&lt;/h3&gt;

&lt;p&gt;3D generation introduces an important shift compared with the previous techniques: the output is no longer necessarily a 2D image, but a digital representation of the product that can be used from different perspectives and across different environments.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚙️ Techniques:&lt;/strong&gt; 3D asset generation, multi-view reconstruction and neural rendering techniques such as NeRFs or 3D Gaussian Splatting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔄 Input → Output:&lt;/strong&gt; text, images or multiple views of a product → 3D model or representation, geometry and/or textures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Industry application:&lt;/strong&gt; designers, product development teams, ecommerce, AR/VR teams and others working with digital representation can use these assets during Design &amp;amp; Development, Prototyping, Ecommerce &amp;amp; Sales, and other stages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The value of this type of representation lies in the fact that &lt;strong&gt;the same digital asset can be reused for different purposes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of creating a separate visual representation for each scenario, a 3D model can become a resource that supports different experiences and processes.&lt;/p&gt;

&lt;p&gt;This becomes especially interesting when we look at the full product lifecycle: &lt;strong&gt;an asset created at one stage can continue to provide value long after it was originally generated.&lt;/strong&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  5.2.5. 🔗 Digital Twin: Connecting the digital and physical product
&lt;/h3&gt;

&lt;p&gt;Digital Twin introduces a different level of complexity because &lt;strong&gt;we are no longer talking only about generating a visual representation, but about connecting that representation to a physical object, system or process and to the data it produces.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;⚙️ Techniques:&lt;/strong&gt; 3D representations, simulation, data integration and IoT, computer vision and AI can be combined depending on the use case.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔄 Input → Output:&lt;/strong&gt; physical product or process + digital representation + operational data → connected digital representation that can be used for monitoring, simulation, analysis or decision-making.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Industry application:&lt;/strong&gt; product development, production, supply chain and operations teams can use Digital Twins mainly in Prototyping, Production and other operational stages of the lifecycle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the context of fashion, a digital representation of a product can be used to prototype scenarios, visualize changes, simulate certain processes or connect information from the physical product with its digital representation.&lt;/p&gt;

&lt;p&gt;The distinction from 3D generation is important: &lt;strong&gt;3D generation can help create the digital representation, while a Digital Twin also incorporates a connection to the physical object or process and its data.&lt;/strong&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  5.3. From individual techniques to a connected system
&lt;/h3&gt;

&lt;p&gt;When we look at these capabilities together, &lt;strong&gt;AI stops looking like a collection of isolated tools and starts behaving like a technological layer that can connect different parts of the product lifecycle.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Outputs generated at one stage can become inputs for another, &lt;strong&gt;connecting design, prototyping, production, marketing, ecommerce and customer experience within the same ecosystem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This perspective also changes how we evaluate the value of each technique. The value lies not only in what a model can generate, but in &lt;strong&gt;how that output can be reused, connected to other systems and transformed into a new input within the product lifecycle.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And this is precisely where &lt;strong&gt;technology architecture becomes just as important as the generative capability itself.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  6. Not every fashion brand is embracing AI
&lt;/h2&gt;

&lt;p&gt;After exploring all these possibilities, it may seem that adopting AI is an inevitable evolution for any fashion brand. But not every company is following the same strategy. In some cases, &lt;strong&gt;even deciding where not to use AI can become part of a brand’s positioning, as seen with Aerie, the American Eagle brand.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In 2014, the company launched its &lt;strong&gt;100% Aerie Real&lt;/strong&gt; commitment, stopping the digital retouching of people and their bodies in its imagery. In 2025, it extended this commitment to artificial intelligence, stating that it would not use AI to generate bodies or digitally alter the people featured in its campaigns.&lt;/p&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fja3jen5r2u6vylsjkhmt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fja3jen5r2u6vylsjkhmt.png" alt=" " width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;em&gt;AI-generated illustration created with Google Gemini&lt;/em&gt;&lt;/center&gt;



&lt;p&gt;The decision, then, does not appear to be an isolated reaction to the arrival of AI, but rather a continuation of a brand strategy that has spent more than a decade linking its communication to &lt;strong&gt;real people and unretouched imagery.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The most interesting development came in March 2026, when Aerie turned this position into the creative concept for a new campaign featuring Pamela Anderson.&lt;/p&gt;

&lt;p&gt;The ad begins with Anderson giving instructions to an AI system to generate models. She keeps refining the result: asking for the models to look happier, more natural and less expressionless. Eventually, she asks them to &lt;strong&gt;“feel real.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At that point, the artificial scene disappears and we see a real Aerie studio, with Pamela Anderson and other people working on the campaign.&lt;/p&gt;

&lt;p&gt;Anderson’s final line captures the idea:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You can’t prompt this.”&lt;/p&gt;
&lt;/blockquote&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frdiaqmpsqsi716ic6adw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frdiaqmpsqsi716ic6adw.png" alt=" " width="730" height="1080"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;em&gt;Frame from Aerie’s 2026 campaign featuring Pamela Anderson. Source: Aerie.&lt;/em&gt;&lt;/center&gt;



&lt;p&gt;What is interesting is that the campaign does not necessarily take an anti-AI position. The decision is more closely related to the brand’s positioning and to what it wants to communicate to its consumers.&lt;/p&gt;

&lt;p&gt;If you want to watch the campaign: &lt;a href="https://www.youtube.com/watch?v=kg9JqAQlX6E" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=kg9JqAQlX6E&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/kg9JqAQlX6E" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Perhaps this is not so different from what has happened in other industries. When mass production makes something increasingly accessible and homogeneous, &lt;strong&gt;what is handcrafted or produced in a more traditional way can gain new value precisely because it is less scalable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As AI makes it possible to generate campaigns, models and scenarios faster and at a lower cost, &lt;strong&gt;productions involving real people and creative teams may become not only a form of differentiation, but also a way to connect with consumers who value authenticity and human experience.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This leaves us with a question: could working with real people and creative teams become a way not only to differentiate a brand, but also to build a stronger connection with consumers who value authenticity and human experience?&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Conclusion: So, what does AI really change in fashion?
&lt;/h2&gt;

&lt;p&gt;After looking at these different cases, we can identify some of the main changes AI can bring to the fashion business:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚡**Speed:v analyzing trends and large volumes of data to respond more quickly to market changes.&lt;/li&gt;
&lt;li&gt;💰 &lt;strong&gt;Cost:&lt;/strong&gt; reducing the time and resources needed to produce and adapt content, while also automating parts of these processes when appropriate and maintaining human validation where needed.&lt;/li&gt;
&lt;li&gt;📈 &lt;strong&gt;Scale:&lt;/strong&gt; creating and adapting content more easily across different products, markets and consumer segments.&lt;/li&gt;
&lt;li&gt;🎯 &lt;strong&gt;Personalization:&lt;/strong&gt; using data to deliver experiences, recommendations and content that are increasingly tailored to different audiences.&lt;/li&gt;
&lt;li&gt;🎨 &lt;strong&gt;Creative experimentation:&lt;/strong&gt; testing more ideas, variations and concepts without requiring a full production for every experiment.&lt;/li&gt;
&lt;li&gt;⚠️ &lt;strong&gt;New risks:&lt;/strong&gt; managing emerging challenges related to copyright, data provenance, authenticity, representation and transparency. The easier it becomes to generate content, the more important it is to understand what information is being used, where it comes from and how what ultimately reaches the consumer is represented.&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  🚧 AI can lower the barriers to fashion
&lt;/h4&gt;

&lt;p&gt;These possibilities may also change &lt;strong&gt;who has access to them.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For emerging designers and brands, reducing production costs and timelines can create new opportunities to experiment, build a visual identity and reach new markets &lt;strong&gt;without needing the resources of a large company from the outset.&lt;/strong&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  👤 AI can make personalization part of the brand experience
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Self-Congruity theory&lt;/strong&gt;, developed in the 1980s within consumer behavior research, suggests that people tend to be more attracted to brands and products they perceive as consistent with their own identity.&lt;/p&gt;

&lt;p&gt;This becomes particularly interesting in fashion, where a garment does not only serve a functional purpose but can also become part of &lt;strong&gt;how a person wants to look, feel and express themselves.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI can take this idea of personalization much further by using consumer data and preferences to adapt not only recommendations, but also &lt;strong&gt;the images, campaigns and ways in which a product is presented to different audiences.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In other words, the same brand could begin telling different stories about the same product depending on who is seeing it.&lt;/p&gt;

&lt;p&gt;That raises an especially interesting question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How far can the personalization of a brand experience go before the brand begins to lose the common identity behind it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  🔮 What does this mean for the future of fashion?
&lt;/h4&gt;

&lt;p&gt;Perhaps this is one of the biggest changes AI will bring to fashion.&lt;/p&gt;

&lt;p&gt;It is not only about producing faster, reducing costs or generating better images, but also about deciding &lt;strong&gt;how far we want to take personalization, automation and content generation without losing what makes a brand, a person or even a form of self-expression recognizable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Technology can expand the possibilities of fashion… &lt;strong&gt;The question is how we choose to use them.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  📚 References
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;[1] Blumberg, D. L. (2026, January 16). How AI and tariffs are transforming fast fashion. Stanford Report. &lt;a href="https://news.stanford.edu/stories/2026/01/fast-fashion-us-tariffs-artificial-intelligence" rel="noopener noreferrer"&gt;https://news.stanford.edu/stories/2026/01/fast-fashion-us-tariffs-artificial-intelligence&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[2] Reid, H. (2025, May 7). Zalando uses AI to speed up marketing campaigns, cut costs. Reuters. &lt;a href="https://www.reuters.com/business/media-telecom/zalando-uses-ai-speed-up-marketing-campaigns-cut-costs-2025-05-07/" rel="noopener noreferrer"&gt;https://www.reuters.com/business/media-telecom/zalando-uses-ai-speed-up-marketing-campaigns-cut-costs-2025-05-07/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[3] H&amp;amp;M Group. (2026). Annual &amp;amp; sustainability report 2025. &lt;a href="https://hmgroup.com/wp-content/uploads/2026/03/HM-Group-Annual-and-sustainability-report-2025.pdf" rel="noopener noreferrer"&gt;https://hmgroup.com/wp-content/uploads/2026/03/HM-Group-Annual-and-sustainability-report-2025.pdf&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[4] Reid, H. (2026, June 19). AI-generated ads should be exempt from EU transparency rules, retail association says. Reuters. &lt;a href="https://www.reuters.com/legal/litigation/ai-generated-ads-should-be-exempt-eu-transparency-rules-retail-association-says-2026-06-19/" rel="noopener noreferrer"&gt;https://www.reuters.com/legal/litigation/ai-generated-ads-should-be-exempt-eu-transparency-rules-retail-association-says-2026-06-19/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[5] Sweney, M. (2016, April 6). Gucci ad banned over ‘unhealthily thin’ model. The Guardian. &lt;a href="https://www.theguardian.com/media/2016/apr/06/gucci-ad-banned-unhealthily-thin-model-asa" rel="noopener noreferrer"&gt;https://www.theguardian.com/media/2016/apr/06/gucci-ad-banned-unhealthily-thin-model-asa&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[6] Advertising Standards Authority. (2025, August 18). Beauty and cosmetics: The use of production techniques. &lt;a href="https://www.asa.org.uk/advice-online/cosmetics-the-use-of-production-techniques.html" rel="noopener noreferrer"&gt;https://www.asa.org.uk/advice-online/cosmetics-the-use-of-production-techniques.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[7] Gajanan, M. (2015, October 22). Zendaya calls out fashion magazine for retouched photos. The Guardian. &lt;a href="https://www.theguardian.com/fashion/2015/oct/22/zendaya-retouched-photos-modeliste-magazine" rel="noopener noreferrer"&gt;https://www.theguardian.com/fashion/2015/oct/22/zendaya-retouched-photos-modeliste-magazine&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[8] Wang, M. (2017, November 10). Lupita Nyong’o is the latest star to call out offensive retouching on Instagram. Vogue. &lt;a href="https://www.vogue.com/article/lupita-nyongo-retouching-instagram" rel="noopener noreferrer"&gt;https://www.vogue.com/article/lupita-nyongo-retouching-instagram&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[9] Aerie. (n.d.). 100% Aerie Real. American Eagle. &lt;a href="https://www.ae.com/intl/en/content/aerie/aerie-real" rel="noopener noreferrer"&gt;https://www.ae.com/intl/en/content/aerie/aerie-real&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;[10] Hammers, J. (2026, March 26). How Aerie is pushing back against AI content with Pamela Anderson. Marketing Dive. &lt;a href="https://www.marketingdive.com/news/how-aerie-is-pushing-back-against-ai-content-with-pamela-anderson/815668/" rel="noopener noreferrer"&gt;https://www.marketingdive.com/news/how-aerie-is-pushing-back-against-ai-content-with-pamela-anderson/815668/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>ai</category>
      <category>googlecloud</category>
      <category>python</category>
    </item>
    <item>
      <title>From Apple Health Data to Clinical Storytelling: Building an AI-Powered Report with Python and Gemini</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Mon, 20 Jul 2026 09:55:58 +0000</pubDate>
      <link>https://dev.to/gdg/from-apple-health-data-to-clinical-storytelling-building-an-ai-powered-report-with-python-and-3n8n</link>
      <guid>https://dev.to/gdg/from-apple-health-data-to-clinical-storytelling-building-an-ai-powered-report-with-python-and-3n8n</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;At recent technology conferences, one topic has caught my attention: every year, more health-focused devices, sensors, and applications appear. Smartwatches track heart rate, smart scales measure body data, glucose monitors record blood sugar levels, and apps help users track sleep or nutrition. Today, the amount of information we can collect about our own bodies is enormous.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftuu57c0prpch85eraky7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftuu57c0prpch85eraky7.png" alt=" " width="799" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article was inspired by an everyday experience with my father, &lt;strong&gt;Herminio ❤️&lt;/strong&gt;. Whenever he has a medical appointment, he opens the Apple Health app and shows the doctor the evolution of his heart rate, physical activity, sleep hours, and other recorded metrics. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;While watching this, I kept asking myself the same question: &lt;strong&gt;are we really making the most of all this information?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Showing a chart during a medical appointment can be useful, but the data could provide much more value if it were automatically processed, summarized, and transformed into a structured health report.&lt;/p&gt;

&lt;p&gt;For this reason in this project, I use &lt;strong&gt;Gemini&lt;/strong&gt; to transform previously calculated metrics into a clear and organized summary. The LLM does not analyze all the raw records or perform the main calculations. The pipeline processes the data, calculates the indicators, and generates the visualizations, while the model acts as a support layer for building the report narrative.&lt;/p&gt;

&lt;p&gt;The goal is not to create a medical application or replace professional judgment. Instead, the purpose is to build a prototype that shows how Apple Health exports, deterministic data processing, visualizations, and an LLM can be combined to generate automated reports.&lt;/p&gt;

&lt;p&gt;This project was developed using simulated data from three patients, so the complete pipeline can be reproduced without using real clinical information.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ Why Gemini?
&lt;/h2&gt;

&lt;p&gt;This project uses an &lt;strong&gt;LLM&lt;/strong&gt; to transform previously processed metrics into a structured narrative that can be reviewed more easily by a healthcare professional.&lt;br&gt;
I chose Gemini for practical reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ I was already familiar with its API, it integrates easily with Python, and Google AI Studio makes it simple to test and adjust prompts. &lt;/li&gt;
&lt;li&gt;〰️ It also offers a good balance between speed, performance, and cost for text-generation tasks. &lt;/li&gt;
&lt;li&gt;〰️ Its free tier also makes it easier to reproduce this MVP without initial costs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this case, I use a general-purpose model because all calculations are completed in Python before the data is sent to Gemini. The model only organizes the results into readable text.&lt;br&gt;
For projects that need to analyze clinical documents or medical images directly, specialized models such as &lt;strong&gt;MedGemma&lt;/strong&gt; could also be evaluated. MedGemma is a family of open Google models adapted for healthcare-related tasks. However, its implementation, evaluation, and validation are outside the scope of this tutorial.&lt;/p&gt;


&lt;h1&gt;
  
  
  2. HealthKit: The Framework Behind the Data
&lt;/h1&gt;

&lt;p&gt;Although most users only interact with the Apple Health app, HealthKit is the framework behind it. Apple provides HealthKit so developers can securely access health information stored on the device.&lt;/p&gt;

&lt;p&gt;HealthKit works as a central repository where the iPhone and Apple Watch store health and fitness data. With the user’s explicit permission, authorized applications can read and write information through a single API. This avoids the need for every app to maintain its own separate database.&lt;/p&gt;

&lt;p&gt;HealthKit currently supports hundreds of data types across many areas of health and well-being. The following figure presents a simplified grouping of some of these categories to provide a clearer overview of the available information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fswtgxoaqz09s4guru5kv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fswtgxoaqz09s4guru5kv.png" alt=" " width="790" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This taxonomy was created specifically for this article based on publicly available HealthKit documentation. It is not an official Apple classification and should be understood as a summarized, author-created interpretation for explanatory purposes.&lt;/p&gt;

&lt;p&gt;Thanks to this architecture, HealthKit makes it possible to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Collect and store health and fitness information.&lt;/li&gt;
&lt;li&gt;Analyze and visualize how this data changes over time.&lt;/li&gt;
&lt;li&gt;Share information between authorized applications, reducing duplication and enabling new user experiences.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the most interesting design decisions in HealthKit is its large catalog of predefined classes and data types for standardized health metrics.&lt;/p&gt;

&lt;p&gt;At first, this may seem restrictive for developers. However, it is actually one of the platform’s main strengths because it ensures that all stored information follows a consistent data model. This means that heart rate, blood glucose, or body weight always represent the same type of information and use the same units, regardless of the device or application that created the record.&lt;/p&gt;

&lt;p&gt;This standardization simplifies application development, improves interoperability between apps, and helps maintain consistency across the data stored in HealthKit.&lt;/p&gt;


&lt;h2&gt;
  
  
  2.1 Data Sources
&lt;/h2&gt;

&lt;p&gt;One of HealthKit’s main benefits is its ability to bring data from multiple sources into a single repository.&lt;br&gt;
The most common sources include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;iPhone:&lt;/strong&gt; records steps, distance traveled, mobility data, and other indicators collected through its sensors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apple Watch:&lt;/strong&gt; provides physiological metrics such as heart rate, electrocardiogram (ECG), blood oxygen saturation (SpO₂), body temperature, sleep data, workouts, and cardiorespiratory fitness (VO₂ Max).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third-party apps:&lt;/strong&gt; can add information related to nutrition, mental health, hydration, medication, menstrual cycles, or sports training.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connected medical devices and wearables:&lt;/strong&gt; HealthKit supports Bluetooth Low Energy (BLE) health devices and medical data profiles. It can also work with FHIR (Fast Healthcare Interoperability Resources), making it possible to integrate data from devices such as glucose meters and blood pressure monitors, as well as clinical records from authorized healthcare institutions.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  3. HL7 / FHIR Compatibility
&lt;/h2&gt;

&lt;p&gt;So far, we have mainly discussed data generated by devices and applications. However, in 2018 Apple expanded the Health app by introducing Health Records, a feature that allows users to import structured clinical information from supported healthcare institutions. That same year, Apple also opened access to these records for authorized applications through the HealthKit API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Health Records&lt;/strong&gt; is built on &lt;strong&gt;HL7 FHIR&lt;/strong&gt;, which stands for Fast Healthcare Interoperability Resources. &lt;strong&gt;FHIR&lt;/strong&gt; is a standard developed by &lt;strong&gt;HL7&lt;/strong&gt; International to represent and exchange health information electronically between hospitals, applications, and Electronic Health Record systems.&lt;/p&gt;

&lt;p&gt;FHIR organizes information into modular resources such as &lt;code&gt;Patient&lt;/code&gt;, &lt;code&gt;Observation&lt;/code&gt;, &lt;code&gt;Condition&lt;/code&gt;, &lt;code&gt;Procedure&lt;/code&gt;, &lt;code&gt;MedicationRequest&lt;/code&gt;, and &lt;code&gt;Immunization&lt;/code&gt;. Each resource represents a specific piece of clinical information that can be connected, queried, and exchanged between systems. Although FHIR can also be used to build clinical documents, its architecture does not require the entire patient record to be handled as one large document.&lt;/p&gt;

&lt;p&gt;When records are downloaded from a supported institution, HealthKit represents each one as an &lt;code&gt;HKClinicalRecord&lt;/code&gt; object, which keeps the original FHIR resource. Authorized applications can request the clinical record types they need and process their content as FHIR JSON. However, these records are read-only, which means applications cannot create new &lt;code&gt;HKClinicalRecord&lt;/code&gt; objects or modify existing ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg9gkh2097u4q5jtmgcz8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg9gkh2097u4q5jtmgcz8.png" alt=" " width="646" height="719"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Access to any HealthKit information requires user consent, but clinical records have additional requirements because of their sensitivity. An application must enable the Clinical Health Records capability, include the required entitlement, explain why the information is needed, and request permission for each record type it wants to access. The use of this capability is also subject to Apple’s review process.&lt;/p&gt;

&lt;p&gt;In HealthKit, clinical records are represented as read-only HKClinicalRecord objects that preserve the original FHIR content. Access requires explicit user authorization and is subject to additional privacy and platform requirements.&lt;/p&gt;

&lt;p&gt;This architecture makes it possible to bring together information from different sources while keeping access centered on user consent and privacy.&lt;/p&gt;


&lt;h1&gt;
  
  
  4. HealthKit: Clinical Use Cases
&lt;/h1&gt;

&lt;p&gt;The availability of large volumes of physiological data, combined with interoperability standards such as FHIR, has created many opportunities for research and clinical applications.&lt;/p&gt;

&lt;p&gt;The value of this data does not come only from individual measurements, but from how they are analyzed over time. Tracking changes in heart rate, sleep, mobility, or activity levels can help identify patterns, summarize relevant information, and support patient monitoring in different healthcare scenarios.&lt;/p&gt;

&lt;p&gt;The following figure presents some representative use cases, including early anomaly detection, remote patient monitoring, clinical summary generation, and synthetic data generation for research.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmmwaakpvbu4veulqgcmg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmmwaakpvbu4veulqgcmg.png" alt=" " width="790" height="486"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  5. Technical, Clinical, and Regulatory Considerations
&lt;/h1&gt;

&lt;p&gt;Before running the tutorial or using the code presented in this article, it is important to understand its scope and consider several limitations related to privacy, data quality, and the use of artificial intelligence in healthcare contexts.&lt;/p&gt;
&lt;h2&gt;
  
  
  5.1 Privacy and Data Protection
&lt;/h2&gt;

&lt;p&gt;Health information is one of the most sensitive categories of personal data. Depending on the country and the context of use, it may be subject to regulations such as HIPAA in the United States or GDPR in the European Union.&lt;/p&gt;

&lt;p&gt;Although this article uses only simulated data, any implementation that processes real information should include suitable controls for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User consent.&lt;/li&gt;
&lt;li&gt;Access management.&lt;/li&gt;
&lt;li&gt;Data minimization.&lt;/li&gt;
&lt;li&gt;Anonymization or pseudonymization.&lt;/li&gt;
&lt;li&gt;Encryption.&lt;/li&gt;
&lt;li&gt;Secure storage and processing.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  5.2 Consumer Data Is Not a Diagnosis
&lt;/h2&gt;

&lt;p&gt;Measurements collected through consumer devices can provide useful information for identifying trends and supporting long-term monitoring.&lt;br&gt;
However, these records do not represent a medical diagnosis on their own and should not replace measurements taken with certified clinical equipment.&lt;/p&gt;


&lt;h2&gt;
  
  
  5.3 Data Quality and Continuity
&lt;/h2&gt;

&lt;p&gt;The quality of the measurements can be affected by factors such as incorrect device placement, low battery levels, synchronization failures, periods when the device is not used, or differences between sensors and applications.&lt;br&gt;
These situations may produce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incomplete records.&lt;/li&gt;
&lt;li&gt;Duplicate measurements.&lt;/li&gt;
&lt;li&gt;Outliers.&lt;/li&gt;
&lt;li&gt;Periods with missing information.&lt;/li&gt;
&lt;li&gt;Differences in units or sampling frequency.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this reason, the data should be validated, cleaned, and normalized before generating any analysis. It is also important to identify periods where the available information is not complete enough to support reliable conclusions.&lt;/p&gt;
&lt;h2&gt;
  
  
  5.4 Use and Limitations of the LLM
&lt;/h2&gt;

&lt;p&gt;In this project, the large language model does not diagnose conditions or recommend treatments. Its role is to transform previously calculated metrics into a clear and structured summary that can be reviewed more easily by a healthcare professional.&lt;/p&gt;

&lt;p&gt;Any generated output should be treated as a draft that requires human review. The model may omit information, misunderstand a result, or produce statements that are not fully supported by the input data.&lt;/p&gt;
&lt;h2&gt;
  
  
  5.2 Scope of the Code
&lt;/h2&gt;

&lt;p&gt;The repository provided with this article should be understood as &lt;strong&gt;an educational&lt;/strong&gt; and &lt;strong&gt;experimental MVP&lt;/strong&gt;. It is designed to demonstrate the general processing flow using simulated data.&lt;/p&gt;

&lt;p&gt;It is not a medical product, a diagnostic tool, or an implementation ready for direct use in a clinical environment.&lt;br&gt;
Before adapting the code to a real use case, additional validation would be required in areas such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security and access control.&lt;/li&gt;
&lt;li&gt;Error handling and traceability.&lt;/li&gt;
&lt;li&gt;Data quality and provenance.&lt;/li&gt;
&lt;li&gt;Reproducibility of the results.&lt;/li&gt;
&lt;li&gt;Evaluation of the model’s responses.&lt;/li&gt;
&lt;li&gt;Compliance with applicable standards and regulations.&lt;/li&gt;
&lt;li&gt;Review and approval by qualified professionals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal of this project is to present one possible architecture and explore its main components, not to provide a production-ready clinical solution.&lt;/p&gt;


&lt;h1&gt;
  
  
  6. Building the Apple Health Reporting Pipeline
&lt;/h1&gt;

&lt;p&gt;In this tutorial, we will build a Python pipeline that processes an Apple Health XML export and generates a structured PDF report.&lt;br&gt;
The pipeline will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;read and normalize the exported health records;&lt;/li&gt;
&lt;li&gt;calculate mobility, cardiovascular, and sleep metrics;&lt;/li&gt;
&lt;li&gt;compare the results against configurable reference values;&lt;/li&gt;
&lt;li&gt;generate charts;&lt;/li&gt;
&lt;li&gt;use Gemini to create a structured narrative;&lt;/li&gt;
&lt;li&gt;combine everything into a final PDF report.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The generated report contains four main sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚶 &lt;strong&gt;Mobility:&lt;/strong&gt; daily steps, walking speed, steadiness, gait metrics, and caloric expenditure.&lt;/li&gt;
&lt;li&gt;❤️ &lt;strong&gt;Cardiovascular:&lt;/strong&gt; resting heart rate, HRV, oxygen saturation, VO₂ Max, and recovery metrics.&lt;/li&gt;
&lt;li&gt;😴 &lt;strong&gt;Sleep:&lt;/strong&gt; average sleep duration and nights above or below the configured references.&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;AI-generated summary:&lt;/strong&gt; a structured narrative with patient profile, mobility, cardiovascular, sleep, and overall assessment sections.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following diagram shows the complete flow of the project:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkfs605z4gocn1nqourub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkfs605z4gocn1nqourub.png" alt=" " width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The implementation follows a modular architecture in which each class is responsible for one stage of the pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📥 &lt;code&gt;HealthDataReader&lt;/code&gt; reads and processes the Apple Health export.&lt;/li&gt;
&lt;li&gt;📊 &lt;code&gt;HealthChartBuilder&lt;/code&gt; generates the visualizations.&lt;/li&gt;
&lt;li&gt;✨ &lt;code&gt;HealthSummaryGenerator&lt;/code&gt; creates the narrative using Gemini.&lt;/li&gt;
&lt;li&gt;📄 &lt;code&gt;HealthReportPDF&lt;/code&gt; combines the metrics, charts, and generated text into the final report.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the next sections, we will review each stage separately. To keep the article focused, I will only include the most relevant code fragments and design decisions. The complete implementation, configuration files, prompt template, and simulated data are available in the project repository.&lt;/p&gt;
&lt;h2&gt;
  
  
  6.1 Prerequisites
&lt;/h2&gt;

&lt;p&gt;To follow the tutorial, you will need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The project repository cloned locally.&lt;/li&gt;
&lt;li&gt;An Apple Health XML export or one of the simulated files included in the repository.&lt;/li&gt;
&lt;li&gt;A Gemini API key created from Google AI Studio.&lt;/li&gt;
&lt;li&gt;The Python dependencies installed from the project requirements.txt file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can clone the repository and install the dependencies with:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RominaElenaMendezEscobar" rel="noopener noreferrer"&gt;
        RominaElenaMendezEscobar
      &lt;/a&gt; / &lt;a href="https://github.com/RominaElenaMendezEscobar/apple-health-data" rel="noopener noreferrer"&gt;
        apple-health-data
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Python pipeline that processes Apple Health XML exports, calculates health metrics, generates visualizations, creates a structured narrative with Gemini, and builds a final PDF report using simulated patient data.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/r0mymendez" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b96fd4ea89ea15fcec30a4f86382eef0bbd17454aa3a8d4de8c8c5e92b55cf6c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275792532304d6525323041253230436f666665652d737570706f72742532306d79253230776f726b2d4646444430303f7374796c653d666c6174266c6162656c436f6c6f723d313031303130266c6f676f3d6275792d6d652d612d636f66666565266c6f676f436f6c6f723d7768697465" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;From Apple Health Data to Clinical Storytelling: Building an AI-Powered Report with Python and Gemini&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Apple Health Reporting Pipeline with Python and Gemini&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;A modular Python pipeline that processes Apple Health XML exports, calculates health metrics, generates visualizations, creates an AI-assisted narrative with Gemini, and builds a structured PDF report.&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/RominaElenaMendezEscobar/apple-health-data/img/0-Preview.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRominaElenaMendezEscobar%2Fapple-health-data%2FHEAD%2Fimg%2F0-Preview.png" alt="img"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This repository is an educational MVP built with simulated data. It is not a medical device, diagnostic tool, or production-ready clinical solution.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The pipeline:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reads and normalizes Apple Health XML records.&lt;/li&gt;
&lt;li&gt;Calculates mobility, cardiovascular, and sleep metrics.&lt;/li&gt;
&lt;li&gt;Compares results with configurable reference values.&lt;/li&gt;
&lt;li&gt;Generates charts with Matplotlib.&lt;/li&gt;
&lt;li&gt;Creates a structured narrative with Gemini.&lt;/li&gt;
&lt;li&gt;Combines metrics, charts, and text into a PDF report.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;HealthKit: The Framework Behind the Data&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;HealthKit is Apple’s framework for storing and sharing health and fitness information collected by the iPhone, Apple Watch, third-party apps, and compatible devices.&lt;/p&gt;
&lt;p&gt;It provides standardized data types for metrics such…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RominaElenaMendezEscobar/apple-health-data" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;✨Gemini API key&lt;/strong&gt;&lt;br&gt;
You can create an API key from &lt;a href="https://aistudio.google.com/api-keys" rel="noopener noreferrer"&gt;Google AI Studio&lt;/a&gt;.&lt;br&gt;
After creating it, add a .env file at the root of the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;gemini_api_key=YOUR_CREDENTIAL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6.2 Data source
&lt;/h2&gt;

&lt;p&gt;Apple Health allows users to export their information as a ZIP file containing an XML document.&lt;/p&gt;

&lt;p&gt;The export can be generated from the Health app:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Health app on the iPhone.&lt;/li&gt;
&lt;li&gt;Tap the profile icon.&lt;/li&gt;
&lt;li&gt;Select Export All Health Data.&lt;/li&gt;
&lt;li&gt;Confirm the export.&lt;/li&gt;
&lt;li&gt;Extract the generated ZIP file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The tutorial uses the export.xml structure produced by this process. However, to avoid exposing real health information, the repository includes three simulated patient files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;alex_28m.xml:&lt;/strong&gt; 28-year-old male patient.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;carlos_68m.xml:&lt;/strong&gt; 68-year-old male patient.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;maria_61f.xml:&lt;/strong&gt; 61-year-old female patient.
These files are stored in the patients/ folder and allow the complete pipeline to be reproduced without using real clinical data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6.3 Orchestrating the Pipeline
&lt;/h2&gt;

&lt;p&gt;The complete project is coordinated from the &lt;code&gt;main.py&lt;/code&gt; file, which works as the application entry point. Its responsibility is not to process the data directly, but to create the specialized classes and execute each stage of the pipeline in the correct order.&lt;/p&gt;

&lt;p&gt;This file also defines the list of patients to be processed. For each patient, it includes the XML file path and the name that will appear in the final report. The files are declared explicitly to make the example easier to follow, although a more general implementation could discover them automatically from a folder.&lt;/p&gt;

&lt;p&gt;The complete main.py file is shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;healthChartBuilder&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HealthChartBuilder&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;healthDataReader&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HealthDataReader&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;healthReportPDF&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HealthReportPDF&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;healthSummaryGenerator&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HealthSummaryGenerator&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;utils&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
   &lt;span class="n"&gt;patients&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
       &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;patients/alex_28m.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Alex Torres&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
       &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;patients/maria_61f.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;María González&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
       &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;patients/carlos_68m.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Carlos Mendez&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="p"&gt;]&lt;/span&gt;

   &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;makedirs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reports&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;exist_ok&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;makedirs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;charts&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="n"&gt;exist_ok&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;makedirs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="n"&gt;exist_ok&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="n"&gt;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;utils&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_env&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

   &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;xml_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;patients&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
       &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;── &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; ──&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="n"&gt;prefix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;_&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

       &lt;span class="c1"&gt;# Step 1: read and compute
&lt;/span&gt;       &lt;span class="n"&gt;reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HealthDataReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;xml_path&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

       &lt;span class="c1"&gt;# Step 1.1: save the compact LLM-friendly summary for this patient
&lt;/span&gt;       &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;write_llm_summary&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

       &lt;span class="c1"&gt;# Step 2: generate charts
&lt;/span&gt;       &lt;span class="n"&gt;builder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HealthChartBuilder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
           &lt;span class="n"&gt;metrics&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;output_dir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;charts&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;prefix&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="n"&gt;charts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build_all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

       &lt;span class="c1"&gt;# Step: generate the narrative summary with Gemini
&lt;/span&gt;       &lt;span class="n"&gt;generator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HealthSummaryGenerator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
           &lt;span class="n"&gt;json_path&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;_llm_summary.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;yml_path&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;config/params_health.yml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;prompt_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;prompt/prompt_summary.txt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;api_key&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini_api_key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
       &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
       &lt;span class="n"&gt;llm_text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;generator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

       &lt;span class="c1"&gt;# Step 3: build PDF
&lt;/span&gt;       &lt;span class="nc"&gt;HealthReportPDF&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
           &lt;span class="n"&gt;metrics&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;charts&lt;/span&gt;         &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;charts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;patient_name&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;date_of_birth&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;date_of_birth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;biological_sex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;biological_sex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;start_date&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;start&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
           &lt;span class="n"&gt;end_date&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;start&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
           &lt;span class="n"&gt;out_path&lt;/span&gt;       &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reports/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;_report.pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;llm_summary&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6.4 Reading and Processing the Apple Health Export
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;HealthDataReader&lt;/code&gt; class reads the XML file exported from Apple Health and transforms it into a structure that can be analyzed with Python. During this process, it extracts the available records, normalizes dates and numeric values, limits the analysis to the configured period, and calculates the metrics used by the next stages of the pipeline.&lt;/p&gt;

&lt;p&gt;The class receives the XML file path and, optionally, the number of months to include in the analysis:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HealthDataReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; 
&lt;span class="n"&gt;xml_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;patients/alex_28m.xml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;months&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The load() method runs two main operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📥 &lt;strong&gt;_parse_xml()&lt;/strong&gt; reads the file, extracts the records, and transforms them into a Pandas DataFrame.&lt;/li&gt;
&lt;li&gt;📐 &lt;strong&gt;_compute_metrics()&lt;/strong&gt; calculates the daily series and aggregated indicators used in the analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Threshold Configuration
&lt;/h3&gt;

&lt;p&gt;The values used to classify or compare the metrics are not hardcoded inside the class. Instead, they are loaded from &lt;code&gt;config/params_health.yml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This separation makes it possible to update the reference values without changing the Python implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;threshold_steps_low&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Step count threshold for red zone.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3000&lt;/span&gt;
&lt;span class="na"&gt;threshold_steps_mid&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Step count threshold for orange zone.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5000&lt;/span&gt;
&lt;span class="na"&gt;threshold_steps_goal&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Step count goal line.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7000&lt;/span&gt;
&lt;span class="na"&gt;threshold_speed_low&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Walking speed considered critically low.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3.5&lt;/span&gt;
&lt;span class="na"&gt;threshold_speed_goal&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Walking speed reference value.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4.5&lt;/span&gt;
&lt;span class="na"&gt;threshold_steadiness&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Steadiness warning value.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.60&lt;/span&gt;
&lt;span class="na"&gt;threshold_spo2_low&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SpO2 critical threshold.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;95.0&lt;/span&gt;
&lt;span class="na"&gt;threshold_spo2&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Minimum SpO2 reference value.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;96.0&lt;/span&gt;
&lt;span class="na"&gt;threshold_sleep_min&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Sleep duration for red zone.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5.0&lt;/span&gt;
&lt;span class="na"&gt;threshold_sleep_mid&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Sleep duration for orange zone.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;6.0&lt;/span&gt;
&lt;span class="na"&gt;threshold_sleep_goal&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Sleep duration goal.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7.0&lt;/span&gt;
&lt;span class="na"&gt;threshold_hrv&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Minimum HRV reference value.&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These parameters affect several parts of the project. They are used, for example, to calculate how many days fall below a specific step count, identify periods of low walking speed, evaluate sleep duration, and define the reference zones later used in the charts and the final report.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Note: The values included in the repository are only for demonstration and are intended to support the example with simulated data. They should not be treated as clinical criteria. Before adapting the code to a real use case, the thresholds should be reviewed and validated by healthcare professionals, considering the population, age group, clinical context, and specific purpose of the solution.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Metric Selection
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;_compute_metrics()&lt;/code&gt; method defines which data types are processed and which indicators are calculated. In the current implementation, the metrics are mainly organized into three groups:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🚶 Mobility and activity:&lt;/strong&gt; steps, walking speed, step length, steadiness, asymmetry, active energy, and flights climbed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;❤️ Cardiovascular:&lt;/strong&gt; resting heart rate, HRV, oxygen saturation, respiratory rate, VO₂ Max, and heart rate recovery.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;😴 Sleep:&lt;/strong&gt; daily duration, average sleep, and the number of nights below or above the configured thresholds.
The daily series are calculated using sums or averages, depending on the type of record:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;steps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_daily_sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;StepCount&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;speed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_daily_mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;WalkingSpeed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;hr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_daily_mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RestingHeartRate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;hrv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_daily_mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;HeartRateVariabilitySDNN&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;spo2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_daily_mean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OxygenSaturation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ Note:&lt;/strong&gt; The thresholds are not the only values that should be reviewed. It is also important to confirm that the statistical methods used by the class are appropriate for each metric. For example, the mean can be affected by outliers. Before using this approach in production, other measures such as the median or percentiles may need to be evaluated.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Preparing the Data for the LLM
&lt;/h3&gt;

&lt;p&gt;In addition to the full set of metrics, the class generates a smaller JSON file through &lt;code&gt;to_llm_summary()&lt;/code&gt;.&lt;br&gt;
Instead of sending the complete time series, Python creates a compact and deterministic representation that includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📊 mean and standard deviation;&lt;/li&gt;
&lt;li&gt;↕️ minimum and maximum values;&lt;/li&gt;
&lt;li&gt;📈 trend over the analysis period;&lt;/li&gt;
&lt;li&gt;📅 best and worst weekly averages;&lt;/li&gt;
&lt;li&gt;🔄 weekly variability;&lt;/li&gt;
&lt;li&gt;⏱️ longest consecutive period below the configured threshold.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not every metric includes all of these fields, because some calculations do not apply in the same way to every type of data. This decision has two main benefits:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Reducing the amount of data sent to the model.&lt;/strong&gt; An Apple Health export may contain thousands of records. Sending all observations would increase the prompt size, token usage, and execution cost, while also adding repetitive information that may not improve the final summary.&lt;br&gt;
&lt;strong&gt;2. Keeping the calculations in Python.&lt;/strong&gt; Averages, trends, minimum and maximum values, weekly statistics, and threshold streaks are calculated in advance using deterministic code. The LLM receives fixed and verifiable values and is only responsible for turning them into a natural-language summary.&lt;/p&gt;

&lt;p&gt;This separation also makes the project easier to maintain. If the trend calculation changes or a new metric is added, the update can be made in Python without changing the role of the language model.&lt;br&gt;
For example, the model receives a structure like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"steps"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"mean"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;9498.53&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"std"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1728.37&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"min"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;5667.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"max"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;14201.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"trend"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"stable"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"worst_week_mean"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;8214.29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"best_week_mean"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;10672.71&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"weekly_volatility"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;576.09&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"worst_streak_below_threshold"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6.5 Generating Clinical Charts
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;HealthChartBuilder&lt;/code&gt; class receives the metrics calculated by &lt;code&gt;HealthDataReader&lt;/code&gt; and generates the charts that are later included in the final report.&lt;br&gt;
To keep the presentation logic separate from the data-processing logic, the class uses two configuration files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🎯 &lt;code&gt;params_health.yml&lt;/code&gt;: defines the reference thresholds used for color zones and horizontal lines in each chart.&lt;/li&gt;
&lt;li&gt;🎨 &lt;code&gt;params_styles.yml&lt;/code&gt;: stores the color palette applied consistently across all visualizations.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Generated Charts
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;build_all()&lt;/code&gt; method coordinates the chart-generation process and delegates each visualization to an independent private method:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚶 &lt;strong&gt;Activity and mobility&lt;/strong&gt; — &lt;code&gt;_chart_steps()&lt;/code&gt;, &lt;code&gt;_chart_mobility()&lt;/code&gt;, and &lt;code&gt;_chart_calories()&lt;/code&gt;: daily steps with threshold-based color zones, walking speed with a reference line, and active versus basal calories.&lt;/li&gt;
&lt;li&gt;❤️ &lt;strong&gt;Cardiovascular&lt;/strong&gt; — &lt;code&gt;_chart_hrv()&lt;/code&gt; and &lt;code&gt;_chart_spo2()&lt;/code&gt;: heart rate variability with a minimum reference value, and oxygen saturation with critical, low, and normal zones.&lt;/li&gt;
&lt;li&gt;😴 &lt;strong&gt;Sleep&lt;/strong&gt; — &lt;code&gt;_chart_sleep()&lt;/code&gt;: nightly sleep duration displayed with threshold-based color zones. If no sleep data is available, the chart shows an alternative message.
Each chart is implemented independently, so it can be modified or replaced without affecting the rest of the pipeline.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6.6 Generating the Narrative with Gemini
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;HealthSummaryGenerator&lt;/code&gt; class receives the summary created by &lt;code&gt;HealthDataReader&lt;/code&gt; and uses Gemini to transform it into structured natural-language text. At this stage, the original Apple Health records are not sent to the model. Instead, Gemini receives the metrics that were already calculated and summarized in the previous step.&lt;br&gt;
To build the prompt, the class uses three input files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;📊 &lt;code&gt;json_path&lt;/code&gt;:&lt;/strong&gt; contains the patient’s compact summary, including the previously calculated metrics and statistics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 &lt;code&gt;yml_path&lt;/code&gt;:&lt;/strong&gt; points to &lt;code&gt;params_health.yml&lt;/code&gt;, which contains the thresholds used to compare each metric.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📝 &lt;code&gt;prompt_path&lt;/code&gt;:&lt;/strong&gt; contains the prompt template and the instructions the model must follow.
The &lt;code&gt;load()&lt;/code&gt; method reads these files and initializes the Gemini client:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;self.datos = utils.read_json_file(self.json_path)
self.yml = utils.read_yml_file(self.yml_path)
self.prompt = utils.read_txt_file(self.prompt_path)
self.client = genai.Client(api_key=self.api_key)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Prompt Structure
&lt;/h3&gt;

&lt;p&gt;The prompt template defines how the report should be generated. Instead of including the complete prompt in the article, its main instructions can be summarized as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🧭 &lt;strong&gt;Patient context:&lt;/strong&gt; calculates the patient’s age from the date of birth and considers biological sex and the analysis period.&lt;/li&gt;
&lt;li&gt;📐 &lt;strong&gt;Threshold comparison:&lt;/strong&gt; defines which value from &lt;code&gt;params_health.yml&lt;/code&gt; should be used to evaluate each metric.&lt;/li&gt;
&lt;li&gt;📑 &lt;strong&gt;Report structure:&lt;/strong&gt; requires fixed sections for patient profile, mobility, cardiovascular data, sleep, and overall assessment.&lt;/li&gt;
&lt;li&gt;🔎 &lt;strong&gt;Trends and continuity:&lt;/strong&gt; asks the model to consider metric trends, weekly variability, and consecutive periods below the configured thresholds.&lt;/li&gt;
&lt;li&gt;🚫 &lt;strong&gt;Restrictions:&lt;/strong&gt; prevents the model from inventing data, using unavailable fields, or making general judgments about the patient’s health. It also avoids subjective terms such as “healthy” or “concerning.” The model should only report whether each value is above, within, or below its corresponding threshold.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This last point is especially important, because the model should describe the available values and their relationship to the configured thresholds without making a diagnosis or turning the summary into medical advice.&lt;/p&gt;




&lt;h3&gt;
  
  
  Building and Running the Prompt
&lt;/h3&gt;

&lt;p&gt;The class separates prompt preparation from the model call:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;_build_prompt()&lt;/code&gt;replaces the &lt;code&gt;{datos}&lt;/code&gt; and &lt;code&gt;{yml}&lt;/code&gt; placeholders with the actual JSON data and threshold configuration.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;generate()&lt;/code&gt; sends the completed prompt to Gemini and returns the generated text.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_build_prompt&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate_content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;model_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;contents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;types&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;GenerateContentConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;max_output_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;thinking_config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;types&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ThinkingConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;thinking_budget&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
        &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6.7 Generating the Final PDF Report
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;HealthReportPDF&lt;/code&gt; class combines the results produced during the previous stages and creates the final PDF report using ReportLab.&lt;br&gt;
The class receives four main inputs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;📊 Metrics and KPIs:&lt;/strong&gt; obtained directly from the &lt;code&gt;metrics&lt;/code&gt; dictionary generated by &lt;code&gt;HealthDataReader&lt;/code&gt;. The class does not recalculate the main statistics. Instead, it organizes them into KPI cards, tables, alerts, and short descriptions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📈 Charts:&lt;/strong&gt; receives the image paths generated by &lt;code&gt;HealthChartBuilder&lt;/code&gt; and adds each chart to the corresponding report section.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;✨ Gemini summary:&lt;/strong&gt; receives the narrative generated by &lt;code&gt;HealthSummaryGenerator&lt;/code&gt; and includes it as a separate section.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎯 Configuration&lt;/strong&gt;: uses &lt;code&gt;params_health.yml&lt;/code&gt; and &lt;code&gt;params_styles.yml&lt;/code&gt; to apply the same thresholds and visual styles used across the rest of the pipeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This class does not calculate averages, trends, or weekly statistics. Those values are already produced by &lt;code&gt;HealthDataReader&lt;/code&gt;. It only performs simple comparisons against the configured thresholds to decide whether a table should display a ✓ or ⚠ status and whether an alert should be added to the report.&lt;/p&gt;




&lt;h3&gt;
  
  
  Report Structure
&lt;/h3&gt;

&lt;p&gt;The generated document is divided into four sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚶 &lt;strong&gt;① Mobility:&lt;/strong&gt; KPIs for steps, walking speed, steadiness, gait asymmetry, and activity, together with the related charts and reference tables.&lt;/li&gt;
&lt;li&gt;❤️ &lt;strong&gt;② Cardiovascular:&lt;/strong&gt; resting heart rate, HRV, SpO₂, VO₂ Max, and recovery metrics. This section is adapted when Apple Watch data is not available.&lt;/li&gt;
&lt;li&gt;😴 &lt;strong&gt;③ Sleep:&lt;/strong&gt; average sleep duration, nights below the minimum threshold, and nights that meet the configured goal.&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;④ AI-Generated Summary:&lt;/strong&gt; the narrative generated by Gemini, converted from simple Markdown into formatted PDF content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkyv807088sc8cexczad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdkyv807088sc8cexczad.png" alt=" " width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Alerts and Reference Status
&lt;/h3&gt;

&lt;p&gt;Before building the report sections, the &lt;code&gt;build()&lt;/code&gt; method checks the main metrics against their configured thresholds.&lt;/p&gt;

&lt;p&gt;For example, it can generate an alert when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the average &lt;strong&gt;number of steps&lt;/strong&gt; is below the target;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;walking speed&lt;/strong&gt; is below the reference value;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HRV or SpO₂&lt;/strong&gt; is below the configured threshold;&lt;/li&gt;
&lt;li&gt;average &lt;strong&gt;sleep duration&lt;/strong&gt; does not meet the expected value.
These alerts are based on simple comparisons and do not represent medical diagnoses.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  AI Disclaimer
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;AI-generated section always includes a visible disclaimer.&lt;/strong&gt; It explains that the text was created from device data, is not a clinical evaluation or diagnosis, and may contain errors or incorrect interpretations.&lt;br&gt;
The disclaimer also reminds the reader that the generated narrative should be checked against the original metrics and reviewed by a qualified professional before being used in any health-related decision.&lt;/p&gt;




&lt;h1&gt;
  
  
  7. Conclusions
&lt;/h1&gt;

&lt;p&gt;One of the main challenges of this project was transforming &lt;strong&gt;Apple Health records&lt;/strong&gt; into useful and understandable information. HealthKit’s consistent data structure makes this processing easier and supports the creation of a reusable pipeline. It also opens the door to interoperability: in a real environment, representing the results with standards such as HL7 &lt;strong&gt;FHIR&lt;/strong&gt; could simplify their exchange with applications, hospitals, and electronic health record systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Separating Calculation from Interpretation
&lt;/h3&gt;

&lt;p&gt;A relevant design decision was to keep the calculations in &lt;strong&gt;Python&lt;/strong&gt; and use &lt;strong&gt;Gemini&lt;/strong&gt; only to generate the narrative. Averages, trends, threshold comparisons, and weekly statistics are calculated in a controlled way, while the model receives already processed values and turns them into readable text.&lt;br&gt;
Summarizing the data before sending it to the LLM also reduces token usage, execution cost, and the risk of reaching the context window limit. This approach provides more control over the information used to generate the report.&lt;/p&gt;

&lt;h3&gt;
  
  
  Personalization and Data Quality
&lt;/h3&gt;

&lt;p&gt;The same &lt;strong&gt;metrics and thresholds&lt;/strong&gt; are not suitable for every patient or every use case. Making these values configurable allows the analysis to be adapted to the patient profile, the monitoring objective, and the specific needs of the project.&lt;br&gt;
However, configuration alone does not guarantee reliable results. The statistical methods should also be validated, and the pipeline should measure data completeness. For example, it should be able to distinguish between a real reduction in activity and missing records caused by low battery, synchronization problems, or irregular device use.&lt;br&gt;
In a real implementation, metrics, thresholds, and validation rules should be reviewed together with healthcare professionals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security and Responsible Data Use
&lt;/h3&gt;

&lt;p&gt;Health data requires &lt;strong&gt;specific controls for privacy, access, storage, and retention&lt;/strong&gt;. A real solution should define what information is collected, who can access it, how long it is stored, and which data may be sent to external services.&lt;br&gt;
Although these topics are outside the scope of this article, they should be considered from the beginning of the design process. Consent, data minimization, and retention policies should not be added only after the technical implementation is complete. This principle is also reflected in Apple Health, which requires explicit permission to read and write health information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Note
&lt;/h3&gt;

&lt;p&gt;This project is an &lt;strong&gt;educational MVP built with simulated data&lt;/strong&gt;. It is not ready for production and should not be used directly to make health-related decisions.&lt;br&gt;
Its main purpose is to demonstrate how continuous health data, deterministic processing, visualizations, and a language model can be combined in a modular pipeline. The LLM can help communicate the results, but the calculations, validation rules, and data-quality controls should remain reproducible and verifiable.&lt;/p&gt;




&lt;h1&gt;
  
  
  8. 📚 Reference
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Apple. (2018, 24 de enero). Apple announces solution bringing health records to iPhone. Apple Newsroom. &lt;a href="https://www.apple.com/newsroom/2018/01/apple-announces-effortless-solution-bringing-health-records-to-iPhone/" rel="noopener noreferrer"&gt;https://www.apple.com/newsroom/2018/01/apple-announces-effortless-solution-bringing-health-records-to-iPhone/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Apple. (2020). Handling FHIR without getting burned [Video]. Apple Developer. &lt;a href="https://developer.apple.com/videos/play/wwdc2020/10669/" rel="noopener noreferrer"&gt;https://developer.apple.com/videos/play/wwdc2020/10669/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Apple. (s. f.). Accessing Health Records. Apple Developer Documentation. Retrieved July 10, 2026, from &lt;a href="https://developer.apple.com/documentation/healthkit/accessing-health-records" rel="noopener noreferrer"&gt;https://developer.apple.com/documentation/healthkit/accessing-health-records&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Apple. (s. f.). Configuring HealthKit access. Apple Developer Documentation. Retrieved July 10, 2026, from &lt;a href="https://developer.apple.com/documentation/xcode/configuring-healthkit-access" rel="noopener noreferrer"&gt;https://developer.apple.com/documentation/xcode/configuring-healthkit-access&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Apple. (s. f.). HealthKit. Apple Developer Documentation. Retrieved July 10, 2026, from &lt;a href="https://developer.apple.com/documentation/healthkit" rel="noopener noreferrer"&gt;https://developer.apple.com/documentation/healthkit&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google. (2026, 23 de junio). Gemini 2.5 Flash. Google AI for Developers. &lt;a href="https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash" rel="noopener noreferrer"&gt;https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google. (s. f.). Guía de inicio rápido de Google AI Studio. Google AI for Developers. Retrieved July 10, 2026, from  &lt;a href="https://ai.google.dev/gemini-api/docs/ai-studio-quickstart?hl=es-419" rel="noopener noreferrer"&gt;https://ai.google.dev/gemini-api/docs/ai-studio-quickstart?hl=es-419&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google. (s. f.). MedGemma 27B instruction-tuned model card. Hugging Face. Retrieved July 10, 2026, from &lt;a href="https://huggingface.co/google/medgemma-27b-it" rel="noopener noreferrer"&gt;https://huggingface.co/google/medgemma-27b-it&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Health Level Seven International. (2023, 26 de marzo). FHIR overview: FHIR release 5. &lt;a href="https://fhir.hl7.org/fhir/overview.html" rel="noopener noreferrer"&gt;https://fhir.hl7.org/fhir/overview.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Health Level Seven International. (2023, 26 de marzo). Introducing HL7 FHIR: FHIR release 5. &lt;a href="https://fhir.hl7.org/fhir/summary.html" rel="noopener noreferrer"&gt;https://fhir.hl7.org/fhir/summary.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>googlecloud</category>
      <category>python</category>
      <category>learning</category>
    </item>
    <item>
      <title>Apple WWDC 2026: Apple Intelligence, Privacy-First AI, and the Future of Digital Experiences</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Wed, 10 Jun 2026 17:25:47 +0000</pubDate>
      <link>https://dev.to/r_elena_mendez_escobar/apple-wwdc-2026-when-ai-stops-being-a-feature-and-becomes-the-foundation-d6i</link>
      <guid>https://dev.to/r_elena_mendez_escobar/apple-wwdc-2026-when-ai-stops-being-a-feature-and-becomes-the-foundation-d6i</guid>
      <description>&lt;p&gt;At &lt;strong&gt;WWDC 2026 (its annual developers conference)&lt;/strong&gt;, &lt;strong&gt;Apple&lt;/strong&gt; announced a new generation of Apple Intelligence, a completely redesigned Siri, and a host of AI-powered features across its ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29cy1fu27qc3br99iyb9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29cy1fu27qc3br99iyb9.png" alt=" " width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What was interesting was observing how &lt;strong&gt;Apple&lt;/strong&gt; is building a vision where design, privacy, accessibility, and artificial intelligence are no longer separate issues, but rather integrated into a single product strategy.&lt;br&gt;
Between the evolution of &lt;code&gt;Liquid Glass&lt;/code&gt;, an AI architecture that prioritizes local data processing, new parental control tools, and features that expand accessibility through natural language and visual understanding, &lt;strong&gt;WWDC 2026&lt;/strong&gt; offered several clues about where the next generation of digital products might be headed.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Design Is Never Finished: The Evolution of Liquid Glass
&lt;/h2&gt;

&lt;p&gt;Last year, Apple introduced Liquid Glass as one of the most ambitious visual changes in its ecosystem. This year, they did something that we often forget in technology: they iterated on it.&lt;br&gt;
Apple explicitly acknowledged feedback from users and developers, adjusting aspects related to legibility, contrast, visual depth, and customization. The addition of transparency controls and the refinement of core components reflects a practice we see in the most successful digital products: &lt;strong&gt;ship, observe, learn, evolve&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key updates in this iteration:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;Improved legibility&lt;/strong&gt;: the system now diffuses complex content behind surfaces differently, creating greater separation and visual depth between interface layers&lt;/li&gt;
&lt;li&gt; 〰️ &lt;strong&gt;Customization slider&lt;/strong&gt;: users can now adjust Liquid Glass appearance from ultra-clear to fully tinted directly in Settings&lt;/li&gt;
&lt;li&gt; 〰️ &lt;strong&gt;Icon depth&lt;/strong&gt;: additional Liquid Glass layers are now integrated directly into app icon artwork for sharper definition in the dock and home screen&lt;/li&gt;
&lt;li&gt; 〰️ &lt;strong&gt;Structural consistency&lt;/strong&gt;: sidebars expand to window edges to reduce distractions while maintaining the characteristic glass refractions; window corners use a tighter radius for visual coherence
The evolution of Liquid Glass tells a broader story: design at this scale is not a launch event, it's a continuous discipline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rzxuie61khtlu1sv98k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rzxuie61khtlu1sv98k.png" alt=" " width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Privacy-First: An Architecture That Could Change How We Build AI
&lt;/h2&gt;

&lt;p&gt;This is arguably the most relevant part of WWDC 2026 for those of us who work in technology.&lt;/p&gt;

&lt;p&gt;Apple reinforced an idea it has been building for years: &lt;strong&gt;privacy in AI is not a marketing slogan… it's a non-negotiable architectural feature&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The new generation of Apple Intelligence combines on-device processing with Private Cloud Compute, allowing most personal information to remain on the device. This opens important questions for architects, data engineers, and developers — because for years we assumed AI required sending large amounts of data to centralized services to function. Apple is exploring a different path: bringing intelligence closer to where the data actually lives.&lt;/p&gt;

&lt;p&gt;The shift is conceptual as much as technical. Privacy stops being a constraint and becomes a design principle.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the architecture works
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Private Cloud Compute (PCC)&lt;/strong&gt; is the key piece for data engineers. Complex requests are sent to servers running Apple Silicon, with a guarantee that data is never stored or accessible (not even to Apple)  and that this promise can be verified by independent experts at any time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxb28qmrhrmnozbgox7c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxb28qmrhrmnozbgox7c.png" alt=" " width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;•••&lt;/center&gt;

&lt;h3&gt;
  
  
  Real examples of this in practice
&lt;/h3&gt;

&lt;p&gt;〰️🧭 &lt;strong&gt;Safari&lt;/strong&gt;: unlike other AI-powered browsers, Safari does not share sensitive browsing history with anyone&lt;br&gt;
 〰️ 📱&lt;strong&gt;Phone app:&lt;/strong&gt;  the "Call Context" feature analyzes who is calling and searches for relevant information across your apps, but the entire process runs on-device with nothing shared externally&lt;br&gt;
 〰️🏞️ &lt;strong&gt;Image Playground:&lt;/strong&gt;  even when powerful cloud models generate photorealistic images, personal photos used as reference are never stored or shared&lt;br&gt;
For sectors like healthcare, finance, or legal — this model matters. On-device AI inference at this quality level removes one of the core objections to AI adoption: data residency and third-party access. When the compute moves to the device and the results are verifiable, many compliance conversations change.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Technology to Learn With, Not Just to Consume: Child Safety Reimagined
&lt;/h2&gt;

&lt;p&gt;One of the announcements that caught my attention most was the focus on children and teenagers.&lt;br&gt;
The conversation about kids and devices often reduces to a single question: are they good or bad? Apple proposes a more interesting frame. The question becomes how to use them safely and intentionally.&lt;br&gt;
What Apple introduced is not just parental controls — it's a framework for intentional digital access, built on recommendations from child development experts and organizations including the American Academy of Pediatrics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key tools announced
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;〰️🚸 &lt;strong&gt;Child Account&lt;/strong&gt;:  the first step: activates age-appropriate safeguards automatically, including adult site blocking and App Store media restrictions&lt;/li&gt;
&lt;li&gt;〰️? &lt;strong&gt;Ask to Browse&lt;/strong&gt;: extends the "Ask to Buy" model to web navigation; children request permission to visit new sites, parents review and approve from their own devices&lt;/li&gt;
&lt;li&gt; 〰️✔️ &lt;strong&gt;Contact approval&lt;/strong&gt;: parents must approve any new contact added within apps&lt;/li&gt;
&lt;li&gt; 〰️💬 &lt;strong&gt;Communication Safety&lt;/strong&gt;: proactive intervention before children see violent or graphic content in shared images and videos, in addition to existing nudity protection&lt;/li&gt;
&lt;li&gt; 〰️⏰ &lt;strong&gt;Time Allowances&lt;/strong&gt;: daily recommendations by category (games, social media, entertainment) based on the child's age and validated by the AAP — with parents retaining full control to adjust&lt;/li&gt;
&lt;li&gt; 〰️🗓️ &lt;strong&gt;Schedules&lt;/strong&gt;: define which apps are available during school hours to reduce distraction and support focus
The goal is not to take the device away. It's to make it useful, safe, and age-appropriate. A child can use educational apps during school time, creative apps in the afternoon, and have social apps gated for weekends.
### APIs for developers
Apple extended this safety ecosystem to third parties:&lt;/li&gt;
&lt;li&gt;〰️ Declared Age Range API — lets developers privately adapt their app experience to the child's verified age range, without exposing the actual age&lt;/li&gt;
&lt;li&gt; 〰️ Contact control resources — tools to ensure parents approve new contacts within third-party applications
The underlying principle resonates beyond child safety: the device is not the problem. The design of access is.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Siri AI, Visual Intelligence, and AI-Powered Accessibility
&lt;/h2&gt;

&lt;p&gt;The new Siri is probably the most visible announcement of the event — but its implications go well beyond a conversational assistant.&lt;br&gt;
Siri is no longer a command interface. It is a context-aware, multimodal agent that understands what you see, what you are doing, and what you have said before — across all your devices.&lt;br&gt;
The architecture diagram Apple shared illustrates this clearly:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrqb361df2z7qwns7n08.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrqb361df2z7qwns7n08.png" alt=" " width="800" height="673"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;•••&lt;/center&gt;

&lt;h3&gt;
  
  
  Visual Intelligence in Practice
&lt;/h3&gt;

&lt;p&gt;The examples Apple showed during the session represent architectural shifts in how humans interact with technology:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; 〰️ Point the camera at a restaurant bill → Siri splits it automatically using Apple Cash&lt;/li&gt;
&lt;li&gt; 〰️ Scan the food on your plate → get nutritional information in real time&lt;/li&gt;
&lt;li&gt; 〰️ Look at something in your environment → ask what it is and get context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo1nfweszw15u09bets0y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo1nfweszw15u09bets0y.png" alt=" " width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  AI as Accessibility Infrastructure
&lt;/h3&gt;

&lt;p&gt;The new capabilities Apple introduced through voice interactions and visual understanding were primarily presented as productivity and assistance features. However, from my perspective, they also represent a meaningful step forward in accessibility.&lt;/p&gt;

&lt;p&gt;For decades, digital accessibility has often been approached as an additional layer added on top of products: screen readers, magnification tools, voice commands, or specialized interfaces designed for specific needs. Those tools remain essential, but what Apple appears to be demonstrating points in a different direction.&lt;/p&gt;

&lt;p&gt;When a system can understand what is happening on the screen, interpret what the camera sees, maintain conversational context, and respond through natural language, accessibility stops being a separate feature and becomes part of the interaction model itself.&lt;/p&gt;

&lt;p&gt;From the perspective of Universal Design, several principles begin to emerge naturally through these capabilities.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility in Use&lt;/strong&gt;: Users can interact with the same functionality in different ways depending on their preferences, abilities, or context. A person can type, speak, show an image, or combine multiple interaction methods to achieve the same outcome. The technology no longer imposes a single path; it adapts to different ways of engaging with it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simple and Intuitive Use&lt;/strong&gt;: Natural language interactions reduce the need to learn complex navigation structures, extensive menus, or specific commands. Users can express their intent using their own words and receive contextual assistance without needing to understand how the system works behind the scenes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Perceptible Information&lt;/strong&gt;: Visual Intelligence can transform visual information into verbal or contextual information. Users can receive descriptions of objects, understand documents, identify elements in their surroundings, or obtain explanations about what appears in front of the camera. Information is no longer tied to a single sensory channel.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Low Physical Effort&lt;/strong&gt;: Many tasks that previously required multiple steps, manual searches, or switching between applications can now be completed through a conversation or a single image capture. Reducing the number of actions required to accomplish a task lowers the effort needed to interact with the system.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;center&gt;•••&lt;/center&gt;

&lt;h4&gt;
  
  
  Beyond Traditional Accessibility
&lt;/h4&gt;

&lt;p&gt;Accessibility becomes less about specialized accommodations and more about creating technology that understands people, their context, and their intent.&lt;br&gt;
Perhaps the most significant shift is that technology is no longer asking people to adapt to interfaces... because the interface is beginning to adapt to people.&lt;/p&gt;

&lt;center&gt;•••&lt;/center&gt;

&lt;h4&gt;
  
  
  Intelligence That Follows the User
&lt;/h4&gt;

&lt;p&gt;Another interesting aspect of the new Siri architecture is cross-device continuity.&lt;br&gt;
Conversations can now move seamlessly between iPhone, iPad, Mac, and Vision Pro while preserving context. A user can start a conversation on one device and continue it on another without losing the flow of the interaction.&lt;br&gt;
This may seem like a convenience feature, but it reflects a deeper design principle. The context window is no longer tied to a specific device. It follows the user.&lt;br&gt;
In summary Users do not think in terms of devices; they think in terms of tasks, goals, and conversations. Apple's approach suggests a future where intelligence becomes a persistent layer across the entire ecosystem rather than a capability attached to individual products.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. From Features to Platform
&lt;/h2&gt;

&lt;p&gt;Beyond the end-user experience, Apple also introduced a set of frameworks, APIs, and development tools that open Apple Intelligence to the broader ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧠 Foundation Models Framework&lt;/strong&gt;&lt;br&gt;
Developers can access Apple's foundation models directly from Swift, extend them with custom capabilities, and use the same programming model across different environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;❤️ Core AI&lt;/strong&gt;&lt;br&gt;
Applications can run third-party models locally on Apple Silicon, taking advantage of hardware acceleration while keeping inference close to where the data resides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔗 App Intents&lt;/strong&gt;&lt;br&gt;
App Intents continue to become a foundational integration layer. They allow Siri and Apple Intelligence to understand and interact with application functionality. Apps that expose meaningful intents become part of the broader intelligence ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🤖 Agentic Coding in Xcode&lt;/strong&gt;&lt;br&gt;
Apple introduced agentic development capabilities directly into Xcode, allowing developers to connect AI assistants to tools such as GitHub, Figma, and simulators as part of the development workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📱 Device Hub&lt;/strong&gt;&lt;br&gt;
A unified interface for testing applications across real and simulated devices, simplifying validation across Apple's growing ecosystem.&lt;/p&gt;

&lt;center&gt;•••&lt;/center&gt;

&lt;h3&gt;
  
  
  APIs Extending the Ecosystem
&lt;/h3&gt;

&lt;p&gt;Apple also expanded several APIs that allow developers to integrate these capabilities into their own applications.&lt;br&gt;
〰️ &lt;strong&gt;Image Playground API&lt;/strong&gt; enables AI-powered image generation directly within third-party applications.&lt;br&gt;
〰️ &lt;strong&gt;Declared Age Range API&lt;/strong&gt; allows applications to provide age-appropriate experiences while preserving user privacy.&lt;br&gt;
〰️ &lt;strong&gt;App Intents API&lt;/strong&gt; enables applications to become deeply integrated with Siri and Apple Intelligence.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;If I had to summarize WWDC 2026 in one sentence, I would say Apple presented a vision where design, privacy, intelligence, accessibility, and digital safety are no longer separate concerns. They become part of the same product architecture.&lt;/p&gt;

&lt;p&gt;In summary, WWDC 2026 highlights several important lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The evolution of &lt;strong&gt;Liquid Glass&lt;/strong&gt; showed that design is a continuous process of learning and refinement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apple Intelligence&lt;/strong&gt; demonstrated that AI can be built around privacy rather than treating it as a constraint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The new child safety features&lt;/strong&gt; reframed the conversation from restricting technology to designing intentional access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Intelligence&lt;/strong&gt; suggested a future where accessibility emerges naturally from systems that understand context, language, images, and user intent.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For developers, the message was equally significant. Apple did not only introduce new user-facing experiences; it exposed the frameworks, APIs, and intelligence layers required to build on top of them.&lt;/p&gt;

&lt;p&gt;What I take away from this event is that we need to focus less on individual features and more on complete solutions that help people accomplish tasks across different contexts. The platform is no longer a standalone destination; it becomes part of a continuous experience that follows the user across devices and moments.&lt;/p&gt;

&lt;p&gt;As intelligence becomes more integrated into everyday interactions, personalization and security increasingly emerge as foundational design principles. Building products now requires thinking beyond a single application or device and considering how experiences evolve across an entire ecosystem.&lt;/p&gt;

&lt;p&gt;The most important takeaway is not any individual feature announced during WWDC. It is the direction these announcements collectively point toward: technology that becomes more contextual, more personal, more accessible, and more deeply integrated into people's daily lives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How will these principles reshape the way we design digital products, platforms, and enterprise architectures over the next decade?&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Reference
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apple.&lt;/strong&gt; (2026, June 8). Apple WWDC 2026 June 8: Introducing Siri AI and more [Video]. YouTube. Retrieved June 9, 2026, from &lt;a href="https://www.youtube.com/watch?v=hF8swzNR1-o" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=hF8swzNR1-o&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>mobile</category>
      <category>ios</category>
      <category>news</category>
    </item>
    <item>
      <title>Serverless Research Paper Intelligence: Docling, Lambda Containers, and Amazon Bedrock</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Wed, 27 May 2026 13:25:25 +0000</pubDate>
      <link>https://dev.to/aws-builders/serverless-research-paper-intelligence-docling-lambda-containers-and-amazon-bedrock-5987</link>
      <guid>https://dev.to/aws-builders/serverless-research-paper-intelligence-docling-lambda-containers-and-amazon-bedrock-5987</guid>
      <description>&lt;h1&gt;
  
  
  1.🚀 Introduction
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Processing scientific PDFs is not as simple as extracting text&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Many papers include tables, multiple columns, formulas, figures, and structures that can easily break when we use traditional extractors.&lt;br&gt;
The problem becomes even bigger when those documents are private. We do not always want to depend completely on multimodal models to analyze them, and the cost can also grow quickly when we work with many files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5em26jfi9wb7z5b57tq2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5em26jfi9wb7z5b57tq2.png" alt=" " width="799" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few months ago, I attended &lt;strong&gt;PyData Berlin&lt;/strong&gt; and during one of the talks I discovered IBM &lt;strong&gt;Docling&lt;/strong&gt;, an open source project focused on intelligent document processing. What caught my attention the most was its ability to extract structured information from complex PDFs, especially scientific documents with tables, multiple columns, formulas, and layouts that are difficult to process with traditional tools.&lt;/p&gt;

&lt;p&gt;From that moment, I started thinking about how to bring this type of processing to the cloud in a simple and scalable way, while also keeping costs under control. Some current solutions for analyzing complex documents with generative AI rely heavily on multimodal models, but in scenarios where we work with large volumes of papers or private documents, cost and privacy can quickly become a problem.&lt;/p&gt;

&lt;p&gt;If you have read some of my previous articles, you have probably seen that I like to build content around a real use case. In this tutorial, I decided to work with scientific papers related to research on &lt;strong&gt;GLP-1 receptor agonists&lt;/strong&gt;, a class of medications widely studied for type 2 diabetes and obesity.&lt;/p&gt;

&lt;p&gt;These treatments are currently very popular because many people use them for weight loss purposes.&lt;/p&gt;


&lt;h2&gt;
  
  
  The objective of the tutorial
&lt;/h2&gt;

&lt;p&gt;The idea is not to build a generic search engine over the internet, but something much more interesting: a private knowledge base where you can query only your own research documents in a secure environment.&lt;br&gt;
To solve this, we are going to build an architecture based on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📦 AWS Lambda Containers&lt;/li&gt;
&lt;li&gt;📑 Amazon Bedrock Knowledge Bases&lt;/li&gt;
&lt;li&gt;🐣 PDF processing with Docling&lt;/li&gt;
&lt;li&gt;🪣 Storage in Amazon S3&lt;/li&gt;
&lt;li&gt;✂️ Chunking strategies to improve information retrieval&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During the tutorial, I will also show several real problems that I found while implementing this solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ size limits in Lambda,&lt;/li&gt;
&lt;li&gt;〰️ timeouts caused by model downloads,&lt;/li&gt;
&lt;li&gt;〰️ Docker image optimization,&lt;/li&gt;
&lt;li&gt;〰️ scientific document processing,&lt;/li&gt;
&lt;li&gt;〰️ and architecture decisions to keep a serverless and low cost approach.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The final objective will be to transform a set of scientific papers into a knowledge base that can be queried using natural language. This will allow us to ask questions about adverse effects, clinical criteria, study results, and comparisons between different research papers.&lt;/p&gt;


&lt;h1&gt;
  
  
  2.🧪 Use case
&lt;/h1&gt;

&lt;p&gt;In this tutorial, we are going to work with a set of scientific papers related to research on &lt;strong&gt;GLP-1 receptor agonists (Glucagon-Like Peptide-1)&lt;/strong&gt;, a natural hormone involved in glucose regulation, insulin secretion, and the feeling of fullness.&lt;/p&gt;

&lt;p&gt;In recent years, different treatments based on this family of molecules have appeared, and a large number of clinical studies, academic papers, and research documents have been published. These documents are related to cardiovascular outcomes, weight loss, adverse effects, and inclusion or exclusion criteria in clinical trials.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The objective of this use case&lt;/strong&gt; is not to build a search engine over the internet or use public information in real time. The idea is to &lt;code&gt;work with a private and curated set of scientific documents&lt;/code&gt;, simulating a scenario where researchers, medical teams, or research areas need to query only their own papers in a secure environment.&lt;/p&gt;

&lt;p&gt;For this &lt;strong&gt;MVP&lt;/strong&gt;, I am going to use 10 public papers as an example dataset, but the architecture is designed for scenarios where the documents can be private or belong to internal research processes.&lt;br&gt;
From these documents, we are going to build a knowledge base that allows queries using natural language, for example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ identify adverse effects reported in different studies,&lt;/li&gt;
&lt;li&gt;〰️ compare results between treatments,&lt;/li&gt;
&lt;li&gt;〰️ validate exclusion criteria in clinical trials,&lt;/li&gt;
&lt;li&gt;〰️ analyze cardiovascular outcomes,&lt;/li&gt;
&lt;li&gt;〰️ retrieve specific information across multiple scientific papers.&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  3. 🏗️ Solution Architecture
&lt;/h1&gt;

&lt;p&gt;Before going into the theoretical concepts, we are going to describe the solution that we will build.&lt;/p&gt;

&lt;p&gt;This solution is based on a &lt;strong&gt;serverless architecture&lt;/strong&gt; that processes scientific papers in &lt;code&gt;PDF&lt;/code&gt; format and later uses them as input for an &lt;strong&gt;Amazon Bedrock Knowledge Base&lt;/strong&gt; to build a &lt;code&gt;RAG&lt;/code&gt; system.&lt;/p&gt;

&lt;p&gt;The architecture clearly separates the &lt;strong&gt;ingestion and processing flow&lt;/strong&gt; from the &lt;strong&gt;intelligent query flow&lt;/strong&gt;, while keeping the solution simple and scalable.&lt;/p&gt;

&lt;p&gt;The following blueprint shows how each component connects inside the complete pipeline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs0t4fwuk7qudsweekbwr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs0t4fwuk7qudsweekbwr.png" alt=" " width="800" height="664"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In summary, this pipeline processes &lt;code&gt;PDF&lt;/code&gt; files using a &lt;strong&gt;Python Docker image&lt;/strong&gt; with &lt;strong&gt;Docling&lt;/strong&gt;, running inside an &lt;strong&gt;AWS Lambda function based on a container image&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This Lambda function transforms the files into structured documents in &lt;code&gt;Markdown&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then, these documents are stored in &lt;strong&gt;Amazon S3&lt;/strong&gt; and indexed by &lt;strong&gt;Amazon Bedrock&lt;/strong&gt;, which generates &lt;code&gt;embeddings&lt;/code&gt; and allows semantic queries over the content.&lt;/p&gt;


&lt;h1&gt;
  
  
  4. 📑 Docling: structured document extraction
&lt;/h1&gt;

&lt;p&gt;One of the main challenges when working with scientific &lt;code&gt;PDFs&lt;/code&gt; is that they are not “simple” documents. They are full of &lt;strong&gt;tables&lt;/strong&gt;, &lt;strong&gt;columns&lt;/strong&gt;, &lt;strong&gt;formulas&lt;/strong&gt;, &lt;strong&gt;figures&lt;/strong&gt;, and complex &lt;code&gt;layouts&lt;/code&gt; that are not always preserved correctly when text is extracted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IBM Docling&lt;/strong&gt; is an open source library designed for &lt;code&gt;PDF&lt;/code&gt; extraction and document structuring. Its goal is not only to extract text, but also to convert complex documents into a &lt;strong&gt;structured representation&lt;/strong&gt; that can be used in artificial intelligence pipelines and &lt;code&gt;RAG&lt;/code&gt; systems.&lt;/p&gt;

&lt;p&gt;Instead of returning messy plain text, &lt;strong&gt;Docling&lt;/strong&gt; tries to preserve the structure of the document, including the &lt;strong&gt;reading order&lt;/strong&gt;, &lt;strong&gt;tables&lt;/strong&gt;, &lt;strong&gt;formulas&lt;/strong&gt;, &lt;strong&gt;images&lt;/strong&gt;, and other key elements of the content.&lt;/p&gt;

&lt;p&gt;The following image summarizes some of the key benefits of using Docling for complex document processing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flj24wb85j54tgnwe8uxl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flj24wb85j54tgnwe8uxl.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Why use Docling?
&lt;/h2&gt;

&lt;p&gt;Traditional tools like &lt;code&gt;PyPDF&lt;/code&gt;, &lt;code&gt;PDFPlumber&lt;/code&gt;, or classic &lt;code&gt;OCR&lt;/code&gt; are usually enough for simple documents, but they can struggle when working with scientific papers that have complex &lt;code&gt;layouts&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In these cases, important information can be lost, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️&lt;strong&gt;table structure&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;column separation&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️&lt;strong&gt;relationship between text and figures&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️&lt;strong&gt;mathematical formulas&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Docling&lt;/strong&gt; appears as an alternative that tries to solve exactly these problems, generating a much more consistent output for later analysis.&lt;/p&gt;


&lt;h2&gt;
  
  
  Docling features
&lt;/h2&gt;

&lt;p&gt;Below, you can find the main features published by the library on &lt;strong&gt;Hugging Face&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;🏷️ DocTags for Efficient Tokenization – Introduces DocTags an efficient and minimal representation for documents that is fully compatible with DoclingDocuments.&lt;/li&gt;
&lt;li&gt;🔍 OCR (Optical Character Recognition) – Extracts text accurately from images.&lt;/li&gt;
&lt;li&gt;📐 Layout and Localization – Preserves document structure and document element bounding boxes.&lt;/li&gt;
&lt;li&gt;💻 Code Recognition – Detects and formats code blocks including identation.&lt;/li&gt;
&lt;li&gt;🔢 Formula Recognition – Identifies and processes mathematical expressions.&lt;/li&gt;
&lt;li&gt;📊 Chart Recognition – Extracts and interprets chart data.&lt;/li&gt;
&lt;li&gt;📑 Table Recognition – Supports column and row headers for structured table extraction.&lt;/li&gt;
&lt;li&gt;🖼️ Figure Classification – Differentiates figures and graphical elements.&lt;/li&gt;
&lt;li&gt;📝 Caption Correspondence – Links captions to relevant images and figures.&lt;/li&gt;
&lt;li&gt;📜 List Grouping – Organizes and structures list elements correctly.&lt;/li&gt;
&lt;li&gt;📄 Full-Page Conversion – Processes entire pages for comprehensive document conversion including all page elements (code, equations, tables, charts etc.)&lt;/li&gt;
&lt;li&gt;🔲 OCR with Bounding Boxes – OCR regions using a bounding box.&lt;/li&gt;
&lt;li&gt;📂 General Document Processing – Trained for both scientific and non-scientific documents.&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  🏥 Practical example: processing a medical record with Docling
&lt;/h2&gt;

&lt;p&gt;In this example, we will use a &lt;strong&gt;synthetically generated clinical record&lt;/strong&gt; in &lt;code&gt;PDF&lt;/code&gt; format to show how Docling can extract and structure information from a healthcare document.&lt;/p&gt;

&lt;p&gt;All patient data, medical records, and clinical findings are completely fictional and were created only for educational purposes. No real patient information was used.&lt;/p&gt;

&lt;p&gt;This example represents a common use case in the healthcare industry, where medical documents need to be processed, structured, and prepared for analysis with AI.&lt;/p&gt;

&lt;p&gt;In the next steps, we will use Docling to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;load and convert the PDF&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;explore the document structure and identify sections&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;extract structured patient data into a pandas DataFrame&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📌The following image shows part of the clinical record that we will process in this example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff5ellk68vn0kb5ek5354.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff5ellk68vn0kb5ek5354.png" alt=" " width="773" height="688"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  📑 Loading and converting the PDF
&lt;/h3&gt;

&lt;p&gt;In this step, we load the clinical record &lt;code&gt;PDF&lt;/code&gt; using Docling's &lt;code&gt;DocumentConverter&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Docling automatically detects the document structure and exports the result in two formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️&lt;strong&gt;Markdown&lt;/strong&gt;: a human readable output to preview the content&lt;/li&gt;
&lt;li&gt;〰️&lt;strong&gt;Dictionary&lt;/strong&gt;: programmatic access to text, tables, images, and metadata&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This structured output is what makes &lt;strong&gt;Docling&lt;/strong&gt; more powerful than a basic &lt;code&gt;PDF&lt;/code&gt; text extractor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;docling.document_converter&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DocumentConverter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PdfFormatOption&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;
&lt;span class="n"&gt;converter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DocumentConverter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;converter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;convert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;clinical_history_structured.pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# export markdown
&lt;/span&gt;&lt;span class="n"&gt;data_markdown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;export_to_markdown&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="c1"&gt;# export dict
&lt;/span&gt;&lt;span class="n"&gt;data_dict&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;export_to_dict&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;texts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data_dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;texts&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🗂️ Exploring document sections
&lt;/h3&gt;

&lt;p&gt;Every clinical record is organized into sections. Here, we extract all the &lt;strong&gt;section headers&lt;/strong&gt; detected by &lt;strong&gt;Docling&lt;/strong&gt;, such as &lt;code&gt;Patient Identification&lt;/code&gt;, &lt;code&gt;Chief Complaint&lt;/code&gt;, and &lt;code&gt;Laboratory Results&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This gives us:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ A &lt;strong&gt;map of the document structure&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ The ability to &lt;strong&gt;target specific sections&lt;/strong&gt; for downstream processing
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;data_dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;texts&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;label&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;section_header&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;['CITYVIEW MEDICAL CENTER CLINICAL HISTORY AND RECORD',
 '1. PATIENT IDENTIFICATION',
 '4. PAST MEDICAL HISTORY',
 '5. MEDICATIONS',
 '6. ALLERGIES',
 '2. CHIEF COMPLAINT',
 '3. HISTORY OF PRESENT ILLNESS',
 '7. FAMILY HISTORY',
 '8. SOCIAL HISTORY',
 '9. REVIEW OF SYSTEMS',
 '10. PHYSICAL EXAMINATION',
 '12. LABORATORY RESULTS',
 '13. ASSESSMENT',
 '14. PLAN',
 '11. IMAGING']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🧩 Extracting patient data as a structured table
&lt;/h3&gt;

&lt;p&gt;Now we extract the content of the first section, &lt;strong&gt;Patient Identification&lt;/strong&gt;, by filtering the items that belong to &lt;code&gt;#/groups/0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docling&lt;/strong&gt; preserves the &lt;code&gt;key value&lt;/code&gt; layout of the original &lt;code&gt;PDF&lt;/code&gt;, so we can split the flat list into field names and values using Python slice notation.&lt;/p&gt;

&lt;p&gt;The result is a clean &lt;code&gt;pandas DataFrame&lt;/code&gt; ready for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ Analysis&lt;/li&gt;
&lt;li&gt;〰️ Storage&lt;/li&gt;
&lt;li&gt;〰️ Downstream AI processing
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Filter group 0
&lt;/span&gt;&lt;span class="n"&gt;group_0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;orig&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;texts&lt;/span&gt; 
           &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;parent&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{}).&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;$ref&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;#/groups/0&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="c1"&gt;# Convert the flat list into key value pairs
&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;group_0&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  
&lt;span class="n"&gt;values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;group_0&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;  
&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DataFrame&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;field&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;value&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;values&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="n"&gt;df&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fastxdp5eceu16vp235po.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fastxdp5eceu16vp235po.png" alt=" " width="533" height="306"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tables&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;export_to_dataframe&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4k6owfjn0fbxebg21c5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4k6owfjn0fbxebg21c5.png" alt=" " width="516" height="145"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  5. ⚡ AWS Lambda
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;AWS Lambda&lt;/strong&gt; is a &lt;code&gt;serverless&lt;/code&gt; service that allows you to run code without managing infrastructure. It scales automatically and you only pay for what you use.&lt;br&gt;
It is commonly used for &lt;strong&gt;file processing&lt;/strong&gt;, &lt;strong&gt;service integration&lt;/strong&gt;, &lt;strong&gt;scheduled tasks&lt;/strong&gt;, and &lt;strong&gt;real time event processing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;However, even though it is one of the most used services in the &lt;code&gt;serverless&lt;/code&gt; ecosystem, some limitations appear quickly when we start working with heavier &lt;code&gt;workloads&lt;/code&gt; or complex dependencies.&lt;br&gt;
Some of the main limitations are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;memory and CPU limits&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;maximum execution timeout&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;deployment package size restrictions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;the need to use ZIP files or Layers for dependencies&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;cold starts in heavier workloads&lt;/strong&gt;
These restrictions mean that, in some cases, traditional Lambda is not enough to run &lt;code&gt;workloads&lt;/code&gt; such as intensive &lt;code&gt;PDF&lt;/code&gt; processing or libraries with large dependencies.&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  6. 🐳 AWS Lambda Containers
&lt;/h1&gt;

&lt;p&gt;To solve part of these limitations, &lt;strong&gt;AWS Lambda&lt;/strong&gt; allows you to run functions using &lt;strong&gt;container images&lt;/strong&gt; instead of &lt;code&gt;ZIP&lt;/code&gt; packages.&lt;br&gt;
This approach allows you to package the function as a &lt;strong&gt;Docker image&lt;/strong&gt;, push it to &lt;strong&gt;Amazon Elastic Container Registry&lt;/strong&gt;, and run it directly from &lt;strong&gt;Lambda&lt;/strong&gt;.&lt;br&gt;
The main advantage is that it significantly increases the size limit, up to &lt;code&gt;10 GB&lt;/code&gt;. This makes it possible to include heavy dependencies, predownloaded models, or complex libraries like &lt;strong&gt;Docling&lt;/strong&gt; without needing workarounds with &lt;strong&gt;Layers&lt;/strong&gt;.&lt;br&gt;
In this project, this option is key because it allows us to run &lt;strong&gt;Docling&lt;/strong&gt; inside &lt;strong&gt;Lambda&lt;/strong&gt; without compromising dependencies or the &lt;code&gt;runtime&lt;/code&gt;.&lt;br&gt;
The following image summarizes the key benefits of using &lt;strong&gt;Lambda Containers&lt;/strong&gt; for this type of workload.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96yap6duqm3g96601trt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F96yap6duqm3g96601trt.png" alt=" " width="799" height="444"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Deploying a Docling Lambda Container to AWS
&lt;/h2&gt;

&lt;p&gt;As we saw in the previous section, the limitations of traditional &lt;strong&gt;Lambda&lt;/strong&gt; make it difficult to run heavy libraries like &lt;strong&gt;Docling&lt;/strong&gt; using &lt;code&gt;ZIP&lt;/code&gt; packages or &lt;strong&gt;Layers&lt;/strong&gt;.&lt;br&gt;
To solve this, we are going to run &lt;strong&gt;AWS Lambda&lt;/strong&gt; from a &lt;strong&gt;container image&lt;/strong&gt;. This allows us to package &lt;strong&gt;Docling&lt;/strong&gt;, its dependencies, and its models inside a &lt;strong&gt;Docker image&lt;/strong&gt;, and deploy it using &lt;strong&gt;Amazon Elastic Container Registry&lt;/strong&gt; (&lt;code&gt;ECR&lt;/code&gt;).&lt;br&gt;
In this section, we are going to build the image, push it to &lt;strong&gt;AWS&lt;/strong&gt;, and use it inside &lt;strong&gt;Lambda&lt;/strong&gt; to process our scientific papers.&lt;br&gt;
The following image shows the deployment flow that we will follow step by step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgp5p3jbntzcqfaabcpjv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgp5p3jbntzcqfaabcpjv.png" alt=" " width="799" height="444"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before starting, you need to have:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;AWS CLI&lt;/strong&gt; installed and configured &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker&lt;/strong&gt; installed with &lt;code&gt;buildx&lt;/code&gt; support &lt;/li&gt;
&lt;li&gt;Repository cloned locally &lt;/li&gt;
&lt;li&gt;Create &lt;strong&gt;Amazon S3&lt;/strong&gt; bucket named &lt;code&gt;docling-papers-tutorial&lt;/code&gt;, with the &lt;code&gt;PDFs&lt;/code&gt; that we are going to process already uploaded &lt;/li&gt;
&lt;li&gt;You also need an &lt;strong&gt;IAM user&lt;/strong&gt; with permissions to create images in &lt;strong&gt;ECR&lt;/strong&gt; and deploy &lt;strong&gt;Lambda&lt;/strong&gt; functions. In the repository, you will find &lt;code&gt;JSON&lt;/code&gt; files with the required policies inside &lt;code&gt;iam/user_policies&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Github repository&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RominaElenaMendezEscobar" rel="noopener noreferrer"&gt;
        RominaElenaMendezEscobar
      &lt;/a&gt; / &lt;a href="https://github.com/RominaElenaMendezEscobar/docling-bedrock-research-rag" rel="noopener noreferrer"&gt;
        docling-bedrock-research-rag
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Serverless RAG pipeline for turning research papers into a private knowledge base using Docling, AWS Lambda Containers, Amazon S3, and Amazon Bedrock.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/r0mymendez" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b96fd4ea89ea15fcec30a4f86382eef0bbd17454aa3a8d4de8c8c5e92b55cf6c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275792532304d6525323041253230436f666665652d737570706f72742532306d79253230776f726b2d4646444430303f7374796c653d666c6174266c6162656c436f6c6f723d313031303130266c6f676f3d6275792d6d652d612d636f66666565266c6f676f436f6c6f723d7768697465" alt="Buy Me A Coffee"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Serverless Research Paper Intelligence: Docling, Lambda Containers, and Amazon Bedrock&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/RominaElenaMendezEscobar/docling-bedrock-research-rag/img/01-preview.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRominaElenaMendezEscobar%2Fdocling-bedrock-research-rag%2FHEAD%2Fimg%2F01-preview.png" alt="01-preview"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;1.🚀 Introduction&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;The objective of the tutorial&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;The idea is not to build a generic search engine over the internet, but something much more interesting: a private knowledge base where you can query only your own research documents in a secure environment.
To solve this, we are going to build an architecture based on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;📦 AWS Lambda Containers&lt;/li&gt;
&lt;li&gt;📑 Amazon Bedrock Knowledge Bases&lt;/li&gt;
&lt;li&gt;🐣 PDF processing with Docling&lt;/li&gt;
&lt;li&gt;🗑️ Storage in Amazon S3&lt;/li&gt;
&lt;li&gt;✂️ Chunking strategies to improve information retrieval&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;During the tutorial, I will also show several real problems that I found while implementing this solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;〰️ size limits in Lambda,&lt;/li&gt;
&lt;li&gt;〰️ timeouts caused by model downloads,&lt;/li&gt;
&lt;li&gt;〰️ Docker image optimization,&lt;/li&gt;
&lt;li&gt;〰️ scientific document processing,&lt;/li&gt;
&lt;li&gt;〰️and architecture decisions to keep a serverless and low cost approach.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The final objective will be to transform a set of scientific papers into…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RominaElenaMendezEscobar/docling-bedrock-research-rag" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;





&lt;h3&gt;
  
  
  Building the Docker image
&lt;/h3&gt;

&lt;p&gt;Once the repository is cloned, we start by configuring the environment variables required for the deployment.&lt;/p&gt;

&lt;center&gt;•••••&lt;/center&gt;

&lt;h4&gt;
  
  
  Setup
&lt;/h4&gt;

&lt;p&gt;Create a &lt;code&gt;.env&lt;/code&gt; file with your credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;AWS_ACCESS_KEY_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_access_key
&lt;span class="nv"&gt;AWS_SECRET_ACCESS_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_secret_key
&lt;span class="nv"&gt;AWS_DEFAULT_REGION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then export the variables:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s1"&gt;'^#'&lt;/span&gt; .env | xargs&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AWS_ACCOUNT_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;aws sts get-caller-identity &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--query&lt;/span&gt; Account &lt;span class="nt"&gt;--output&lt;/span&gt; text&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ECR_REPO_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;docling-lambda
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;LAMBDA_FUNCTION_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;docling-lambda
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;IMAGE_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;docling-lambda
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;⚠️ Remember to add &lt;code&gt;.env&lt;/code&gt; to your &lt;code&gt;.gitignore&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 1: Verify your AWS identity
&lt;/h4&gt;

&lt;p&gt;Before deploying, verify which &lt;strong&gt;AWS account&lt;/strong&gt; and &lt;strong&gt;IAM user&lt;/strong&gt; are currently configured in your environment.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws sts get-caller-identity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;center&gt;•••••&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 2: Authenticate Docker with Amazon ECR
&lt;/h4&gt;

&lt;p&gt;This command generates a temporary &lt;strong&gt;ECR authentication token&lt;/strong&gt; and passes it to &lt;code&gt;docker login&lt;/code&gt;, so Docker can push images to your private &lt;strong&gt;ECR registry&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ecr get-login-password &lt;span class="nt"&gt;--region&lt;/span&gt; &lt;span class="nv"&gt;$AWS_DEFAULT_REGION&lt;/span&gt; | &lt;span class="se"&gt;\&lt;/span&gt;
  docker login &lt;span class="nt"&gt;--username&lt;/span&gt; AWS &lt;span class="nt"&gt;--password-stdin&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nv"&gt;$AWS_ACCOUNT_ID&lt;/span&gt;.dkr.ecr.&lt;span class="nv"&gt;$AWS_DEFAULT_REGION&lt;/span&gt;.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;⚠️ This token expires after 12 hours. Run this step again if you get authentication errors.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 3: Build the Docker image
&lt;/h4&gt;

&lt;p&gt;Now we build the Docker image from the &lt;code&gt;Dockerfile&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker buildx build &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--platform&lt;/span&gt; linux/amd64 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--provenance&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--sbom&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--no-cache&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--load&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="nv"&gt;$IMAGE_NAME&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The most important flags are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--platform linux/amd64&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Forces the &lt;code&gt;x86_64&lt;/code&gt; architecture required by AWS Lambda. This is required if you are building on an Apple Silicon Mac, such as M1, M2, or M3.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--provenance=false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disables build attestation metadata, which can cause issues with Lambda image deployments.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--sbom=false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disables Software Bill of Materials generation, which can also cause issues with Lambda deployments.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--no-cache&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Builds the image from scratch, ignoring cached layers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--load&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Loads the image into your local Docker daemon after building.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-t $IMAGE_NAME&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Tags the image with the selected image name.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 4: Tag the image for ECR
&lt;/h4&gt;

&lt;p&gt;Before pushing the image, we need to create a new tag that points to the full &lt;strong&gt;ECR repository URI&lt;/strong&gt;.&lt;br&gt;
Docker requires the image name to match the complete &lt;strong&gt;ECR URI&lt;/strong&gt; before it can push the image to the registry.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker tag &lt;span class="nv"&gt;$IMAGE_NAME&lt;/span&gt;:latest &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nv"&gt;$AWS_ACCOUNT_ID&lt;/span&gt;.dkr.ecr.&lt;span class="nv"&gt;$AWS_DEFAULT_REGION&lt;/span&gt;.amazonaws.com/&lt;span class="nv"&gt;$ECR_REPO_NAME&lt;/span&gt;:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;center&gt;•••••&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 5: Verify that the image exists locally
&lt;/h4&gt;

&lt;p&gt;Before pushing the image to &lt;strong&gt;ECR&lt;/strong&gt;, confirm that it exists in your local Docker environment.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker images
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The image should appear with both tags: the &lt;strong&gt;local tag&lt;/strong&gt; and the &lt;strong&gt;ECR tag&lt;/strong&gt;.&lt;/p&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 6: Push the image to ECR
&lt;/h4&gt;

&lt;p&gt;Now we push the image to your private &lt;strong&gt;ECR repository&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This step may take several minutes because the &lt;strong&gt;Docling image&lt;/strong&gt; is large due to the &lt;code&gt;ML&lt;/code&gt; models included inside the container.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker push &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nv"&gt;$AWS_ACCOUNT_ID&lt;/span&gt;.dkr.ecr.&lt;span class="nv"&gt;$AWS_DEFAULT_REGION&lt;/span&gt;.amazonaws.com/&lt;span class="nv"&gt;$ECR_REPO_NAME&lt;/span&gt;:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;center&gt;•••••&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 7: Update the Lambda function
&lt;/h4&gt;

&lt;p&gt;Run this step only if you need to update an existing &lt;strong&gt;Lambda function&lt;/strong&gt; with a new image version.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws lambda update-function-code &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--function-name&lt;/span&gt; &lt;span class="nv"&gt;$LAMBDA_FUNCTION_NAME&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--image-uri&lt;/span&gt; &lt;span class="nv"&gt;$AWS_ACCOUNT_ID&lt;/span&gt;.dkr.ecr.&lt;span class="nv"&gt;$AWS_DEFAULT_REGION&lt;/span&gt;.amazonaws.com/&lt;span class="nv"&gt;$ECR_REPO_NAME&lt;/span&gt;:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This command tells &lt;strong&gt;AWS Lambda&lt;/strong&gt; to use the new image that you just pushed to &lt;strong&gt;ECR&lt;/strong&gt;.&lt;br&gt;
Lambda will pull the image from &lt;strong&gt;ECR&lt;/strong&gt; and deploy it automatically.&lt;/p&gt;


&lt;h1&gt;
  
  
  7. 🧯 Real problems during the deployment
&lt;/h1&gt;
&lt;h2&gt;
  
  
  What I had to solve to run Docling on Lambda
&lt;/h2&gt;

&lt;p&gt;Up to this point, the flow looks relatively simple: build the image, push it to &lt;strong&gt;ECR&lt;/strong&gt;, and deploy the &lt;strong&gt;Lambda function&lt;/strong&gt;.&lt;br&gt;
However, when working with heavy libraries like &lt;strong&gt;Docling&lt;/strong&gt;, several problems started to appear. These problems were related to the image size, the Lambda &lt;code&gt;runtime&lt;/code&gt;, and the download of models during execution.&lt;br&gt;
This section summarizes some of the real problems I found during the implementation and the solutions I finally applied.&lt;/p&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h2&gt;
  
  
  Reducing the image size
&lt;/h2&gt;

&lt;p&gt;One of the first problems I ran into was related to the &lt;strong&gt;Docker image size&lt;/strong&gt;. When working with libraries like &lt;strong&gt;Docling&lt;/strong&gt;, which include ML models and multiple heavy dependencies, the final image can grow considerably. &lt;br&gt;
To avoid issues during the build and push process, I added a cleanup step inside the &lt;code&gt;Dockerfile&lt;/code&gt; to remove temporary files, &lt;code&gt;__pycache__&lt;/code&gt; folders, and compiled &lt;code&gt;.pyc&lt;/code&gt; files.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clean up temporary files to reduce image size&lt;/span&gt;
RUN find /var/lang/lib/python3.12/site-packages &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-type&lt;/span&gt; d &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"__pycache__"&lt;/span&gt; &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; + 2&amp;gt;/dev/null &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
find /var/lang/lib/python3.12/site-packages &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*.pyc"&lt;/span&gt; &lt;span class="nt"&gt;-delete&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Although this may look like a small optimization, this type of cleanup helps reduce the final size of images with many Python dependencies.&lt;/p&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h2&gt;
  
  
  Avoiding timeouts and model downloads at runtime
&lt;/h2&gt;

&lt;p&gt;Another important problem appeared during the first executions of the &lt;strong&gt;Lambda function&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In the version used in this project, &lt;strong&gt;Docling&lt;/strong&gt; tried to automatically download the models at startup if they were not found locally. This caused timeouts and also created another issue: the &lt;strong&gt;Lambda&lt;/strong&gt; filesystem is read only outside the temporary directory, &lt;br&gt;
which means models cannot be downloaded or saved there at runtime.&lt;/p&gt;

&lt;p&gt;To solve this, I decided to predownload the models during the &lt;strong&gt;Docker&lt;/strong&gt; build and store them directly inside the image.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;Dockerfile&lt;/code&gt;, I added the following:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Copy and run model download script&lt;/span&gt;
COPY download_models.py /tmp/download_models.py

RUN &lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /opt/docling-models &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
python3.12 /tmp/download_models.py &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; /tmp/download_models.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The script initializes a &lt;code&gt;DocumentConverter&lt;/code&gt;, which forces the required &lt;strong&gt;Docling&lt;/strong&gt; models to be downloaded during the image build instead of during Lambda execution.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;docling.document_converter&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DocumentConverter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PdfFormatOption&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;docling.datamodel.base_models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;InputFormat&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;docling.datamodel.pipeline_options&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;PdfPipelineOptions&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;

   &lt;span class="n"&gt;artifacts_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/opt/docling-models&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="n"&gt;pipeline_options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;PdfPipelineOptions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="n"&gt;artifacts_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;artifacts_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;do_ocr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;
   &lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="n"&gt;converter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DocumentConverter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="n"&gt;format_options&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
           &lt;span class="n"&gt;InputFormat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PDF&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;PdfFormatOption&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
               &lt;span class="n"&gt;pipeline_options&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;pipeline_options&lt;/span&gt;
           &lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt;
   &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
   &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;✓ Models downloaded successfully&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With this approach, the models are packaged inside the container and the &lt;strong&gt;Lambda function&lt;/strong&gt; can start much faster, avoiding unnecessary downloads and problems related to the restricted filesystem.&lt;/p&gt;


&lt;h1&gt;
  
  
  8. 🔁 Orchestrated paper processing
&lt;/h1&gt;

&lt;p&gt;The following function corresponds to the &lt;strong&gt;orchestration Lambda&lt;/strong&gt;. Its goal is to list the papers stored in &lt;strong&gt;Amazon S3&lt;/strong&gt; and run the processing by invoking the &lt;code&gt;docling-lambda&lt;/code&gt; function, which contains the &lt;strong&gt;Docker image&lt;/strong&gt; with &lt;strong&gt;Docling&lt;/strong&gt;.&lt;br&gt;
In this case, the processing is done in a distributed way. Each &lt;code&gt;PDF&lt;/code&gt; file is sent individually to the Lambda function responsible for converting the document into &lt;code&gt;Markdown&lt;/code&gt;.&lt;br&gt;
In the repository, you will find an implementation similar to the following:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;botocore.config&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Config&lt;/span&gt;

&lt;span class="n"&gt;s3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;s3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;lambda_client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
   &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;lambda&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;Config&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="n"&gt;read_timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;900&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;connect_timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;retries&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max_attempts&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
   &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;BUCKET&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;docling-papers-tutorial&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;DOCLING_LAMBDA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;docling-lambda&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;lambda_handler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;

   &lt;span class="c1"&gt;# List PDFs
&lt;/span&gt;   &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list_objects_v2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="n"&gt;Bucket&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;BUCKET&lt;/span&gt;
   &lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="n"&gt;pdfs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
       &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
       &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Contents&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;
       &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;endswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;]&lt;/span&gt;

   &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PDFs found: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pdfs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

   &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;pdf_key&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pdfs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

       &lt;span class="n"&gt;s3_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;s3://&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;BUCKET&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pdf_key&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

       &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Processing: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;s3_url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

       &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;lambda_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
           &lt;span class="n"&gt;FunctionName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;DOCLING_LAMBDA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;InvocationType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;RequestResponse&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="n"&gt;Payload&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;s3_url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;s3_url&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
       &lt;span class="p"&gt;)&lt;/span&gt;

       &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Payload&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

       &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;s3_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;output&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;output&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="p"&gt;})&lt;/span&gt;

       &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;✓ &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pdf_key&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; → &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;output&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;processed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
       &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;results&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Once the function is deployed, we can execute the &lt;strong&gt;Lambda function&lt;/strong&gt; and analyze the results from &lt;strong&gt;CloudWatch&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkzjfc1uinsznqs8gqd3d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkzjfc1uinsznqs8gqd3d.png" alt=" " width="661" height="521"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;In my tests with these 10 papers, the average was approximately 3.8 seconds per page. This can vary significantly depending on document complexity&lt;/p&gt;

&lt;p&gt;This confirms something important: the processing time depends much more on the &lt;strong&gt;complexity of the content&lt;/strong&gt;, such as tables, images, multiple columns, or figures, than on the file size or the number of pages.&lt;/p&gt;


&lt;h1&gt;
  
  
  9. 🟩 Amazon Bedrock Knowledge Base
&lt;/h1&gt;

&lt;p&gt;Before configuring our &lt;strong&gt;Knowledge Base&lt;/strong&gt;, it is worth understanding what this service is inside &lt;strong&gt;Amazon Bedrock&lt;/strong&gt; and why it plays a key role in a &lt;code&gt;RAG&lt;/code&gt; architecture.&lt;/p&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h2&gt;
  
  
  What is a Knowledge Base?
&lt;/h2&gt;

&lt;p&gt;In simple terms, a &lt;strong&gt;Knowledge Base&lt;/strong&gt; is a layer that connects private data with artificial intelligence models, so they can use that information as context to answer questions.&lt;/p&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h2&gt;
  
  
  What is a Knowledge Base in Amazon Bedrock?
&lt;/h2&gt;

&lt;p&gt;In &lt;strong&gt;Amazon Bedrock&lt;/strong&gt;, a &lt;strong&gt;Knowledge Base&lt;/strong&gt; is a fully managed service that allows you to build &lt;code&gt;RAG&lt;/code&gt; systems over your own data.&lt;br&gt;
This means that models can query information stored in a knowledge base to generate more accurate and contextualized answers based on private data.&lt;br&gt;
The following image summarizes the key benefits of using &lt;strong&gt;Amazon Bedrock Knowledge Bases&lt;/strong&gt; in this type of architecture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw0auzc4jjepyg91fla4j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw0auzc4jjepyg91fla4j.png" alt=" " width="799" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, it includes capabilities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;automatic embedding management&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;context management&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;source attribution in the answers&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;direct integration with private data&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h2&gt;
  
  
  Supported data sources
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;Knowledge Base&lt;/strong&gt; in &lt;strong&gt;Amazon Bedrock&lt;/strong&gt; can connect to different data sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ 🪣 &lt;strong&gt;Amazon S3&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ 🟦 &lt;strong&gt;Confluence&lt;/strong&gt; depending on availability&lt;/li&gt;
&lt;li&gt;〰️ ☁️ &lt;strong&gt;Salesforce&lt;/strong&gt; depending on availability&lt;/li&gt;
&lt;li&gt;〰️ 📑 &lt;strong&gt;Custom data sources&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;〰️ 🕸️ &lt;strong&gt;Web Crawler&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Availability can depend on the AWS Region and account configuration.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this use case, we are mainly going to work with &lt;strong&gt;Amazon S3&lt;/strong&gt;, where we store the documents processed with &lt;strong&gt;Docling&lt;/strong&gt;.&lt;/p&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h2&gt;
  
  
  Chunking: how information is divided
&lt;/h2&gt;

&lt;p&gt;One of the most important concepts when building a &lt;strong&gt;Knowledge Base&lt;/strong&gt; is &lt;code&gt;chunking&lt;/code&gt;, which is the process of dividing documents into smaller parts called &lt;code&gt;chunks&lt;/code&gt;.&lt;br&gt;
This is necessary because models have context limitations and cannot process very long documents all at once.&lt;/p&gt;

&lt;p&gt;We can understand this from two perspectives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;Context limit&lt;/strong&gt;: models can only handle a limited number of &lt;code&gt;tokens&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;Efficient search&lt;/strong&gt;: dividing the content allows the system to retrieve more precise information faster
In this project, &lt;code&gt;chunking&lt;/code&gt; is key because we are working with scientific papers, where the context between sections is very important, for example: results, methods, and adverse effects.
The following image describes the main &lt;code&gt;chunking&lt;/code&gt; features available in &lt;strong&gt;Amazon Bedrock Knowledge Bases&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhk6h7yxz0blu7s3x059m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhk6h7yxz0blu7s3x059m.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h2&gt;
  
  
  Step by step configuration
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Creating the Knowledge Base in Amazon Bedrock
&lt;/h3&gt;

&lt;p&gt;In this section, we are going to configure the &lt;strong&gt;Knowledge Base&lt;/strong&gt; in &lt;strong&gt;Amazon Bedrock&lt;/strong&gt; using the papers processed with &lt;strong&gt;Docling&lt;/strong&gt; and stored in &lt;strong&gt;Amazon S3&lt;/strong&gt; in &lt;code&gt;Markdown&lt;/code&gt; format.&lt;br&gt;
The &lt;code&gt;chunking&lt;/code&gt; strategy selected for this use case is &lt;strong&gt;Hierarchical Chunking&lt;/strong&gt;, because it allows us to keep the relationship between document sections, for example results, methods, or adverse effects. This is key when working with scientific papers.&lt;/p&gt;

&lt;p&gt;Below, I explain why I did not choose the other strategies and what each one implies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ ❌ &lt;strong&gt;Default&lt;/strong&gt;: uses the default chunking configuration, which may split content without preserving the full document structure.&lt;/li&gt;
&lt;li&gt;〰️ ❌ &lt;strong&gt;Fixed size&lt;/strong&gt;: similar to the default strategy, but configurable. It still has the same problem of losing context.&lt;/li&gt;
&lt;li&gt;〰️ ❌ &lt;strong&gt;Semantic&lt;/strong&gt;: groups content by semantic similarity. It can be useful, but it may add extra processing time and can be less predictable depending on the documents.&lt;/li&gt;
&lt;li&gt;〰️ ❌ &lt;strong&gt;No chunking&lt;/strong&gt;:  useful when documents are already small or manually preprocessed into meaningful units.&lt;/li&gt;
&lt;li&gt;〰️ ✅ &lt;strong&gt;Hierarchical&lt;/strong&gt;: keeps a parent child structure, allowing each chunk to preserve its context inside the document.&lt;/li&gt;
&lt;/ul&gt;

&lt;center&gt;•••••&lt;/center&gt;
&lt;h3&gt;
  
  
  Prerequisites and permissions
&lt;/h3&gt;

&lt;p&gt;To create a &lt;strong&gt;Knowledge Base&lt;/strong&gt;, you need to consider the following permissions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;IAM&lt;/strong&gt;: create or select roles with the right permissions&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;Bedrock&lt;/strong&gt;: access to Knowledge Bases and embedding models&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;S3&lt;/strong&gt;: access to the bucket where the processed documents are stored&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;KMS&lt;/strong&gt;: optional, for data encryption&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;Lambda&lt;/strong&gt;: optional, for custom data transformations &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ AWS does not support creating a Knowledge Base using root user credentials — you need an IAM user or role with the right permissions. Permission configuration is usually one of the most delicate parts of this type of architecture.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;center&gt;_______________&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 1: Create the Knowledge Base
&lt;/h4&gt;

&lt;p&gt;In &lt;strong&gt;Amazon Bedrock&lt;/strong&gt;, go to the &lt;strong&gt;Knowledge Bases&lt;/strong&gt; section and select &lt;code&gt;Create knowledge base with vector store&lt;/code&gt;.&lt;br&gt;
Complete the configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name&lt;/strong&gt;: &lt;code&gt;docling-glp1-papers-kb&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Description&lt;/strong&gt;: &lt;code&gt;Knowledge base with GLP-1 papers processed with Docling and Lambda&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM Role&lt;/strong&gt;: &lt;code&gt;AmazonBedrockExecutionRoleForKnowledgeBase-docling&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data source&lt;/strong&gt;: &lt;code&gt;Amazon S3&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgt4qegghq1cj0ujwrayv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgt4qegghq1cj0ujwrayv.png" alt=" " width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhaejmc9kj9m7p2vx54e6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhaejmc9kj9m7p2vx54e6.png" alt=" " width="799" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;_______________&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 2: Configure the data source
&lt;/h4&gt;

&lt;p&gt;Configure the data source with the following values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;Source name&lt;/strong&gt;: &lt;code&gt;docling-glp1-papers-ds&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;S3 path&lt;/strong&gt;: &lt;code&gt;s3://docling-papers-tutorial/output/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;Parsing strategy&lt;/strong&gt;: &lt;code&gt;Amazon Bedrock default parser&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;Chunking strategy&lt;/strong&gt;: &lt;code&gt;Hierarchical chunking&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygwp16arv2gwnnr5t7qf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygwp16arv2gwnnr5t7qf.png" alt=" " width="800" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;_______________&lt;/center&gt;
&lt;h4&gt;
  
  
  Step 3: Vector store and embeddings
&lt;/h4&gt;

&lt;p&gt;Here, we are going to select the model that we will use to create the &lt;code&gt;RAG&lt;/code&gt; system and the destination where the information will be stored.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;strong&gt;Embeddings model&lt;/strong&gt;: &lt;code&gt;Titan Text Embeddings v2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;Vector store&lt;/strong&gt;: &lt;code&gt;Amazon S3 Vectors&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this case, we use &lt;code&gt;on demand&lt;/code&gt; mode, although other models are available depending on the use case.&lt;br&gt;
After that, we select the &lt;strong&gt;Amazon S3 bucket&lt;/strong&gt; used by &lt;strong&gt;S3 Vectors&lt;/strong&gt; to store the vector index.&lt;/p&gt;

&lt;p&gt;To better understand how this type of storage works, you can check a previous article I wrote:&lt;/p&gt;


&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/aws-builders/from-coffee-products-to-ai-search-building-a-serverless-semantic-search-architecture-with-amazon-5g5b" class="crayons-story__hidden-navigation-link"&gt;From Coffee Products to AI Search: Building a Serverless Semantic Search Architecture with Amazon S3 Vectors and Bedrock&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;
          &lt;a class="crayons-logo crayons-logo--l" href="/aws-builders"&gt;
            &lt;img alt="AWS Community Builders  logo" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F2794%2F88da75b6-aadd-4ea1-8083-ae2dfca8be94.png" class="crayons-logo__image" width="350" height="350"&gt;
          &lt;/a&gt;

          &lt;a href="/r_elena_mendez_escobar" class="crayons-avatar  crayons-avatar--s absolute -right-2 -bottom-2 border-solid border-2 border-base-inverted  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F719582%2F2d700dae-2335-4c2f-9a32-4435184a4f4f.jpeg" alt="r_elena_mendez_escobar profile" class="crayons-avatar__image" width="200" height="200"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/r_elena_mendez_escobar" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Romina Elena Mendez Escobar
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Romina Elena Mendez Escobar
                
              
              &lt;div id="story-author-preview-content-3137085" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/r_elena_mendez_escobar" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F719582%2F2d700dae-2335-4c2f-9a32-4435184a4f4f.jpeg" class="crayons-avatar__image" alt="" width="200" height="200"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Romina Elena Mendez Escobar&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

            &lt;span&gt;
              &lt;span class="crayons-story__tertiary fw-normal"&gt; for &lt;/span&gt;&lt;a href="/aws-builders" class="crayons-story__secondary fw-medium"&gt;AWS Community Builders &lt;/a&gt;
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;a href="https://dev.to/aws-builders/from-coffee-products-to-ai-search-building-a-serverless-semantic-search-architecture-with-amazon-5g5b" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Dec 31 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/aws-builders/from-coffee-products-to-ai-search-building-a-serverless-semantic-search-architecture-with-amazon-5g5b" id="article-link-3137085"&gt;
          From Coffee Products to AI Search: Building a Serverless Semantic Search Architecture with Amazon S3 Vectors and Bedrock
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aws"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aws&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/python"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;python&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/cloud"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;cloud&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/aws-builders/from-coffee-products-to-ai-search-building-a-serverless-semantic-search-architecture-with-amazon-5g5b" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;6&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/aws-builders/from-coffee-products-to-ai-search-building-a-serverless-semantic-search-architecture-with-amazon-5g5b#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              1&lt;span class="hidden s:inline"&gt;&amp;nbsp;comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            21 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfydh7fty5c1y0o7xpsa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnfydh7fty5c1y0o7xpsa.png" alt=" " width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;_______________&lt;/center&gt;

&lt;h4&gt;
  
  
  Step 4: Data synchronization
&lt;/h4&gt;

&lt;p&gt;Once the &lt;strong&gt;Knowledge Base&lt;/strong&gt; is created, its initial status will be &lt;code&gt;Available&lt;/code&gt;.&lt;br&gt;
To load the documents, you need to run a manual synchronization:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ Go to the &lt;strong&gt;Knowledge Base&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;〰️ Select the &lt;strong&gt;data source&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;〰️ Click on &lt;code&gt;Sync&lt;/code&gt;
This synchronization processes the documents, generates the required &lt;code&gt;embeddings&lt;/code&gt;, and makes the content available for natural language queries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcc2z6ec3b5xj9l1agh0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcc2z6ec3b5xj9l1agh0p.png" alt=" " width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvtr8f013m0bw2u82fcy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvtr8f013m0bw2u82fcy.png" alt=" " width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  10. 🟩 BEDROCK: Test the Knowledge Base
&lt;/h1&gt;

&lt;p&gt;Now we return to the point where we left off a few steps ago: testing our &lt;strong&gt;Knowledge Base&lt;/strong&gt; with the processed papers.&lt;/p&gt;

&lt;p&gt;The idea in this stage is to validate whether the system can retrieve relevant information from the &lt;code&gt;10&lt;/code&gt; scientific papers that we previously loaded and processed.&lt;/p&gt;

&lt;p&gt;To do this, we are going to ask some questions focused on clinical analysis and study comparison:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;What gastrointestinal adverse effects were reported in semaglutide clinical trials and what were the incidence rates?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;What were the cardiovascular outcomes reported in semaglutide clinical trials and which patient populations benefited most?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;How does semaglutide compare to liraglutide and tirzepatide in terms of weight loss efficacy and adverse effects across the clinical trials?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These queries allow us to evaluate how the system retrieves specific information across different studies, especially in scenarios where the results are distributed across multiple documents.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwojcdfi7qb54q1lhbdy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwojcdfi7qb54q1lhbdy.png" alt=" " width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvd8etexylm9mu75t2b3a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvd8etexylm9mu75t2b3a.png" alt=" " width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  11. 🎯 Conclusions
&lt;/h1&gt;

&lt;p&gt;This MVP shows that it is possible to build a queryable &lt;strong&gt;knowledge base&lt;/strong&gt; over private scientific documents using &lt;strong&gt;AWS serverless services&lt;/strong&gt; together with open source tools like &lt;strong&gt;Docling&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learned while building this system:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ The &lt;code&gt;chunking&lt;/code&gt; strategy matters more than it may seem. In the case of scientific papers, &lt;strong&gt;Hierarchical Chunking&lt;/strong&gt; preserves the context between sections such as &lt;code&gt;Results&lt;/code&gt; or &lt;code&gt;Adverse Effects&lt;/code&gt; better than fixed token based strategies.&lt;/li&gt;
&lt;li&gt;〰️ &lt;strong&gt;Docling&lt;/strong&gt; can help reduce the cost and complexity of preprocessing when working with complex &lt;code&gt;PDFs&lt;/code&gt;, especially those with tables, columns, and non linear structures. It allows us to convert these documents into structured information ready to be used in AI systems.
*〰️ &lt;code&gt;Embeddings&lt;/code&gt; are not the same as security. Even though we work with vector representations, research has shown that in some scenarios it is possible to infer or reconstruct sensitive information from embedding vectors. Because of this, treating vector stores as sensitive data and applying access controls and encryption 
is a good practice in real scenarios.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If we take this to a production environment, three pieces become fundamental:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;〰️ &lt;code&gt;CI/CD&lt;/code&gt; pipelines are necessary to automate processing and system updates as improvements are added.&lt;/li&gt;
&lt;li&gt;〰️ Infrastructure as Code with &lt;strong&gt;Terraform&lt;/strong&gt;, or similar tools, is key to replicate, scale, and maintain the environment consistently across different stages.&lt;/li&gt;
&lt;li&gt;〰️ Any solution that is deployed, especially one that uses AI models, should include observability systems to detect and solve problems in production.
In terms of impact, this type of solution opens a very relevant space in industries such as healthcare and research, where controlled access to large volumes of knowledge can significantly accelerate scientific analysis and decision making.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, beyond the tools used, the most interesting part of this architecture is how it combines different cloud services and generative AI capabilities to solve a very concrete problem: converting unstructured information into accessible, private, and queryable knowledge using natural language.&lt;/p&gt;







&lt;h1&gt;
  
  
  12. 📚 Technical references
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Amazon Web Services. (n.d.). &lt;strong&gt;AWS Lambda Developer Guide&lt;/strong&gt;. AWS Documentation. Retrieved May 26, 2026, from &lt;a href="https://docs.aws.amazon.com/es_es/lambda/latest/dg/welcome.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/es_es/lambda/latest/dg/welcome.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon Web Services. (n.d.). &lt;strong&gt;Create a Lambda function using a container image&lt;/strong&gt;. AWS Documentation. Retrieved May 26, 2026, from &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/images-create.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/lambda/latest/dg/images-create.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon Web Services. (n.d.). &lt;strong&gt;Amazon Bedrock Knowledge Bases&lt;/strong&gt;. Retrieved May 26, 2026, from &lt;a href="https://aws.amazon.com/es/bedrock/knowledge-bases/" rel="noopener noreferrer"&gt;https://aws.amazon.com/es/bedrock/knowledge-bases/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IBM. (n.d.). &lt;strong&gt;Docling&lt;/strong&gt;. Retrieved May 26, 2026, from &lt;a href="https://www.docling.ai/" rel="noopener noreferrer"&gt;https://www.docling.ai/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docling Project. (n.d.). &lt;strong&gt;SmolDocling 256M preview&lt;/strong&gt;. Hugging Face. Retrieved May 26, 2026, from &lt;a href="https://huggingface.co/docling-project/SmolDocling-256M-preview" rel="noopener noreferrer"&gt;https://huggingface.co/docling-project/SmolDocling-256M-preview&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;University of Utah Health. (2026). &lt;strong&gt;GLP 1 FAQs answered by weight loss experts&lt;/strong&gt;. Retrieved from &lt;a href="https://healthcare.utah.edu/healthfeed/2026/03/preguntas-frecuentes-sobre-el-glp-1-respondidas-por-expertos-en-perdida-de-peso" rel="noopener noreferrer"&gt;https://healthcare.utah.edu/healthfeed/2026/03/preguntas-frecuentes-sobre-el-glp-1-respondidas-por-expertos-en-perdida-de-peso&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h1&gt;
  
  
  13. 📄 Research papers used in the use case
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Han, S. H., Safeek, R., Ockerman, K., Trieu, N., Mars, P., Klenke, A., Furnas, H., &amp;amp; Sorice Virk, S. (2023). &lt;strong&gt;Public interest in the off label use of glucagon like peptide 1 agonists (Ozempic) for cosmetic weight loss: A Google Trends analysis&lt;/strong&gt;. &lt;em&gt;Aesthetic Surgery Journal&lt;/em&gt;. &lt;a href="https://doi.org/10.1093/asj/sjad211" rel="noopener noreferrer"&gt;https://doi.org/10.1093/asj/sjad211&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ryan, N., &amp;amp; Savulescu, J. (2026). &lt;strong&gt;The ethics of Ozempic and Wegovy&lt;/strong&gt;. &lt;em&gt;Journal of Medical Ethics, 52&lt;/em&gt;(3), 185–193. &lt;a href="https://doi.org/10.1136/jme-2024-110374" rel="noopener noreferrer"&gt;https://doi.org/10.1136/jme-2024-110374&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mailhac, A., Pedersen, L., Pottegård, A., Søndergaard, J., Mogensen, T., Sørensen, H. T., &amp;amp; Thomsen, R. W. (2024). &lt;strong&gt;Semaglutide (Ozempic®) use in Denmark 2018 through 2023: User trends and off label prescribing for weight loss&lt;/strong&gt;. &lt;em&gt;Clinical Epidemiology&lt;/em&gt;. &lt;a href="https://doi.org/10.2147/CLEP.S456170" rel="noopener noreferrer"&gt;https://doi.org/10.2147/CLEP.S456170&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manoharan, S. V. R. R., &amp;amp; Madan, R. (2024). &lt;strong&gt;GLP 1 agonists can affect mood: A case of worsened depression on Ozempic (Semaglutide)&lt;/strong&gt;. &lt;em&gt;Case Reports in Psychiatry&lt;/em&gt;. &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC11208009/" rel="noopener noreferrer"&gt;https://pmc.ncbi.nlm.nih.gov/articles/PMC11208009/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Humphrey, C. D., &amp;amp; Lawrence, A. C. (2023). &lt;strong&gt;Implications of Ozempic and other semaglutide medications for facial plastic surgeons&lt;/strong&gt;. &lt;em&gt;Facial Plastic Surgery&lt;/em&gt;. &lt;a href="https://doi.org/10.1055/a-2148-6321" rel="noopener noreferrer"&gt;https://doi.org/10.1055/a-2148-6321&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pillarisetti, L., &amp;amp; Agrawal, D. K. (2025). &lt;strong&gt;Semaglutide: Double edged sword with risks and benefits&lt;/strong&gt;. &lt;em&gt;Archives of Internal Medicine Research, 8&lt;/em&gt;(1), 1–13. &lt;a href="https://doi.org/10.26502/aimr.0189" rel="noopener noreferrer"&gt;https://doi.org/10.26502/aimr.0189&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fong, S., Carollo, A., Lazuras, L., Corazza, O., &amp;amp; Esposito, G. (2024). &lt;strong&gt;Ozempic (Glucagon like peptide 1 receptor agonist) in social media posts: Unveiling user perspectives through Reddit topic modeling&lt;/strong&gt;. &lt;em&gt;Dialogues in Health&lt;/em&gt;. &lt;a href="https://www.sciencedirect.com/science/article/pii/S2667118224000163" rel="noopener noreferrer"&gt;https://www.sciencedirect.com/science/article/pii/S2667118224000163&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Carboni, A., Woessner, S., Martini, O., Marroquin, N. A., &amp;amp; Waller, J. (2024). &lt;strong&gt;Natural weight loss or “Ozempic Face”: Demystifying a social media phenomenon&lt;/strong&gt;. &lt;em&gt;Journal of Drugs in Dermatology, 23&lt;/em&gt;(1). &lt;a href="https://doi.org/10.36849/JDD.7613" rel="noopener noreferrer"&gt;https://doi.org/10.36849/JDD.7613&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Grech, V. S., Lotsaris, K., Grech, I., &amp;amp; Kefala, V. (2024). &lt;strong&gt;Semaglutide (Ozempic) and obesity: A comprehensive guide for aestheticians&lt;/strong&gt;. &lt;em&gt;Review of Clinical Pharmacology and Pharmacokinetics, 38&lt;/em&gt;(Suppl. 1), 31–35. &lt;a href="https://www.researchgate.net/publication/378300594_Semaglutide_Ozempic_and_obesity_A_comprehensive_guide_for_aestheticians" rel="noopener noreferrer"&gt;https://www.researchgate.net/publication/378300594_Semaglutide_Ozempic_and_obesity_A_comprehensive_guide_for_aestheticians&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Vambe, S. D., Zulu, W., Hough, E., &amp;amp; Luvhimbi, M. J. (2024). &lt;strong&gt;Semaglutide (Ozempic®): A comprehensive review of its pharmacology, efficacy, and safety profile in type 2 diabetes mellitus and weight management&lt;/strong&gt;. &lt;em&gt;SA Pharmaceutical Journal, 91&lt;/em&gt;(6), 31–34. &lt;a href="https://www.researchgate.net/publication/388790459_Semaglutide_Ozempic_R_a_comprehensive_review_of_its_pharmacology_efficacy_and_safety_profile_in_type_2_diabetes_mellitus_and_weight_management" rel="noopener noreferrer"&gt;https://www.researchgate.net/publication/388790459_Semaglutide_Ozempic_R_a_comprehensive_review_of_its_pharmacology_efficacy_and_safety_profile_in_type_2_diabetes_mellitus_and_weight_management&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>opensource</category>
      <category>python</category>
    </item>
    <item>
      <title>Google I/O 2026: What Happens When Everything Connects?</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Sat, 23 May 2026 14:03:06 +0000</pubDate>
      <link>https://dev.to/gdg/google-io-2026-what-happens-when-everything-connects-4gf8</link>
      <guid>https://dev.to/gdg/google-io-2026-what-happens-when-everything-connects-4gf8</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-io-writing-2026-05-19"&gt;Google I/O Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Google I/O 2026 showed us something that goes beyond a list of launches: a vision of where technology is heading.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkw4zvgqlhzhv9mojzja.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkw4zvgqlhzhv9mojzja.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Image created by the author&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;

&lt;p&gt;Sundar Pichai (Google CEO) opened the presentation sharing some interesting numbers about the *&lt;em&gt;evolution of AI with Google statistics&lt;/em&gt; that you can see in the following &lt;code&gt;infographic&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8ry4llkx539e5i2kkh7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8ry4llkx539e5i2kkh7.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Infographic created by the author&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;

&lt;p&gt;&lt;strong&gt;But let’s get back to the event…&lt;/strong&gt;&lt;br&gt;
Over two hours, Google announced a wide range of products, updates and platforms. From new AI models to &lt;strong&gt;smart glasses&lt;/strong&gt;, from &lt;strong&gt;music generation tools&lt;/strong&gt; to a &lt;strong&gt;digital twin&lt;/strong&gt; of the entire planet.&lt;br&gt;
What stands out is not any single product on its own, but the way they are designed to work together. Most of them are not meant to exist in isolation but to integrate with each other and with the models Google is deploying across its ecosystem.&lt;/p&gt;

&lt;p&gt;Below you will find all the launches organized by category, with my take on each one and direct links to the exact moment in the keynote where it was announced.&lt;/p&gt;


&lt;h2&gt;
  
  
  🧠 Models &amp;amp; Infrastructure
&lt;/h2&gt;

&lt;p&gt;Behind almost everything presented at &lt;strong&gt;Google I/O 2026&lt;/strong&gt; has the same foundation: more advanced models and an infrastructure designed to scale new forms of interaction between people and systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Firc0l77fk4toyvknoz0z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Firc0l77fk4toyvknoz0z.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Image created by the author&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;
&lt;h3&gt;
  
  
  Gemini Omni
&lt;/h3&gt;

&lt;p&gt;The first model that allows you to modify videos using natural language, with inputs that can be images, text or video. But it is not just about understanding text, images, audio and video at the same time;  it is about reasoning over all of them together to generate something new.&lt;br&gt;
What sets it apart from any previous video generator is that it combines an intuitive understanding of physics with real knowledge about history, science and cultural context. So you can take a video you recorded and ask it to change what happens in it, edit the action, add characters, transform a moment into something completely unexpected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Gemini Omni&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=1035s" rel="noopener noreferrer"&gt;17:15&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Gemini 3.5 Flash
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Gemini 3.5 Flash&lt;/strong&gt; is the direct evolution of the main line of large language models (LLM) from Google, optimized to deliver ultra-high speed performance, advanced logical reasoning capabilities and code orchestration. It is an ideal model for building autonomous agents capable of executing complex task flows in the background, writing code, processing large text contexts or powering searches.&lt;br&gt;
All of this while being four times faster than comparable models, which makes it the option specifically designed for agentic tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Gemini 3.5 Flash&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=1423s" rel="noopener noreferrer"&gt;23:43&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🤖 Agents &amp;amp; Productivity: Your Digital Life, Managed
&lt;/h2&gt;

&lt;p&gt;This is one of the categories I enjoyed the most, featuring several tools that change the way we work and organize our daily tasks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4vtld5dmdo6yj2la756.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4vtld5dmdo6yj2la756.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Image created by the author&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;
&lt;h3&gt;
  
  
  Gemini Spark
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Gemini Spark&lt;/strong&gt; is a &lt;strong&gt;personal AI agent&lt;/strong&gt; that runs tasks in the background, across all your applications, without you having to supervise every step. With Spark you can organize an event, manage a chain of emails, coordinate a complex task across multiple services.&lt;br&gt;
It also connects with external tools through the open MCP protocol, which extends its reach beyond the Google ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Gemini Spark&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=2118s" rel="noopener noreferrer"&gt;35:18&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Daily Brief
&lt;/h3&gt;

&lt;p&gt;Google has been offering AI summaries for a while, but Daily Brief is something different. Instead of summarizing a document you provide, it reads your chats, your Gmail emails, your calendar context and your pending tasks, and then prioritizes what matters for your day. The difference between a generic summary and one that actually understands your context is significant, and that is exactly what Daily Brief proposes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Daily Brief&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=4506s" rel="noopener noreferrer"&gt;1:15:06&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Ask YouTube
&lt;/h3&gt;

&lt;p&gt;Ask YouTube changes the search bar we know on YouTube into a conversation. You can ask for a summary, a specific recommendation, or request to find exactly what you need at a precise moment without watching the full video.&lt;br&gt;
What I find most interesting is the impact on creators. The algorithm can now understand the deeper context of content and recommend videos that used to stay hidden behind generic titles. For creators, this is an opportunity, and for content consumption in general, it changes the way we interact with the platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Ask YouTube&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=461s" rel="noopener noreferrer"&gt;7:41&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Docs Live
&lt;/h3&gt;

&lt;p&gt;Docs Live changes the way we create documents. While it's already possible to create content using Gemini's voice input options, this solution lets you share your ideas aloud, and Gemini will start creating a document, formatting, structuring, and writing the text in real time.&lt;br&gt;
The key difference from Gemini's existing voice input is that the result isn't a chat response; it's a properly formatted Google Docs document, complete with headings, lists, and a professional structure right from the start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Docs Live&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=554s" rel="noopener noreferrer"&gt;9:14&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🔍 Search &amp;amp; Commerce: Your Next Purchase Will Be Made by an Agent
&lt;/h2&gt;

&lt;p&gt;AI search is already part of our daily routine, but this year Google took it further, turning search from a simple query into an agent that can look for information and even make purchases on your behalf.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz9v58xfxzmj692e7whs0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz9v58xfxzmj692e7whs0.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Image created by the author&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;
&lt;h3&gt;
  
  
  AI Search Box
&lt;/h3&gt;

&lt;p&gt;The new search box is no longer limited to text. It now accepts &lt;code&gt;images&lt;/code&gt;, &lt;code&gt;files&lt;/code&gt;, &lt;code&gt;videos&lt;/code&gt; and even &lt;code&gt;Chrome tabs&lt;/code&gt; as input. It may seem like a small change, but it completely transforms the experience of searching for something, powered by the new Gemini 3.5 Flash models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 AI Search Box&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=2765s" rel="noopener noreferrer"&gt;46:05&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Search Agents
&lt;/h3&gt;

&lt;p&gt;Search agents are a feature that, in my opinion, will become essential without many people noticing at first. They are background agents that you can set up to monitor specific topics, such as the value of a stock you are tracking, a flight route for an upcoming trip, or a property you want to rent in a specific neighborhood.&lt;/p&gt;

&lt;p&gt;If the &lt;strong&gt;agent detects changes&lt;/strong&gt;, it can &lt;code&gt;summarize the information&lt;/code&gt; and &lt;code&gt;notify you&lt;/code&gt;. It can pick up updates from blogs, news sites, social media, and real-time data on finance, shopping and sports.&lt;br&gt;
This changes the current experience we have with Google Alerts, which were based only on keywords, since it takes both alerts and information retrieval to a much more advanced level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Search Agents&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=2868s" rel="noopener noreferrer"&gt;47:48&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Generative UI in Search
&lt;/h3&gt;

&lt;p&gt;This announcement is quite interesting because information can already be accessed through agents, chats or other channels, but the main idea is to &lt;strong&gt;provide an interface that is intuitive for users to interpret that information&lt;/strong&gt;. Instead of returning a list of links, Search can now build a personalized interactive interface for complex queries. Here you can get a live comparison table, a dynamic chart or an interactive explanation, all generated in real time for your specific question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Generative UI&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=3077s" rel="noopener noreferrer"&gt;51:17&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Universal Cart &amp;amp; UCP + AP2
&lt;/h3&gt;

&lt;p&gt;Google is redefining the online shopping experience with two announcements. On one hand, &lt;strong&gt;Universal Cart&lt;/strong&gt; turns the shopping cart into something where you can add products, and the system then works in the background autonomously, monitoring price drops, analyzing price history and notifying you when an item becomes available again.&lt;/p&gt;

&lt;p&gt;On the other hand, &lt;strong&gt;the Universal Commerce Protocol (UCP)&lt;/strong&gt; establishes an open standard that allows all of this to scale beyond Google. It creates a common language for agents and systems to work together across the entire shopping process, from finding a product to post-purchase support, connecting consumer platforms, businesses and payment providers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UCP&lt;/strong&gt; is compatible with other key ecosystem protocols such as &lt;strong&gt;Agent2Agent (A2A)&lt;/strong&gt;, &lt;strong&gt;Agent Payments Protocol (AP2)&lt;/strong&gt; and &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;, positioning it not as a Google tool, but as the infrastructure for agentic commerce.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 AP2 Protocol&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=3677s" rel="noopener noreferrer"&gt;1:01:17&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;📍 Universal Cart&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=3793s" rel="noopener noreferrer"&gt;1:03:13&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🎬 Creative Tools: Can anyone make a movie today?
&lt;/h2&gt;

&lt;p&gt;Content creation was another area where the shift in focus at Google I/O 2026 became very clear. It is not just about generating images, music or video, but about how these tools are starting to integrate into a continuous creative flow, closer to a conversation than to a technical process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fom9uab517rmxxjsiheqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fom9uab517rmxxjsiheqb.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Image created by the author&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;
&lt;h3&gt;
  
  
  Google Flow
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Google Flow&lt;/strong&gt; is a creative platform developed by Google that allows users &lt;code&gt;to generate, edit and compose videos, images and music from prompts or images&lt;/code&gt;. In its latest update, it integrates with Gemini Omni to take video editing to a more conversational level, allowing you to change environments, add characters, and generate 16 different camera angles from a single image.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Google Flow&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=5288s" rel="noopener noreferrer"&gt;1:28:08&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Flow Music
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Flow Music&lt;/strong&gt; is a generative tool that &lt;code&gt;allows users to compose songs and create full music videos from prompts&lt;/code&gt;. It also lets you provide a reference recording and build a complete track around it, edit it section by section, reimagine the style of a song while keeping its original melody, or create music videos by directly conversing with the agent.&lt;br&gt;
I think it is an ideal tool for independent artists who develop games, apps or video content and want to create using AI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Flow Music&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=5461s" rel="noopener noreferrer"&gt;1:31:01&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Stitch
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Google Stitch&lt;/strong&gt; is a tool developed by Google Labs that uses AI to &lt;code&gt;design user interfaces (UI/UX)&lt;/code&gt;. These designs can be exported directly to code, Figma, Google Antigravity or Google AI Studio. The design process is driven by instructions that can be given through text or voice, and it is generated in real time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Stitch&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=5136s" rel="noopener noreferrer"&gt;1:25:36&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Google Pics
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Google Pics&lt;/strong&gt; is a &lt;code&gt;new image creation and editing tool based on Nano Banana&lt;/code&gt;, Google’s model for this type of task. It allows users to select and edit specific elements with precision, such as moving objects, changing colors, or transforming one element into another without affecting the rest of the image.&lt;/p&gt;

&lt;p&gt;Without a doubt, it is a very useful tool for content creators, making it easier to modify and edit images using text instructions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Google Pics&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=5060s" rel="noopener noreferrer"&gt;1:24:20&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  ⚙️ Developer Tools &amp;amp; Hardware
&lt;/h3&gt;

&lt;p&gt;This section is perhaps one of the most diverse of the event, as it combines developer tools with consumer hardware that is still in active development. It ranges from systems capable of coordinating code agents at scale to devices that start bringing Gemini interactions directly into the physical world.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrsrw1zcqi44nhycq1xi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwrsrw1zcqi44nhycq1xi.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Image created by the author&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;
&lt;h3&gt;
  
  
  Antigravity 2.0
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Antigravity 2.0&lt;/strong&gt; is a native desktop application that works as a central platform for coordinating multiple sub-agents running tasks in parallel. The keynote demo showed one of the most complex examples, building an operating system from scratch, and this tool allows you to create a plan and define how sub-agents should run in parallel in order to achieve the goal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Antigravity 2.0&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=1615s" rel="noopener noreferrer"&gt;26:55&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  CodeMender
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;CodeMender&lt;/strong&gt; is a security tool originally developed by Google DeepMind. The tool &lt;code&gt;scans code&lt;/code&gt;, &lt;code&gt;identifies vulnerabilities autonomously&lt;/code&gt;, &lt;code&gt;recommends fixes&lt;/code&gt;, &lt;code&gt;tests them in a safe environment&lt;/code&gt;, and &lt;code&gt;can apply the necessary patches&lt;/code&gt; with your approval at each step.&lt;br&gt;
&lt;strong&gt;📍 CodeMender&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=6358s" rel="noopener noreferrer"&gt;1:45:58&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Audio Glasses
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Audio glasses&lt;/strong&gt;, developed with Samsung and designed in collaboration with Gentle Monster and Warby Parker, allow you to use Gemini without a screen and without taking your phone out. With these glasses, you can ask about a restaurant you just passed, get step-by-step directions, manage calls and messages, take photos with a voice command, or use the apps installed on your phone.&lt;br&gt;
&lt;strong&gt;📍 Audio Glasses&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=5672s" rel="noopener noreferrer"&gt;1:34:32&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Display Glasses &amp;amp; Android XR
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Display Glasses&lt;/strong&gt; go one step further: they include micro-projectors built into the lenses that overlay useful information on the real world, such as navigation maps or real-time translations on signs, among other features.&lt;br&gt;
Meanwhile, Android XR is the operating system platform that powers these devices, developed with Samsung and Qualcomm. It is still in a trusted testers phase, with a wider rollout expected later this year.&lt;br&gt;
&lt;strong&gt;📍 Android XR / Display Glasses&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=5595s" rel="noopener noreferrer"&gt;1:33:15&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  🔬 Science: What Happens When AI Never Stops Researching?
&lt;/h2&gt;

&lt;p&gt;This was, for me, the most important section of the event. The following initiatives from Google apply AI to problems that go far beyond personal productivity, from accelerating scientific research to modeling the global climate and rethinking the process of drug discovery.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmyvgur5x1prmujyhkw0l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmyvgur5x1prmujyhkw0l.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Image created by the author&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;
&lt;h3&gt;
  
  
  Gemini for Science
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Gemini for Science&lt;/strong&gt; is a research acceleration platform that allows scientists to stay up to date with newly published papers, turn research goals into executable code, and generate new hypotheses. It is still in a prototype phase in Google Labs, but the concept is what matters: AI is not presented as a replacement for scientific thinking, but as infrastructure that removes friction from the early stages of research, enabling literature search, synthesis of papers, and translation of hypotheses into experiments.&lt;br&gt;
A researcher who can stay updated in real time across their entire field and automatically translate a hypothesis into an experiment is a researcher who can focus on more meaningful work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Gemini for Science&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=6397s" rel="noopener noreferrer"&gt;1:46:37&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  AlphaEarth Foundations &amp;amp; WeatherNext
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;AlphaEarth Foundations&lt;/strong&gt; is a model developed by Google DeepMind that works as an interactive digital twin of the Earth, powered by real-time satellite data, climate sensors, ocean readings, and biodiversity records. Meanwhile, &lt;strong&gt;WeatherNext&lt;/strong&gt; is its atmospheric counterpart, a weather forecasting engine capable of predicting hurricane paths and extreme weather events with greater accuracy and speed than traditional systems.&lt;br&gt;
These models were presented at the conference as examples of how Google’s AI technology can be applied to solve problems that affect billions of people around the world.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 AlphaEarth + WeatherNext&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=6397s" rel="noopener noreferrer"&gt;1:46:37&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  Isomorphic Labs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Isomorphic Labs&lt;/strong&gt;, the biotechnology company within Alphabet (a sister company of &lt;strong&gt;Google DeepMind&lt;/strong&gt;), continues to build on AlphaFold. This is an AI system developed by DeepMind that enables the prediction of protein structures.&lt;br&gt;
It is another example of &lt;code&gt;how Google’s technology is being applied in the pharmaceutical industry&lt;/code&gt;, helping to significantly accelerate research and molecular design for treatments against cancer and complex immune disorders.&lt;br&gt;
In the keynote, this work was described as “science at digital speed”, where AI acts as a tool to understand biological systems that were previously impossible to model directly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 Isomorphic Labs&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=6397s" rel="noopener noreferrer"&gt;1:46:37&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  SynthID
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;SynthID&lt;/strong&gt; is Google’s &lt;code&gt;invisible watermarking system&lt;/code&gt; for AI-generated content. This label is added to images, videos and audio at the moment of creation, allowing anyone or any system to later verify whether something was generated by AI.&lt;br&gt;
This announcement is important not only from a safety perspective, but also because it is being adopted as a standard by companies such as OpenAI and ElevenLabs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📍 SynthID&lt;/strong&gt; → &lt;a href="https://www.youtube.com/watch?v=wYSncx9zLIU&amp;amp;t=1266s" rel="noopener noreferrer"&gt;21:06&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  What I'm Most Excited to Try
&lt;/h2&gt;

&lt;p&gt;If I had to choose the three announcements I will follow most closely:&lt;/p&gt;
&lt;h3&gt;
  
  
  🛒 Universal Cart &amp;amp; UCP + AP2
&lt;/h3&gt;

&lt;p&gt;These two announcements will change the way we shop online. For years, we have designed experiences for human users: visual interfaces, marketplaces, recommendations and conversion funnels. But Google is proposing something different: agents capable of discovering products, evaluating options, monitoring prices and executing purchases on our behalf.&lt;br&gt;
This means ecommerce is no longer only a human platform interaction, but starts to become an ecosystem where agents also participate as consumers.&lt;br&gt;
I do not think these solutions will replace traditional commerce overnight, but they will deeply change how trust is built, how products are presented, and how companies compete for attention, not only from people but also from intelligent agents.&lt;/p&gt;
&lt;h3&gt;
  
  
  🔍 Search Agents
&lt;/h3&gt;

&lt;p&gt;Traditional alerts have always been passive: they depended on exact keywords and often generated more noise than context. This is one of the announcements I will probably follow most closely because it completely changes that logic.&lt;br&gt;
Instead of manually searching for information, you can now delegate the monitoring of a topic to a system that understands intent, relevance and meaningful changes. An agent that continuously tracks the internet in the background.&lt;br&gt;
And the more I think about it, the clearer it becomes that this might be one of the most important features of the keynote, precisely because it will quietly integrate into our daily routine.&lt;/p&gt;

&lt;center&gt;• • • •&lt;/center&gt;
&lt;h3&gt;
  
  
  🧬 Gemini for Science
&lt;/h3&gt;

&lt;p&gt;Of everything announced, this is probably the project with the deepest potential impact.&lt;br&gt;
Modern scientific research has a silent problem: the speed of knowledge has already surpassed human capacity to absorb it. Thousands of papers are published every week, information is fragmented, hypotheses are scattered, and entire weeks are spent just trying to stay updated.&lt;br&gt;
Gemini for Science proposes something fundamentally different: turning AI into infrastructure for research.&lt;br&gt;
The ability to translate scientific literature into actionable hypotheses, generate experimental code, connect discoveries across disciplines and accelerate research processes could completely change the scale at which science progresses.&lt;br&gt;
Because perhaps the most important application of artificial intelligence is not to automate work, but to accelerate human knowledge.&lt;/p&gt;


&lt;h2&gt;
  
  
  🎥 What I Actually Tried: Google Flow
&lt;/h2&gt;

&lt;p&gt;Most of the announcements that caught my attention were related to systems, agents and infrastructure. But beyond the long term vision, I also wanted to understand what it actually feels like to interact with one of these tools in practice.&lt;br&gt;
So instead of just describing them, I decided to try one myself. I opened Google Flow and started experimenting with a short video prompt, and for a moment, I found myself living that childhood idea of creating my own animation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbcnrfbny9u8azw9uw4mc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbcnrfbny9u8azw9uw4mc.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;code&gt;Image source: Image created by google flow&lt;/code&gt;&lt;/center&gt;

&lt;center&gt;____________&lt;/center&gt;

&lt;p&gt;While doing this, I could not help but think about how tools like this could evolve beyond individual experimentation. In the future, they might become part of how schools teach storytelling, narration and creative thinking, helping children express ideas through visual and generative tools. At the same time, it also raises an interesting challenge: how younger generations will learn to use these systems in a way that is both creative and intentional, rather than just consumptive.&lt;/p&gt;


&lt;h4&gt;
  
  
  What the Experience Felt Like
&lt;/h4&gt;

&lt;p&gt;The result was an 8 second clip and honestly, the quality surprised me. With a fairly simple prompt describing a scene, the model generated something that looked cinematic and coherent. The prompt itself was also AI generated, and I am leaving it in the appendix at the end of this article in case you want to replicate the experiment.&lt;br&gt;
A few things stood out from the experience.&lt;br&gt;
The 8 second limit felt a bit frustrating at first. But after thinking about it, I am not sure if that is a limitation of Flow or simply how professional video production works. Scenes in film and TV are often short clips that are later assembled in post production. Flow seems to follow that same logic, where you build a story by connecting multiple clips instead of generating one long video in a single shot.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/fg4-glVbsiM"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In a previous test, I was able to concatenate two clips, and what impressed me the most was the character consistency between them. The same character appeared in both scenes without drifting, keeping the same look and style. That is actually one of the hardest problems in AI video generation today: maintaining character consistency across different prompts. Flow’s approach of letting you define and save a character that can later be reused across scenes feels like a real step forward. Whether it can maintain that consistency across longer or more complex sequences is something I still want to keep testing.&lt;/p&gt;

&lt;h4&gt;
  
  
  How I Tested It
&lt;/h4&gt;

&lt;p&gt;Under the hood, I used Gemini Omni Flash as the base model, with an 8 second duration, 2x speed and a 16:9 aspect ratio.&lt;br&gt;
Each generation costs 50 credits, which gives a more concrete sense of the cost per clip when planning a longer project. The tool also allows direct publishing to YouTube and lets you select a custom thumbnail, making the end to end workflow surprisingly complete for a creative platform.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔮 How far do we want to go?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Google I/O 2026&lt;/strong&gt; presented a series of solutions, models and use cases where artificial intelligence is becoming more deeply integrated into our daily lives. But while watching each demo, one broader question kept coming to my mind:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How far do we really want to go?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because many of these tools do not only automate tasks, they also start to reorganize how we access information, how we make decisions and how we interact with the digital world.&lt;/p&gt;

&lt;p&gt;What stood out the most was not each announcement on its own, but what happens when you look at them together. Agents that run in the background, search that becomes conversational, interfaces that adapt to context in real time. Not as isolated products, but as parts of a system that is still being built.&lt;/p&gt;

&lt;p&gt;And in any system, what matters is not only each component, but how they connect with each other and what kind of emerging behavior appears when they start interacting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Google showed the pieces based on AI.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What is still being defined is the full system: its direction, its shape, and how it will integrate into our daily lives and work.&lt;br&gt;
And maybe that is the most important part of this new era: it is not only about what technology is capable of building, but about how each of us decides to interpret it, use it, and become part of it.&lt;/p&gt;


&lt;h2&gt;
  
  
  ⚠️ A note on process and transparency
&lt;/h2&gt;

&lt;p&gt;I am an organizer at GDG Barcelona, and I led the event where we brought together 37 people to watch the full Google I/O 2026 keynote live. That experience, I was able to follow the announcements in real time, listening to the reactions in the room ... is what shaped the perspective and opinions in this article.&lt;/p&gt;

&lt;p&gt;This article is also based on the official sources listed in the references section, which I read and consulted directly after the event to verify and expand on each announcement.&lt;/p&gt;

&lt;p&gt;All the visuals in this article were designed by me using Figma Design, because creating my own images is something I genuinely enjoy as part of my writing process. AI tools were used for text correction and translation assistance and all opinions, analysis and perspectives are my own.&lt;/p&gt;


&lt;h2&gt;
  
  
  📚 References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google. (n.d.). Gemini Omni. Google Blog. &lt;a href="https://blog.google/intl/es-es/productos/presentamos-gemini-omni/" rel="noopener noreferrer"&gt;https://blog.google/intl/es-es/productos/presentamos-gemini-omni/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Gemini Spark. Gemini Overview. &lt;a href="https://gemini.google/overview/agent/spark/" rel="noopener noreferrer"&gt;https://gemini.google/overview/agent/spark/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Daily Brief. Gemini Overview. &lt;a href="https://gemini.google/overview/daily-brief/" rel="noopener noreferrer"&gt;https://gemini.google/overview/daily-brief/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). The next evolution of the Gemini app. Google Blog. &lt;a href="https://blog.google/innovation-and-ai/products/gemini-app/next-evolution-gemini-app/" rel="noopener noreferrer"&gt;https://blog.google/innovation-and-ai/products/gemini-app/next-evolution-gemini-app/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;YouTube. (n.d.). YouTube News: Google I/O 2026. YouTube Blog. &lt;a href="https://blog.youtube/news-and-events/youtube-news-google-io-2026/" rel="noopener noreferrer"&gt;https://blog.youtube/news-and-events/youtube-news-google-io-2026/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). YouTube search updates and AI features. Google Support. &lt;a href="https://support.google.com/youtube/answer/16943763?hl=en" rel="noopener noreferrer"&gt;https://support.google.com/youtube/answer/16943763?hl=en&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Search at Google I/O 2026: AI-powered search updates. Google Blog. &lt;a href="https://blog.google/products-and-platforms/products/search/search-io-2026/" rel="noopener noreferrer"&gt;https://blog.google/products-and-platforms/products/search/search-io-2026/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Universal Cart and shopping updates. Google Blog. &lt;a href="https://blog.google/intl/es-419/actualizaciones-de-producto/informacion/google-shopping-cart/" rel="noopener noreferrer"&gt;https://blog.google/intl/es-419/actualizaciones-de-producto/informacion/google-shopping-cart/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Merchant Center help: Shopping updates. Google Support. &lt;a href="https://support.google.com/merchants/answer/16837055?hl=es" rel="noopener noreferrer"&gt;https://support.google.com/merchants/answer/16837055?hl=es&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Flow updates. Google Blog. &lt;a href="https://blog.google/intl/es-419/actualizaciones-de-producto/flow-updates/" rel="noopener noreferrer"&gt;https://blog.google/intl/es-419/actualizaciones-de-producto/flow-updates/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Stitch updates from Google Labs. Google Blog. &lt;a href="https://blog.google/innovation-and-ai/models-and-research/google-labs/stitch-updates/" rel="noopener noreferrer"&gt;https://blog.google/innovation-and-ai/models-and-research/google-labs/stitch-updates/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Google I/O 2026 developer tools highlights. Google Blog. &lt;a href="https://blog.google/innovation-and-ai/technology/developers-tools/google-io-2026-collection/" rel="noopener noreferrer"&gt;https://blog.google/innovation-and-ai/technology/developers-tools/google-io-2026-collection/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Workspace updates at Google I/O 2026. Google Blog. &lt;a href="https://blog.google/products-and-platforms/products/workspace/workspace-updates/" rel="noopener noreferrer"&gt;https://blog.google/products-and-platforms/products/workspace/workspace-updates/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Antigravity 2.0. &lt;a href="https://antigravity.google/product/antigravity-2" rel="noopener noreferrer"&gt;https://antigravity.google/product/antigravity-2&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Developer highlights from Google I/O 2026. Google Blog. &lt;a href="https://blog.google/innovation-and-ai/technology/developers-tools/google-io-2026-developer-highlights/" rel="noopener noreferrer"&gt;https://blog.google/innovation-and-ai/technology/developers-tools/google-io-2026-developer-highlights/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google Cloud. (n.d.). Innovations from Google I/O 2026 on Google Cloud. &lt;a href="https://cloud.google.com/blog/products/ai-machine-learning/innovations-from-google-io-26-on-google-cloud" rel="noopener noreferrer"&gt;https://cloud.google.com/blog/products/ai-machine-learning/innovations-from-google-io-26-on-google-cloud&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;Google. (n.d.). Android XR at Google I/O 2026. Google Blog. &lt;a href="https://blog.google/products-and-platforms/platforms/android/android-xr-io-2026/" rel="noopener noreferrer"&gt;https://blog.google/products-and-platforms/platforms/android/android-xr-io-2026/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;li&gt;DeepMind. (n.d.). SynthID. &lt;a href="https://deepmind.google/models/synthid/" rel="noopener noreferrer"&gt;https://deepmind.google/models/synthid/&lt;/a&gt; (Accessed May 22, 2026)&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  📄 Appendix
&lt;/h2&gt;

&lt;p&gt;This is the AI-generated prompt I used to create the video in Google Flow. I am including it here so you can replicate the experiment or explore it further.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A short animated intro video, 15 seconds. Chibi anime art style — soft cel-shading, vibrant neon colors, cinematic lighting, dark moody atmosphere. Think Lo-Fi anime meets cyberpunk gamer aesthetic.
Character: A small chubby panda in chibi style. Oversized black hoodie with hood down while walking, round panda ears visible on top. Serious and unbothered expression. Tiny paws. Soft black and white fur with subtle neon light reflections. This is a developer panda — cool, focused, says nothing.
Scene 1 — 0:00 to 0:05: Wide shot of a dark misty forest at night. A distant neon city skyline glows purple and cyan through the trees. Fog rolls along the ground. The panda walks alone from the right side of frame through a forest path, hands in hoodie pocket, completely unbothered. He approaches a large mossy rock formation — a hidden cave entrance covered by hanging vines with faint bioluminescent blue glow. He pushes the vines aside and steps in. Slow cinematic cut to black.
Scene 2 — 0:05 to 0:10: Interior of the cave — full gamer setup. RGB neon strips in Google colors (blue, red, yellow, green) line the rocky cave walls casting dramatic colored light on everything. A dark stone desk holds a glowing MacBook Pro, mechanical keyboard with RGB backlighting, mouse with neon underglow, and stacked empty energy drink cans. The panda walks to the desk, drops his backpack on the floor. Pulls out the chair and sits down. He opens the MacBook — a burst of white light floods his face and the cave. He slowly reaches to the side, picks up thick black sunglasses and puts them on. Then places large black headphones over his panda ears. He cracks his tiny paw knuckles. Leans forward. The RGB strips pulse once in sync.
Scene 3 — 0:10 to 0:15: Ultra slow cinematic push-in toward the MacBook screen. The cave darkens around it. The screen fills the entire frame glowing bright. Bold text appears: "GOOGLE I/O 2026 — THE AGENTIC ERA IS HERE" in clean white typography on dark background. Neon blue and green light pulses around the text edges. Below it, six glowing color blocks appear one by one with smooth fade-ins: MODELS · AGENTS · SEARCH · CREATIVE · DEV · SCIENCE. Each block in its Google neon color, white bold uppercase text, subtle neon glow border. Final frame holds 2 seconds with all blocks visible, neon pulsing softly. Fade to black.
Lighting &amp;amp; mood throughout: Dark, moody, cinematic. Neon reflections on all surfaces — the panda's fur, the cave walls, the desk. Color palette: deep black backgrounds, cyan #00F5FF, neon green #39FF14, Google blue #4285F4, Google red #EA4335, Google yellow #FBBC04, purple #BF5FFF. Inspired by cyberpunk anime aesthetics — think lo-fi coder vibes meets Akira color palette.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>googleiochallenge</category>
      <category>ai</category>
      <category>googlecloud</category>
    </item>
    <item>
      <title>From Hype to Product: How AI Is Being Used Today</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Fri, 10 Apr 2026 12:10:27 +0000</pubDate>
      <link>https://dev.to/r_elena_mendez_escobar/from-hype-to-product-how-ai-is-being-used-today-4hj0</link>
      <guid>https://dev.to/r_elena_mendez_escobar/from-hype-to-product-how-ai-is-being-used-today-4hj0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbq1y9zwrb0wzd3j3mo2l.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbq1y9zwrb0wzd3j3mo2l.webp" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For years, we talked about artificial intelligence as a promise, and over the last two years in the era of LLMs… AI has stopped being the protagonist and has become invisible infrastructure.&lt;/p&gt;

&lt;p&gt;Today we don’t see it as “AI”, it becomes invisible and already forms part of our interactions and experiences without us noticing. This means when an app understands what you need before you search, when a recommendation hits the mark effortlessly, or when a decision happens in real time without an explicit interface.&lt;/p&gt;

&lt;p&gt;In this article, we explore some concrete examples of how artificial intelligence is moving from hype to product, and the patterns that are starting to emerge.&lt;/p&gt;




&lt;h1&gt;
  
  
  💄Sephora Transforms User Experience with AI in ChatGPT
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb8rh8ljfvbz72iic3qn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb8rh8ljfvbz72iic3qn.png" alt=" " width="799" height="451"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Image Reference:&lt;/strong&gt; &lt;a href="https://newsroom.sephora.com" rel="noopener noreferrer"&gt;https://newsroom.sephora.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sephora, a global leader in premium beauty products, has launched its app within ChatGPT, currently in a pilot phase in the United States. Participating users can receive personalized beauty product recommendations by linking their Beauty Insider account, explore solutions tailored to their needs, and take advantage of benefits such as free shipping and samples.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Link:&lt;/strong&gt; &lt;a href="https://newsroom.sephora.com/sephora-app-in-chatgpt-brings-a-new-personalized-beauty-experience/" rel="noopener noreferrer"&gt;https://newsroom.sephora.com/sephora-app-in-chatgpt-brings-a-new-personalized-beauty-experience/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  ☕️ What’s Behind Every Cup of Coffee You Enjoy at Starbucks?
&lt;/h1&gt;

&lt;p&gt;Starbucks, the global coffeehouse chain, is using artificial intelligence to enhance the experience for both customers and partners without replacing human interaction. Tools like Green Dot Assist help baristas get quick answers about recipes, routines, and service standards, while Smart Queue optimizes the order flow across in-store, drive-thru, mobile, and delivery channels.&lt;/p&gt;

&lt;p&gt;Additionally, the Starbucks Ordering Companion, still in development, will guide customers to discover their ideal drink and locate nearby stores, while maintaining the warmth and personalization that define the brand.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Link:&lt;/strong&gt; &lt;a href="https://about.starbucks.com/press/2026/supporting-the-moments-that-matter-with-artificial-intelligence/" rel="noopener noreferrer"&gt;https://about.starbucks.com/press/2026/supporting-the-moments-that-matter-with-artificial-intelligence/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  🖼️ Pinterest AI Turns Your Ads into Scalable Results
&lt;/h1&gt;

&lt;p&gt;Pinterest, the visual discovery and search platform, is integrating artificial intelligence into its Performance+ campaigns, allowing advertisers to optimize results without micromanaging every detail. AI automation helps intelligently combine content, audiences, and placements, making ads more relevant and scalable while advertisers focus on providing content and product signals.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Link:&lt;/strong&gt; &lt;a href="https://business.pinterest.com/es/blog/pinterest-performance-plus-campaigns/" rel="noopener noreferrer"&gt;https://business.pinterest.com/es/blog/pinterest-performance-plus-campaigns/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  ✈️ Delta Reveals Why We Still Seek Real Experiences When Traveling
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F71pwctwq7n7srxaqs2nh.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F71pwctwq7n7srxaqs2nh.webp" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
Reference image: &lt;a href="https://news.delta.com/deltas-inaugural-connection-index-finds-why-travelers-are-priorizing-real-wold-experiences" rel="noopener noreferrer"&gt;https://news.delta.com/deltas-inaugural-connection-index-finds-why-travelers-are-priorizing-real-wold-experiences&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A new global trends report from Delta Air Lines, Connection Index: Why We Fly, examines why travelers choose to fly and how these experiences impact their emotions. The study shows that even in an increasingly digital world, travelers prioritize authentic experiences: 84% of international travelers report a strong desire to explore new places and meet people, and 73% have traveled specifically to see in person something they first discovered online.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Link:&lt;/strong&gt; &lt;a href="https://news.delta.com/deltas-inaugural-connection-index-finds-why-travelers-are-prioritizing-real-world-experiences" rel="noopener noreferrer"&gt;https://news.delta.com/deltas-inaugural-connection-index-finds-why-travelers-are-prioritizing-real-world-experiences&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  📊 Agentic AI in Action: How Amazon Helps Sellers Make Real-Time Decisions
&lt;/h1&gt;

&lt;p&gt;Amazon, a global leader in e-commerce and technology, is integrating generative and agentic AI into its Seller Central platform to improve how sellers manage and scale their businesses. Through a new experience called Canvas, sellers can create interactive visual spaces that combine business data, insights, and recommended actions in real time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ruxfk0wcpcanc18s331.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ruxfk0wcpcanc18s331.webp" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Reference Image: &lt;a href="https://www.aboutamazon.com/news/innovation-at-amazon" rel="noopener noreferrer"&gt;https://www.aboutamazon.com/news/innovation-at-amazon&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This experience is based on the agentic architecture of Seller Assistant, powered by Amazon Bedrock and models such as Amazon Nova and Anthropic Claude. Sellers can ask questions or select suggestions, and the system automatically builds a personalized dashboard that enables performance analysis, scenario simulations (such as changes in demand or inventory), and optimization of marketing campaigns with concrete projections.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Link:&lt;/strong&gt; &lt;a href="https://www.aboutamazon.com/news/innovation-at-amazon/amazon-sellers-canvas-artificial-intelligence" rel="noopener noreferrer"&gt;https://www.aboutamazon.com/news/innovation-at-amazon/amazon-sellers-canvas-artificial-intelligence&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  📱Apple Unifies Business Management on a Single Platform
&lt;/h1&gt;

&lt;p&gt;Apple, a leading technology company, has launched Apple Business, an all-in-one platform that integrates device management, collaboration tools, and brand presence into a single environment. The solution allows companies to automatically configure devices through Blueprint projects, manage users and apps, and centralize services such as email, calendar, and directory with their own domains.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Link:&lt;/strong&gt; &lt;a href="https://www.apple.com/es/newsroom/2026/03/introducing-apple-business/" rel="noopener noreferrer"&gt;https://www.apple.com/es/newsroom/2026/03/introducing-apple-business/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  🛒 How Instacart Connects Physical Stores and Real-Time Data with AI
&lt;/h1&gt;

&lt;p&gt;Instacart, a technology platform for retail and supermarkets, is developing a “Physical AI” system that connects real-world data with cloud models to enhance the shopping experience. Through devices like Caper Carts, equipped with sensors, cameras, and edge processing (NVIDIA Jetson), the company captures real-time information about products, cart location, and user behavior within the store. This data is combined with cloud systems that use recommendation models and transformer-based architectures to generate insights and suggestions at the exact moment of purchase.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flcbo1x2i4ma4b1tyhi4i.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flcbo1x2i4ma4b1tyhi4i.webp" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href="https://www.instacart.com/company/enterprise-blog" rel="noopener noreferrer"&gt;https://www.instacart.com/company/enterprise-blog&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Link:&lt;/strong&gt; &lt;a href="https://www.instacart.com/company/enterprise-blog/connecting-stores-from-edge-to-cloud-reinventing-retail-with-physical-ai" rel="noopener noreferrer"&gt;https://www.instacart.com/company/enterprise-blog/connecting-stores-from-edge-to-cloud-reinventing-retail-with-physical-ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;💳 How Mastercard Is Building Trust in the Era of AI Agents&lt;br&gt;
Mastercard is a global payments technology company that connects consumers, merchants, and financial institutions, developing infrastructures that enable secure and scalable transactions worldwide.&lt;/p&gt;

&lt;p&gt;In this context, it introduces Verifiable Intent, a new layer of trust for commerce with AI agents, developed in partnership with Google. This system creates a cryptographically verifiable record of what a user authorized before an agent acts on their behalf, connecting identity, intent, and action in a single source of truth. As agents move from assisting to executing purchases, this solution addresses a key challenge for bringing AI into production: ensuring traceability, authorization, and dispute resolution in autonomous transactions, making trust a central component of the product.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔗 Link:&lt;/strong&gt; &lt;a href="https://www.mastercard.com/global/en/news-and-trends/stories/2026/verifiable-intent.html" rel="noopener noreferrer"&gt;https://www.mastercard.com/global/en/news-and-trends/stories/2026/verifiable-intent.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Before You Go
&lt;/h1&gt;

&lt;p&gt;As we wrap up this edition, here’s a tool to help you put AI into action in your own projects:&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Recommended App
&lt;/h2&gt;

&lt;p&gt;Stitch is an experimental AI tool from Google Labs that lets you quickly turn text prompts into functional app designs for mobile and desktop. It supports interactive prototyping, allows real-time collaboration, and can export your designs to popular platforms like Figma or as HTML code. In short, Stitch makes it easy to transform ideas into high-fidelity UI prototypes without complex setup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpcpdmepqll2vwce7pyt6.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpcpdmepqll2vwce7pyt6.webp" alt=" " width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reference image&lt;/strong&gt;: &lt;a href="https://stitch.withgoogle.com" rel="noopener noreferrer"&gt;https://stitch.withgoogle.com&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  📢 Join the Conversation
&lt;/h2&gt;

&lt;p&gt;What do you think about the ways AI is transforming experiences across industries, from retail to travel to design? I’d love to hear your thoughts, ideas, or favorite AI tools.&lt;/p&gt;

&lt;p&gt;Hit reply and share your perspective!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>product</category>
      <category>ux</category>
    </item>
    <item>
      <title>More women in Tech. Fewer women leading</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Tue, 31 Mar 2026 13:41:07 +0000</pubDate>
      <link>https://dev.to/r_elena_mendez_escobar/more-women-in-tech-fewer-women-leading-5f9e</link>
      <guid>https://dev.to/r_elena_mendez_escobar/more-women-in-tech-fewer-women-leading-5f9e</guid>
      <description>&lt;p&gt;Every March invites me to pause, and on a personal level, it’s a moment to acknowledge the progress made toward equality, but also to reflect honestly on the challenges that still remain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8238lzz0pm8nq5dm01jm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8238lzz0pm8nq5dm01jm.png" alt=" " width="780" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In recent years, we have seen encouraging signs: more women are pursuing careers in technology, science, and data. At the same time, initiatives to promote diversity within organizations have grown, along with conversations around female leadership and inclusion programs across the sector.&lt;/p&gt;

&lt;p&gt;However, when we look at who occupies decision-making roles in technology (who leads teams, defines strategy, or drives innovation) the reality still reflects an uneven path.&lt;/p&gt;

&lt;p&gt;From my experience working in IT, one question keeps coming up: if more women are studying STEM fields (science, technology, engineering, and mathematics) and developing technical skills, why is it still so difficult to see them in technical leadership roles?&lt;/p&gt;

&lt;p&gt;With that question in mind, I reviewed several recent reports and what I found is that there is no single cause, but rather a combination of structural and cultural factors that reinforce one another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding them together is key to explaining why progress remains so slow.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  A persistent gap: the numbers behind the reality
&lt;/h1&gt;

&lt;p&gt;To frame the conversation, it is worth starting with a few recent data points: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;(1)&lt;/strong&gt; Globally, women represent around 50% of the working-age population, yet they hold only 40% of total employment and approximately 35.4% of management positions, according to the International Labour Organization &lt;strong&gt;[1]&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;(2)&lt;/strong&gt; Within the technology sector, the situation is even more pronounced. In Europe, women account for fewer than one in five tech workers [6], and according to McKinsey’s analysis, their presence in core technical roles has not only failed to improve over time but has actually declined: from 22% in earlier reports to approximately 19% in more recent ones. This suggests that, rather than closing, the gap may in fact be widening &lt;strong&gt;[2]&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;(3)&lt;/strong&gt; At the highest levels, the numbers are equally telling. In 2025, women lead just 11% of Fortune 500 companies, compared to 10.4% the previous year [3],  a modest increase that, in perspective, highlights the slow pace of progress.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;(4)&lt;/strong&gt; According to the 2025 Women’s Power Gap report, of the 64 new CEOs appointed in the S&amp;amp;P 500 in 2024, only 11 were women (17% of the total), and none were founders of the companies they were set to lead &lt;strong&gt;[4]&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;(5)&lt;/strong&gt; The gender pay gap adds another layer to this picture: in the European Union, women earn on average around 12% less than men &lt;strong&gt;[9]&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;〰️ &lt;strong&gt;(6)&lt;/strong&gt; The 82% of the female leaders surveyed say they have had to change companies at least once in order to take the next step in their professional career &lt;strong&gt;[9]&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These figures describe the outcome, but not the process. To understand why this situation persists, we need to look inside organizations and examine the mechanisms shaping women’s career progression.&lt;/p&gt;




&lt;h1&gt;
  
  
  The broken rung: when careers start at a disadvantage
&lt;/h1&gt;

&lt;p&gt;One of the most useful concepts for explaining this gap is called &lt;strong&gt;Broken Rung&lt;/strong&gt;. The image is precise: it is not about a glass ceiling preventing women from reaching the top, but rather a damaged step at the very beginning that makes it harder for many women to take their first step into leadership.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo9isf5azz7typ9w0zhya.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo9isf5azz7typ9w0zhya.png" alt=" " width="780" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to a McKinsey study conducted in the United States, for every 100 men promoted to their first management role, only around 80 women achieve the same advancement [2]. At first glance, this may seem like a small difference, but its consequences compound over time. If fewer women reach the first step of leadership, there will also be fewer candidates at the next level, and even fewer at the level above.&lt;/p&gt;

&lt;p&gt;With each promotion, the starting pool shrinks, and female representation gradually diminishes as one moves up the hierarchy.&lt;/p&gt;

&lt;p&gt;This cascading effect largely explains why executive levels in technology companies show such limited representation. The problem is not  the final barrier before reaching roles such as CEO or CTO, it lies in that initial moment when decisions are made about who takes on early management and leadership responsibilities and who does not.&lt;/p&gt;

&lt;p&gt;At this point, it is worth adding another insight highlighted by McKinsey: 49% of women in the European technology sector reported experiencing sexism or bias in the past year, and 82% said they feel the need to prove their competence more than their male peers in order to be recognized [2].&lt;/p&gt;

&lt;p&gt;These are not just individual experiences; they are indicators of an environment where the standards of evaluation are not the same for everyone, and where promotion decisions may be influenced by different expectations based on gender.&lt;/p&gt;




&lt;h1&gt;
  
  
  Invisible work: tasks that consume time without building careers
&lt;/h1&gt;

&lt;p&gt;Alongside the broken rung, there is a second mechanism that operates more quietly but just as effectively: &lt;code&gt;non-promotable work&lt;/code&gt;. This refers to all the tasks that are necessary for the day-to-day functioning of organizations but are not recognized in performance evaluations nor contribute to career advancement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fosxiypkj6fga72mtou83.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fosxiypkj6fga72mtou83.png" alt=" " width="780" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The list is familiar to anyone who has worked in an organization: taking meeting notes, organizing team events, coordinating onboarding logistics for new hires, managing recognition initiatives or gifts, or participating in committees that have no direct impact on the business. These tasks are essential, yet they are not reflected in any performance metric and, when it comes to evaluating promotions, they simply do not count.&lt;/p&gt;

&lt;p&gt;The issue is not only that these tasks go unrecognized, but also that they are not distributed equitably. According to an analysis published by The Guardian in 2022 [7], women tend to take on these responsibilities more frequently. This results in less time available for strategic projects and reduced visibility within the organization. In some cases, this difference can amount to nearly a month of work per year spent on tasks that do not contribute to professional growth, compared to their male counterparts.&lt;/p&gt;

&lt;p&gt;Over time, this pattern not only limits individual development but also structurally reinforces the gap in access to leadership roles.&lt;/p&gt;




&lt;h1&gt;
  
  
  Learning to stay relevant: the challenge of continuous upskilling
&lt;/h1&gt;

&lt;p&gt;In this context, one of the most important responses is reskilling: the ability to learn new skills and adapt to ongoing market transformations. Developing capabilities in areas such as AI, data, cloud, infrastructure, cloud computing, DevOps and security will be critical in the coming years for those who want to remain relevant and grow professionally.&lt;/p&gt;

&lt;p&gt;However, technical training, while necessary, is not sufficient on its own. It is equally essential to develop a deep understanding of the industries where technology is applied: understanding the real challenges organizations face, identifying the most appropriate solutions for each context, and being able to design realistic implementation paths. In this sense, training in project management, agile methodologies, and research and development practices is not an optional complement, but a core component of the professional profile the market will demand.&lt;/p&gt;

&lt;p&gt;As Meirav Oren, CEO and co-founder of Versatile, noted during the World Economic Forum:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3j2xr23mvhu7jvu0785.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp3j2xr23mvhu7jvu0785.png" alt=" " width="780" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This insight points to a well-documented phenomenon: many women tend to apply for new positions only when they feel they meet all the requirements, whereas men often apply when they meet only part of them. This is not a difference in capability, but rather a reflection of how the environment has shaped confidence and risk perception.&lt;/p&gt;

&lt;p&gt;For this reason, fostering environments where women can take on challenges, learn through the process, and make their work visible is just as important as any technical training program.&lt;/p&gt;




&lt;h1&gt;
  
  
  Systemic barriers in transition: the added impact of AI
&lt;/h1&gt;

&lt;p&gt;When viewed together, what emerges is not a list of isolated issues, but a system of barriers that reinforce one another. The broken rung reduces, from the outset, the number of women who enter leadership, while non-promotable work consumes the time and energy that could otherwise be invested in building visibility and career progression.&lt;/p&gt;

&lt;p&gt;And to this already complex system, we must now add a new and accelerating force: artificial intelligence.&lt;/p&gt;

&lt;p&gt;AI is redefining skills, roles, and organizational dynamics. As new opportunities emerge, others evolve or transform at an increasing pace.&lt;/p&gt;

&lt;p&gt;However, this transformation also presents a specific challenge for women's participation in technology. In many teams, women have historically had stronger representation in areas such as design, user experience, and product management. According to McKinsey, &lt;strong&gt;women represent approximately 53% of design roles and 39% of product management positions [2]&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These same areas are among those most affected by the adoption of AI-driven tools. In particular, early-career roles are already showing signs of decline, &lt;strong&gt;with a 3% decrease in design and a 2% decrease in product roles between 2024 and 2025 [2]&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This does not mean these roles will disappear, but rather that they are evolving rapidly and demanding new technical and strategic capabilities. Entry-level profiles, in particular, face greater challenges, as they require structured support, continuous learning, and real opportunities to adapt.&lt;/p&gt;

&lt;p&gt;In this context, the risk is not technological but structural: if women do not have equitable access to reskilling, upskilling, and leadership opportunities within these transformations, the gap may widen even further in the coming years.&lt;/p&gt;

&lt;p&gt;None of these dynamics operate in isolation. Rather, it is their combination that explains why, despite the growing number of women entering the technology sector, representation in leadership roles remains so limited.&lt;/p&gt;

&lt;p&gt;And precisely because the problem is systemic, the solutions must be as well.&lt;/p&gt;




&lt;h1&gt;
  
  
  Building the future of technology is also a matter of diversity
&lt;/h1&gt;

&lt;p&gt;Technological progress opens up enormous opportunities for society, but it also raises a question we cannot ignore: who is designing the systems we will use in the future?&lt;/p&gt;

&lt;p&gt;Algorithms, digital platforms, and artificial intelligence systems are not neutral. They are shaped by the decisions, experiences, and contexts of those who build them.&lt;/p&gt;

&lt;p&gt;In software architecture, there is a principle known as &lt;strong&gt;Conway’s Law&lt;/strong&gt;, which states that organizations design systems that mirror their communication structures. Applied to diversity, this means that if technology teams are not diverse — or if communication is hierarchical and limited — those same constraints may be reflected in the solutions we create.&lt;/p&gt;

&lt;p&gt;This is not only a matter of equality, but also of innovation, social impact, and the quality of the technology we bring into the world. Diverse teams make better decisions, consider more perspectives, and ultimately build more robust solutions.&lt;/p&gt;

&lt;p&gt;March 8 serves as a reminder that, although progress has been made, the path toward equitable participation in technology leadership is still ongoing. And this challenge does not belong to a single day or a single sector:  it is part of an ongoing responsibility.&lt;/p&gt;

&lt;p&gt;Promoting inclusion, supporting the professional development of women in technology, and creating real pathways to leadership are not just goals. They are ways of building teams where different perspectives can coexist and enrich the decisions we shape — now more than ever — in technology.&lt;/p&gt;

&lt;p&gt;Because the future of technology will not only be defined by what we build... but by who is given the opportunity to build it.&lt;/p&gt;




&lt;h1&gt;
  
  
  📚References
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[1]&lt;/strong&gt; Deloitte. (n.d.). Women at work: Global outlook. &lt;a href="https://www.deloitte.com/global/en/issues/work/content/women-at-work-global-outlook.html" rel="noopener noreferrer"&gt;https://www.deloitte.com/global/en/issues/work/content/women-at-work-global-outlook.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[2]&lt;/strong&gt; McKinsey &amp;amp; Company. (n.d.). Women in tech and AI in Europe: Can the region close its gender gap? &lt;a href="https://www.mckinsey.com/capabilities/mckinsey-technology/our-insights/women-in-tech-and-ai-in-europe-can-the-region-close-its-gender-gap#/" rel="noopener noreferrer"&gt;https://www.mckinsey.com/capabilities/mckinsey-technology/our-insights/women-in-tech-and-ai-in-europe-can-the-region-close-its-gender-gap#/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[3]&lt;/strong&gt; Fortune. (2025, June 2). Fortune 500 female CEOs 2025. &lt;a href="https://fortune.com/2025/06/02/fortune-500-female-ceos-2025/" rel="noopener noreferrer"&gt;https://fortune.com/2025/06/02/fortune-500-female-ceos-2025/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[4]&lt;/strong&gt; Women’s Power Gap. (2025). CEO report 2025. &lt;a href="https://www.womenspowergap.org/wp-content/uploads/2025/05/WPG_CEO-Report_2025.pdf" rel="noopener noreferrer"&gt;https://www.womenspowergap.org/wp-content/uploads/2025/05/WPG_CEO-Report_2025.pdf&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[5]&lt;/strong&gt; Council of the European Union. (n.d.). The EU’s gender pay gap: Facts and figures. &lt;a href="https://www.consilium.europa.eu/en/policies/the-eu-s-gender-pay-gap-facts-and-figures/" rel="noopener noreferrer"&gt;https://www.consilium.europa.eu/en/policies/the-eu-s-gender-pay-gap-facts-and-figures/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[6]&lt;/strong&gt; Euronews. (2026, March 8). Why women are disappearing from Europe’s tech workforce. &lt;a href="https://www.euronews.com/next/2026/03/08/why-women-are-disappearing-from-europes-tech-workforce" rel="noopener noreferrer"&gt;https://www.euronews.com/next/2026/03/08/why-women-are-disappearing-from-europes-tech-workforce&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[7]&lt;/strong&gt;  The Guardian. (2022, May 9). They feel guilty: Why women should say no to office housework. &lt;a href="https://www.theguardian.com/society/2022/may/09/they-feel-guilty-why-women-should-say-no-to-office-housework" rel="noopener noreferrer"&gt;https://www.theguardian.com/society/2022/may/09/they-feel-guilty-why-women-should-say-no-to-office-housework&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[8]&lt;/strong&gt; World Economic Forum. (2025, June). What to know about AI and the gender gap. &lt;a href="https://www.weforum.org/stories/2025/06/amnc25-what-to-know-about-ai-and-the-gender-gap/" rel="noopener noreferrer"&gt;https://www.weforum.org/stories/2025/06/amnc25-what-to-know-about-ai-and-the-gender-gap/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[9]&lt;/strong&gt; KPMG. (2025). Global female leaders outlook 2025. &lt;a href="https://assets.kpmg.com/content/dam/kpmgsites/pt/pdf/kpmg-global-female-leaders-outlook-2025.pdf.coredownload.inline.pdf" rel="noopener noreferrer"&gt;https://assets.kpmg.com/content/dam/kpmgsites/pt/pdf/kpmg-global-female-leaders-outlook-2025.pdf.coredownload.inline.pdf&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>womenintech</category>
      <category>inclusion</category>
      <category>career</category>
    </item>
    <item>
      <title>AI in healthcare: how OpenAI is transforming medical care</title>
      <dc:creator>Romina Elena Mendez Escobar</dc:creator>
      <pubDate>Mon, 19 Jan 2026 10:17:37 +0000</pubDate>
      <link>https://dev.to/r_elena_mendez_escobar/ai-in-healthcare-how-openai-is-transforming-medical-care-ffn</link>
      <guid>https://dev.to/r_elena_mendez_escobar/ai-in-healthcare-how-openai-is-transforming-medical-care-ffn</guid>
      <description>&lt;p&gt;Introduction&lt;br&gt;
Artificial intelligence is increasingly being adopted in highly regulated industries, and &lt;strong&gt;healthcare&lt;/strong&gt; is a clear example of how this technology can improve processes, access to information, and the quality of care.&lt;br&gt;
According to OpenAI’s latest product announcements, more than &lt;strong&gt;230 million people worldwide&lt;/strong&gt; use ChatGPT every week to ask questions related to health and wellbeing. This growing adoption reflects a broader shift in how individuals and professionals seek medical information and support.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fspeqkq4wi310dqdf73vf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fspeqkq4wi310dqdf73vf.png" alt=" " width="800" height="704"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Healthcare systems face significant challenges: clinical staff are often overwhelmed, medical knowledge is highly fragmented, and administrative complexity continues to grow. &lt;strong&gt;AI is beginning to address these issues&lt;/strong&gt; by supporting decision-making, reducing operational burdens, and making medical information more accessible.&lt;/p&gt;

&lt;p&gt;This month, OpenAI introduced new &lt;strong&gt;healthcare-focused capabilities&lt;/strong&gt; designed to support both medical professionals and patients. These services aim to bring trusted information and care-related workflows closer to people, while prioritizing &lt;strong&gt;security, compliance, and responsible use&lt;/strong&gt; in one of the most sensitive and regulated industries.&lt;/p&gt;




&lt;h1&gt;
  
  
  OpenAI for Healthcare: Operationalizing AI in Healthcare Organizations
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;OpenAI for Healthcare&lt;/strong&gt; is specifically designed for healthcare organizations such as hospitals, research centers, clinic networks, and integrated health systems. Its primary goal is to provide a &lt;strong&gt;secure, enterprise-grade platform&lt;/strong&gt; that enables these institutions to deliver more consistent, high-quality care, while reducing the administrative burden that consumes a significant amount of clinicians’ time.&lt;/p&gt;

&lt;p&gt;One of the platform’s most distinctive capabilities is its &lt;strong&gt;evidence retrieval with clear citations&lt;/strong&gt;. Responses are grounded in trusted medical sources, including millions of peer-reviewed studies, public health guidelines, and up-to-date clinical directives. This allows healthcare professionals to verify information more easily and support clinical decisions with &lt;strong&gt;reliable, evidence-based insights&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Another particularly valuable feature is the use of &lt;strong&gt;reusable templates to streamline workflows&lt;/strong&gt;. These shared templates support common tasks such as drafting discharge summaries, patient instructions, clinical letters, and prior authorization requests. As a result, clinical teams spend less time rewriting repetitive documentation and searching for information, while patients benefit from clearer guidance and smoother transitions of care.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93kdyc81rgb2gbqbmeyr.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93kdyc81rgb2gbqbmeyr.webp" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;image source: &lt;a href="https://openai.com/es-419/index/openai-for-healthcare/" rel="noopener noreferrer"&gt;https://openai.com/es-419/index/openai-for-healthcare/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Below is an overview of the main capabilities offered by this solution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flk2r8aogpvf5pymucp3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flk2r8aogpvf5pymucp3j.png" alt=" " width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  ChatGPT Health: A Smarter Way to Understand Your Health
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;ChatGPT Health&lt;/strong&gt; is designed for individual users who want to better understand their own health and navigate a complex healthcare system. Health is already one of the most popular topics on ChatGPT, because every week, users ask questions about health and wellbeing.&lt;/p&gt;

&lt;p&gt;Users can securely &lt;strong&gt;connect personal health data from multiple sources&lt;/strong&gt;, including electronic health records and wellness apps. They can also &lt;strong&gt;upload their own documents or images&lt;/strong&gt;, such as lab results or medical reports. This centralization allows ChatGPT Health to provide &lt;strong&gt;more relevant, personalized responses&lt;/strong&gt;, helping users interpret information, summarize results, and prepare for appointments.&lt;/p&gt;

&lt;p&gt;The tool is designed for practical, everyday use. It can help users review lab results, prepare questions for medical visits, provide guidance on diet, exercise, or wellness routines, and support understanding of insurance options based on personal health habits. It also includes features like voice input, dictation, and advanced search, making the experience more accessible and tailored to individual needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehz5mbi4t2uzotwpe102.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehz5mbi4t2uzotwpe102.webp" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;image source: &lt;a href="https://openai.com/es-ES/index/introducing-chatgpt-health/" rel="noopener noreferrer"&gt;https://openai.com/es-ES/index/introducing-chatgpt-health/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Below is an overview of the types of data sources users can integrate with ChatGPT Health.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb1wlevgx4jwf3w10z7a5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb1wlevgx4jwf3w10z7a5.png" alt=" " width="799" height="362"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Comparative Overview
&lt;/h1&gt;

&lt;p&gt;A side-by-side look at how OpenAI for Healthcare and ChatGPT Health support clinical teams and individual users with AI-driven health insights.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fotitpi3t2g888as5cdyy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fotitpi3t2g888as5cdyy.png" alt=" " width="800" height="528"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;The introduction of AI in healthcare is showing &lt;strong&gt;real potential&lt;/strong&gt;, not only as a tool to support clinical workflows, but also as a way to provide reliable information and guidance to people who may not have easy access to specialized care. &lt;strong&gt;OpenAI for Healthcare and ChatGPT Health&lt;/strong&gt; represent a major step forward in applying AI to one of the most regulated and sensitive industries.&lt;/p&gt;

&lt;p&gt;Currently, these tools are &lt;strong&gt;limited in availability&lt;/strong&gt;: OpenAI for Healthcare serves select institutions, and ChatGPT Health operates through a waitlist. How and when these solutions expand to smaller clinics, rural areas, or other countries will be key in determining their ability to truly democratize access to high-quality health support.&lt;/p&gt;

&lt;p&gt;Healthcare is constantly evolving, with &lt;strong&gt;new scientific evidence, clinical guidelines, and regulatory updates&lt;/strong&gt;. AI solutions like these can help by keeping pace with these changes, providing relevant and accurate information over time.&lt;/p&gt;

&lt;p&gt;While AI will not &lt;strong&gt;replace healthcare professionals&lt;/strong&gt;, these tools offer opportunities to reduce administrative burdens, improve efficiency, and empower both clinicians and patients with personalized insights. By making healthcare more accessible, understandable, and responsive, AI can &lt;strong&gt;complement human care&lt;/strong&gt;, helping to achieve better outcomes while supporting professionals rather than replacing them.&lt;/p&gt;




&lt;h1&gt;
  
  
  📚Referencias
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;OpenAI. (2025)&lt;/strong&gt;. OpenAI for Healthcare. OpenAI. &lt;a href="https://openai.com/es-419/index/openai-for-healthcare/" rel="noopener noreferrer"&gt;https://openai.com/es-419/index/openai-for-healthcare/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI. (2025)&lt;/strong&gt;. Introducing ChatGPT Health. OpenAI. &lt;a href="https://openai.com/es-ES/index/introducing-chatgpt-health" rel="noopener noreferrer"&gt;https://openai.com/es-ES/index/introducing-chatgpt-health&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  📌 How to cite this article
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;APA style&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Mendez Escobar, Romina Elena. (2025). &lt;strong&gt;AI in healthcare: how OpenAI is transforming medical care&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
&lt;a href="https://dev.to/r_elena_mendez_escobar/ai-in-healthcare-how-openai-is-transforming-medical-care-ffn"&gt;https://dev.to/r_elena_mendez_escobar/ai-in-healthcare-how-openai-is-transforming-medical-care-ffn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BibTeX&lt;/strong&gt;&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
text
@article{mendez2025aihealthcare,
  title  = {AI in healthcare: how OpenAI is transforming medical care},
  author = {Mendez Escobar, Romina Elena},
  year   = {2025},
  url    = {https://dev.to/r_elena_mendez_escobar/ai-in-healthcare-how-openai-is-transforming-medical-care-ffn}
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>openai</category>
      <category>ai</category>
      <category>data</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
