<?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: Datalaria</title>
    <description>The latest articles on DEV Community by Datalaria (datalaria).</description>
    <link>https://dev.to/datalaria</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%2Forganization%2Fprofile_image%2F12018%2Fc60f0d32-39e9-4c8d-aa46-a1a9497fbfcd.png</url>
      <title>DEV Community: Datalaria</title>
      <link>https://dev.to/datalaria</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/datalaria"/>
    <language>en</language>
    <item>
      <title>Thomas Bayes: The Reverend Who Taught Us to Update Our Beliefs with Data</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sat, 18 Jul 2026 15:02:17 +0000</pubDate>
      <link>https://dev.to/datalaria/thomas-bayes-the-reverend-who-taught-us-to-update-our-beliefs-with-data-2l70</link>
      <guid>https://dev.to/datalaria/thomas-bayes-the-reverend-who-taught-us-to-update-our-beliefs-with-data-2l70</guid>
      <description>&lt;p&gt;There is a question every professional who works with data should ask — and almost no one formulates explicitly: &lt;strong&gt;How should I change my opinion when I receive new evidence?&lt;/strong&gt; I don't mean a philosophical answer, but a mathematical one. If I believe there's a 30% probability that an electronic component will become obsolete this year, and I suddenly receive an email from the supplier announcing a production capacity reduction, how much should my estimate increase? To 50%? To 70%? How do I calculate it rigorously?&lt;/p&gt;

&lt;p&gt;The answer to that question was formulated by an English Presbyterian reverend sometime before 1761, and it wasn't published until two years after his death. His name was &lt;strong&gt;Thomas Bayes&lt;/strong&gt;, and his posthumous essay is, without exaggeration, one of the most influential documents in the history of science. From the spam filters in your email to the probabilistic forecasting models we used in the &lt;a href="https://dev.to/en/posts/sop-engineering-part2-forecasting/"&gt;S&amp;amp;OP Engineering series&lt;/a&gt; with Facebook Prophet, everything passes through Bayes' Theorem.&lt;/p&gt;

&lt;p&gt;In the lineage of historical figures who shaped our relationship with data — &lt;a href="https://dev.to/en/posts/florence-nightingale/"&gt;Florence Nightingale&lt;/a&gt; and visualization, &lt;a href="https://dev.to/en/posts/john-snow/"&gt;John Snow&lt;/a&gt; and geolocation, &lt;a href="https://dev.to/en/posts/abraham_wald/"&gt;Abraham Wald&lt;/a&gt; and survivorship bias, &lt;a href="https://dev.to/en/posts/kantorovich/"&gt;Kantorovich&lt;/a&gt; and optimization, &lt;a href="https://dev.to/en/posts/deming/"&gt;Deming&lt;/a&gt; and quality, &lt;a href="https://dev.to/en/posts/claude_shannon/"&gt;Claude Shannon&lt;/a&gt; and information — Bayes occupies a singular place: he taught us to think of &lt;strong&gt;uncertainty as something quantifiable and updatable&lt;/strong&gt;, not as an obstacle but as raw material.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Reverend and the Posthumous Essay
&lt;/h3&gt;

&lt;p&gt;Thomas Bayes was born in London in 1702 into a family of religious dissenters. His father, Joshua Bayes, was one of the first Presbyterian ministers ordained in England. Thomas followed in his father's footsteps, was ordained a minister, and spent most of his life as a pastor in Tunbridge Wells, a quiet spa town southeast of London.&lt;/p&gt;

&lt;p&gt;But Bayes was no ordinary pastor. He was a Fellow of the &lt;strong&gt;Royal Society&lt;/strong&gt; (elected in 1742), which indicates that his mathematical reputation was recognized by the scientific elite of his era. He is known to have published a work defending the logical foundations of Newton's calculus, but during his lifetime he was a discreet figure, almost invisible in the great intellectual debates of the Enlightenment.&lt;/p&gt;

&lt;p&gt;History might have completely forgotten Bayes were it not for his friend &lt;strong&gt;Richard Price&lt;/strong&gt;, a distinguished Welsh philosopher and mathematician. After Bayes's death in 1761, Price found among his papers an unfinished manuscript titled &lt;em&gt;"An Essay towards solving a Problem in the Doctrine of Chances"&lt;/em&gt;. Price immediately recognized its importance, completed it, and presented it to the Royal Society in 1763.&lt;/p&gt;

&lt;p&gt;The problem Bayes was trying to solve was deceptively simple in its formulation and profoundly revolutionary in its implications: &lt;strong&gt;given a series of observations, what is the probability that the underlying cause is one thing or another?&lt;/strong&gt; In other words, how do we reverse the direction of probability? Not "given that the coin is fair, what is the probability of getting 7 heads in 10 flips?" but the inverse question: "given that I observed 7 heads in 10 flips, what is the probability that the coin is fair?"&lt;/p&gt;

&lt;h3&gt;
  
  
  The Theorem: Updating Beliefs with Evidence
&lt;/h3&gt;

&lt;p&gt;Bayes' Theorem can be expressed without intimidating formulas using three intuitive concepts:&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%2Fs3v1onisdftny1totcxq.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%2Fs3v1onisdftny1totcxq.png" alt="Visualization of Bayesian updating: from prior to posterior" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prior (Previous Belief)&lt;/strong&gt;: What you believe before seeing the data. Your initial estimate based on experience, intuition, or historical data. In an S&amp;amp;OP context, the &lt;em&gt;prior&lt;/em&gt; might be: "Historically, we sell about 10,000 units of this product in July."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evidence (Likelihood)&lt;/strong&gt;: The new data you observe and the probability of observing that data under different hypotheses. For example: "This June we've received 40% more advance orders than last year."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Posterior (Updated Belief)&lt;/strong&gt;: Your new estimate after integrating the evidence with your previous belief. The &lt;em&gt;posterior&lt;/em&gt; mathematically combines what you knew before with what the new data tells you. It doesn't discard your prior experience nor lets itself be blinded by a single new data point: &lt;strong&gt;it weighs both&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The beauty of the Bayesian approach is that it's &lt;strong&gt;iterative&lt;/strong&gt;: today's &lt;em&gt;posterior&lt;/em&gt; becomes tomorrow's &lt;em&gt;prior&lt;/em&gt;. Each new piece of data refines your estimate. It's not a static photograph; it's a movie that updates frame by frame. It is exactly the same philosophy as &lt;a href="https://dev.to/en/posts/deming/"&gt;W. Edwards Deming's&lt;/a&gt; PDCA cycle: plan, do, check, adjust. Repeat.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modern Connection: Prophet and Demand Forecasting
&lt;/h3&gt;

&lt;p&gt;Where does Bayes appear in modern data engineering? Virtually everywhere, but the most direct connection with this blog is &lt;strong&gt;Facebook Prophet&lt;/strong&gt;, the tool we used in &lt;a href="https://dev.to/en/posts/sop-engineering-part2-forecasting/"&gt;Part 2 of the S&amp;amp;OP series&lt;/a&gt; to generate probabilistic demand forecasts.&lt;/p&gt;

&lt;p&gt;Prophet is, at its core, a &lt;strong&gt;Bayesian additive model&lt;/strong&gt;. It decomposes a time series into three components — trend, seasonality, and holiday effects — and generates not a point prediction, but a &lt;strong&gt;confidence interval&lt;/strong&gt;. That confidence interval is, literally, a Bayesian posterior distribution: it reflects the model's uncertainty given the historical evidence.&lt;/p&gt;

&lt;p&gt;Why does this matter in practice? Because the &lt;strong&gt;Safety Stock&lt;/strong&gt; we calculated in &lt;a href="https://dev.to/en/posts/sop-engineering-part3-optimization/"&gt;Part 3 of the S&amp;amp;OP series&lt;/a&gt; — the amount of buffer inventory to absorb demand variability — is calculated on the upper bound of that confidence interval (typically at 95%). If Prophet used a deterministic model (a single number, no uncertainty), our Safety Stock would be a guess. Thanks to Bayes, it's a &lt;strong&gt;decision grounded in the probability distribution of future demand&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;prior&lt;/em&gt; in this context is the accumulated experience of the demand planning team and the historical patterns of the time series. The &lt;em&gt;evidence&lt;/em&gt; is the new data arriving each week or month. The &lt;em&gt;posterior&lt;/em&gt; is the updated forecast that feeds the &lt;a href="https://dev.to/en/posts/sop-engineering-part3-optimization/"&gt;PuLP linear programming engine&lt;/a&gt; to optimize the production plan. Bayes is at the heart of the chain, even though his name is never mentioned in S&amp;amp;OP meetings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modern Connection: A/B Testing and Netflix
&lt;/h3&gt;

&lt;p&gt;When &lt;a href="https://dev.to/en/posts/netflix/"&gt;Netflix&lt;/a&gt; decides which thumbnail to show for a series, it runs a massive A/B test: it shows version A to millions of users and version B to millions of others, then measures which generates more clicks. The classical (frequentist) approach requires waiting until a predetermined sample size is reached to declare a "winner" with statistical significance. If you do &lt;em&gt;peeking&lt;/em&gt; — looking at results before time — you invalidate the experiment.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Bayesian&lt;/strong&gt; approach to A/B testing eliminates this problem. Instead of a binary hypothesis test (is there a difference or not?), Bayesian A/B testing continuously calculates the &lt;strong&gt;probability that version A is better than version B&lt;/strong&gt; given the data observed so far. You don't need to wait for a fixed sample size because the posterior distribution updates with each new data point.&lt;/p&gt;

&lt;p&gt;This has enormous practical implications for startups and teams with limited traffic. If your product doesn't have millions of users, a frequentist test can take weeks or months to be conclusive. A Bayesian test gives you a useful probability estimate much sooner, with the honesty of telling you: "With current data, there's a 78% probability that A is better than B." You decide if that 78% is enough to act on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modern Connection: Spam Filters and Classification
&lt;/h3&gt;

&lt;p&gt;One of the first triumphs of machine learning in production at scale was the &lt;strong&gt;Bayesian spam filter&lt;/strong&gt;. The &lt;strong&gt;Naive Bayes&lt;/strong&gt; algorithm (called "naive" because it assumes independence between words, a crude simplification that's surprisingly effective) calculates the probability that an email is spam given the words it contains.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;prior&lt;/em&gt; is the base rate of spam (approximately 45% of all global email). The &lt;em&gt;evidence&lt;/em&gt; is the email's words: "offer," "free," "urgent" increase the posterior probability of spam; "meeting," "budget," "attached" reduce it. Each word updates the probability, exactly as Bayes prescribed 260 years ago.&lt;/p&gt;

&lt;p&gt;The connection with &lt;a href="https://dev.to/en/posts/abraham_wald/"&gt;Abraham Wald's survivorship bias&lt;/a&gt; is direct: in a spam filter, the data you &lt;strong&gt;don't see&lt;/strong&gt; (legitimate emails erroneously filtered as spam) is as important as what you do see. If your filter has a high false positive rate, you're making the same mistake as the WWII engineers who only analyzed the planes that returned. Bayes and Wald, separated by two centuries, are talking about the same problem: &lt;strong&gt;absent information distorts your conclusions&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modern Connection: Medical Diagnosis and the Perfect Test Paradox
&lt;/h3&gt;

&lt;p&gt;There's a classic example of Bayesian reasoning that should be mandatory in every engineer's training, because it destroys a very widespread intuition. Suppose there's a medical test for a rare disease (prevalence: 1 in 10,000 people). The test has a sensitivity of 99% (correctly detects 99% of the sick) and a specificity of 99% (correctly identifies 99% of the healthy).&lt;/p&gt;

&lt;p&gt;Question: if you test positive, &lt;strong&gt;what is the probability that you're actually sick?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The intuitive answer most people give — including many physicians — is "99%." The correct Bayesian answer is approximately &lt;strong&gt;1%&lt;/strong&gt;. How is this possible? Because the prevalence (the &lt;em&gt;prior&lt;/em&gt;) is so low that, even with a 99% test, the vast majority of positives are false positives.&lt;/p&gt;

&lt;p&gt;This reasoning is directly applicable to AI system engineering. When we configure alerts in the &lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;obsolescence radar&lt;/a&gt; or in any monitoring system, the false positive rate is the silent enemy. An anomaly detection system with 99% accuracy can generate hundreds of false alerts if the base rate of actual anomalies is very low. Bayes forces us to think about the &lt;em&gt;prior&lt;/em&gt; before celebrating the &lt;em&gt;test's&lt;/em&gt; accuracy.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Legacy: Think in Distributions, Not Points
&lt;/h3&gt;

&lt;p&gt;Thomas Bayes's deepest contribution was not a formula; it was a &lt;strong&gt;mindset shift&lt;/strong&gt;. Before Bayes, probability was conceived as a fixed property of objects: a coin has a 50% chance of landing heads, period. After Bayes, probability became a measure of &lt;strong&gt;our degree of knowledge&lt;/strong&gt; about the world, continuously updated with new evidence.&lt;/p&gt;

&lt;p&gt;This distinction is the difference between an engineer who says &lt;em&gt;"July demand will be 10,000 units"&lt;/em&gt; and one who says &lt;em&gt;"July demand has a 95% probability of falling between 8,500 and 11,500 units, and our production plan must absorb that variability."&lt;/em&gt; The first operates with false certainties; the second, with quantified uncertainty. The first is vulnerable to the &lt;em&gt;bullwhip effect&lt;/em&gt; that &lt;a href="https://dev.to/en/posts/sop_engineering-data-hygiene/"&gt;destroys supply chains&lt;/a&gt;; the second is armored against it.&lt;/p&gt;

&lt;p&gt;In a world where AI models are stochastic by nature — as we painfully documented in the &lt;a href="https://dev.to/en/posts/ai_agents_part9/"&gt;Autopilot post-mortem&lt;/a&gt;, where the same pipeline produces different results on each run — thinking Bayesianly isn't a philosophical option: it's an operational necessity. Don't ask "what is the answer?" Ask "what is the distribution of possible answers, and with what confidence?"&lt;/p&gt;

&lt;p&gt;A reverend from the 18th century, working in solitude with quill and ink in an English spa town, solved a problem that today powers medicine, marketing, cybersecurity, supply chain management, and artificial intelligence. And he did it with an idea so simple it fits in a single sentence: &lt;strong&gt;update what you believe with what you observe&lt;/strong&gt;. Two hundred and sixty years later, we still haven't found better advice.&lt;/p&gt;




&lt;h4&gt;
  
  
  Sources of Interest:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://plato.stanford.edu/entries/bayes-theorem/" rel="noopener noreferrer"&gt;&lt;strong&gt;Stanford Encyclopedia of Philosophy&lt;/strong&gt;: Bayes' Theorem — Foundations and Historical Context&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://royalsociety.org/people/thomas-bayes-11313/" rel="noopener noreferrer"&gt;&lt;strong&gt;Royal Society&lt;/strong&gt;: Thomas Bayes — Fellow Profile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=HZGCoVF3YvM" rel="noopener noreferrer"&gt;&lt;strong&gt;3Blue1Brown&lt;/strong&gt;: Bayes' theorem, the geometry of changing beliefs (YouTube)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/descriptive-analysis/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Descriptive Statistics — Data Analysis Fundamentals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/sop-engineering-part2-forecasting/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: S&amp;amp;OP Part 2 — Demand Planning with Prophet (Bayesian Model)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/abraham_wald/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Abraham Wald — The Epistemology of Missing Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/netflix/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Netflix — How Data Forges an Empire (A/B Testing)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/claude_shannon/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Claude Shannon — Entropy as Uncertainty&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Thomas Bayes: El Reverendo que Nos Enseñó a Actualizar Nuestras Creencias con Datos</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sat, 18 Jul 2026 14:56:46 +0000</pubDate>
      <link>https://dev.to/datalaria/thomas-bayes-el-reverendo-que-nos-enseno-a-actualizar-nuestras-creencias-con-datos-31g1</link>
      <guid>https://dev.to/datalaria/thomas-bayes-el-reverendo-que-nos-enseno-a-actualizar-nuestras-creencias-con-datos-31g1</guid>
      <description>&lt;p&gt;Hay una pregunta que todo profesional que trabaja con datos debería hacerse y que casi nadie se formula explícitamente: &lt;strong&gt;¿Cómo debería cambiar mi opinión cuando recibo nueva evidencia?&lt;/strong&gt; No me refiero a una respuesta filosófica, sino a una matemática. Si creo que hay un 30% de probabilidad de que un componente electrónico quede obsoleto este año, y de repente recibo un email del proveedor anunciando una reducción de capacidad de producción, ¿cuánto debería subir mi estimación? ¿Al 50%? ¿Al 70%? ¿Cómo lo calculo de forma rigurosa?&lt;/p&gt;

&lt;p&gt;La respuesta a esa pregunta la formuló un reverendo presbiteriano inglés en algún momento antes de 1761, y no se publicó hasta dos años después de su muerte. Su nombre era &lt;strong&gt;Thomas Bayes&lt;/strong&gt;, y su ensayo póstumo es, sin exageración, uno de los documentos más influyentes en la historia de la ciencia. Desde los filtros anti-spam de tu correo electrónico hasta los modelos de predicción probabilística que utilizamos en la &lt;a href="https://dev.to/es/posts/sop-ingenieria-parte2-prediccion/"&gt;serie de Ingeniería S&amp;amp;OP&lt;/a&gt; con Facebook Prophet, todo pasa por el Teorema de Bayes.&lt;/p&gt;

&lt;p&gt;En la línea de figuras históricas que han dado forma a nuestra relación con los datos — &lt;a href="https://dev.to/es/posts/florence-nightingale/"&gt;Florence Nightingale&lt;/a&gt; y la visualización, &lt;a href="https://dev.to/es/posts/john-snow/"&gt;John Snow&lt;/a&gt; y la geolocalización, &lt;a href="https://dev.to/es/posts/abraham_wald/"&gt;Abraham Wald&lt;/a&gt; y el sesgo del superviviente, &lt;a href="https://dev.to/es/posts/kantorovich/"&gt;Kantorovich&lt;/a&gt; y la optimización, &lt;a href="https://dev.to/es/posts/deming/"&gt;Deming&lt;/a&gt; y la calidad, &lt;a href="https://dev.to/es/posts/claude_shannon/"&gt;Claude Shannon&lt;/a&gt; y la información — Bayes ocupa un lugar singular: nos enseñó a pensar en la &lt;strong&gt;incertidumbre como algo cuantificable y actualizable&lt;/strong&gt;, no como un obstáculo, sino como materia prima.&lt;/p&gt;

&lt;h3&gt;
  
  
  El Reverendo y el Ensayo Póstumo
&lt;/h3&gt;

&lt;p&gt;Thomas Bayes nació en Londres en 1702 en el seno de una familia de disidentes religiosos. Su padre, Joshua Bayes, fue uno de los primeros ministros presbiterianos ordenados en Inglaterra. Thomas siguió los pasos de su padre, fue ordenado ministro y pasó la mayor parte de su vida como pastor en Tunbridge Wells, un tranquilo balneario al sureste de Londres.&lt;/p&gt;

&lt;p&gt;Pero Bayes no era un pastor convencional. Era miembro de la &lt;strong&gt;Royal Society&lt;/strong&gt; (elegido en 1742), lo que indica que su reputación matemática era reconocida por la élite científica de la época. Se sabe que publicó un trabajo defendiendo los fundamentos lógicos del cálculo de Newton, pero durante su vida fue una figura discreta, casi invisible en los grandes debates intelectuales de la Ilustración.&lt;/p&gt;

&lt;p&gt;La historia podría haber olvidado por completo a Bayes si no fuera por su amigo &lt;strong&gt;Richard Price&lt;/strong&gt;, un filósofo galés y matemático destacado. Tras la muerte de Bayes en 1761, Price encontró entre sus papeles un manuscrito inacabado titulado &lt;em&gt;"An Essay towards solving a Problem in the Doctrine of Chances"&lt;/em&gt;. Price reconoció inmediatamente su importancia, lo completó, y lo presentó ante la Royal Society en 1763.&lt;/p&gt;

&lt;p&gt;El problema que Bayes intentaba resolver era deceptivamente simple en su formulación y profundamente revolucionario en sus implicaciones: &lt;strong&gt;dada una serie de observaciones, ¿cuál es la probabilidad de que la causa subyacente sea una u otra?&lt;/strong&gt; Es decir, ¿cómo invertimos la dirección de la probabilidad? No «dado que la moneda es justa, ¿cuál es la probabilidad de sacar 7 caras en 10 lanzamientos?», sino la pregunta inversa: «dado que he observado 7 caras en 10 lanzamientos, ¿cuál es la probabilidad de que la moneda sea justa?».&lt;/p&gt;

&lt;h3&gt;
  
  
  El Teorema: Actualizar Creencias con Evidencia
&lt;/h3&gt;

&lt;p&gt;El Teorema de Bayes puede expresarse sin fórmulas intimidantes usando tres conceptos intuitivos:&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%2F42e03e4z73ewtjioswzl.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%2F42e03e4z73ewtjioswzl.png" alt="Visualización de la actualización bayesiana: del prior al posterior" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prior (Creencia previa)&lt;/strong&gt;: Lo que crees antes de ver los datos. Tu estimación inicial basada en experiencia, intuición o datos históricos. En un contexto S&amp;amp;OP, el &lt;em&gt;prior&lt;/em&gt; podría ser: «Históricamente, vendemos unas 10.000 unidades de este producto en julio».&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evidencia (Likelihood)&lt;/strong&gt;: Los datos nuevos que observas y la probabilidad de observar esos datos bajo diferentes hipótesis. Por ejemplo: «Este junio hemos recibido un 40% más de pedidos anticipados que el año pasado».&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Posterior (Creencia actualizada)&lt;/strong&gt;: Tu nueva estimación después de integrar la evidencia con tu creencia previa. El &lt;em&gt;posterior&lt;/em&gt; combina matemáticamente lo que sabías antes con lo que los datos nuevos te dicen. No descarta tu experiencia previa ni se deja cegar por un solo dato nuevo: &lt;strong&gt;pondera ambos&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;La belleza del enfoque bayesiano es que es &lt;strong&gt;iterativo&lt;/strong&gt;: el &lt;em&gt;posterior&lt;/em&gt; de hoy se convierte en el &lt;em&gt;prior&lt;/em&gt; de mañana. Cada nuevo dato que recibes refina tu estimación. No es una fotografía estática; es una película que se actualiza fotograma a fotograma. Es exactamente la misma filosofía del ciclo PDCA de &lt;a href="https://dev.to/es/posts/deming/"&gt;W. Edwards Deming&lt;/a&gt;: planifica, ejecuta, verifica, ajusta. Repite.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conexión Moderna: Prophet y la Predicción de Demanda
&lt;/h3&gt;

&lt;p&gt;¿Dónde aparece Bayes en la ingeniería de datos moderna? En prácticamente todas partes, pero la conexión más directa con este blog es &lt;strong&gt;Facebook Prophet&lt;/strong&gt;, la herramienta que utilizamos en la &lt;a href="https://dev.to/es/posts/sop-ingenieria-parte2-prediccion/"&gt;Parte 2 de la serie S&amp;amp;OP&lt;/a&gt; para generar forecasts probabilísticos de demanda.&lt;/p&gt;

&lt;p&gt;Prophet es, en su núcleo, un &lt;strong&gt;modelo aditivo bayesiano&lt;/strong&gt;. Descompone una serie temporal en tres componentes — tendencia, estacionalidad y efecto de festivos — y genera no una predicción puntual, sino un &lt;strong&gt;intervalo de confianza&lt;/strong&gt;. Ese intervalo de confianza es, literalmente, una distribución posterior bayesiana: refleja la incertidumbre del modelo dada la evidencia histórica.&lt;/p&gt;

&lt;p&gt;¿Por qué importa esto en la práctica? Porque el &lt;strong&gt;Safety Stock&lt;/strong&gt; que calculamos en la &lt;a href="https://dev.to/es/posts/sop-ingenieria-parte3-optimizacion/"&gt;Parte 3 de la serie S&amp;amp;OP&lt;/a&gt; — la cantidad de inventario de reserva para absorber la variabilidad de la demanda — se calcula sobre el límite superior de ese intervalo de confianza (típicamente al 95%). Si Prophet usara un modelo determinista (un solo número, sin incertidumbre), nuestro Safety Stock sería una adivinanza. Gracias a Bayes, es una &lt;strong&gt;decisión fundamentada en la distribución de probabilidad de la demanda futura&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;El &lt;em&gt;prior&lt;/em&gt; en este contexto es la experiencia acumulada del equipo de demand planning y los patrones históricos de la serie temporal. La &lt;em&gt;evidencia&lt;/em&gt; son los nuevos datos que llegan cada semana o cada mes. El &lt;em&gt;posterior&lt;/em&gt; es el forecast actualizado que alimenta el motor de &lt;a href="https://dev.to/es/posts/sop-ingenieria-parte3-optimizacion/"&gt;programación lineal de PuLP&lt;/a&gt; para optimizar el plan de producción. Bayes está en el corazón de la cadena, aunque nunca se le mencione por su nombre en las reuniones de S&amp;amp;OP.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conexión Moderna: A/B Testing y Netflix
&lt;/h3&gt;

&lt;p&gt;Cuando &lt;a href="https://dev.to/es/posts/netflix/"&gt;Netflix&lt;/a&gt; decide qué carátula mostrar para una serie, ejecuta un A/B test masivo: muestra la versión A a millones de usuarios y la versión B a otros tantos, y mide cuál genera más clics. El enfoque clásico (frecuentista) requiere esperar hasta alcanzar un tamaño de muestra predeterminado para declarar un «ganador» con significancia estadística. Si haces &lt;em&gt;peeking&lt;/em&gt; — mirar los resultados antes de tiempo —, invalidas el experimento.&lt;/p&gt;

&lt;p&gt;El enfoque &lt;strong&gt;bayesiano&lt;/strong&gt; para A/B testing elimina este problema. En lugar de un test binario de hipótesis (¿hay diferencia o no?), el A/B testing bayesiano calcula continuamente la &lt;strong&gt;probabilidad de que la versión A sea mejor que la versión B&lt;/strong&gt; dado los datos observados hasta el momento. No necesitas esperar a un tamaño de muestra fijo porque la distribución posterior se actualiza con cada nuevo dato.&lt;/p&gt;

&lt;p&gt;Esto tiene implicaciones prácticas enormes para startups y equipos con tráfico limitado. Si tu producto no tiene millones de usuarios, un test frecuentista puede tardar semanas o meses en ser concluyente. Un test bayesiano te da una estimación de probabilidad útil mucho antes, con la honestidad de decirte: «Con los datos actuales, hay un 78% de probabilidad de que A sea mejor que B». Tú decides si ese 78% es suficiente para actuar.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conexión Moderna: Filtros Anti-Spam y Clasificación
&lt;/h3&gt;

&lt;p&gt;Uno de los primeros triunfos del machine learning en producción a escala fue el &lt;strong&gt;filtro de spam bayesiano&lt;/strong&gt;. El algoritmo &lt;strong&gt;Naive Bayes&lt;/strong&gt; (llamado «naive» porque asume independencia entre las palabras, una simplificación burda pero sorprendentemente efectiva) calcula la probabilidad de que un email sea spam dado las palabras que contiene.&lt;/p&gt;

&lt;p&gt;El &lt;em&gt;prior&lt;/em&gt; es la tasa base de spam (aproximadamente el 45% de todo el email global). La &lt;em&gt;evidencia&lt;/em&gt; son las palabras del email: «oferta», «gratis», «urgente» aumentan la probabilidad posterior de spam; «reunión», «presupuesto», «adjunto» la reducen. Cada palabra actualiza la probabilidad, exactamente como Bayes prescribió hace 260 años.&lt;/p&gt;

&lt;p&gt;La conexión con el &lt;a href="https://dev.to/es/posts/abraham_wald/"&gt;sesgo del superviviente de Abraham Wald&lt;/a&gt; es directa: en un filtro de spam, los datos que &lt;strong&gt;no ves&lt;/strong&gt; (emails legítimos que fueron filtrados erróneamente como spam) son tan importantes como los que ves. Si tu filtro tiene una alta tasa de falsos positivos, estás cometiendo el mismo error que los ingenieros de la WWII que solo analizaban los aviones que regresaban. Bayes y Wald, separados por dos siglos, están hablando del mismo problema: &lt;strong&gt;la información ausente distorsiona tus conclusiones&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conexión Moderna: Diagnóstico Médico y la Paradoja del Test Perfecto
&lt;/h3&gt;

&lt;p&gt;Hay un ejemplo clásico de razonamiento bayesiano que debería ser obligatorio en la formación de todo ingeniero, porque destruye una intuición muy extendida. Supongamos que existe un test médico para una enfermedad rara (prevalencia: 1 de cada 10.000 personas). El test tiene una sensibilidad del 99% (detecta correctamente al 99% de los enfermos) y una especificidad del 99% (identifica correctamente al 99% de los sanos).&lt;/p&gt;

&lt;p&gt;Pregunta: si das positivo en este test, &lt;strong&gt;¿cuál es la probabilidad de que realmente estés enfermo?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;La respuesta intuitiva de la mayoría de las personas — incluidos muchos médicos — es «99%». La respuesta bayesiana correcta es aproximadamente &lt;strong&gt;1%&lt;/strong&gt;. ¿Cómo es posible? Porque la prevalencia (el &lt;em&gt;prior&lt;/em&gt;) es tan baja que, incluso con un test del 99%, la inmensa mayoría de los positivos son falsos positivos.&lt;/p&gt;

&lt;p&gt;Este razonamiento es directamente aplicable a la ingeniería de sistemas de IA. Cuando configuramos alertas en el &lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;radar de obsolescencia&lt;/a&gt; o en cualquier sistema de monitoreo, la tasa de falsos positivos es el enemigo silencioso. Un sistema de detección de anomalías con un 99% de precisión puede generar cientos de alertas falsas si la tasa base de anomalías reales es muy baja. Bayes nos obliga a pensar en el &lt;em&gt;prior&lt;/em&gt; antes de celebrar la precisión del &lt;em&gt;test&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  El Legado: Pensar en Distribuciones, No en Puntos
&lt;/h3&gt;

&lt;p&gt;La contribución más profunda de Thomas Bayes no fue una fórmula; fue un &lt;strong&gt;cambio de mentalidad&lt;/strong&gt;. Antes de Bayes, la probabilidad se concebía como una propiedad fija de los objetos: una moneda tiene un 50% de probabilidad de caer cara, punto. Después de Bayes, la probabilidad se convirtió en una medida de &lt;strong&gt;nuestro grado de conocimiento&lt;/strong&gt; sobre el mundo, que se actualiza continuamente con nueva evidencia.&lt;/p&gt;

&lt;p&gt;Esta distinción es la diferencia entre un ingeniero que dice &lt;em&gt;"la demanda de julio será de 10.000 unidades"&lt;/em&gt; y uno que dice &lt;em&gt;"la demanda de julio tiene un 95% de probabilidad de estar entre 8.500 y 11.500 unidades, y nuestro plan de producción debe absorber esa variabilidad"&lt;/em&gt;. El primero opera con certezas falsas; el segundo, con incertidumbre cuantificada. El primero es vulnerable al &lt;em&gt;bullwhip effect&lt;/em&gt; que &lt;a href="https://dev.to/es/posts/sop_ingenieria-higiene-datos/"&gt;destruye las cadenas de suministro&lt;/a&gt;; el segundo está blindado contra él.&lt;/p&gt;

&lt;p&gt;En un mundo donde los modelos de IA son estocásticos por naturaleza — como documentamos dolorosamente en el &lt;a href="https://dev.to/es/posts/ia_agents_part9/"&gt;post-mortem del Autopilot&lt;/a&gt;, donde el mismo pipeline produce resultados diferentes en cada ejecución —, pensar bayesianamente no es una opción filosófica: es una necesidad operativa. No preguntes «¿cuál es la respuesta?». Pregunta «¿cuál es la distribución de respuestas posibles, y con qué confianza?».&lt;/p&gt;

&lt;p&gt;Un reverendo del siglo XVIII, trabajando en soledad con pluma y tinta en un pueblo termal inglés, resolvió un problema que hoy mueve la medicina, el marketing, la ciberseguridad, la cadena de suministro y la inteligencia artificial. Y lo hizo con una idea tan simple que cabe en una frase: &lt;strong&gt;actualiza lo que crees con lo que observas&lt;/strong&gt;. Doscientos sesenta años después, seguimos sin encontrar un consejo mejor.&lt;/p&gt;




&lt;h4&gt;
  
  
  Fuentes de Interés:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://plato.stanford.edu/entries/bayes-theorem/" rel="noopener noreferrer"&gt;&lt;strong&gt;Stanford Encyclopedia of Philosophy&lt;/strong&gt;: Bayes' Theorem — Fundamentos y Contexto Histórico&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://royalsociety.org/people/thomas-bayes-11313/" rel="noopener noreferrer"&gt;&lt;strong&gt;Royal Society&lt;/strong&gt;: Thomas Bayes — Fellow Profile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=HZGCoVF3YvM" rel="noopener noreferrer"&gt;&lt;strong&gt;3Blue1Brown&lt;/strong&gt;: Bayes' theorem, the geometry of changing beliefs (YouTube)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/Estadistica-descriptiva/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Estadística Descriptiva — Fundamentos de Análisis de Datos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/sop-ingenieria-parte2-prediccion/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: S&amp;amp;OP Part 2 — Demand Planning con Prophet (Modelo Bayesiano)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/abraham_wald/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Abraham Wald — La Epistemología de los Datos Ausentes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/netflix/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Netflix — Cómo los Datos Forjan un Imperio (A/B Testing)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/claude_shannon/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Claude Shannon — La Entropía como Incertidumbre&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>RAG in Production: 7 Anti-Patterns That Destroy Precision (And How I Fixed Them)</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sat, 11 Jul 2026 14:28:15 +0000</pubDate>
      <link>https://dev.to/datalaria/rag-in-production-7-anti-patterns-that-destroy-precision-and-how-i-fixed-them-26ef</link>
      <guid>https://dev.to/datalaria/rag-in-production-7-anti-patterns-that-destroy-precision-and-how-i-fixed-them-26ef</guid>
      <description>&lt;p&gt;RAG is the aspirin of generative AI: everyone prescribes it, almost no one truly understands how it works, and when it fails, the patient hallucinates. If you've attended any tech conference in the past 18 months, you'll have heard the same promise repeated like a mantra: &lt;em&gt;"Connect your LLM to your documents with RAG and you'll have a chatbot that responds with your company's truth."&lt;/em&gt; It's a seductive promise. It is also, in most implementations I've seen, &lt;strong&gt;a well-intentioned lie&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I know this because I've walked both paths. I built a working RAG system in production — the &lt;a href="https://dev.to/en/posts/ai_agents_part8/"&gt;Ops Engineering Copilot&lt;/a&gt; with Algolia Agent Studio, indexing over 70 posts from this blog — and I also built a system that &lt;strong&gt;deliberately rejects RAG&lt;/strong&gt; — the &lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;agentic obsolescence radar&lt;/a&gt;, which uses pure Tool Calling to query industrial databases with mathematical precision. The experience of operating both systems in production left me with an uncomfortable conclusion: &lt;strong&gt;RAG isn't bad; what's bad is how we implement it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This article is the catalogue of the 7 errors that destroy a RAG system's precision, the solutions that work, and the question no one wants to ask: do you really need RAG, or do you need something else?&lt;/p&gt;

&lt;h3&gt;
  
  
  Anti-Pattern 1: Blind Chunking
&lt;/h3&gt;

&lt;p&gt;The first step in any RAG pipeline is splitting your documents into fragments (&lt;em&gt;chunks&lt;/em&gt;) that will be stored as vectors. And this is where most tutorials commit the first mortal sin: &lt;strong&gt;chunking by fixed length&lt;/strong&gt; (e.g., 500 tokens per chunk with 50 tokens of overlap).&lt;/p&gt;

&lt;p&gt;The problem is brutal: a paragraph explaining a complex technical concept gets cut in half. The first half ends up in one chunk, the second in another. When the user asks a question, the retriever finds the first half (which contains the keywords) but misses the context from the second. The LLM, true to its nature, &lt;strong&gt;fills in what's missing with a plausible fabrication&lt;/strong&gt;. Hallucination served.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;: Semantic chunking. Split by logical units of meaning: sections delimited by headers, complete paragraphs, or functional blocks of the document. In the Ops Copilot, when we indexed Datalaria's posts with Algolia, each &lt;em&gt;record&lt;/em&gt; corresponds to a complete article section (delimited by &lt;code&gt;###&lt;/code&gt; in Markdown), not an arbitrary block of N tokens. The result: each chunk is self-contained and holds a complete thought.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anti-Pattern 2: Generic Embeddings for Specialized Domains
&lt;/h3&gt;

&lt;p&gt;Pre-trained embeddings (like OpenAI's &lt;code&gt;text-embedding-3-small&lt;/code&gt; or Vertex AI's) are trained on general internet text. They work reasonably well for generic questions. But when your domain is highly specialized — industrial engineering, European regulation, electronic component nomenclature — the semantic distance between key terms can be &lt;strong&gt;completely wrong&lt;/strong&gt; in the vector space.&lt;/p&gt;

&lt;p&gt;A real example: in the context of &lt;a href="https://dev.to/en/posts/obs_part1_intro/"&gt;obsolescence management&lt;/a&gt;, the terms "EOL" (&lt;em&gt;End of Life&lt;/em&gt;), "NRND" (&lt;em&gt;Not Recommended for New Designs&lt;/em&gt;), and "PDN" (&lt;em&gt;Product Discontinuation Notice&lt;/em&gt;) are semantically very close for a supply chain engineer. But for a generic embedding, "End of Life" might be closer to an article about palliative care than to a chip discontinuation notice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;: Evaluate embeddings with your own dataset before committing. Build a small benchmark of 50-100 question-answer pairs from your domain and measure the retriever's &lt;em&gt;hit rate&lt;/em&gt;. If generic embeddings don't exceed 80% accuracy on your benchmark, consider fine-tuning or specialized embeddings for your sector. And if your domain is highly structured (codes, nomenclatures, tables), you probably don't need embeddings at all: you need &lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;Tool Calling&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anti-Pattern 3: Forgetting Reranking
&lt;/h3&gt;

&lt;p&gt;The vector retriever returns the &lt;em&gt;k&lt;/em&gt; documents "closest" in the embedding space. But vector proximity is not synonymous with relevance. A document can contain the same keywords as the user's question and yet answer a completely different question.&lt;/p&gt;

&lt;p&gt;I've seen this anti-pattern cause havoc in technical support systems: the user asks &lt;em&gt;"How do I configure the CrewAI agent timeout?"&lt;/em&gt;, the retriever returns a chunk about GitHub Actions timeouts (same vocabulary, different context), and the LLM generates a response that's technically correct for the wrong chunk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;: Add a &lt;strong&gt;reranking&lt;/strong&gt; layer between the retriever and the LLM. A reranker (like Cohere Rerank or a local cross-encoder) receives the original question and the &lt;em&gt;k&lt;/em&gt; candidates from the retriever, and reorders them by actual semantic relevance, not mere vector proximity. In practice, a well-configured reranker can improve retrieval precision by &lt;strong&gt;15% to 30%&lt;/strong&gt; — an improvement that translates directly into fewer hallucinations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anti-Pattern 4: Insufficient Context in the Prompt
&lt;/h3&gt;

&lt;p&gt;The most widespread and easiest mistake to make: injecting 2-3 chunks into the LLM's prompt and expecting a miracle. Modern models like Gemini 2.5 or Claude handle context windows of hundreds of thousands of tokens. Feeding them 500 tokens of retrieved context is like giving a Formula 1 engine the fuel from a cigarette lighter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;: Experiment aggressively with the size of the injected context window. Increase from &lt;em&gt;top-3&lt;/em&gt; to &lt;em&gt;top-10&lt;/em&gt; or &lt;em&gt;top-15&lt;/em&gt; chunks and measure the impact on response quality. Include &lt;strong&gt;enriched metadata&lt;/strong&gt; in each chunk: source document title, creation date, author, section. These metadata give the LLM a referential framework to evaluate the relevance and recency of the information. In the Ops Copilot, each Algolia record includes not just the post text, but also the title, category, tags, and publication date.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anti-Pattern 5: Hallucination from Partial Retrieval
&lt;/h3&gt;

&lt;p&gt;This is the most dangerous anti-pattern because it's silent. The retriever finds a partially relevant chunk. The LLM detects that the information is incomplete. Instead of stopping and confessing its ignorance, &lt;strong&gt;it completes the answer with fabricated information&lt;/strong&gt; that sounds perfectly plausible. The user has no way to distinguish which part of the answer comes from retrieval and which part is a hallucination.&lt;/p&gt;

&lt;p&gt;In industrial applications, this can be catastrophic. Imagine a RAG system connected to your maintenance documentation that, when asked about the torque specification of a critical bolt, returns a fabricated value because the correct chunk wasn't retrieved. The result could be a mechanical failure in production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;: Double barrier. First: instruct the LLM in the system prompt to answer &lt;strong&gt;"I don't have sufficient information in the provided documentation to answer this question"&lt;/strong&gt; when the retrieved context is insufficient or ambiguous. Include examples in the prompt (few-shot) of correct answers that acknowledge limitations. Second: implement a &lt;strong&gt;post-validation&lt;/strong&gt; of the response. Programmatically evaluate whether the answer contains claims not supported by the injected chunks (frameworks like RAGAS automate this verification with metrics like &lt;em&gt;faithfulness&lt;/em&gt; and &lt;em&gt;answer relevancy&lt;/em&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Anti-Pattern 6: Not Measuring Quality
&lt;/h3&gt;

&lt;p&gt;The sixth anti-pattern is cultural, not technical: launching a RAG system to production &lt;strong&gt;without evaluation metrics&lt;/strong&gt;. Asking "does it work?" to five teammates is not an evaluation methodology; it's an anecdote. Without quantitative metrics, you can't know if a change in chunking improved or worsened precision, if a new embedding model is superior to the previous one, or if the reranker you just added justifies its latency cost.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;: Implement an automated evaluation framework &lt;strong&gt;before&lt;/strong&gt; launching to production. The most mature tools are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RAGAS&lt;/strong&gt; (&lt;em&gt;Retrieval Augmented Generation Assessment&lt;/em&gt;): Measures &lt;em&gt;faithfulness&lt;/em&gt; (the answer is grounded in context), &lt;em&gt;answer relevancy&lt;/em&gt; (the answer is relevant to the question), and &lt;em&gt;context precision&lt;/em&gt; (the retrieved chunks are relevant).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DeepEval&lt;/strong&gt;: An open-source framework that lets you define test suites with metrics like &lt;em&gt;hallucination score&lt;/em&gt;, &lt;em&gt;bias&lt;/em&gt;, and &lt;em&gt;toxicity&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key point is to treat RAG evaluation the way you treat your code's unit tests: &lt;strong&gt;if it doesn't have tests, it doesn't go to production&lt;/strong&gt;. Every pipeline iteration (embedding change, chunk size adjustment, new reranker) must pass through the evaluation suite before deployment. It's the same CI/CD philosophy we applied in &lt;a href="https://dev.to/en/posts/ai_agents_part5/"&gt;Autopilot Part 5&lt;/a&gt; with GitHub Actions, but applied to retrieval quality.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anti-Pattern 7: Using RAG When You Need Tool Calling
&lt;/h3&gt;

&lt;p&gt;This is the anti-pattern that was hardest for me to accept, because it meant questioning my own architectural decision. When we built the &lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;agentic obsolescence radar&lt;/a&gt;, the first temptation was to use RAG: index all component documentation, datasheets, and price histories in a vector store, and let the LLM search for relevant information for each &lt;em&gt;End of Life&lt;/em&gt; alert.&lt;/p&gt;

&lt;p&gt;The result was disastrous. LLMs are, as I wrote in that article, &lt;strong&gt;mediocre calculators&lt;/strong&gt;. When the radar needed to calculate the financial impact of an obsolescence (traverse the BOM graph, multiply quantities by prices, sum redesign costs), RAG returned narrative approximations where we needed exact figures. The financial precision was unacceptable for an executive report.&lt;/p&gt;

&lt;p&gt;The solution was to radically separate the &lt;strong&gt;"semantic brain"&lt;/strong&gt; from the &lt;strong&gt;"mathematical muscle"&lt;/strong&gt;: the LLM (Gemini 2.5 + CrewAI) handles natural language comprehension (extracting the &lt;em&gt;Part Number&lt;/em&gt; from a supplier email, understanding the context of an alert), and Python tools (CrewAI's &lt;code&gt;@tool&lt;/code&gt;) handle precision operations (SQL queries to Supabase, P&amp;amp;L calculations, relational graph traversal). The result: executive reports generated in 4 seconds with &lt;strong&gt;0% hallucination in numerical data&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%2Ffqwvelx03an92e06j68m.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%2Ffqwvelx03an92e06j68m.png" alt="RAG vs Tool Calling: when to use each" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The rule I've distilled is simple:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;You need...&lt;/th&gt;
&lt;th&gt;Use...&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Answers about &lt;strong&gt;unstructured knowledge&lt;/strong&gt; (manuals, posts, narrative documentation)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;RAG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Semantic retrieval is superior for searching free text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Answers with &lt;strong&gt;structured data and numerical precision&lt;/strong&gt; (SQL, APIs, financial calculations)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Tool Calling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tools execute deterministic code, no hallucinations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Both&lt;/strong&gt; (interpret an email + calculate financial impact)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Hybrid architecture&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The LLM orchestrates; the tools execute&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;And if you're wondering how to standardize those connections between the LLM and the tools so you're not locked into a vendor, that's exactly what we addressed in the article about &lt;a href="https://dev.to/en/posts/mcp_protocol/"&gt;MCP (Model Context Protocol)&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion: RAG Isn't Broken; Your Implementation Is
&lt;/h3&gt;

&lt;p&gt;If there's one message I want you to take from this article, it's this: &lt;strong&gt;RAG is a legitimate and powerful architecture when implemented with engineering rigor&lt;/strong&gt;. The problem isn't the pattern; the problem is that the industry has popularized it as a magical plug-and-play solution, when in reality it's a complex pipeline that requires intelligent chunking, evaluated embeddings, reranking, generous context, hallucination defenses, quality metrics, and the humility to recognize when Tool Calling is the right tool for the job.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://dev.to/en/posts/hidden_economics_ai/"&gt;10x Rule&lt;/a&gt; I proposed in the Hidden Economics of AI article applies perfectly here: if RAG doesn't give you a result &lt;strong&gt;10 times better&lt;/strong&gt; than a direct SQL query or an API call, you're probably using the wrong tool for the wrong problem.&lt;/p&gt;

&lt;p&gt;And in the era of the &lt;a href="https://dev.to/en/posts/eu_ai_act/"&gt;EU AI Act&lt;/a&gt;, where traceability (Article 12) and precision are legal obligations for high-risk systems, deploying a RAG that hallucinates isn't just a technical error: it's a regulatory risk.&lt;/p&gt;




&lt;h4&gt;
  
  
  Sources of Interest:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.ragas.io/" rel="noopener noreferrer"&gt;&lt;strong&gt;RAGAS&lt;/strong&gt;: Evaluation Framework for RAG — Official Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.confident-ai.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;DeepEval&lt;/strong&gt;: Open-Source LLM Evaluation Framework&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pinecone.io/learn/chunking-strategies/" rel="noopener noreferrer"&gt;&lt;strong&gt;Pinecone&lt;/strong&gt;: Chunking Strategies for RAG Applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cohere.com/rerank" rel="noopener noreferrer"&gt;&lt;strong&gt;Cohere&lt;/strong&gt;: Reranking — Improving Search Relevance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.datalaria.com/en/posts/obs_part5_radar_agent/" rel="noopener noreferrer"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: The Agentic Radar — Why Tool Calling &amp;gt; RAG in Production&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.datalaria.com/en/posts/ai_agents_part8/" rel="noopener noreferrer"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Autopilot Part 8 — Ops Copilot with Algolia Agent Studio and RAG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.datalaria.com/en/posts/mcp_protocol/" rel="noopener noreferrer"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: MCP Protocol — The Standard That Wants to Be the USB of AI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.datalaria.com/en/posts/eu_ai_act/" rel="noopener noreferrer"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: EU AI Act — Traceability and Precision as Legal Obligations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>RAG en Producción: 7 Antipatrones que Destruyen la Precisión (y Cómo los Solucioné)</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sat, 11 Jul 2026 14:21:13 +0000</pubDate>
      <link>https://dev.to/datalaria/rag-en-produccion-7-antipatrones-que-destruyen-la-precision-y-como-los-solucione-5c52</link>
      <guid>https://dev.to/datalaria/rag-en-produccion-7-antipatrones-que-destruyen-la-precision-y-como-los-solucione-5c52</guid>
      <description>&lt;p&gt;RAG es la aspirina de la IA generativa: todo el mundo la receta, casi nadie entiende cómo funciona realmente, y cuando falla, el paciente sufre alucinaciones. Si has asistido a cualquier conferencia de tecnología en los últimos 18 meses, habrás escuchado la misma promesa repetida como un mantra: &lt;em&gt;"Conecta tu LLM a tus documentos con RAG y tendrás un chatbot que responde con la verdad de tu empresa"&lt;/em&gt;. Es una promesa seductora. También es, en la mayoría de las implementaciones que he visto, &lt;strong&gt;una mentira piadosa&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Lo sé porque he recorrido ambos caminos. Construí un sistema RAG funcional en producción —el &lt;a href="https://dev.to/es/posts/ia_agents_part8/"&gt;Ops Engineering Copilot&lt;/a&gt; con Algolia Agent Studio, indexando los más de 70 posts de este blog— y también construí un sistema que &lt;strong&gt;rechaza RAG deliberadamente&lt;/strong&gt; —el &lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;radar agéntico de obsolescencia&lt;/a&gt;, que usa Tool Calling puro para consultar bases de datos industriales con precisión matemática—. La experiencia de operar ambos sistemas en producción me ha dejado una conclusión incómoda: &lt;strong&gt;RAG no es malo; lo que es malo es cómo lo implementamos&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Este artículo es el catálogo de los 7 errores que destruyen la precisión de un sistema RAG, las soluciones que funcionan, y la pregunta que nadie quiere hacerse: ¿realmente necesitas RAG, o necesitas otra cosa?&lt;/p&gt;

&lt;h3&gt;
  
  
  Antipatrón 1: Chunking a Ciegas
&lt;/h3&gt;

&lt;p&gt;El primer paso de cualquier pipeline RAG es trocear tus documentos en fragmentos (&lt;em&gt;chunks&lt;/em&gt;) que se almacenarán como vectores. Y aquí es donde la mayoría de los tutoriales cometen el primer pecado mortal: &lt;strong&gt;trocear por longitud fija&lt;/strong&gt; (por ejemplo, 500 tokens por chunk con 50 tokens de overlap).&lt;/p&gt;

&lt;p&gt;El problema es brutal: un párrafo que explica un concepto técnico complejo queda cortado por la mitad. La primera mitad acaba en un chunk, la segunda en otro. Cuando el usuario hace una pregunta, el retriever encuentra la primera mitad (que contiene las palabras clave), pero le falta el contexto de la segunda. El LLM, fiel a su naturaleza, &lt;strong&gt;rellena lo que falta con una invención plausible&lt;/strong&gt;. Alucinación servida.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La solución&lt;/strong&gt;: Chunking semántico. Trocear por unidades lógicas de significado: secciones delimitadas por headers, párrafos completos, o bloques funcionales del documento. En el Ops Copilot, cuando indexamos los posts de Datalaria con Algolia, cada &lt;em&gt;record&lt;/em&gt; corresponde a una sección completa del artículo (delimitada por &lt;code&gt;###&lt;/code&gt; en Markdown), no a un bloque arbitrario de N tokens. El resultado: cada chunk es autosuficiente y contiene un pensamiento completo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Antipatrón 2: Embeddings Genéricos para Dominios Especializados
&lt;/h3&gt;

&lt;p&gt;Los embeddings pre-entrenados (como &lt;code&gt;text-embedding-3-small&lt;/code&gt; de OpenAI o los de Vertex AI) están entrenados con texto general de internet. Funcionan razonablemente bien para preguntas genéricas. Pero cuando tu dominio es altamente especializado —ingeniería industrial, normativa europea, nomenclatura de componentes electrónicos—, la distancia semántica entre términos clave puede ser &lt;strong&gt;completamente incorrecta&lt;/strong&gt; en el espacio vectorial.&lt;/p&gt;

&lt;p&gt;Un ejemplo real: en el contexto de la &lt;a href="https://dev.to/es/posts/obs_parte1_intro/"&gt;gestión de obsolescencia&lt;/a&gt;, los términos "EOL" (&lt;em&gt;End of Life&lt;/em&gt;), "NRND" (&lt;em&gt;Not Recommended for New Designs&lt;/em&gt;) y "PDN" (&lt;em&gt;Product Discontinuation Notice&lt;/em&gt;) están semánticamente muy próximos para un ingeniero de supply chain. Pero para un embedding genérico, "End of Life" podría estar más cerca de un artículo sobre cuidados paliativos que de un aviso de discontinuación de un chip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La solución&lt;/strong&gt;: Evalúa los embeddings con tu propio dataset antes de comprometerte. Construye un pequeño benchmark de 50-100 pares pregunta-respuesta de tu dominio y mide la tasa de acierto del retriever (&lt;em&gt;hit rate&lt;/em&gt;). Si los embeddings genéricos no superan el 80% de acierto en tu benchmark, considera fine-tuning o embeddings especializados para tu sector. Y si tu dominio es altamente estructurado (códigos, nomenclaturas, tablas), probablemente no necesitas embeddings en absoluto: necesitas &lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;Tool Calling&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Antipatrón 3: Olvidar el Reranking
&lt;/h3&gt;

&lt;p&gt;El retriever vectorial te devuelve los &lt;em&gt;k&lt;/em&gt; documentos más "cercanos" en el espacio de embeddings. Pero cercanía vectorial no es sinónimo de relevancia. Un documento puede contener las mismas palabras clave que la pregunta del usuario y, sin embargo, responder a una pregunta completamente diferente.&lt;/p&gt;

&lt;p&gt;He visto este antipatrón causar estragos en sistemas de soporte técnico: el usuario pregunta &lt;em&gt;"¿Cómo configuro el timeout del agente CrewAI?"&lt;/em&gt;, el retriever devuelve un chunk sobre timeouts de GitHub Actions (mismo vocabulario, contexto diferente), y el LLM genera una respuesta técnicamente correcta para el chunk equivocado.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La solución&lt;/strong&gt;: Añadir una capa de &lt;strong&gt;reranking&lt;/strong&gt; entre el retriever y el LLM. Un reranker (como Cohere Rerank o un cross-encoder local) recibe la pregunta original y los &lt;em&gt;k&lt;/em&gt; candidatos del retriever, y los reordena por relevancia semántica real, no por simple proximidad vectorial. En la práctica, un reranker bien configurado puede mejorar la precisión del retrieval entre un &lt;strong&gt;15% y un 30%&lt;/strong&gt;, una mejora que se traduce directamente en menos alucinaciones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Antipatrón 4: Contexto Insuficiente en el Prompt
&lt;/h3&gt;

&lt;p&gt;El error más extendido y más fácil de cometer: inyectar 2-3 chunks en el prompt del LLM y esperar un milagro. Los modelos modernos como Gemini 2.5 o Claude manejan ventanas de contexto de cientos de miles de tokens. Alimentarlos con 500 tokens de contexto recuperado es como darle a un motor de Fórmula 1 el combustible de un mechero.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La solución&lt;/strong&gt;: Experimenta agresivamente con el tamaño de la ventana de contexto inyectada. Aumenta de &lt;em&gt;top-3&lt;/em&gt; a &lt;em&gt;top-10&lt;/em&gt; o &lt;em&gt;top-15&lt;/em&gt; chunks y mide el impacto en la calidad de la respuesta. Incluye &lt;strong&gt;metadatos enriquecidos&lt;/strong&gt; en cada chunk: título del documento fuente, fecha de creación, autor, sección. Estos metadatos le dan al LLM un marco referencial para evaluar la relevancia y la actualidad de la información. En el Ops Copilot, cada record de Algolia incluye no solo el texto del post, sino también el título, la categoría, los tags y la fecha de publicación.&lt;/p&gt;

&lt;h3&gt;
  
  
  Antipatrón 5: Alucinación por Retrieval Parcial
&lt;/h3&gt;

&lt;p&gt;Este es el antipatrón más peligroso porque es silencioso. El retriever encuentra un chunk parcialmente relevante. El LLM detecta que la información está incompleta. En lugar de detenerse y confesar su ignorancia, &lt;strong&gt;completa la respuesta con información fabricada&lt;/strong&gt; que suena perfectamente plausible. El usuario no tiene forma de distinguir qué parte de la respuesta proviene del retrieval y qué parte es una alucinación.&lt;/p&gt;

&lt;p&gt;En aplicaciones industriales, esto puede ser catastrófico. Imagina un sistema RAG conectado a tu documentación de mantenimiento que, ante una pregunta sobre el par de apriete de un tornillo crítico, devuelve un valor inventado porque el chunk correcto no fue recuperado. El resultado puede ser un fallo mecánico en producción.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La solución&lt;/strong&gt;: Doble barrera. Primera: instruye al LLM en el system prompt para que responda &lt;strong&gt;"No tengo información suficiente en la documentación proporcionada para responder a esta pregunta"&lt;/strong&gt; cuando el contexto recuperado sea insuficiente o ambiguo. Incluye ejemplos en el prompt (few-shot) de respuestas correctas que reconocen limitaciones. Segunda: implementa una &lt;strong&gt;validación posterior&lt;/strong&gt; de la respuesta. Evalúa programáticamente si la respuesta contiene afirmaciones que no están respaldadas por los chunks inyectados (frameworks como RAGAS automatizan esta verificación con métricas como &lt;em&gt;faithfulness&lt;/em&gt; y &lt;em&gt;answer relevancy&lt;/em&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Antipatrón 6: No Medir la Calidad
&lt;/h3&gt;

&lt;p&gt;El sexto antipatrón es cultural, no técnico: lanzar un sistema RAG a producción &lt;strong&gt;sin métricas de evaluación&lt;/strong&gt;. Preguntar "¿funciona?" a cinco compañeros de equipo no es una metodología de evaluación; es una anécdota. Sin métricas cuantitativas, no puedes saber si un cambio en el chunking mejoró o empeoró la precisión, si un nuevo embedding model es superior al anterior, o si el reranker que acabas de añadir justifica su coste de latencia.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;La solución&lt;/strong&gt;: Implementar un framework de evaluación automatizado &lt;strong&gt;antes&lt;/strong&gt; de lanzar a producción. Las herramientas más maduras son:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;RAGAS&lt;/strong&gt; (&lt;em&gt;Retrieval Augmented Generation Assessment&lt;/em&gt;): Mide &lt;em&gt;faithfulness&lt;/em&gt; (la respuesta está fundamentada en el contexto), &lt;em&gt;answer relevancy&lt;/em&gt; (la respuesta es relevante a la pregunta), y &lt;em&gt;context precision&lt;/em&gt; (los chunks recuperados son relevantes).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DeepEval&lt;/strong&gt;: Framework open-source que permite definir test suites con métricas como &lt;em&gt;hallucination score&lt;/em&gt;, &lt;em&gt;bias&lt;/em&gt;, y &lt;em&gt;toxicity&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;El punto clave es tratar la evaluación de RAG como tratas los tests unitarios de tu código: &lt;strong&gt;si no tiene tests, no va a producción&lt;/strong&gt;. Cada iteración del pipeline (cambio de embedding, ajuste de chunk size, nuevo reranker) debe pasar por la suite de evaluación antes de desplegarse. Es la misma filosofía de CI/CD que aplicamos en el &lt;a href="https://dev.to/es/posts/ia_agents_part5/"&gt;Autopilot Parte 5&lt;/a&gt; con GitHub Actions, pero aplicada a la calidad del retrieval.&lt;/p&gt;

&lt;h3&gt;
  
  
  Antipatrón 7: Usar RAG Cuando Necesitas Tool Calling
&lt;/h3&gt;

&lt;p&gt;Este es el antipatrón que más me costó aceptar, porque implicaba cuestionar una decisión arquitectónica propia. Cuando construimos el &lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;radar agéntico de obsolescencia&lt;/a&gt;, la primera tentación fue usar RAG: indexar toda la documentación de componentes, las hojas de datos y los históricos de precios en un vector store, y dejar que el LLM buscara la información relevante ante cada alerta de &lt;em&gt;End of Life&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;El resultado fue desastroso. Los LLMs son, como escribí en aquel artículo, &lt;strong&gt;calculadoras mediocres&lt;/strong&gt;. Cuando el radar necesitaba calcular el impacto financiero de una obsolescencia (cruzar el grafo BOM, multiplicar cantidades por precios, sumar costes de rediseño), RAG devolvía aproximaciones narrativas donde necesitábamos cifras exactas. La precisión financiera era inaceptable para un informe ejecutivo.&lt;/p&gt;

&lt;p&gt;La solución fue separar radicalmente el &lt;strong&gt;"cerebro" semántico&lt;/strong&gt; del &lt;strong&gt;"músculo" matemático&lt;/strong&gt;: el LLM (Gemini 2.5 + CrewAI) se encarga de la comprensión del lenguaje natural (extraer el &lt;em&gt;Part Number&lt;/em&gt; de un email de proveedor, entender el contexto de una alerta), y las herramientas Python (&lt;code&gt;@tool&lt;/code&gt; de CrewAI) se encargan de las operaciones de precisión (consultas SQL a Supabase, cálculos de P&amp;amp;L, cruce de grafos relacionales). El resultado: reportes ejecutivos generados en 4 segundos con &lt;strong&gt;0% de alucinación en los datos numéricos&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%2Frzdddenfbh474jpjayxj.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%2Frzdddenfbh474jpjayxj.png" alt="RAG vs Tool Calling: cuándo usar cada uno" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;La regla que he destilado es sencilla:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Necesitas...&lt;/th&gt;
&lt;th&gt;Usa...&lt;/th&gt;
&lt;th&gt;Por qué&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Respuestas sobre &lt;strong&gt;conocimiento no estructurado&lt;/strong&gt; (manuales, posts, documentación narrativa)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;RAG&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;El retrieval semántico es superior para buscar en texto libre&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Respuestas con &lt;strong&gt;datos estructurados y precisión numérica&lt;/strong&gt; (SQL, APIs, cálculos financieros)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Tool Calling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Las herramientas ejecutan código determinista, sin alucinaciones&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Ambos&lt;/strong&gt; (interpretar un email + calcular impacto financiero)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Arquitectura híbrida&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;El LLM orquesta; las herramientas ejecutan&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Y si te preguntas cómo estandarizar esas conexiones entre el LLM y las herramientas para no quedar atado a un proveedor, eso es exactamente lo que abordamos en el artículo sobre &lt;a href="https://dev.to/es/posts/mcp_protocol/"&gt;MCP (Model Context Protocol)&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusión: RAG No Está Roto; Tu Implementación Sí
&lt;/h3&gt;

&lt;p&gt;Si hay un mensaje que quiero que te lleves de este artículo es este: &lt;strong&gt;RAG es una arquitectura legítima y poderosa cuando se implementa con rigor ingenieril&lt;/strong&gt;. El problema no es el patrón; el problema es que la industria lo ha popularizado como una solución mágica plug-and-play, cuando en realidad es un pipeline complejo que requiere chunking inteligente, embeddings evaluados, reranking, contexto generoso, defensas contra alucinaciones, métricas de calidad, y la humildad de reconocer cuándo Tool Calling es la herramienta correcta.&lt;/p&gt;

&lt;p&gt;La &lt;a href="https://dev.to/es/posts/economia_oculta_ia/"&gt;Regla del 10x&lt;/a&gt; que propuse en el artículo sobre la Economía Oculta de la IA aplica perfectamente aquí: si RAG no te da un resultado &lt;strong&gt;10 veces mejor&lt;/strong&gt; que una búsqueda SQL directa o una llamada a una API, probablemente estás usando la herramienta equivocada para el problema equivocado.&lt;/p&gt;

&lt;p&gt;Y en la era del &lt;a href="https://dev.to/es/posts/eu_ai_act/"&gt;EU AI Act&lt;/a&gt;, donde la trazabilidad (Artículo 12) y la precisión son obligaciones legales para sistemas de alto riesgo, implementar un RAG que alucina no es solo un error técnico: es un riesgo regulatorio.&lt;/p&gt;




&lt;h4&gt;
  
  
  Fuentes de Interés:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.ragas.io/" rel="noopener noreferrer"&gt;&lt;strong&gt;RAGAS&lt;/strong&gt;: Framework de Evaluación para RAG — Documentación Oficial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.confident-ai.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;DeepEval&lt;/strong&gt;: Framework Open-Source de Evaluación de LLMs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pinecone.io/learn/chunking-strategies/" rel="noopener noreferrer"&gt;&lt;strong&gt;Pinecone&lt;/strong&gt;: Chunking Strategies for RAG Applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cohere.com/rerank" rel="noopener noreferrer"&gt;&lt;strong&gt;Cohere&lt;/strong&gt;: Reranking — Improving Search Relevance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https:www.datalaria.com/es/posts/obs_parte5_radar/" rel="noopener noreferrer"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: El Radar Agéntico — Por qué Tool Calling &amp;gt; RAG en Producción&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https:www.datalaria.com/es/posts/ia_agents_part8/" rel="noopener noreferrer"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Autopilot Part 8 — Ops Copilot con Algolia Agent Studio y RAG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https:www.datalaria.com/es/posts/mcp_protocol/" rel="noopener noreferrer"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: MCP Protocol — El Estándar que Quiere Ser el USB de la IA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https:www.datalaria.com/es/posts/eu_ai_act/" rel="noopener noreferrer"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: EU AI Act — Trazabilidad y Precisión como Obligación Legal&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>EU AI Act: What Every Engineer Needs to Know (No Lawyers Required)</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 05 Jul 2026 21:36:38 +0000</pubDate>
      <link>https://dev.to/datalaria/eu-ai-act-what-every-engineer-needs-to-know-no-lawyers-required-1i8m</link>
      <guid>https://dev.to/datalaria/eu-ai-act-what-every-engineer-needs-to-know-no-lawyers-required-1i8m</guid>
      <description>&lt;p&gt;Picture this scenario: your European startup launches an AI tool that scans résumés to filter candidates in hiring processes. The product works, clients are happy, revenue is growing. Three months later, you receive a formal notification from the national AI supervisory authority. Your system has been classified as &lt;strong&gt;"high-risk"&lt;/strong&gt; under Regulation (EU) 2024/1689, better known as the &lt;strong&gt;EU AI Act&lt;/strong&gt;. You have no mandatory technical documentation, you haven't implemented human oversight, and your training data doesn't meet the governance requirements. Potential fine: up to &lt;strong&gt;35 million euros&lt;/strong&gt; or &lt;strong&gt;7% of your worldwide annual turnover&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Impossible? Not at all. This is exactly what European regulation has stipulated since February 2025 for prohibited practices, and what from &lt;strong&gt;August 2, 2026&lt;/strong&gt; extends to the majority of obligations for high-risk systems (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689" rel="noopener noreferrer"&gt;Art. 113, Regulation (EU) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;If you already operate AI agents in production — as we've done on this blog with the &lt;a href="https://dev.to/en/posts/ai_agents_part1/"&gt;Autopilot Project&lt;/a&gt; or the &lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;agentic obsolescence radar&lt;/a&gt; — you need to know exactly where the line is. And most guides on the EU AI Act are written by lawyers, for lawyers. Not this one. This one is written by an engineer who translates every article of the regulation into the language we actually understand: architectures, pipelines, and code.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Risk Pyramid: Classify Your AI in 60 Seconds
&lt;/h3&gt;

&lt;p&gt;The EU AI Act doesn't ban artificial intelligence. What it does is classify every AI system into &lt;strong&gt;four risk levels&lt;/strong&gt; and assign proportional obligations to each level. It's a pragmatic approach inspired by existing regulatory frameworks like REACH for the chemical industry or the Machinery Directive for manufacturing: the higher the potential risk, the stricter the control requirements.&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%2F0afmbsyhpqjx7rfpny1k.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%2F0afmbsyhpqjx7rfpny1k.png" alt="EU AI Act risk classification pyramid" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🔴 Unacceptable Risk — PROHIBITED (Article 5)
&lt;/h4&gt;

&lt;p&gt;These practices have been &lt;strong&gt;completely banned in the EU since February 2, 2025&lt;/strong&gt; (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689#d1e2816-1-1" rel="noopener noreferrer"&gt;Art. 5, Regulation (EU) 2024/1689&lt;/a&gt;). There are no commercial exceptions or sandboxes that permit them. They are the absolute red lines of the regulation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subliminal or deceptive manipulation&lt;/strong&gt;: AI systems designed to distort a person's behavior using techniques that operate below their threshold of consciousness, causing significant harm.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exploitation of vulnerabilities&lt;/strong&gt;: AI that exploits the age, disability, or socioeconomic situation of vulnerable persons to alter their behavior in a harmful way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Social scoring&lt;/strong&gt;: Systems used by public authorities to evaluate or classify people based on their social behavior or personal traits, resulting in unjustified detrimental treatment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predictive policing&lt;/strong&gt;: AI that predicts a person's criminal behavior based solely on their profiling or personality traits (with limited exceptions for ongoing investigations).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Untargeted facial scraping&lt;/strong&gt;: The creation or expansion of facial recognition databases through untargeted collection of facial images from the internet or CCTV footage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emotion recognition at work and school&lt;/strong&gt;: Inferring the emotions of employees in the workplace or students in educational institutions (with very limited medical or safety exceptions).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sensitive biometric categorization&lt;/strong&gt;: Systems that infer data such as political or religious beliefs, sexual orientation, or race from biometric data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If any AI system in your organization touches any of these categories, the correct position is not to "find a legal loophole" but to remove it from the product. The fine for these practices reaches &lt;strong&gt;35 million euros&lt;/strong&gt; or &lt;strong&gt;7% of global annual turnover&lt;/strong&gt;, whichever is higher (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689#d1e9487-1-1" rel="noopener noreferrer"&gt;Art. 99.3, Regulation (EU) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;h4&gt;
  
  
  🟠 High Risk — STRICT REGULATION (Articles 6-49 and Annex III)
&lt;/h4&gt;

&lt;p&gt;This is where most enterprise AI systems land, and where the regulation demands the greatest technical effort. A system is classified as "high-risk" if it is a safety component of a product regulated by EU harmonized legislation (medical devices, toys, aviation), or if it operates in any of the sensitive areas defined in &lt;strong&gt;Annex III&lt;/strong&gt; of the regulation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Critical infrastructure&lt;/strong&gt;: Systems for the management of essential services (transport, water, gas, electricity, telecommunications).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Education and training&lt;/strong&gt;: AI that determines access to educational institutions or assesses student performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Employment and HR&lt;/strong&gt;: AI tools for recruitment, CV screening, task assignment, or worker management. This is directly relevant to what we analyzed in the &lt;a href="https://dev.to/en/posts/onboarding/"&gt;Onboarding with AI article&lt;/a&gt;: using IDP and GenAI to automate employee onboarding falls into the high-risk category if the system makes or influences decisions about people.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Essential services&lt;/strong&gt;: Systems that determine access to credit, essential public services, or life and health insurance. Startups like &lt;a href="https://dev.to/en/posts/clarity_ai/"&gt;Clarity AI&lt;/a&gt;, which calculates sustainability scores for investment decisions, operate directly in this zone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Law enforcement, justice, and migration&lt;/strong&gt;: AI in border control, asylum processing, security risk assessment, or the administration of justice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Biometrics&lt;/strong&gt;: Certain remote biometric identification systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fine for non-compliance with high-risk system obligations is up to &lt;strong&gt;15 million euros&lt;/strong&gt; or &lt;strong&gt;3% of worldwide annual turnover&lt;/strong&gt; (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689#d1e9487-1-1" rel="noopener noreferrer"&gt;Art. 99.4, Regulation (EU) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important note&lt;/strong&gt;: The legislative proposal known as the &lt;em&gt;"Digital Omnibus"&lt;/em&gt; (2025) may postpone certain Annex III (high-risk) obligations from August 2026 to &lt;strong&gt;December 2027&lt;/strong&gt;. However, the underlying technical requirements remain unchanged — only the enforcement timeline shifts. Don't wait.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  🟡 Limited Risk — TRANSPARENCY (Articles 50-52)
&lt;/h4&gt;

&lt;p&gt;Limited-risk systems have a single fundamental obligation: &lt;strong&gt;inform the user that they are interacting with an AI&lt;/strong&gt;. This applies to chatbots, content generation systems (deepfakes), and conversational assistants. Our &lt;a href="https://dev.to/en/posts/ai_agents_part8/"&gt;Ops Engineering Copilot&lt;/a&gt; (the chatbot based on Algolia Agent Studio and RAG that answers questions about the blog) falls into this category: the user must know they're talking to a machine, not a person.&lt;/p&gt;

&lt;h4&gt;
  
  
  🟢 Minimal Risk — FREE (no additional obligations)
&lt;/h4&gt;

&lt;p&gt;The majority of commercial AI systems fall here: spam filters, recommendation engines, generative AI for marketing content. The &lt;a href="https://dev.to/en/posts/ai_agents_part1/"&gt;Autopilot Project&lt;/a&gt; that automatically generates social media posts has no specific obligations under the EU AI Act beyond general good practices. The same applies to tools like the &lt;a href="https://dev.to/en/posts/app_unit_converter/"&gt;unit converter&lt;/a&gt; or the &lt;a href="https://dev.to/en/posts/app_flashcards/"&gt;flashcards app&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 5 Technical Commandments of High Risk
&lt;/h3&gt;

&lt;p&gt;If your system falls into the 🟠 category, you need to implement five blocks of technical requirements. What's notable is that, if you already follow the engineering practices we've documented on this blog, you're closer to compliance than you think:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Risk Management — Article 9&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The regulation requires establishing, implementing, and maintaining a &lt;strong&gt;risk management system that operates throughout the entire lifecycle of the AI system&lt;/strong&gt; (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689#d1e3383-1-1" rel="noopener noreferrer"&gt;Art. 9, Regulation (EU) 2024/1689&lt;/a&gt;). This includes identifying known and foreseeable risks to health, safety, and fundamental rights, estimating those risks, and adopting mitigation measures.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Translation for engineers&lt;/em&gt;: It's a CI/CD pipeline applied to risk. Document, monitor, iterate. It's not a static document you write once and file away; it's a living process. Exactly the philosophy that &lt;a href="https://dev.to/en/posts/deming/"&gt;W. Edwards Deming&lt;/a&gt; systematized with the PDCA cycle (Plan-Do-Check-Act). If you already implement PDCA in your quality processes, the AI Act's risk management will feel familiar.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Data Governance — Article 10&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Training, validation, and testing datasets must meet high-quality criteria: be &lt;strong&gt;representative, relevant, free of errors to the extent possible, and with appropriate governance practices&lt;/strong&gt; to prevent bias (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689#d1e3549-1-1" rel="noopener noreferrer"&gt;Art. 10, Regulation (EU) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Translation&lt;/em&gt;: The &lt;a href="https://dev.to/en/posts/sop_engineering-data-hygiene/"&gt;data hygiene&lt;/a&gt; we preached in the S&amp;amp;OP series is no longer an optional best practice — &lt;strong&gt;it's the law&lt;/strong&gt;. The cleanup pipeline with Z-Score for outlier detection, anomaly flagging (not deletion), and persistence in Supabase with Row Level Security that we built in that series directly fulfills the spirit of this article. What the regulation adds is the requirement that all of this be documented and auditable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Technical Documentation — Article 11 and Annex IV&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before marketing or putting a high-risk system into service, you must prepare a &lt;strong&gt;technical file&lt;/strong&gt; demonstrating compliance with the regulation (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689#d1e3667-1-1" rel="noopener noreferrer"&gt;Art. 11, Regulation (EU) 2024/1689&lt;/a&gt;). Annex IV details the minimum content: general system description, detailed architecture and components, training data information, performance metrics (accuracy, robustness, cybersecurity), and the development process.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Translation&lt;/em&gt;: Your README and your Confluence page aren't enough. The regulation requires a living document covering the system architecture (like the Mermaid diagrams we use in the &lt;a href="https://dev.to/en/posts/obs_part3_architecture/"&gt;Obsolescence series&lt;/a&gt;), model performance metrics, robustness tests, and cybersecurity measures. Think of it as an Architecture Decision Record on regulatory steroids.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Record-Keeping and Logging — Article 12&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;High-risk systems must be designed to &lt;strong&gt;automatically generate logs&lt;/strong&gt; during operation, ensuring full traceability of every decision and the ability to reconstruct events if a compliance issue arises (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689#d1e3702-1-1" rel="noopener noreferrer"&gt;Art. 12, Regulation (EU) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Translation&lt;/em&gt;: If you already use Supabase + FastAPI with the architecture from the &lt;a href="https://dev.to/en/posts/obs_part6_fastapi_server/"&gt;agentic radar&lt;/a&gt;, this should sound familiar. Every ingestion event, every CrewAI agent decision, every LLM response gets logged in the database. What the regulation formalizes is what any competent backend engineer should already be doing: structured logging, not as an afterthought, but as a design requirement from day zero.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Human Oversight — Article 14&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The system must be designed with &lt;strong&gt;"human-in-the-loop"&lt;/strong&gt; or &lt;strong&gt;"human-on-the-loop"&lt;/strong&gt; mechanisms, ensuring that a qualified human operator can oversee, interpret, and if necessary, override the AI's decisions (&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689#d1e3789-1-1" rel="noopener noreferrer"&gt;Art. 14, Regulation (EU) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Translation&lt;/em&gt;: This is the principle we implemented in &lt;a href="https://dev.to/en/posts/ai_agents_part5/"&gt;Autopilot Part 5&lt;/a&gt; with &lt;strong&gt;GitHub Environments for manual approval&lt;/strong&gt;. The pipeline generates content automatically with AI agents, but no post gets published without explicit human review and approval. It's not a new concept for us; now it has the force of law.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spain and the AESIA: The Local Sheriff
&lt;/h3&gt;

&lt;p&gt;The EU AI Act is a &lt;strong&gt;European Regulation&lt;/strong&gt; (not a Directive), which means it is directly applicable in Spain without needing national legislative transposition. However, Spain has taken an additional step: in May 2026, the Council of Ministers approved the &lt;strong&gt;Spanish AI Law&lt;/strong&gt;, which complements the European regulation and defines the role of the &lt;strong&gt;AESIA (Spanish Agency for AI Supervision)&lt;/strong&gt; as the national competent authority.&lt;/p&gt;

&lt;p&gt;The AESIA is the entity that will investigate complaints, conduct audits, and, where applicable, impose the AI Act's penalties on Spanish territory. Additionally, Spain has launched &lt;strong&gt;regulatory sandboxes&lt;/strong&gt;: controlled environments where startups and companies can test innovative AI systems under AESIA supervision, without sanctioning risk during the trial period.&lt;/p&gt;

&lt;p&gt;The Spanish startups we've analyzed on this blog are not strangers to this regulation. &lt;a href="https://dev.to/en/posts/clarity_ai/"&gt;Clarity AI&lt;/a&gt; operates in ESG financial scoring, an area that Annex III classifies as high-risk. &lt;a href="https://dev.to/en/posts/nextail/"&gt;Nextail&lt;/a&gt; makes inventory decisions with prescriptive AI in the supply chain. &lt;a href="https://dev.to/en/posts/devo/"&gt;Devo&lt;/a&gt; protects critical military infrastructure, the most sensitive category in the regulation. All of them will need to demonstrate compliance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compliance-as-Code: The Engineer's Checklist
&lt;/h3&gt;

&lt;p&gt;If there's one thing we've learned building data pipelines on this blog, it's that documentation that isn't automated doesn't get maintained. Here's an actionable checklist, designed so that a technical team can execute it sprint by sprint:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 1 — Inventory and Classification&lt;/strong&gt; &lt;em&gt;(Sprint 1)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inventory all AI systems in your organization (including ones you don't call "AI" but internally use ML)&lt;/li&gt;
&lt;li&gt;Classify each system in the risk pyramid: Prohibited / High / Limited / Minimal&lt;/li&gt;
&lt;li&gt;For each system classified as High Risk, assign a technical compliance owner&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Phase 2 — Technical Implementation&lt;/strong&gt; &lt;em&gt;(Sprints 2-4)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implement automatic logging of model decisions (Art. 12): timestamps, inputs, outputs, confidence scores&lt;/li&gt;
&lt;li&gt;Create living technical documentation (Art. 11 + Annex IV): architecture, data, metrics, process&lt;/li&gt;
&lt;li&gt;Design human oversight mechanism (Art. 14): manual approval, "kill switch" button, monitoring dashboards&lt;/li&gt;
&lt;li&gt;Audit training datasets (Art. 10): bias, representativeness, traceability, versioning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Phase 3 — Continuous Management&lt;/strong&gt; &lt;em&gt;(Ongoing)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Establish risk management pipeline (Art. 9): periodic review, Concept Drift monitoring, mitigation plan&lt;/li&gt;
&lt;li&gt;For Limited Risk systems: verify the user knows they're interacting with AI&lt;/li&gt;
&lt;li&gt;Configure cost and usage alerts (connect with &lt;a href="https://dev.to/en/posts/hidden_economics_ai/"&gt;The Hidden Economics of AI&lt;/a&gt;: compliance is an additional hidden cost)&lt;/li&gt;
&lt;li&gt;Register the system in the EU public database (when applicable for high-risk)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Regulation Isn't the Enemy; Ignorance Is
&lt;/h3&gt;

&lt;p&gt;There is an understandable temptation to see the EU AI Act as a bureaucratic brake on European innovation. And in part, the criticism has merit: the definition of "high-risk" in Annex III is extremely broad, the documentation burden of Annex IV can be disproportionate for a five-person startup, and the uncertainty around the &lt;em&gt;Digital Omnibus&lt;/em&gt; generates paralysis in legal teams.&lt;/p&gt;

&lt;p&gt;But if you strip away the legal jargon and look at the bare technical requirements, what the regulation actually asks is: &lt;strong&gt;document your system, control your data, log your AI's decisions, manage risks continuously, and keep a human in the control loop&lt;/strong&gt;. In other words, exactly what a good engineer should already be doing.&lt;/p&gt;

&lt;p&gt;If you've followed the practices we've documented on this blog — &lt;a href="https://dev.to/en/posts/sop_engineering-data-hygiene/"&gt;data hygiene with Z-Score&lt;/a&gt;, &lt;a href="https://dev.to/en/posts/obs_part6_fastapi_server/"&gt;automatic logging with FastAPI and Supabase&lt;/a&gt;, &lt;a href="https://dev.to/en/posts/ai_agents_part5/"&gt;human-in-the-loop with GitHub Environments&lt;/a&gt;, &lt;a href="https://dev.to/en/posts/deming/"&gt;risk management with Deming's PDCA cycle&lt;/a&gt; — &lt;strong&gt;you're already 80% of the way to compliance&lt;/strong&gt;. The remaining 20% is formalization and documentation.&lt;/p&gt;

&lt;p&gt;As Deming said: &lt;em&gt;"It is not enough to do your best; you must first know what to do."&lt;/em&gt; Now the regulation tells you what to do. How to do it, you already know. Or at least, you have a blog where you can find it.&lt;/p&gt;




&lt;h4&gt;
  
  
  Sources of Interest:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689" rel="noopener noreferrer"&gt;&lt;strong&gt;Regulation (EU) 2024/1689&lt;/strong&gt;: Full text of the EU AI Act on EUR-Lex (EN)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai" rel="noopener noreferrer"&gt;&lt;strong&gt;European Commission&lt;/strong&gt;: Official EU AI Act page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://artificialintelligenceact.eu/" rel="noopener noreferrer"&gt;&lt;strong&gt;EU AI Act Explorer&lt;/strong&gt;: Navigable guide through the regulation's articles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://portal.mineco.gob.es/es-es/digitalizacion/Paginas/ia.aspx" rel="noopener noreferrer"&gt;&lt;strong&gt;digital.gob.es&lt;/strong&gt;: Information about the AESIA and AI regulation in Spain&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/hidden_economics_ai/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: The Hidden Economics of AI — Real Production Costs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/deming/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: W. Edwards Deming — The Father of Total Quality Who Predicted the Future of AI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/sop_engineering-data-hygiene/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: S&amp;amp;OP Data Hygiene — Why Your Spreadsheet Lies to You&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/ai_agents_part5/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Autopilot Part 5 — From Localhost to the Cloud with GitHub Actions and CI/CD&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>EU AI Act: Lo que Todo Ingeniero Español Necesita Saber (Sin Abogados)</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 05 Jul 2026 21:32:28 +0000</pubDate>
      <link>https://dev.to/datalaria/eu-ai-act-lo-que-todo-ingeniero-espanol-necesita-saber-sin-abogados-4k52</link>
      <guid>https://dev.to/datalaria/eu-ai-act-lo-que-todo-ingeniero-espanol-necesita-saber-sin-abogados-4k52</guid>
      <description>&lt;p&gt;Imagina este escenario: tu startup española lanza una herramienta de IA que analiza currículums para filtrar candidatos en procesos de selección. El producto funciona, los clientes están contentos, la facturación crece. Tres meses después, recibes una notificación formal de la &lt;strong&gt;AESIA&lt;/strong&gt; (Agencia Española de Supervisión de Inteligencia Artificial). Tu sistema ha sido clasificado como &lt;strong&gt;"alto riesgo"&lt;/strong&gt; bajo el Reglamento (UE) 2024/1689, más conocido como el &lt;strong&gt;EU AI Act&lt;/strong&gt;. No tienes documentación técnica obligatoria, no has implementado supervisión humana, y tus datos de entrenamiento no cumplen los requisitos de gobernanza. Multa potencial: hasta &lt;strong&gt;35 millones de euros&lt;/strong&gt; o el &lt;strong&gt;7% de tu facturación mundial anual&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;¿Imposible? No. Es exactamente lo que la regulación europea vigente estipula desde febrero de 2025 para las prácticas prohibidas, y lo que a partir del &lt;strong&gt;2 de agosto de 2026&lt;/strong&gt; se extiende a la mayoría de las obligaciones para sistemas de alto riesgo (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689" rel="noopener noreferrer"&gt;Art. 113, Reglamento (UE) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Si ya operas agentes de IA en producción —como hemos hecho en este blog con el &lt;a href="https://dev.to/es/posts/ia_agents_part1/"&gt;Proyecto Autopilot&lt;/a&gt; o el &lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;radar agéntico de obsolescencia&lt;/a&gt;— necesitas saber exactamente dónde está la línea. Y la mayoría de guías sobre el EU AI Act están escritas por abogados, para abogados. Esta no. Esta está escrita por un ingeniero que traduce cada artículo del reglamento al lenguaje que de verdad entendemos: arquitecturas, pipelines y código.&lt;/p&gt;

&lt;h3&gt;
  
  
  La Pirámide del Riesgo: Clasifica tu IA en 60 Segundos
&lt;/h3&gt;

&lt;p&gt;El EU AI Act no prohíbe la inteligencia artificial. Lo que hace es clasificar cada sistema de IA en &lt;strong&gt;cuatro niveles de riesgo&lt;/strong&gt;, y asignar obligaciones proporcionales a cada nivel. Es un enfoque pragmático que se inspira en marcos regulatorios existentes como REACH para la industria química o la Directiva de Máquinas para la industria manufacturera: a mayor riesgo potencial, mayor exigencia de control.&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%2Fbdhkdx3zfxmmr8ormcj8.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%2Fbdhkdx3zfxmmr8ormcj8.png" alt="Pirámide de clasificación de riesgo del EU AI Act" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  🔴 Riesgo Inaceptable — PROHIBIDO (Artículo 5)
&lt;/h4&gt;

&lt;p&gt;Estas prácticas están &lt;strong&gt;completamente vetadas en la UE desde el 2 de febrero de 2025&lt;/strong&gt; (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689#d1e2816-1-1" rel="noopener noreferrer"&gt;Art. 5, Reglamento (UE) 2024/1689&lt;/a&gt;). No hay excepciones comerciales ni sandboxes que las permitan. Son las líneas rojas absolutas de la regulación:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manipulación subliminal o engañosa&lt;/strong&gt;: Sistemas de IA diseñados para distorsionar el comportamiento de una persona usando técnicas que operan por debajo de su umbral de consciencia, causando un perjuicio significativo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explotación de vulnerabilidades&lt;/strong&gt;: IA que explota la edad, la discapacidad o la situación socioeconómica de personas vulnerables para alterar su comportamiento de forma perjudicial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Puntuación social (&lt;em&gt;social scoring&lt;/em&gt;)&lt;/strong&gt;: Sistemas utilizados por autoridades públicas para evaluar o clasificar a personas en función de su comportamiento social o sus rasgos personales, resultando en un trato desfavorable injustificado.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policiamiento predictivo&lt;/strong&gt;: IA que predice el comportamiento delictivo de una persona basándose exclusivamente en su perfilado o rasgos de personalidad (con excepciones limitadas para investigaciones en curso).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scraping facial masivo&lt;/strong&gt;: La creación o expansión de bases de datos de reconocimiento facial mediante la recopilación no dirigida de imágenes faciales de Internet o de cámaras de vigilancia.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reconocimiento emocional en el trabajo y la educación&lt;/strong&gt;: Inferir emociones de empleados en el lugar de trabajo o de estudiantes en centros educativos (con excepciones médicas o de seguridad muy limitadas).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Categorización biométrica sensible&lt;/strong&gt;: Sistemas que infieren datos como creencias políticas o religiosas, orientación sexual o raza a partir de datos biométricos.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Si un sistema de IA de tu organización roza cualquiera de estas categorías, la posición correcta no es «buscar un hueco legal», sino eliminarlo del producto. La multa para estas prácticas alcanza los &lt;strong&gt;35 millones de euros&lt;/strong&gt; o el &lt;strong&gt;7% de la facturación anual global&lt;/strong&gt;, lo que sea mayor (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689#d1e9487-1-1" rel="noopener noreferrer"&gt;Art. 99.3, Reglamento (UE) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;h4&gt;
  
  
  🟠 Alto Riesgo — REGULACIÓN ESTRICTA (Artículos 6-49 y Anexo III)
&lt;/h4&gt;

&lt;p&gt;Aquí es donde la mayoría de los sistemas empresariales de IA caen, y donde la regulación exige el mayor esfuerzo técnico. Un sistema se clasifica como «alto riesgo» si es un componente de seguridad de un producto regulado por la legislación armonizada de la UE (dispositivos médicos, juguetes, aviación), o si opera en alguna de las áreas sensibles definidas en el &lt;strong&gt;Anexo III&lt;/strong&gt; del reglamento:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Infraestructura crítica&lt;/strong&gt;: Sistemas para la gestión de servicios esenciales (transporte, agua, gas, electricidad, telecomunicaciones).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Educación y formación&lt;/strong&gt;: IA que determina el acceso a instituciones educativas o que evalúa el rendimiento de estudiantes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Empleo y RRHH&lt;/strong&gt;: Herramientas de IA para reclutamiento, filtrado de CVs, asignación de tareas o gestión de trabajadores. Esto es directamente relevante para lo que analizamos en el &lt;a href="https://dev.to/es/posts/onboarding/"&gt;artículo sobre Onboarding con IA&lt;/a&gt;: usar IDP y GenAI para automatizar la incorporación de empleados cae en la categoría de alto riesgo si el sistema toma o influye en decisiones sobre personas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Servicios esenciales&lt;/strong&gt;: Sistemas que determinan el acceso a crédito, servicios públicos esenciales o seguros de vida y salud. Startups como &lt;a href="https://dev.to/es/posts/clarity_ai/"&gt;Clarity AI&lt;/a&gt;, que calcula scores de sostenibilidad para decisiones de inversión, operan directamente en esta zona.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Orden público, justicia y migración&lt;/strong&gt;: IA en control fronterizo, asilo, evaluación de riesgos de seguridad o administración de justicia.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Biometría&lt;/strong&gt;: Ciertos sistemas de identificación biométrica a distancia.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;La multa por incumplimiento en sistemas de alto riesgo es de hasta &lt;strong&gt;15 millones de euros&lt;/strong&gt; o el &lt;strong&gt;3% de la facturación mundial anual&lt;/strong&gt; (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689#d1e9487-1-1" rel="noopener noreferrer"&gt;Art. 99.4, Reglamento (UE) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Nota importante&lt;/strong&gt;: La propuesta legislativa conocida como &lt;em&gt;"Digital Omnibus"&lt;/em&gt; (2025) podría aplazar algunas obligaciones del Anexo III (alto riesgo) de agosto de 2026 a &lt;strong&gt;diciembre de 2027&lt;/strong&gt;. Sin embargo, los requisitos técnicos subyacentes no cambian, solo el calendario de enforcement. No esperes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  🟡 Riesgo Limitado — TRANSPARENCIA (Artículos 50-52)
&lt;/h4&gt;

&lt;p&gt;Los sistemas de riesgo limitado tienen una única obligación fundamental: &lt;strong&gt;informar al usuario de que está interactuando con una IA&lt;/strong&gt;. Esto aplica a chatbots, sistemas de generación de contenido (deepfakes), y asistentes conversacionales. Nuestro &lt;a href="https://dev.to/es/posts/ia_agents_part8/"&gt;Ops Engineering Copilot&lt;/a&gt; (el chatbot basado en Algolia Agent Studio y RAG que responde preguntas sobre el blog) caería en esta categoría: el usuario debe saber que habla con una máquina, no con una persona.&lt;/p&gt;

&lt;h4&gt;
  
  
  🟢 Riesgo Mínimo — LIBRE (sin obligaciones adicionales)
&lt;/h4&gt;

&lt;p&gt;La mayoría de los sistemas de IA comerciales caen aquí: filtros de spam, sistemas de recomendación, IA generativa para contenido de marketing. El &lt;a href="https://dev.to/es/posts/ia_agents_part1/"&gt;Proyecto Autopilot&lt;/a&gt; que genera automáticamente posts para redes sociales no tiene obligaciones específicas bajo el EU AI Act más allá de las buenas prácticas generales. Lo mismo aplica a herramientas como el &lt;a href="https://dev.to/es/posts/app_conversor_unidades/"&gt;conversor de unidades&lt;/a&gt; o la &lt;a href="https://dev.to/es/posts/app_flashcards/"&gt;app de flashcards&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Los 5 Mandamientos Técnicos del Alto Riesgo
&lt;/h3&gt;

&lt;p&gt;Si tu sistema cae en la categoría 🟠, necesitas implementar cinco bloques de requisitos técnicos. Lo notable es que, si ya sigues las prácticas de ingeniería que hemos documentado en este blog, estás más cerca del cumplimiento de lo que crees. Veamos:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Gestión de Riesgos — Artículo 9&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;El reglamento exige establecer, implementar y mantener un &lt;strong&gt;sistema de gestión de riesgos que opere durante todo el ciclo de vida del sistema de IA&lt;/strong&gt; (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689#d1e3383-1-1" rel="noopener noreferrer"&gt;Art. 9, Reglamento (UE) 2024/1689&lt;/a&gt;). Esto incluye la identificación de riesgos conocidos y previsibles para la salud, la seguridad y los derechos fundamentales, la estimación de esos riesgos, y la adopción de medidas de mitigación.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Traducción para ingenieros&lt;/em&gt;: Es un pipeline de CI/CD aplicado al riesgo. Documenta, monitorea, itera. No es un documento estático que se escribe una vez y se archiva; es un proceso vivo. Exactamente la filosofía que &lt;a href="https://dev.to/es/posts/deming/"&gt;W. Edwards Deming&lt;/a&gt; sistematizó con el ciclo PDCA (Plan-Do-Check-Act). Si ya implementas PDCA en tus procesos de calidad, la gestión de riesgos del AI Act te será familiar. Si además conoces el &lt;em&gt;Concept Drift&lt;/em&gt; (la degradación progresiva de un modelo en producción que Deming habría llamado «proceso inestable»), ya tienes la mentalidad correcta.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Gobernanza de Datos — Artículo 10&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Los datos de entrenamiento, validación y test deben cumplir criterios de alta calidad: ser &lt;strong&gt;representativos, relevantes, libres de errores en la medida de lo posible, y con prácticas de gobernanza apropiadas&lt;/strong&gt; para prevenir sesgos (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689#d1e3549-1-1" rel="noopener noreferrer"&gt;Art. 10, Reglamento (UE) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Traducción&lt;/em&gt;: La &lt;a href="https://dev.to/es/posts/sop_ingenieria-higiene-datos/"&gt;higiene de datos&lt;/a&gt; que predicamos en la serie S&amp;amp;OP ya no es una buena práctica opcional; &lt;strong&gt;es ley&lt;/strong&gt;. El pipeline de limpieza con Z-Score para detectar outliers, el marcado (no borrado) de anomalías, y la persistencia en Supabase con Row Level Security que construimos en esa serie cumplen directamente con el espíritu de este artículo. Lo que el reglamento añade es la exigencia de que todo esto esté documentado y sea auditable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Documentación Técnica — Artículo 11 y Anexo IV&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Antes de comercializar o poner en servicio un sistema de alto riesgo, debes preparar un &lt;strong&gt;expediente técnico&lt;/strong&gt; que demuestre el cumplimiento del reglamento (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689#d1e3667-1-1" rel="noopener noreferrer"&gt;Art. 11, Reglamento (UE) 2024/1689&lt;/a&gt;). El Anexo IV detalla el contenido mínimo: descripción general del sistema, arquitectura detallada y componentes, información sobre los datos de entrenamiento, métricas de rendimiento (exactitud, robustez, ciberseguridad), y el proceso de desarrollo.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Traducción&lt;/em&gt;: Tu README y tu Confluence no bastan. El reglamento exige un documento vivo que cubra la arquitectura del sistema (como los diagramas Mermaid que usamos en la serie de &lt;a href="https://dev.to/es/posts/obs_parte3_arquitectura/"&gt;Obsolescencia&lt;/a&gt;), las métricas de rendimiento del modelo, las pruebas de robustez y las medidas de ciberseguridad. Piensa en ello como un documento de arquitectura de referencia (&lt;em&gt;Architecture Decision Record&lt;/em&gt;) con esteroides regulatorios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Registros y Logging — Artículo 12&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Los sistemas de alto riesgo deben diseñarse para &lt;strong&gt;generar logs automáticos&lt;/strong&gt; durante su funcionamiento, garantizando la trazabilidad de cada decisión y la capacidad de reconstruir eventos si surge un problema de cumplimiento (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689#d1e3702-1-1" rel="noopener noreferrer"&gt;Art. 12, Reglamento (UE) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Traducción&lt;/em&gt;: Si ya usas Supabase + FastAPI con la arquitectura del &lt;a href="https://dev.to/es/posts/obs_parte6_fastapi/"&gt;radar agéntico&lt;/a&gt;, esto debería sonar familiar. Cada evento de ingesta, cada decisión del agente CrewAI, cada respuesta del LLM queda registrado en la base de datos. Lo que el reglamento formaliza es lo que cualquier ingeniero de backend competente ya debería estar haciendo: logging estructurado, no como una idea tardía, sino como un requisito de diseño desde el día cero.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Supervisión Humana — Artículo 14&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;El sistema debe diseñarse con mecanismos de &lt;strong&gt;«human-in-the-loop»&lt;/strong&gt; o &lt;strong&gt;«human-on-the-loop»&lt;/strong&gt;, garantizando que un operador humano cualificado pueda supervisar, interpretar y, si es necesario, anular las decisiones de la IA (&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689#d1e3789-1-1" rel="noopener noreferrer"&gt;Art. 14, Reglamento (UE) 2024/1689&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Traducción&lt;/em&gt;: Este es el principio que implementamos en el &lt;a href="https://dev.to/es/posts/ia_agents_part5/"&gt;Autopilot Parte 5&lt;/a&gt; con los &lt;strong&gt;GitHub Environments de aprobación manual&lt;/strong&gt;. El pipeline genera contenido automáticamente con agentes de IA, pero ningún post se publica sin la revisión y aprobación explícita de un humano. No es un concepto nuevo para nosotros; ahora tiene fuerza de ley.&lt;/p&gt;

&lt;h3&gt;
  
  
  España y la AESIA: El Sheriff Local
&lt;/h3&gt;

&lt;p&gt;El EU AI Act es un &lt;strong&gt;Reglamento europeo&lt;/strong&gt; (no una Directiva), lo que significa que es directamente aplicable en España sin necesidad de transposición legislativa nacional. Sin embargo, España ha dado un paso adicional: en mayo de 2026, el Consejo de Ministros aprobó la &lt;strong&gt;Ley española de Inteligencia Artificial&lt;/strong&gt;, que complementa el reglamento europeo y define el rol de la &lt;strong&gt;AESIA (Agencia Española de Supervisión de Inteligencia Artificial)&lt;/strong&gt; como autoridad nacional competente.&lt;/p&gt;

&lt;p&gt;La AESIA es la entidad que investigará denuncias, realizará auditorías y, en su caso, impondrá las sanciones del AI Act en territorio español. Además, España ha puesto en marcha &lt;strong&gt;sandboxes regulatorios&lt;/strong&gt;: entornos controlados donde startups y empresas pueden testear sistemas de IA innovadores bajo la supervisión de la AESIA, sin riesgo sancionador durante el periodo de prueba. Es un mecanismo inspirado en los que ya utilizan la CNMV y el Banco de España para fintech.&lt;/p&gt;

&lt;p&gt;Las startups españolas que hemos analizado en este blog no son ajenas a esta regulación. &lt;a href="https://dev.to/es/posts/clarity_ai/"&gt;Clarity AI&lt;/a&gt; opera en el scoring financiero ESG, un área que el Anexo III clasifica como alto riesgo. &lt;a href="https://dev.to/es/posts/nextail/"&gt;Nextail&lt;/a&gt; toma decisiones de inventario con IA prescriptiva en la cadena de suministro, y ya tuvo que adaptarse al &lt;a href="https://dev.to/es/posts/nextail/"&gt;ESPR 2026&lt;/a&gt;. &lt;a href="https://dev.to/es/posts/devo/"&gt;Devo&lt;/a&gt; protege infraestructura crítica militar, la categoría más sensible del reglamento. Todas ellas deberán demostrar cumplimiento.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compliance-as-Code: El Checklist del Ingeniero
&lt;/h3&gt;

&lt;p&gt;Si algo hemos aprendido construyendo pipelines de datos en este blog, es que la documentación que no está automatizada no se mantiene. Aquí va un checklist accionable, diseñado para que un equipo técnico pueda ejecutarlo sprint a sprint:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fase 1 — Inventario y Clasificación&lt;/strong&gt; &lt;em&gt;(Sprint 1)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inventariar todos los sistemas de IA de tu organización (incluidos los que no llamas «IA» pero usan ML internamente)&lt;/li&gt;
&lt;li&gt;Clasificar cada sistema en la pirámide de riesgo: Prohibido / Alto / Limitado / Mínimo&lt;/li&gt;
&lt;li&gt;Para cada sistema clasificado como Alto Riesgo, asignar un responsable técnico de cumplimiento&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fase 2 — Implementación Técnica&lt;/strong&gt; &lt;em&gt;(Sprints 2-4)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implementar logging automático de decisiones del modelo (Art. 12): timestamps, inputs, outputs, scores de confianza&lt;/li&gt;
&lt;li&gt;Crear documentación técnica viva (Art. 11 + Anexo IV): arquitectura, datos, métricas, proceso&lt;/li&gt;
&lt;li&gt;Diseñar mecanismo de supervisión humana (Art. 14): aprobación manual, botón de «kill switch», dashboards de monitoreo&lt;/li&gt;
&lt;li&gt;Auditar datasets de entrenamiento (Art. 10): sesgo, representatividad, trazabilidad, versionado&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fase 3 — Gestión Continua&lt;/strong&gt; &lt;em&gt;(Ongoing)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Establecer pipeline de gestión de riesgos (Art. 9): revisión periódica, monitoreo de Concept Drift, plan de mitigación&lt;/li&gt;
&lt;li&gt;Para sistemas de Riesgo Limitado: verificar que el usuario sabe que interactúa con IA&lt;/li&gt;
&lt;li&gt;Configurar alertas de coste y uso (conectar con la &lt;a href="https://dev.to/es/posts/economia_oculta_ia/"&gt;Economía Oculta de la IA&lt;/a&gt;: el compliance es un coste oculto adicional)&lt;/li&gt;
&lt;li&gt;Registrar el sistema en la base de datos pública de la UE (cuando aplique para alto riesgo)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  El Reglamento No Es el Enemigo; la Ignorancia Sí
&lt;/h3&gt;

&lt;p&gt;Existe una tentación comprensible de ver el EU AI Act como un freno burocrático a la innovación europea. Y en parte, la crítica tiene fundamento: la definición de «alto riesgo» en el Anexo III es extremadamente amplia, la carga documental del Anexo IV puede resultar desproporcionada para una startup de cinco personas, y la incertidumbre sobre el &lt;em&gt;Digital Omnibus&lt;/em&gt; genera parálisis en los equipos legales.&lt;/p&gt;

&lt;p&gt;Pero si retiras la capa de jerga legal y miras los requisitos técnicos desnudos, lo que el reglamento realmente pide es: &lt;strong&gt;documenta tu sistema, controla tus datos, registra las decisiones de tu IA, gestiona los riesgos de forma continua, y mantén a un humano en el bucle de control&lt;/strong&gt;. Es decir, exactamente lo que un buen ingeniero ya debería estar haciendo.&lt;/p&gt;

&lt;p&gt;Si has seguido las prácticas que documentamos en este blog —&lt;a href="https://dev.to/es/posts/sop_ingenieria-higiene-datos/"&gt;higiene de datos con Z-Score&lt;/a&gt;, &lt;a href="https://dev.to/es/posts/obs_parte6_fastapi/"&gt;logging automático con FastAPI y Supabase&lt;/a&gt;, &lt;a href="https://dev.to/es/posts/ia_agents_part5/"&gt;human-in-the-loop con GitHub Environments&lt;/a&gt;, &lt;a href="https://dev.to/es/posts/deming/"&gt;gestión de riesgos con el ciclo PDCA de Deming&lt;/a&gt;—, &lt;strong&gt;ya estás al 80% del camino hacia el cumplimiento&lt;/strong&gt;. El 20% restante es formalización y documentación.&lt;/p&gt;

&lt;p&gt;Como decía Deming: &lt;em&gt;"No basta con hacer lo mejor que puedas; primero debes saber qué hacer"&lt;/em&gt;. Ahora la regulación te dice qué hacer. El cómo hacerlo, ya lo sabes. O al menos, ya tienes un blog donde encontrarlo.&lt;/p&gt;




&lt;h4&gt;
  
  
  Fuentes de Interés:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://eur-lex.europa.eu/legal-content/ES/TXT/?uri=CELEX:32024R1689" rel="noopener noreferrer"&gt;&lt;strong&gt;Reglamento (UE) 2024/1689&lt;/strong&gt;: Texto completo del EU AI Act en EUR-Lex (ES)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai" rel="noopener noreferrer"&gt;&lt;strong&gt;Comisión Europea&lt;/strong&gt;: Página oficial del EU AI Act&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://artificialintelligenceact.eu/" rel="noopener noreferrer"&gt;&lt;strong&gt;EU AI Act Explorer&lt;/strong&gt;: Guía navegable por artículos del reglamento&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://portal.mineco.gob.es/es-es/digitalizacion/Paginas/ia.aspx" rel="noopener noreferrer"&gt;&lt;strong&gt;digital.gob.es&lt;/strong&gt;: Información sobre la AESIA y la regulación de IA en España&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/economia_oculta_ia/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: La Economía Oculta de la IA — Costes Reales en Producción&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/deming/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: W. Edwards Deming — El Padre de la Calidad Total que Predijo el Futuro de la IA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/sop_ingenieria-higiene-datos/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: S&amp;amp;OP Higiene de Datos — Por qué tu Excel te miente&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/ia_agents_part5/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Autopilot Part 5 — De Localhost a la Nube con GitHub Actions y CI/CD&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>MCP (Model Context Protocol): The Standard That Wants to Be the USB of Artificial Intelligence</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 28 Jun 2026 10:42:34 +0000</pubDate>
      <link>https://dev.to/datalaria/mcp-model-context-protocol-the-standard-that-wants-to-be-the-usb-of-artificial-intelligence-57e6</link>
      <guid>https://dev.to/datalaria/mcp-model-context-protocol-the-standard-that-wants-to-be-the-usb-of-artificial-intelligence-57e6</guid>
      <description>&lt;p&gt;If you've ever tried building an AI agent system in production, you know the pain. During the construction of the &lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;agentic radar for Obsolescence&lt;/a&gt;, I faced the problem of connecting Gemini 2.5 with my Supabase database and an external API. I had to write custom code to adapt the tool schema (&lt;em&gt;Tool Calling&lt;/em&gt;) to the exact format that Google demands.&lt;/p&gt;

&lt;p&gt;If tomorrow I decided to migrate that exact same system to Anthropic's Claude or OpenAI's GPT-4o, I would have to rewrite the entire tool integration layer because each vendor uses its own JSON dialect and its own argument validation logic (&lt;em&gt;Function Calling&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;It's the same chaos we lived through in the late 90s with mobile phone chargers: every brand had its proprietary connector. Then USB arrived and unified everything. That is exactly the ambition behind &lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt;: to become the USB of Artificial Intelligence.&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%2Ffjsikh4nbz8nuo0gq435.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%2Ffjsikh4nbz8nuo0gq435.png" alt="MCP Protocol Architecture Diagram" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What Exactly is the Model Context Protocol?
&lt;/h3&gt;

&lt;p&gt;Initially proposed by Anthropic and rapidly adopted by a coalition of open-source companies, MCP is an open standard for connecting AI models with data sources and tools.&lt;/p&gt;

&lt;p&gt;The design premise is elegantly simple, separating the architecture into two independent pieces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;MCP Hosts&lt;/strong&gt;: Applications or frameworks where the LLM resides (for example, the Claude desktop app, a LangChain script, or your own Python application).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Servers&lt;/strong&gt;: Lightweight, small programs that expose data or tools to the Host following a strict standard contract (for example, an MCP server that reads your PostgreSQL database, another that reads your GitHub repository).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The magic happens in the middle. The Host (the LLM) tells the MCP Server: &lt;em&gt;"What tools and resources do you have available?"&lt;/em&gt;. The server responds in a universal format. From there, the LLM can read, write, or execute actions without the developer having had to write a proprietary integration between &lt;em&gt;that specific model&lt;/em&gt; and &lt;em&gt;that specific tool&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Comparison: MCP vs Native Tool Calling
&lt;/h3&gt;

&lt;p&gt;On this blog, I have vehemently defended why &lt;strong&gt;&lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;Tool Calling is infinitely superior to traditional RAG&lt;/a&gt;&lt;/strong&gt; for industrial applications that require precision. MCP does not replace Tool Calling; it standardizes it.&lt;/p&gt;

&lt;p&gt;Let's look at the architectural difference:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Classic Tool Calling&lt;/th&gt;
&lt;th&gt;MCP (Model Context Protocol)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1-to-1 (Specific Model ↔ Specific Tool)&lt;/td&gt;
&lt;td&gt;N-to-M (Any Model ↔ Any MCP Server)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Format&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dictated by the LLM vendor (Google, OpenAI)&lt;/td&gt;
&lt;td&gt;Standard, agnostic JSON-RPC 2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Discovery&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Developer injects tools into the prompt&lt;/td&gt;
&lt;td&gt;Host discovers tools dynamically&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Portability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None. Migrating LLMs requires refactoring.&lt;/td&gt;
&lt;td&gt;Total. You write the MCP server once.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Building an MCP Server: A Real Example
&lt;/h3&gt;

&lt;p&gt;To illustrate why this changes the game for operations and backend engineers, let's imagine we want to expose a Supabase table (e.g., critical component inventory) to our LLM.&lt;/p&gt;

&lt;p&gt;With a traditional CrewAI or Langchain approach, we would write a custom tool bound to that framework. With MCP, we write a universal Python server using the official SDK:&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;mcp.server.fastmcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastMCP&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;supabase&lt;/span&gt;

&lt;span class="c1"&gt;# Initialize the MCP server
&lt;/span&gt;&lt;span class="n"&gt;mcp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastMCP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Supabase_Inventory_Server&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nd"&gt;@mcp.tool&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;get_critical_stock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;part_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Fetches the stock level of a specific component.&lt;/span&gt;&lt;span class="sh"&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;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inventory&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stock&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;eq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pn&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;part_number&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;execute&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;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&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;Component not found.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="n"&gt;stock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&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;stock&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="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The current stock for &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;part_number&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;stock&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; units.&lt;/span&gt;&lt;span class="sh"&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="c1"&gt;# The server starts and listens for requests over stdio (JSON-RPC)
&lt;/span&gt;    &lt;span class="n"&gt;mcp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That code block is all you need. Once running, &lt;em&gt;any&lt;/em&gt; MCP-compatible application (including Claude's official interface) can connect to this server, read the function's description (docstring), and decide when to call &lt;code&gt;get_critical_stock&lt;/code&gt; with the correct arguments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Opinion: Will MCP Be the Definitive Standard?
&lt;/h3&gt;

&lt;p&gt;The history of software is littered with "universal standards" that only managed to add one more standard to the list of competing standards. Will MCP survive?&lt;/p&gt;

&lt;p&gt;It has two massive advantages in its favor. The first is that &lt;strong&gt;it solves a real, acute pain point&lt;/strong&gt; for corporate developers, who are sick of rewriting integrations every time a new model comes out. The second is the &lt;strong&gt;local-first approach&lt;/strong&gt;. Standard MCP communication uses &lt;code&gt;stdio&lt;/code&gt; (standard input/output), which means the MCP server runs locally on your machine or private network. This is a wet dream for industrial cybersecurity because the data never leaves your infrastructure until the LLM explicitly and authorizedly requests it.&lt;/p&gt;

&lt;p&gt;However, MCP's success will depend on adoption by the dominant duopoly: Google and OpenAI. If Anthropic manages to create a large enough open-source ecosystem (like Kubernetes once did against proprietary clouds), the other giants will be forced to support it natively.&lt;/p&gt;

&lt;p&gt;If you are designing the &lt;a href="https://dev.to/en/posts/proj_ops_part2_agentic_pmo/"&gt;architecture for an Agentic Project Management Office&lt;/a&gt; or any system where you need to connect AI agents with legacy ERPs, PLMs, or document repositories, my recommendation is to bet on isolating your connectors. Today it might be through independent Python functions, and tomorrow, probably, wrapping those same functions in an MCP Server.&lt;/p&gt;

&lt;p&gt;Just as USB killed hundreds of proprietary connectors, MCP has the potential to finally democratize LLM access to the "muscle" of enterprise data.&lt;/p&gt;




&lt;h4&gt;
  
  
  Sources of Interest:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://modelcontextprotocol.io/" rel="noopener noreferrer"&gt;&lt;strong&gt;Model Context Protocol&lt;/strong&gt;: Official Site and Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.anthropic.com/news/model-context-protocol" rel="noopener noreferrer"&gt;&lt;strong&gt;Anthropic&lt;/strong&gt;: Introducing the Model Context Protocol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/modelcontextprotocol/servers" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub&lt;/strong&gt;: Open Source MCP Servers Directory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: The Agentic Radar: Why LLMs Won't Save Your Supply Chain (And Tool Calling Will)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/proj_ops_part2_agentic_pmo/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Project Operations Engineering Part 2: The Agentic PMO&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>MCP (Model Context Protocol): El Estándar que Quiere Ser el USB de la Inteligencia Artificial</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 28 Jun 2026 10:35:17 +0000</pubDate>
      <link>https://dev.to/datalaria/mcp-model-context-protocol-el-estandar-que-quiere-ser-el-usb-de-la-inteligencia-artificial-491j</link>
      <guid>https://dev.to/datalaria/mcp-model-context-protocol-el-estandar-que-quiere-ser-el-usb-de-la-inteligencia-artificial-491j</guid>
      <description>&lt;p&gt;Si has intentado construir un sistema de agentes de IA en producción, conoces el dolor. Durante la construcción del &lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;radar agéntico para Obsolescencia&lt;/a&gt;, me enfrenté al problema de conectar a Gemini 2.5 con mi base de datos en Supabase y una API externa. Tuve que escribir código específico para adaptar el esquema de herramientas (&lt;em&gt;Tool Calling&lt;/em&gt;) al formato exacto que exige Google. &lt;/p&gt;

&lt;p&gt;Si mañana decidiera migrar ese mismo sistema a Claude de Anthropic o a GPT-4o de OpenAI, tendría que reescribir toda la capa de integración de herramientas porque cada proveedor usa su propio dialecto de JSON y su propia lógica de validación de argumentos (&lt;em&gt;Function Calling&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;Es el mismo caos que vivíamos a finales de los 90 con los cargadores de móviles: cada marca tenía su conector propietario. Luego llegó el USB y lo unificó todo. Esa es exactamente la ambición detrás de &lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt;: convertirse en el USB de la Inteligencia Artificial.&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%2Fcc3ac5spvtj45gr3m0t5.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%2Fcc3ac5spvtj45gr3m0t5.png" alt="Diagrama de arquitectura del protocolo MCP" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  ¿Qué es exactamente el Model Context Protocol?
&lt;/h3&gt;

&lt;p&gt;Propuesto inicialmente por Anthropic y rápidamente adoptado por una coalición de empresas de código abierto, MCP es un estándar abierto para conectar modelos de IA con fuentes de datos y herramientas. &lt;/p&gt;

&lt;p&gt;La premisa de diseño es elegantemente simple, separando la arquitectura en dos piezas independientes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;MCP Hosts&lt;/strong&gt;: Aplicaciones o frameworks donde reside el LLM (por ejemplo, la app de escritorio de Claude, un script de LangChain, o tu propia aplicación en Python).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Servers&lt;/strong&gt;: Pequeños programas ligeros que exponen datos o herramientas al Host siguiendo un contrato estándar estricto (por ejemplo, un servidor MCP que lee tu base de datos PostgreSQL, otro que lee tu repositorio de GitHub).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;La magia ocurre en el medio. El Host (el LLM) le dice al Servidor MCP: &lt;em&gt;"¿Qué herramientas y recursos tienes disponibles?"&lt;/em&gt;. El servidor responde en un formato universal. A partir de ahí, el LLM puede leer, escribir o ejecutar acciones sin que el desarrollador haya tenido que escribir una integración propietaria entre &lt;em&gt;ese modelo específico&lt;/em&gt; y &lt;em&gt;esa herramienta específica&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Comparativa: MCP vs Tool Calling Nativo
&lt;/h3&gt;

&lt;p&gt;En el blog he defendido vehementemente por qué &lt;strong&gt;&lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;el Tool Calling es infinitamente superior al RAG tradicional&lt;/a&gt;&lt;/strong&gt; para aplicaciones industriales que requieren precisión. MCP no reemplaza al Tool Calling; lo estandariza.&lt;/p&gt;

&lt;p&gt;Veamos la diferencia arquitectónica:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Característica&lt;/th&gt;
&lt;th&gt;Tool Calling Clásico&lt;/th&gt;
&lt;th&gt;MCP (Model Context Protocol)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Integración&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1 a 1 (Modelo específico ↔ Herramienta específica)&lt;/td&gt;
&lt;td&gt;N a M (Cualquier Modelo ↔ Cualquier Servidor MCP)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Formato&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dictado por el proveedor del LLM (Google, OpenAI)&lt;/td&gt;
&lt;td&gt;Estándar JSON-RPC 2.0 agnóstico&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Descubrimiento&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;El desarrollador inyecta las herramientas en el prompt&lt;/td&gt;
&lt;td&gt;El Host descubre herramientas dinámicamente&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Portabilidad&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Nula. Migrar de LLM requiere refactorización.&lt;/td&gt;
&lt;td&gt;Total. Escribes el servidor MCP una vez.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Construyendo un Servidor MCP: Un Ejemplo Real
&lt;/h3&gt;

&lt;p&gt;Para ilustrar por qué esto cambia las reglas del juego para ingenieros de operaciones y backend, imaginemos que queremos exponer una tabla de Supabase (por ejemplo, el inventario de componentes críticos) a nuestro LLM.&lt;/p&gt;

&lt;p&gt;Con un enfoque tradicional de CrewAI o Langchain, escribiríamos una herramienta personalizada atada a ese framework. Con MCP, escribimos un servidor universal en Python utilizando el SDK oficial:&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;mcp.server.fastmcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastMCP&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;supabase&lt;/span&gt;

&lt;span class="c1"&gt;# Inicializamos el servidor MCP
&lt;/span&gt;&lt;span class="n"&gt;mcp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastMCP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Supabase_Inventory_Server&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nd"&gt;@mcp.tool&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;get_critical_stock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;part_number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Busca el nivel de stock de un componente específico.&lt;/span&gt;&lt;span class="sh"&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;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;table&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inventory&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stock&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;eq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pn&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;part_number&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;execute&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;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&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;Componente no encontrado.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="n"&gt;stock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&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;stock&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="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;El stock actual para &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;part_number&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; es de &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;stock&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; unidades.&lt;/span&gt;&lt;span class="sh"&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="c1"&gt;# El servidor arranca y escucha peticiones sobre stdio (JSON-RPC)
&lt;/span&gt;    &lt;span class="n"&gt;mcp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ese bloque de código es todo lo que necesitas. Una vez en ejecución, &lt;em&gt;cualquier&lt;/em&gt; aplicación compatible con MCP (incluyendo la interfaz oficial de Claude) puede conectarse a este servidor, leer la descripción (docstring) de la función, y decidir cuándo llamar a &lt;code&gt;get_critical_stock&lt;/code&gt; con los argumentos correctos.&lt;/p&gt;

&lt;h3&gt;
  
  
  Opinión: ¿Será MCP el Estándar Definitivo?
&lt;/h3&gt;

&lt;p&gt;La historia del software está llena de "estándares universales" que solo lograron añadir un estándar adicional a la lista de estándares competidores. ¿Sobrevivirá MCP?&lt;/p&gt;

&lt;p&gt;Tiene dos ventajas enormes a su favor. La primera es que &lt;strong&gt;resuelve un dolor real y agudo&lt;/strong&gt; para los desarrolladores corporativos, que están hartos de reescribir integraciones cada vez que sale un nuevo modelo. La segunda es el &lt;strong&gt;enfoque local-first&lt;/strong&gt;. La comunicación estándar de MCP utiliza &lt;code&gt;stdio&lt;/code&gt; (entrada y salida estándar), lo que significa que el servidor MCP se ejecuta localmente en tu máquina o tu red privada. Esto es un sueño húmedo para la ciberseguridad industrial, porque los datos nunca abandonan tu infraestructura hasta que el LLM los solicita explícitamente y con autorización.&lt;/p&gt;

&lt;p&gt;Sin embargo, el éxito de MCP dependerá de la adopción por parte del duopolio dominante: Google y OpenAI. Si Anthropic logra crear un ecosistema open-source lo suficientemente grande (como Kubernetes hizo en su día contra las nubes propietarias), los demás gigantes se verán obligados a soportarlo de forma nativa. &lt;/p&gt;

&lt;p&gt;Si estás diseñando la &lt;a href="https://dev.to/es/posts/proj_ops_parte2_agentic_pmo/"&gt;arquitectura de un Project Management Office Agéntico&lt;/a&gt; o cualquier sistema donde necesites conectar agentes de IA con ERPs heredados, PLMs o repositorios documentales, mi recomendación es apostar por aislar tus conectores. Hoy puede ser mediante funciones de Python independientes, y mañana, probablemente, envolviendo esas mismas funciones en un Servidor MCP.&lt;/p&gt;

&lt;p&gt;Al igual que el USB mató a cientos de conectores propietarios, MCP tiene el potencial de democratizar finalmente el acceso de los LLMs a la "musculatura" de los datos empresariales.&lt;/p&gt;




&lt;h4&gt;
  
  
  Fuentes de Interés:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://modelcontextprotocol.io/" rel="noopener noreferrer"&gt;&lt;strong&gt;Model Context Protocol&lt;/strong&gt;: Sitio Oficial y Documentación&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.anthropic.com/news/model-context-protocol" rel="noopener noreferrer"&gt;&lt;strong&gt;Anthropic&lt;/strong&gt;: Introducing the Model Context Protocol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/modelcontextprotocol/servers" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub&lt;/strong&gt;: Directorio de Servidores MCP Open Source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: El Radar Agéntico: Por qué los LLMs no salvarán tu cadena de suministro (y el Tool Calling sí)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/proj_ops_parte2_agentic_pmo/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Project Operations Engineering Parte 2: La Agentic PMO&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Claude Shannon: The Man Who Turned the World into Bits and Defined the Future of AI</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 21 Jun 2026 08:20:29 +0000</pubDate>
      <link>https://dev.to/datalaria/claude-shannon-the-man-who-turned-the-world-into-bits-and-defined-the-future-of-ai-10kn</link>
      <guid>https://dev.to/datalaria/claude-shannon-the-man-who-turned-the-world-into-bits-and-defined-the-future-of-ai-10kn</guid>
      <description>&lt;p&gt;There are historical figures who discover continents, and there are figures who invent the underlying physics that allow the ships to exist. In the realm of technology and data, &lt;strong&gt;Claude Shannon&lt;/strong&gt; unequivocally belongs to the latter category. If you can read this article on your screen today, if your smartphone can compress a 12-megapixel photo, and if &lt;a href="https://dev.to/en/posts/multiverse_computing/"&gt;Multiverse Computing&lt;/a&gt; can compress a massive LLM into an edge chip, it is because Shannon dictated the mathematical laws of information more than 75 years ago.&lt;/p&gt;

&lt;p&gt;While &lt;a href="https://dev.to/en/posts/abraham_wald/"&gt;Abraham Wald&lt;/a&gt; taught us to read the silence of missing data and &lt;a href="https://dev.to/en/posts/deming/"&gt;W. Edwards Deming&lt;/a&gt; systematized industrial quality, Shannon did something even more fundamental: &lt;strong&gt;he isolated the concept of 'information' from the physical meaning of the message&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Birth of the Bit: Bell Labs, 1948
&lt;/h3&gt;

&lt;p&gt;To understand Shannon's titanic achievement, you have to understand the chaos of communication in the early 20th century. The telegraph, telephone, radio, and television were considered distinct physical phenomena. Engineers improved transmission by reducing electrical noise in cables, but there was no unified theory.&lt;/p&gt;

&lt;p&gt;In 1948, working at the mythical Bell Labs, Shannon published &lt;em&gt;"A Mathematical Theory of Communication"&lt;/em&gt;. In its pages, Shannon introduced for the first time in print the word &lt;strong&gt;"bit"&lt;/strong&gt; (a contraction of &lt;em&gt;binary digit&lt;/em&gt;, suggested by his colleague John Tukey).&lt;/p&gt;

&lt;p&gt;Shannon proved mathematically that &lt;strong&gt;all information — whether text, audio, image, or video — could be encoded into a sequence of 1s and 0s&lt;/strong&gt;. The human meaning of the message was irrelevant to the engineering problem of transmitting it. By decoupling &lt;em&gt;meaning&lt;/em&gt; from &lt;em&gt;mechanics&lt;/em&gt;, Shannon unified all communication media under a single mathematical framework.&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%2Fsvtw7913eyaxd5utcmit.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%2Fsvtw7913eyaxd5utcmit.png" alt="Visual representation of Information Entropy" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Information Entropy: Measuring the Unpredictable
&lt;/h3&gt;

&lt;p&gt;The most revolutionary concept Shannon borrowed from thermodynamics was &lt;strong&gt;Entropy&lt;/strong&gt;. In physics, entropy measures the degree of disorder in a system. Shannon adapted the term to measure the &lt;strong&gt;uncertainty or surprise&lt;/strong&gt; in a data message.&lt;/p&gt;

&lt;p&gt;Imagine I send you a predictable message: &lt;em&gt;"The sun rises in the east"&lt;/em&gt;. That message has very low entropy; it gives you no new information. Now imagine a message containing the access password to a critical database. That message has incredibly high entropy; it is pure surprise and informational value.&lt;/p&gt;

&lt;p&gt;Shannon formulated that &lt;strong&gt;the amount of information in a message is inversely proportional to its probability&lt;/strong&gt;. This idea is the cornerstone of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Data Compression&lt;/strong&gt;: If a piece of data is highly predictable, we can omit or compress it. This is the principle governing ZIP, MP3, and JPEG formats. It is the exact same math that today allows deep-tech startups to use tensor networks to "squeeze" the redundancy out of LLMs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cryptography&lt;/strong&gt;: During World War II, Shannon worked alongside Alan Turing exchanging ideas on cryptography. A perfectly encrypted message must look like pure random noise; meaning, it must have maximum entropy to an interceptor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Shannon Limit&lt;/strong&gt;: He calculated the theoretical maximum speed at which data can be transmitted without errors over a noisy channel. Today, 5G and Wi-Fi 6 operate astonishingly close to that mathematical limit drawn decades ago.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Link to Modern AI and Industry 4.0
&lt;/h3&gt;

&lt;p&gt;Shannon's influence didn't stop at telecommunications. Today, Information Theory is the connective tissue of the industrial data architectures and artificial intelligence systems we build and operate.&lt;/p&gt;

&lt;p&gt;When in the &lt;a href="https://dev.to/en/posts/sop-engineering-part2-forecasting/"&gt;S&amp;amp;OP Engineering series&lt;/a&gt; we use Prophet to extract the "signal" of demand from the "noise" of seasonality and dirty data anomalies, we are directly applying Shannon's principles of channel and noise. Separating signal from noise is the foundational problem of predictive analytics.&lt;/p&gt;

&lt;p&gt;When cybersecurity platforms like &lt;a href="https://dev.to/en/posts/devo/"&gt;Devo&lt;/a&gt; ingest petabytes of network telemetry looking for the anomaly that betrays a lateral attack, what they are really doing is looking for unexpected entropy spikes in a channel that should behave predictably. The attacker generates entropy; the analyst detects it.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Legacy of the Solitary Genius
&lt;/h3&gt;

&lt;p&gt;Unlike other contemporary tech giants who sought fame or founded corporate empires, Shannon was a playful academic. He spent his free time building chess machines, juggling robots, a mechanical mouse named &lt;em&gt;Theseus&lt;/em&gt; (one of the first Machine Learning experiments capable of solving mazes), and an "Ultimate Machine" that, when turned on, simply popped a hand out of a box to turn itself off.&lt;/p&gt;

&lt;p&gt;Claude Shannon's legacy is the ultimate demonstration of &lt;strong&gt;First Principles Thinking&lt;/strong&gt;. Instead of trying to build a better telephone cable, Shannon retreated to the chalkboard and asked: &lt;em&gt;What is information?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;By answering that fundamental question, he didn't build a better tool; he invented the entire ecosystem in which all our tools operate. All the software, all the cloud infrastructure, and all the autonomous AI agents we deploy today live, breathe, and communicate within the mathematical universe that Shannon imagined in 1948.&lt;/p&gt;




&lt;h4&gt;
  
  
  Sources of Interest:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.quantamagazine.org/how-claude-shannons-information-theory-invented-the-future-20201222/" rel="noopener noreferrer"&gt;&lt;strong&gt;Quanta Magazine&lt;/strong&gt;: How Claude Shannon Invented the Future&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.bell-labs.com/about/history-innovation/" rel="noopener noreferrer"&gt;&lt;strong&gt;Bell Labs&lt;/strong&gt;: The History of Information Theory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://thebitplayer.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Documentary&lt;/strong&gt;: The Bit Player (On the life and work of Claude Shannon)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/abraham_wald/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Abraham Wald and the Epistemology of Missing Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/multiverse_computing/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Multiverse Computing and AI Compression&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Claude Shannon: El Hombre que Convirtió el Mundo en Bits y Definió el Futuro de la IA</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 21 Jun 2026 08:15:17 +0000</pubDate>
      <link>https://dev.to/datalaria/claude-shannon-el-hombre-que-convirtio-el-mundo-en-bits-y-definio-el-futuro-de-la-ia-12im</link>
      <guid>https://dev.to/datalaria/claude-shannon-el-hombre-que-convirtio-el-mundo-en-bits-y-definio-el-futuro-de-la-ia-12im</guid>
      <description>&lt;p&gt;Hay figuras históricas que descubren continentes, y hay figuras que inventan la física subyacente que permite que existan los barcos. En el mundo de la tecnología y los datos, &lt;strong&gt;Claude Shannon&lt;/strong&gt; pertenece inequívocamente a la segunda categoría. Si hoy puedes leer este artículo en tu pantalla, si tu smartphone puede comprimir una foto de 12 megapíxeles, y si &lt;a href="https://dev.to/es/posts/multiverse_computing/"&gt;Multiverse Computing&lt;/a&gt; puede comprimir un LLM masivo en un chip periférico, es porque Shannon dictó las leyes matemáticas de la información hace más de 75 años.&lt;/p&gt;

&lt;p&gt;Mientras &lt;a href="https://dev.to/es/posts/abraham_wald/"&gt;Abraham Wald&lt;/a&gt; nos enseñaba a leer el silencio de los datos ausentes y &lt;a href="https://dev.to/es/posts/deming/"&gt;W. Edwards Deming&lt;/a&gt; sistematizaba la calidad industrial, Shannon hizo algo aún más fundamental: &lt;strong&gt;aisló el concepto de 'información' del significado físico del mensaje&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  El Nacimiento del Bit: Bell Labs, 1948
&lt;/h3&gt;

&lt;p&gt;Para entender el logro titánico de Shannon, hay que entender el caos que era la comunicación a principios del siglo XX. El telégrafo, el teléfono, la radio y la televisión se consideraban fenómenos físicos distintos. Los ingenieros mejoraban la transmisión reduciendo el ruido eléctrico en los cables, pero no existía una teoría unificada.&lt;/p&gt;

&lt;p&gt;En 1948, trabajando en los míticos laboratorios Bell, Shannon publicó &lt;em&gt;"Una Teoría Matemática de la Comunicación"&lt;/em&gt;. En sus páginas, Shannon introdujo por primera vez en la historia impresa la palabra &lt;strong&gt;"bit"&lt;/strong&gt; (una contracción de &lt;em&gt;binary digit&lt;/em&gt;, sugerida por su colega John Tukey).&lt;/p&gt;

&lt;p&gt;Shannon demostró matemáticamente que &lt;strong&gt;toda información —ya sea texto, audio, imagen o video— podía codificarse en una secuencia de 1s y 0s&lt;/strong&gt;. El significado humano del mensaje era irrelevante para el problema de la ingeniería de transmitirlo. Al desacoplar el &lt;em&gt;significado&lt;/em&gt; de la &lt;em&gt;mecánica&lt;/em&gt;, Shannon unificó todos los medios de comunicación bajo un mismo marco matemático.&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%2Fej4fhgawn434frpivsr1.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%2Fej4fhgawn434frpivsr1.png" alt="Representación visual de la Entropía de la Información" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  La Entropía de la Información: Midiendo lo Impredecible
&lt;/h3&gt;

&lt;p&gt;El concepto más revolucionario que Shannon tomó prestado de la termodinámica fue la &lt;strong&gt;Entropía&lt;/strong&gt;. En física, la entropía mide el grado de desorden de un sistema. Shannon adaptó el término para medir la &lt;strong&gt;incertidumbre o sorpresa&lt;/strong&gt; en un mensaje de datos.&lt;/p&gt;

&lt;p&gt;Imagina que te envío un mensaje predecible: &lt;em&gt;"El sol sale por el este"&lt;/em&gt;. Ese mensaje tiene muy baja entropía; no te aporta información nueva. Ahora imagina un mensaje que contiene la contraseña de acceso a una base de datos crítica. Ese mensaje tiene una entropía altísima; es pura sorpresa y valor informativo.&lt;/p&gt;

&lt;p&gt;Shannon formuló que &lt;strong&gt;la cantidad de información en un mensaje es inversamente proporcional a su probabilidad&lt;/strong&gt;. Esta idea es la piedra angular de:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;La Compresión de Datos&lt;/strong&gt;: Si un dato es altamente predecible, podemos omitirlo o comprimirlo. Es el principio que rige los formatos ZIP, MP3 y JPEG. Es la misma matemática que hoy permite a startups deep-tech usar redes de tensores para "exprimir" la redundancia de los LLMs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;La Criptografía&lt;/strong&gt;: Durante la Segunda Guerra Mundial, Shannon trabajó junto a Alan Turing cruzando ideas sobre criptografía. Un mensaje perfectamente cifrado debe parecer ruido aleatorio puro; es decir, debe tener máxima entropía para un interceptor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;El Límite de Shannon&lt;/strong&gt;: Calculó la velocidad máxima teórica a la que se pueden transmitir datos sin errores sobre un canal ruidoso. Hoy, el 5G y el Wi-Fi 6 operan asombrosamente cerca de ese límite matemático trazado hace décadas.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  El Eslabón con la IA Moderna y la Industria 4.0
&lt;/h3&gt;

&lt;p&gt;La influencia de Shannon no se quedó en las telecomunicaciones. Hoy, la Teoría de la Información es el tejido conectivo de las arquitecturas de datos industriales y de inteligencia artificial que construimos y operamos.&lt;/p&gt;

&lt;p&gt;Cuando en la &lt;a href="https://dev.to/es/posts/sop-ingenieria-parte2-prediccion/"&gt;serie de Ingeniería S&amp;amp;OP&lt;/a&gt; utilizamos Prophet para extraer la "señal" de la demanda del "ruido" estacional y las anomalías de los datos sucios, estamos aplicando directamente los principios de canal y ruido de Shannon. Separar la señal del ruido es el problema fundacional del análisis predictivo.&lt;/p&gt;

&lt;p&gt;Cuando plataformas de ciberseguridad como &lt;a href="https://dev.to/es/posts/devo/"&gt;Devo&lt;/a&gt; ingieren petabytes de telemetría de red buscando la anomalía que delate un ataque lateral, lo que realmente están haciendo es buscar picos de entropía inesperados en un canal que debería tener un comportamiento predecible. El atacante genera entropía; el analista la detecta.&lt;/p&gt;

&lt;h3&gt;
  
  
  El Legado del Genio Solitario
&lt;/h3&gt;

&lt;p&gt;A diferencia de otros gigantes tecnológicos contemporáneos que buscaron la fama o fundaron imperios corporativos, Shannon era un académico juguetón. Pasaba su tiempo libre construyendo máquinas de ajedrez, malabares robotizados, un ratón mecánico llamado &lt;em&gt;Theseus&lt;/em&gt; (uno de los primeros experimentos de Machine Learning capaz de resolver laberintos) y una "Máquina Definitiva" que, al encenderse, simplemente sacaba una mano de una caja para apagarse a sí misma.&lt;/p&gt;

&lt;p&gt;El legado de Claude Shannon es la demostración definitiva del &lt;strong&gt;Pensamiento desde los Primeros Principios&lt;/strong&gt; (&lt;em&gt;First Principles Thinking&lt;/em&gt;). En lugar de intentar construir un cable telefónico mejor, Shannon se retiró al pizarrón y se preguntó: &lt;em&gt;¿Qué es la información?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Al responder a esa pregunta fundamental, no construyó una herramienta mejor; inventó el ecosistema entero en el que todas nuestras herramientas operan. Todo el software, toda la infraestructura cloud, y todos los agentes de IA autónomos que desplegamos hoy, viven, respiran y se comunican dentro del universo matemático que Shannon imaginó en 1948.&lt;/p&gt;




&lt;h4&gt;
  
  
  Fuentes de Interés:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.quantamagazine.org/how-claude-shannons-information-theory-invented-the-future-20201222/" rel="noopener noreferrer"&gt;&lt;strong&gt;Quanta Magazine&lt;/strong&gt;: How Claude Shannon Invented the Future&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.bell-labs.com/about/history-innovation/" rel="noopener noreferrer"&gt;&lt;strong&gt;Bell Labs&lt;/strong&gt;: The History of Information Theory&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://thebitplayer.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Documental&lt;/strong&gt;: The Bit Player (Sobre la vida y obra de Claude Shannon)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/abraham_wald/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Abraham Wald y la Epistemología de los Datos Ausentes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/multiverse_computing/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Multiverse Computing y la compresión de la IA&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>The Hidden Economics of AI: What It Actually Costs to Run LLMs in Production (With Real Data)</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 14 Jun 2026 08:13:27 +0000</pubDate>
      <link>https://dev.to/datalaria/the-hidden-economics-of-ai-what-it-actually-costs-to-run-llms-in-production-with-real-data-40h9</link>
      <guid>https://dev.to/datalaria/the-hidden-economics-of-ai-what-it-actually-costs-to-run-llms-in-production-with-real-data-40h9</guid>
      <description>&lt;p&gt;There is an inconvenient truth the artificial intelligence industry prefers to whisper rather than proclaim: &lt;strong&gt;the real cost of putting an LLM into production almost never matches the API invoice&lt;/strong&gt;. It's like buying a car and discovering that the dealership price didn't include the wheels, the insurance, or the fuel. The label says "$0.15 per million input tokens." What it doesn't say is how many millions of tokens your agent will burn in a delegation loop that spirals out of control at 3 AM.&lt;/p&gt;

&lt;p&gt;I know this because it happened to me. Over the past six months I've operated autonomous agent systems in real production: the &lt;a href="https://dev.to/en/posts/ai_agents_part1/"&gt;Autopilot Project&lt;/a&gt; (9 installments) to automate content distribution across social media, and the &lt;a href="https://dev.to/en/posts/obs_part1_intro/"&gt;Obsolescence Engineering&lt;/a&gt; series (7 installments) with a 24/7 agentic radar to monitor supply chain risks. This article is not a theoretical exercise: it is an X-ray of my real invoices, my mistakes, and my lessons learned.&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%2Frvw45bryvm63jrdjqxh9.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%2Frvw45bryvm63jrdjqxh9.png" alt="The hidden costs iceberg of AI" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Iceberg: What the API Invoice Doesn't Tell You
&lt;/h3&gt;

&lt;p&gt;The most dangerous mistake when budgeting a generative AI project is &lt;strong&gt;confusing the API cost with the total system cost&lt;/strong&gt;. It's like measuring the cost of a restaurant only by the price of the ingredients. In my experience operating these systems, the API represents roughly &lt;strong&gt;15-25% of the real cost&lt;/strong&gt;. The rest is the submerged iceberg:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost Layer&lt;/th&gt;
&lt;th&gt;What It Includes&lt;/th&gt;
&lt;th&gt;Typical %&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LLM API&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Input/output tokens, context caching&lt;/td&gt;
&lt;td&gt;15-25%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Infrastructure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GitHub Actions (minutes), Netlify Functions, Supabase&lt;/td&gt;
&lt;td&gt;25-35%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Engineer Time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Agent debugging, prompt tuning, defensive programming&lt;/td&gt;
&lt;td&gt;30-40%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Silent Costs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Retries on failures, infinite loops, token overconsumption&lt;/td&gt;
&lt;td&gt;10-15%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The third block — engineer time — is where most projects die. As I documented in the &lt;a href="https://dev.to/en/posts/ai_agents_part9/"&gt;Autopilot post-mortem&lt;/a&gt;, models are stochastic: you run the same pipeline ten times and get ten different results. This means &lt;strong&gt;you can't test an AI agent the way you test a conventional microservice&lt;/strong&gt;. You need defensive programming, output validation with JSON Schemas, and retries with exponential backoff. Every hour invested in that engineering has a cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Comparison No One Makes: Gemini vs GPT-4o vs Claude in Real Production
&lt;/h3&gt;

&lt;p&gt;The LLM comparisons flooding the internet typically measure academic benchmarks: MMLU, HumanEval, logical reasoning. That's fine for research papers, but in production what matters is the &lt;strong&gt;cost-quality-reliability equation per specific task&lt;/strong&gt;. Here is my operational experience with the three main models:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criterion&lt;/th&gt;
&lt;th&gt;Gemini 2.5 Flash&lt;/th&gt;
&lt;th&gt;GPT-4o&lt;/th&gt;
&lt;th&gt;Claude Sonnet 4&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Input Cost&lt;/strong&gt; (per 1M tokens)&lt;/td&gt;
&lt;td&gt;$0.15&lt;/td&gt;
&lt;td&gt;$2.50&lt;/td&gt;
&lt;td&gt;$3.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Output Cost&lt;/strong&gt; (per 1M tokens)&lt;/td&gt;
&lt;td&gt;$0.60&lt;/td&gt;
&lt;td&gt;$10.00&lt;/td&gt;
&lt;td&gt;$15.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Average latency&lt;/strong&gt; (complete response)&lt;/td&gt;
&lt;td&gt;~2.1s&lt;/td&gt;
&lt;td&gt;~3.8s&lt;/td&gt;
&lt;td&gt;~4.5s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;JSON reliability&lt;/strong&gt; (structured output)&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;System prompt adherence&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Creativity / "personality"&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The price difference between Gemini Flash and its competitors is not a percentage: it's an &lt;strong&gt;order of magnitude&lt;/strong&gt;. For high-volume, low-creativity tasks — classification, structured data extraction, email parsing — Gemini Flash is unbeatable. That's exactly why I chose it as the engine for the &lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;obsolescence agentic radar&lt;/a&gt;: I needed to run hundreds of analyses per month without the bill spiraling out of control.&lt;/p&gt;

&lt;p&gt;However, when the task demands nuance, personality, or complex reasoning, the quality difference justifies the price. In the Autopilot Project, the agent writing LinkedIn posts with a "corporate" tone and the one writing tweets with a "cynical" tone (&lt;a href="https://dev.to/en/posts/ai_agents_part3/"&gt;Part 3&lt;/a&gt;) performed significantly better with premium-tier models. &lt;strong&gt;The lesson: there is no "best model," there is the right model for each task in your pipeline.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Anatomy of a Real Invoice: The Autopilot Project
&lt;/h3&gt;

&lt;p&gt;Let's break down the actual costs of operating the Autopilot Project during a typical month. This system analyzes each new blog post, generates optimized content for Twitter and LinkedIn in two languages (ES/EN), runs a quality audit, and publishes automatically with human approval.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Monthly Cost&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Gemini API&lt;/strong&gt; (Flash + Pro)&lt;/td&gt;
&lt;td&gt;~€1.20&lt;/td&gt;
&lt;td&gt;~4 executions/month, ~50K tokens per execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;GitHub Actions&lt;/strong&gt; (CI/CD minutes)&lt;/td&gt;
&lt;td&gt;€0.00&lt;/td&gt;
&lt;td&gt;Free tier: 2,000 min/month (more than enough)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Brevo&lt;/strong&gt; (Newsletter)&lt;/td&gt;
&lt;td&gt;€0.00&lt;/td&gt;
&lt;td&gt;Free tier: 300 emails/day&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Netlify&lt;/strong&gt; (Functions + Hosting)&lt;/td&gt;
&lt;td&gt;€0.00&lt;/td&gt;
&lt;td&gt;Free tier: 125K invocations/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Supabase&lt;/strong&gt; (PostgreSQL)&lt;/td&gt;
&lt;td&gt;€0.00&lt;/td&gt;
&lt;td&gt;Free tier: 500MB, 2 projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Domain&lt;/strong&gt; (datalaria.com)&lt;/td&gt;
&lt;td&gt;~€1.50&lt;/td&gt;
&lt;td&gt;Monthly prorated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Engineer time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;¿?&lt;/td&gt;
&lt;td&gt;The real hidden cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total infrastructure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~€2.70/month&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Yes, you read that right: &lt;strong&gt;less than 3 euros per month&lt;/strong&gt; to operate a complete AI agent system with automated social media publishing, newsletter, and CI/CD. The key lies in three deliberate architectural decisions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Gemini Flash as the main engine&lt;/strong&gt;: At $0.15/M input tokens, the cost per execution is cents, not euros.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aggressive free tiers&lt;/strong&gt;: GitHub Actions, Netlify, Supabase, and Brevo offer generous free plans that comfortably cover an individual project or early-stage startup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-demand execution&lt;/strong&gt;: The pipeline doesn't run 24/7 — it only triggers on each new post (event-driven), avoiding the cost of always-on servers.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Loop Trap: When Your Agent Burns Money on Its Own
&lt;/h3&gt;

&lt;p&gt;But the invoice isn't always that friendly. In the Autopilot post-mortem I documented a critical failure every engineer should know about: CrewAI's &lt;strong&gt;infinite delegation loops&lt;/strong&gt;. When an agent can't find the expected answer, it can re-delegate the task to itself in a loop that consumes tokens exponentially until GitHub Actions kills the process on timeout (&lt;strong&gt;SIGTERM&lt;/strong&gt; at 60 minutes).&lt;/p&gt;

&lt;p&gt;In a single failed execution, that loop can consume &lt;strong&gt;more tokens than an entire month of normal operation&lt;/strong&gt;. It's the digital equivalent of leaving a tap running overnight. The solution is brutally simple, yet nobody implements it by default:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;max_iter&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;max_execution_time&lt;/code&gt;&lt;/strong&gt; on every CrewAI agent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output validation&lt;/strong&gt; with Pydantic before passing to the next agent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost alerts&lt;/strong&gt; configured in the Google Cloud console&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Circuit breakers&lt;/strong&gt; that kill execution if consumption exceeds a threshold&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/7zbuEULTHIs"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  The 10x Rule: When It's Worth Paying More
&lt;/h3&gt;

&lt;p&gt;After six months operating these systems, I've distilled a pragmatic rule I call the &lt;strong&gt;10x Rule&lt;/strong&gt;: a more expensive model is only justified if it produces a result at least &lt;strong&gt;10 times better&lt;/strong&gt; on the metric that matters for your use case. What does "10 times better" mean?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;In classification&lt;/strong&gt;: 10x fewer classification errors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In content generation&lt;/strong&gt;: 10x fewer human correction iterations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In data extraction&lt;/strong&gt;: 10x fewer verifiable hallucinations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In latency&lt;/strong&gt;: 10x faster on the user's critical path&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the improvement is 20-30%, stick with the cheap model. If it's 2x-3x, evaluate. If it's 10x, don't think twice. This rule led me to use Gemini Flash for 90% of tasks and reserve premium models only for creative content generation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Looking Ahead: The Deflation of Intelligence
&lt;/h3&gt;

&lt;p&gt;There is a macro trend every engineer needs to have on their radar: &lt;strong&gt;the cost per token is falling at a brutal pace&lt;/strong&gt;. Gemini Flash in June 2025 cost $0.35/M input tokens. One year later, it costs $0.15 — a &lt;strong&gt;57% drop in 12 months&lt;/strong&gt;. If this trend holds (and everything suggests it will accelerate with competition from open-source models like Llama and Mistral), in two years we'll be talking about API costs that are &lt;strong&gt;essentially free&lt;/strong&gt; for most use cases.&lt;/p&gt;

&lt;p&gt;That doesn't mean AI will be free. It means &lt;strong&gt;the cost will definitively shift from the API to the engineer&lt;/strong&gt;: the ability to design robust systems, implement defensive programming, and orchestrate complex pipelines will be the true competitive differentiator. The model will be a commodity; the architecture will be the moat.&lt;/p&gt;

&lt;p&gt;As W. Edwards Deming — to whom I dedicated a &lt;a href="https://dev.to/en/posts/deming/"&gt;full article&lt;/a&gt; — put it: &lt;em&gt;"It is not enough to do your best; you must first know what to do."&lt;/em&gt; In the hidden economics of AI, knowing which model to use, when to use it, and when &lt;strong&gt;not&lt;/strong&gt; to use it is the most valuable skill you can develop.&lt;/p&gt;




&lt;h4&gt;
  
  
  Sources of Interest:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/pricing" rel="noopener noreferrer"&gt;&lt;strong&gt;Google AI&lt;/strong&gt;: Gemini API Pricing — Updated Models and Prices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openai.com/api/pricing/" rel="noopener noreferrer"&gt;&lt;strong&gt;OpenAI&lt;/strong&gt;: API Pricing — GPT-4o, GPT-4o mini Models&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.anthropic.com/pricing" rel="noopener noreferrer"&gt;&lt;strong&gt;Anthropic&lt;/strong&gt;: Claude API Pricing — Claude 4 and Sonnet Models&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/ai_agents_part9/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Autopilot Project Post-Mortem — Lessons Learned&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/en/posts/obs_part5_radar_agent/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: The Agentic Radar — Tool Calling vs RAG in Production&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://a16z.com/navigating-the-high-cost-of-ai-compute/" rel="noopener noreferrer"&gt;&lt;strong&gt;Andreessen Horowitz&lt;/strong&gt;: The Cost of AI — Who Pays and How Much? (Andreessen Horowitz Report)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub&lt;/strong&gt;: GitHub Actions Billing — Free Tier and Pricing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>automation</category>
      <category>llm</category>
    </item>
    <item>
      <title>La Economía Oculta de la IA: Cuánto Cuesta Realmente Usar LLMs en Producción (Con Datos Reales)</title>
      <dc:creator>Daniel</dc:creator>
      <pubDate>Sun, 14 Jun 2026 08:06:44 +0000</pubDate>
      <link>https://dev.to/datalaria/la-economia-oculta-de-la-ia-cuanto-cuesta-realmente-usar-llms-en-produccion-con-datos-reales-47d0</link>
      <guid>https://dev.to/datalaria/la-economia-oculta-de-la-ia-cuanto-cuesta-realmente-usar-llms-en-produccion-con-datos-reales-47d0</guid>
      <description>&lt;p&gt;Hay una verdad incómoda que la industria de la inteligencia artificial prefiere susurrar en lugar de proclamar: &lt;strong&gt;el coste real de poner un LLM en producción casi nunca coincide con la factura de la API&lt;/strong&gt;. Es como comprar un coche y descubrir que el precio del concesionario no incluía ni las ruedas, ni el seguro, ni la gasolina. La etiqueta dice "0,15$ por millón de tokens de entrada". Lo que no dice es cuántos millones de tokens quemará tu agente en un bucle de delegación que se descontrola a las 3 de la madrugada.&lt;/p&gt;

&lt;p&gt;Lo sé porque me ha pasado. Durante los últimos seis meses he operado sistemas de agentes autónomos en producción real: el &lt;a href="https://dev.to/es/posts/ia_agents_part1/"&gt;Proyecto Autopilot&lt;/a&gt; (9 entregas) para automatizar la distribución de contenido en redes sociales, y la serie de &lt;a href="https://dev.to/es/posts/obs_parte1_intro/"&gt;Ingeniería de la Obsolescencia&lt;/a&gt; (7 entregas) con un radar agéntico 24/7 para monitorear riesgos en la cadena de suministro. Este artículo no es un ejercicio teórico: es una radiografía de mis facturas reales, mis errores y mis lecciones aprendidas.&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%2F2rnsy1m4l5e06wjm78ip.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%2F2rnsy1m4l5e06wjm78ip.png" alt="El iceberg de los costes ocultos de la IA" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  El Iceberg: Lo que la Factura de la API No te Cuenta
&lt;/h3&gt;

&lt;p&gt;El error más peligroso al presupuestar un proyecto de IA generativa es &lt;strong&gt;confundir el coste de la API con el coste total del sistema&lt;/strong&gt;. Es como medir el coste de un restaurante solo por el precio de los ingredientes. En mi experiencia operando estos sistemas, la API representa aproximadamente un &lt;strong&gt;15-25% del coste real&lt;/strong&gt;. El resto es el iceberg sumergido:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capa de Coste&lt;/th&gt;
&lt;th&gt;Qué Incluye&lt;/th&gt;
&lt;th&gt;% Típico&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;API del LLM&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tokens de entrada/salida, caché de contexto&lt;/td&gt;
&lt;td&gt;15-25%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Infraestructura&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GitHub Actions (minutes), Netlify Functions, Supabase&lt;/td&gt;
&lt;td&gt;25-35%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tiempo de Ingeniero&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Debugging de agentes, prompt tuning, programación defensiva&lt;/td&gt;
&lt;td&gt;30-40%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Costes Silenciosos&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reintentos por fallos, bucles infinitos, sobre-consumo de tokens&lt;/td&gt;
&lt;td&gt;10-15%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;El tercer bloque —el tiempo de ingeniero— es donde la mayoría de los proyectos mueren. Como documenté en el &lt;a href="https://dev.to/es/posts/ia_agents_part9/"&gt;post-mortem del Autopilot&lt;/a&gt;, los modelos son estocásticos: ejecutas el mismo pipeline diez veces y obtienes diez resultados diferentes. Eso significa que &lt;strong&gt;no puedes testear un agente IA como testeas un microservicio convencional&lt;/strong&gt;. Necesitas programación defensiva, validación de output con JSON Schemas, y reintentos con backoff exponencial. Cada hora invertida en esa ingeniería tiene un coste.&lt;/p&gt;

&lt;h3&gt;
  
  
  La Comparativa que Nadie Hace: Gemini vs GPT-4o vs Claude en Producción Real
&lt;/h3&gt;

&lt;p&gt;Las comparativas de LLMs que abundan online suelen medir benchmarks académicos: MMLU, HumanEval, razonamiento lógico. Eso está bien para papers de investigación, pero en producción lo que importa es la &lt;strong&gt;ecuación coste-calidad-fiabilidad por tarea concreta&lt;/strong&gt;. Aquí va mi experiencia operativa con los tres modelos principales:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criterio&lt;/th&gt;
&lt;th&gt;Gemini 2.5 Flash&lt;/th&gt;
&lt;th&gt;GPT-4o&lt;/th&gt;
&lt;th&gt;Claude Sonnet 4&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Coste Input&lt;/strong&gt; (por 1M tokens)&lt;/td&gt;
&lt;td&gt;$0,15&lt;/td&gt;
&lt;td&gt;$2,50&lt;/td&gt;
&lt;td&gt;$3,00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Coste Output&lt;/strong&gt; (por 1M tokens)&lt;/td&gt;
&lt;td&gt;$0,60&lt;/td&gt;
&lt;td&gt;$10,00&lt;/td&gt;
&lt;td&gt;$15,00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Latencia media&lt;/strong&gt; (respuesta completa)&lt;/td&gt;
&lt;td&gt;~2,1s&lt;/td&gt;
&lt;td&gt;~3,8s&lt;/td&gt;
&lt;td&gt;~4,5s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Fiabilidad JSON&lt;/strong&gt; (structured output)&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Respeto de instrucciones de sistema&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Creatividad / "personalidad"&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐&lt;/td&gt;
&lt;td&gt;⭐⭐⭐⭐⭐&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;La diferencia de precio entre Gemini Flash y sus competidores no es un porcentaje: es un &lt;strong&gt;orden de magnitud&lt;/strong&gt;. Para tareas de alto volumen y baja creatividad —clasificación, extracción de datos estructurados, parsing de emails— Gemini Flash es imbatible. Es exactamente por eso que lo elegí como motor del &lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;radar agéntico de obsolescencia&lt;/a&gt;: necesitaba ejecutar cientos de análisis al mes sin que la factura se disparara.&lt;/p&gt;

&lt;p&gt;Sin embargo, cuando la tarea exige matiz, personalidad o razonamiento complejo, la diferencia de calidad justifica el precio. En el Proyecto Autopilot, el agente que escribía posts para LinkedIn con tono "corporativo" y el que escribía tweets con tono "cínico" (&lt;a href="https://dev.to/es/posts/ia_agents_part3/"&gt;Parte 3&lt;/a&gt;) rendían significativamente mejor con modelos de gama alta. &lt;strong&gt;La lección: no existe el "mejor modelo", existe el modelo correcto para cada tarea de tu pipeline.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Anatomía de una Factura Real: El Proyecto Autopilot
&lt;/h3&gt;

&lt;p&gt;Desglosemos los costes reales de operar el Proyecto Autopilot durante un mes típico. Este sistema analiza cada nuevo post del blog, genera contenido optimizado para Twitter y LinkedIn en dos idiomas (ES/EN), pasa por una auditoría de calidad, y publica automáticamente con aprobación humana.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concepto&lt;/th&gt;
&lt;th&gt;Coste Mensual&lt;/th&gt;
&lt;th&gt;Notas&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Gemini API&lt;/strong&gt; (Flash + Pro)&lt;/td&gt;
&lt;td&gt;~1,20 €&lt;/td&gt;
&lt;td&gt;~4 ejecuciones/mes, ~50K tokens por ejecución&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;GitHub Actions&lt;/strong&gt; (CI/CD minutes)&lt;/td&gt;
&lt;td&gt;0,00 €&lt;/td&gt;
&lt;td&gt;Free tier: 2.000 min/mes (sobra para esto)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Brevo&lt;/strong&gt; (Newsletter)&lt;/td&gt;
&lt;td&gt;0,00 €&lt;/td&gt;
&lt;td&gt;Free tier: 300 emails/día&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Netlify&lt;/strong&gt; (Functions + Hosting)&lt;/td&gt;
&lt;td&gt;0,00 €&lt;/td&gt;
&lt;td&gt;Free tier: 125K invocaciones/mes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Supabase&lt;/strong&gt; (PostgreSQL)&lt;/td&gt;
&lt;td&gt;0,00 €&lt;/td&gt;
&lt;td&gt;Free tier: 500MB, 2 proyectos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Dominio&lt;/strong&gt; (datalaria.com)&lt;/td&gt;
&lt;td&gt;~1,50 €&lt;/td&gt;
&lt;td&gt;Prorrateado mensual&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tiempo de ingeniero&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;¿?&lt;/td&gt;
&lt;td&gt;El verdadero coste oculto&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total infraestructura&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~2,70 €/mes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sí, has leído bien: &lt;strong&gt;menos de 3 euros al mes&lt;/strong&gt; para operar un sistema completo de agentes IA con publicación automatizada en redes sociales, newsletter y CI/CD. La clave está en tres decisiones arquitectónicas deliberadas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Gemini Flash como motor principal&lt;/strong&gt;: A $0,15/M tokens de entrada, el coste por ejecución es de céntimos, no de euros.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free tiers agresivos&lt;/strong&gt;: GitHub Actions, Netlify, Supabase y Brevo ofrecen generosos planes gratuitos que cubren sobradamente un proyecto individual o una startup temprana.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ejecución bajo demanda&lt;/strong&gt;: El pipeline no corre 24/7, solo se activa con cada nuevo post (evento), evitando el coste de servidores siempre encendidos.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  La Trampa de los Bucles: Cuando tu Agente Quema Dinero Solo
&lt;/h3&gt;

&lt;p&gt;Pero la factura no siempre es tan amable. En el post-mortem del Autopilot documenté un fallo crítico que todo ingeniero debería conocer: los &lt;strong&gt;bucles de delegación infinita&lt;/strong&gt; de CrewAI. Cuando un agente no encuentra la respuesta esperada, puede re-delegarse la tarea a sí mismo en un bucle que consume tokens exponencialmente hasta que GitHub Actions mata el proceso por timeout (&lt;strong&gt;SIGTERM&lt;/strong&gt; a los 60 minutos).&lt;/p&gt;

&lt;p&gt;En una sola ejecución fallida, ese bucle puede consumir &lt;strong&gt;más tokens que un mes entero de operación normal&lt;/strong&gt;. Es el equivalente digital de dejar un grifo abierto toda la noche. La solución es brutalmente simple pero nadie la implementa de serie:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;max_iter&lt;/code&gt;&lt;/strong&gt; y &lt;strong&gt;&lt;code&gt;max_execution_time&lt;/code&gt;&lt;/strong&gt; en cada agente CrewAI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validación de output&lt;/strong&gt; con Pydantic antes de pasar al siguiente agente&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alertas de coste&lt;/strong&gt; configuradas en la consola de Google Cloud&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Circuit breakers&lt;/strong&gt; que matan la ejecución si el consumo supera un umbral&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/7zbuEULTHIs"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  La Regla del 10x: Cuándo Merece la Pena Pagar Más
&lt;/h3&gt;

&lt;p&gt;Después de seis meses operando estos sistemas, he destilado una regla pragmática que llamo la &lt;strong&gt;Regla del 10x&lt;/strong&gt;: un modelo más caro solo se justifica si produce un resultado al menos &lt;strong&gt;10 veces mejor&lt;/strong&gt; en la métrica que importa para tu caso de uso. ¿Qué significa "10 veces mejor"?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;En clasificación&lt;/strong&gt;: 10x menos errores de clasificación&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;En generación de contenido&lt;/strong&gt;: 10x menos iteraciones humanas de corrección&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;En extracción de datos&lt;/strong&gt;: 10x menos alucinaciones verificables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;En latencia&lt;/strong&gt;: 10x más rápido en la ruta crítica del usuario&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Si la mejora es de un 20-30%, quédate con el modelo barato. Si es de un 2x-3x, evalúa. Si es de un 10x, no lo pienses. Esta regla me llevó a usar Gemini Flash para el 90% de las tareas y reservar modelos premium solo para la generación creativa de contenido.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mirando al Futuro: La Deflación de la Inteligencia
&lt;/h3&gt;

&lt;p&gt;Hay una tendencia macro que todo ingeniero debe tener en el radar: &lt;strong&gt;el coste por token está cayendo a un ritmo brutal&lt;/strong&gt;. Gemini Flash en junio de 2025 costaba $0,35/M tokens de entrada. Un año después, cuesta $0,15 — una caída del &lt;strong&gt;57% en 12 meses&lt;/strong&gt;. Si esta tendencia se mantiene (y todo indica que se acelerará con la competencia de modelos open-source como Llama y Mistral), en dos años estaremos hablando de costes de API que serán &lt;strong&gt;esencialmente gratuitos&lt;/strong&gt; para la mayoría de los casos de uso.&lt;/p&gt;

&lt;p&gt;Eso no significa que la IA será gratis. Significa que &lt;strong&gt;el coste se desplazará definitivamente de la API al ingeniero&lt;/strong&gt;: la capacidad de diseñar sistemas robustos, implementar programación defensiva, y orquestar pipelines complejos será el verdadero diferencial competitivo. El modelo será un commodity; la arquitectura será el moat.&lt;/p&gt;

&lt;p&gt;Como bien decía W. Edwards Deming —al que dediqué un &lt;a href="https://dev.to/es/posts/deming/"&gt;artículo completo&lt;/a&gt;— : &lt;em&gt;"No basta con hacer lo mejor que puedas; primero debes saber qué hacer"&lt;/em&gt;. En la economía oculta de la IA, saber qué modelo usar, cuándo usarlo y cuándo &lt;strong&gt;no&lt;/strong&gt; usarlo es la habilidad más valiosa que puedes desarrollar.&lt;/p&gt;




&lt;h4&gt;
  
  
  Fuentes de Interés:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/pricing" rel="noopener noreferrer"&gt;&lt;strong&gt;Google AI&lt;/strong&gt;: Gemini API Pricing — Modelos y Precios Actualizados&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://openai.com/api/pricing/" rel="noopener noreferrer"&gt;&lt;strong&gt;OpenAI&lt;/strong&gt;: API Pricing — Modelos GPT-4o, GPT-4o mini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.anthropic.com/pricing" rel="noopener noreferrer"&gt;&lt;strong&gt;Anthropic&lt;/strong&gt;: Claude API Pricing — Modelos Claude 4 y Sonnet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/ia_agents_part9/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: Post-Mortem del Proyecto Autopilot — Lecciones Aprendidas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/es/posts/obs_parte5_radar/"&gt;&lt;strong&gt;Datalaria&lt;/strong&gt;: El Radar Agéntico — Tool Calling vs RAG en Producción&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://a16z.com/navigating-the-high-cost-of-ai-compute/" rel="noopener noreferrer"&gt;&lt;strong&gt;Andreessen Horowitz&lt;/strong&gt;: The Cost of AI — Who Pays and How Much? (Informe Andreessen Horowitz)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub&lt;/strong&gt;: GitHub Actions Billing — Free Tier y Precios&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>spanish</category>
    </item>
  </channel>
</rss>
