<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Tech in pieces]]></title><description><![CDATA[Technology in short form.]]></description><link>https://www.techinpieces.com</link><image><url>https://substackcdn.com/image/fetch/$s_!Gtj3!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b81480d-d1aa-4e4d-9e26-7040d59e4ae0_500x500.png</url><title>Tech in pieces</title><link>https://www.techinpieces.com</link></image><generator>Substack</generator><lastBuildDate>Fri, 05 Jun 2026 22:01:28 GMT</lastBuildDate><atom:link href="https://www.techinpieces.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Suren]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[techinpieces@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[techinpieces@substack.com]]></itunes:email><itunes:name><![CDATA[Tech In Pieces]]></itunes:name></itunes:owner><itunes:author><![CDATA[Tech In Pieces]]></itunes:author><googleplay:owner><![CDATA[techinpieces@substack.com]]></googleplay:owner><googleplay:email><![CDATA[techinpieces@substack.com]]></googleplay:email><googleplay:author><![CDATA[Tech In Pieces]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Harness Engineering: Humans Steer, Agents Execute]]></title><description><![CDATA[Why the discipline of engineering is shifting from writing functions to building the scaffolding that controls the AI.]]></description><link>https://www.techinpieces.com/p/harness-engineering-humans-steer</link><guid isPermaLink="false">https://www.techinpieces.com/p/harness-engineering-humans-steer</guid><dc:creator><![CDATA[Tech In Pieces]]></dc:creator><pubDate>Tue, 17 Feb 2026 20:19:47 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!sxQX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sxQX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sxQX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg 424w, https://substackcdn.com/image/fetch/$s_!sxQX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg 848w, https://substackcdn.com/image/fetch/$s_!sxQX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!sxQX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sxQX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg" width="728" height="600.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1201,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:1821337,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.techinpieces.com/i/188304617?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sxQX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg 424w, https://substackcdn.com/image/fetch/$s_!sxQX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg 848w, https://substackcdn.com/image/fetch/$s_!sxQX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!sxQX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b9aba29-5b31-46ce-aebc-f60bb0ce677a_4315x3559.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@ufolera?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Valerie Semenova</a> on <a href="https://unsplash.com/photos/man-riding-white-horse-during-daytime-9bOYXUlfyik?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure></div><p>No matter how powerful or fast your horse is, imagine riding it without a harness.</p><p>Can you?</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.techinpieces.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Tech in pieces! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Without reins, you can&#8217;t steer it. You can&#8217;t slow it down. You can&#8217;t guide it through a narrow path. Power alone doesn&#8217;t make it useful. But add a harness, and suddenly that same horse becomes controllable. Directional. Reliable.</p><p>That&#8217;s exactly what <a href="https://openai.com/index/harness-engineering/">OpenAI experimented with and wrote about in their recent post on </a><em><a href="https://openai.com/index/harness-engineering/">Harness Engineering</a></em></p><p>They&#8217;ve spent the last five months running an experiment that feels like a glimpse into the next decade of software engineering: building a product with zero lines of manually written code. Everything - the application logic, tests, CI configuration, observability setup, and even documentation was authored by Codex agents. The result was a million-line codebase built in roughly one-tenth the time it would have taken a traditional human team.</p><p>Impressive? Yes.</p><p>But the real story isn&#8217;t the speed. It&#8217;s the harness.</p><div><hr></div><h2>Humans Steer. Agents Execute.</h2><blockquote><p>The core philosophy they landed on is simple: humans steer, agents execute</p></blockquote><p>In this world, the engineer&#8217;s primary job isn&#8217;t typing functions. It&#8217;s designing the environment, specifying intent clearly and building the feedback loops that keep those agents on track.</p><p><strong>Codex is the horse: </strong>powerful, fast, capable of running for hours.</p><p><strong>The harness is everything around it</strong>: the repository structure, strict architectural boundaries, mechanical enforcement via linters, observability wiring, structured documentation and review loops.</p><p>Without that harness, you don&#8217;t get a product.</p><p>You get chaos at scale.</p><div><hr></div><h2>The Repository as the System of Record</h2><p>One of the most interesting shifts they described was moving away from &#8220;manuals&#8221; toward &#8220;maps.&#8221;</p><p>They tried the giant instruction-file approach. It failed. Large instruction blobs rot quickly. They crowd out context. They become stale. When everything is important, nothing is.</p><p>Instead, they treated <em>AGENTS.md</em> as a lightweight table of contents, pointing to a structured <code>docs/</code> directory that acted as the real system of record</p><p>That&#8217;s a subtle but powerful change.</p><p>In many enterprises, critical decisions live in Slack threads, Google Docs, hallway conversations or someone&#8217;s memory. In an agent-first system, if knowledge isn&#8217;t versioned inside the repository, it effectively doesn&#8217;t exist.</p><p>That forces clarity. It also forces discipline.</p><div><hr></div><h2>Making the System Legible to the Agent</h2><p>For an agent to be effective, the codebase has to be legible to it.</p><p>OpenAI went further than just structuring documentation. They wired Codex directly into an ephemeral observability stack. Agents could query logs using LogQL and metrics using PromQL. They could inspect traces, reproduce bugs, and validate UI flows automatically</p><p>Think about that.</p><p>Instead of a developer manually checking logs and stepping through failures, the agent could &#8220;see&#8221; what was happening and iterate.</p><p>That&#8217;s not just code generation. That&#8217;s operational awareness.</p><p>The horse wasn&#8217;t just running. It had vision.</p><div><hr></div><h2>Enforcing Taste and Architecture</h2><p>In my 25+ years in tech, I&#8217;ve seen how quickly architectural purity falls apart under delivery pressure. In this experiment, they didn&#8217;t treat architecture as aspirational. They made it mandatory. They enforced a rigid layering model:</p><div class="pullquote"><p><em>Types &#8594; Config &#8594; Repo &#8594; Service &#8594; Runtime &#8594; UI</em></p></div><p>Dependencies could only flow in approved directions. Custom linters enforced boundaries mechanically. Structural tests ensured drift didn&#8217;t creep in.</p><p>Instead of arguing over style in code reviews, they encoded &#8220;human taste&#8221; directly into tooling.</p><p>And when the agent produced what they openly called &#8220;AI slop,&#8221; they didn&#8217;t just clean it up manually. They built recurring cleanup processes like background agents that scan the repository, update quality grades and open targeted refactoring pull requests.</p><p>It&#8217;s essentially garbage collection for a codebase.</p><p>Human judgment gets encoded once, then enforced continuously.</p><p>That&#8217;s the harness tightening itself.</p><div><hr></div><h2>Will This Work for the Rest of Us?</h2><p>This isn&#8217;t magic.</p><p>It worked because they invested heavily in scaffolding. They designed the harness first.</p><p>Where this model will likely shine:</p><ul><li><p>Greenfield products</p></li><li><p>Teams with strong platform discipline</p></li><li><p>Clear domain boundaries</p></li><li><p>Organizations willing to encode governance into tooling</p></li></ul><p>Where it will struggle:</p><ul><li><p>Legacy systems full of tribal knowledge</p></li><li><p>Fragmented architectures</p></li><li><p>Weak repository hygiene</p></li><li><p>Environments where &#8220;the real decision&#8221; lives outside version control</p></li></ul><p>Most enterprises aren&#8217;t ready to just &#8220;let the horse run.&#8221;</p><p>They need to build the harness first.</p><div><hr></div><h2>The Optimization Target Has Shifted</h2><p>For decades, we optimized for better engineers writing better code.</p><p>Now the optimization target is different.</p><p>We are optimizing for better repository designers. Better constraint designers. Better feedback-loop architects. As OpenAI put it, the discipline of software engineering is moving out of the code and into the scaffolding</p><p><strong>The code becomes a byproduct.</strong></p><p><strong>The environment becomes the product.</strong></p><p>If we can build a better harness, we can stop fighting the horse and start deciding where we want to go.</p><p>And that might be the real evolution here.</p><h3>References</h3><ol><li><p><a href="https://openai.com/index/harness-engineering/">Harness engineering: leveraging Codex in an agent-first world</a></p></li><li><p><a href="https://mitchellh.com/writing/my-ai-adoption-journey#step-5-engineer-the-harness">My AI Adoption Journey - Mitchell Hashimoto</a></p></li><li><p><a href="https://martinfowler.com/articles/exploring-gen-ai/harness-engineering.html">Harness Engineering - Birgitta Bockeler</a></p></li></ol><p></p><p><em>-Suren</em></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.techinpieces.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Tech in pieces! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[If Figma Falls, What Replaces it? AI still hasn't built.]]></title><description><![CDATA[The real bottleneck in enterprise websites isn&#8217;t building. It&#8217;s alignment.]]></description><link>https://www.techinpieces.com/p/if-figma-falls-what-replaces-it-ai</link><guid isPermaLink="false">https://www.techinpieces.com/p/if-figma-falls-what-replaces-it-ai</guid><dc:creator><![CDATA[Tech In Pieces]]></dc:creator><pubDate>Fri, 13 Feb 2026 17:45:37 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UVy2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UVy2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UVy2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png 424w, https://substackcdn.com/image/fetch/$s_!UVy2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png 848w, https://substackcdn.com/image/fetch/$s_!UVy2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png 1272w, https://substackcdn.com/image/fetch/$s_!UVy2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UVy2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png" width="565" height="442" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:442,&quot;width&quot;:565,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:34349,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/187880395?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UVy2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png 424w, https://substackcdn.com/image/fetch/$s_!UVy2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png 848w, https://substackcdn.com/image/fetch/$s_!UVy2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png 1272w, https://substackcdn.com/image/fetch/$s_!UVy2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F33ce2381-a1c0-44d1-ae5c-10fbe67f8418_565x442.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: Google</figcaption></figure></div><p>That is a steep decline. There&#8217;s noise about Figma slowing down, competition rising, AI tools generating layouts in seconds.</p><p>Fine.</p><p>But after years of building enterprise websites, some of them running 10&#8211;15 years, across small sites and massive platforms with thousands of pages, I can say this confidently:</p><p>Figma is not just a design tool.</p><p>It is an alignment engine.</p><blockquote><p>And alignment is the hardest part of enterprise digital work. Actually building the website is the easy part.</p></blockquote><p>The process before code touches production is where the real complexity lives.</p><ul><li><p>Business sends plans to marketing.</p></li><li><p>Marketing shapes positioning and sends direction to design.</p></li><li><p>Design iterates.</p></li><li><p>Marketing pushes back.</p></li><li><p>Accessibility reviews.</p></li><li><p>Legal comments.</p></li><li><p>Engineering evaluates feasibility.</p></li><li><p>Back and forth. Sometimes for weeks.</p></li></ul><p>In large enterprises, I&#8217;ve even seen multiple design agencies hired for the same concept. Parallel explorations. Competing directions. The organization chooses the one that best aligns with long-term strategy.</p><p>That entire negotiation happens before development begins.</p><p>Figma became the shared visual brain for that process. Everyone sees the same thing. Everyone comments in one place. Version history is visible. Decisions are anchored to a visual artifact.</p><p>If Figma declines, the replacement cannot simply be:</p><p><strong>&#8220;AI that generates a homepage.&#8221;</strong></p><p>That solves the wrong problem.</p><p>AI today is excellent at creation. Prompt in, artifact out. It accelerates drafts. It reduces blank-canvas friction. But enterprises are not bottlenecked by blank canvases.</p><p>They are bottlenecked by consensus. What replaces Figma must do more than generate. </p><p>It must:</p><ul><li><p>Host structured review cycles.</p></li><li><p>Support traceable approvals.</p></li><li><p>Bridge business, marketing, design, and engineering.</p></li><li><p>Understand design systems at scale.</p></li><li><p>Manage change across hundreds or thousands of pages.</p></li></ul><p>We do not yet have an AI-native design collaboration layer that fully does this.</p><p>There is no intelligent consensus system that understands enterprise governance while being collaborative and visible. If Figma weakens, the winner won&#8217;t be a generative UI tool. It will be the platform that becomes the next shared system of truth for digital experience.</p><p>AI will be part of it. It has to be.</p><p>But generation is not enough.</p><p>The next layer needs to help organizations move from </p><p>idea &#8594; debate &#8594; alignment &#8594; approval &#8594; implementation with clarity.</p><p>Until something does that better than Figma, Figma&#8217;s role remains structurally important. </p><p>The real disruption won&#8217;t be AI replacing designers.</p><p>It will be whoever replaces the enterprise design brain.</p><p><em>- Suren</em></p>]]></content:encoded></item><item><title><![CDATA[Heroku in Maintenance Mode: It’s Not a Migration. It’s a Rewrite.]]></title><description><![CDATA[Beyond the Marketing Pitch: Why Heroku&#8217;s Maintenance Mode is a High-Stakes Architectural Re-Write, Not a Simple Move.]]></description><link>https://www.techinpieces.com/p/heroku-in-maintenance-mode-its-not</link><guid isPermaLink="false">https://www.techinpieces.com/p/heroku-in-maintenance-mode-its-not</guid><dc:creator><![CDATA[Tech In Pieces]]></dc:creator><pubDate>Thu, 12 Feb 2026 01:19:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!35hx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!35hx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!35hx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg 424w, https://substackcdn.com/image/fetch/$s_!35hx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg 848w, https://substackcdn.com/image/fetch/$s_!35hx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!35hx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!35hx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg" width="1456" height="950" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:950,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2382841,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/187697243?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!35hx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg 424w, https://substackcdn.com/image/fetch/$s_!35hx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg 848w, https://substackcdn.com/image/fetch/$s_!35hx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!35hx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe5eda559-a904-43f5-9e6b-ab6e8e53981f_4164x2716.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@v2osk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">v2osk</a> on <a href="https://unsplash.com/photos/sunset-under-beach-JE01L3hB0GQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure></div><p>Heroku <a href="https://www.heroku.com/blog/an-update-on-heroku/">announced </a>on Feb 6, 2026 that they are transitioning into &#8220;sustaining engineering&#8221;, a million things were running in my mind, thinking about the engineering teams that have to go through this transition. Wade Wegner (Chief Ecosystem and Growth Officer, DigitalOcean) had <a href="https://www.digitalocean.com/blog/migrate-heroku-to-digitalocean">some great thoughts</a> but one line stayed with me:</p><blockquote><p><em>&#8220;Migrate is easy to say. Harder to do.&#8221;</em></p></blockquote><p>True. But in most real engineering organizations, it&#8217;s not even a migration. <strong>It&#8217;s a rewrite.</strong> And rewrites are where strategy meets friction.</p><p>Heroku isn&#8217;t going dark tomorrow. That&#8217;s not the issue. The real signal is the absence of a forward roadmap. When a platform stops investing, the risk isn&#8217;t sudden failure; it&#8217;s slow stagnation while the rest of the ecosystem evolves. That&#8217;s when teams begin the painful process of reassessing.</p><h3>The Myth of Portability</h3><p>On the surface, migration feels simple. Move the app. Move the database. Cut over DNS. But production systems are never just apps. They are layered assumptions: build pipelines, background workers, release phases, network boundaries, secrets management and on-call playbooks.</p><p><strong>Code portability is often high. Operational portability rarely is.</strong> What looks portable at the code layer becomes deeply entangled at the operational layer. Moving from Heroku isn&#8217;t just swapping a &#8220;dyno&#8221; for a &#8220;droplet&#8221;; it&#8217;s re-establishing a working architecture in a world where your networking topology and data layer must be rebuilt from scratch.</p><h3>The Triple-Front War</h3><p>Migrations don&#8217;t happen in a vacuum. Engineering teams are not sitting idle waiting for a platform decision. They are currently fighting a three-front war:</p><ol><li><p><strong>Maintaining the Legacy:</strong> Keeping the current Heroku setup stable so the business doesn&#8217;t crash.</p></li><li><p><strong>The Re-Write:</strong> Rebuilding pipelines, monitoring and databases on a new platform like DigitalOcean.</p></li><li><p><strong>The AI Mandate:</strong> Accelerating AI POCs, standing up inference endpoints and experimenting with agents, the work many orgs are pushing for <em>right now</em>.</p></li></ol><p>Asking already stretched senior engineers to context-switch between modernization and maintenance while shipping AI features isn&#8217;t a &#8220;lift-and-shift&#8221; exercise. It&#8217;s controlled reconstruction mid-flight.</p><h3>Why the Destination Matters</h3><p>If we are forced into this &#8220;controlled reconstruction,&#8221; the destination has to offer more than just a place to park old code. It needs an active roadmap.</p><p>DigitalOcean&#8217;s App Platform is built on the same Cloud Native Buildpack model that made Heroku successful, which helps reduce the &#8220;surface area&#8221; of the change. But more importantly, they are shipping the things Heroku stopped prioritizing: native Bun support, VPC integration and AI-assisted migration tooling.</p><h3>The Reality Check</h3><p>Responsible migration requires something many organizations underestimate: <strong>deliberate capacity.</strong> Not optimism. Not marketing. <em>Capacity.</em></p><p>It requires an inventory of the architecture and a protection of the engineers doing the work. Sometimes, a migration is a forcing function to modernize everything deferred for years - turning a &#8220;migration budget&#8221; conversation into a full platform transformation program.</p><p>The real question isn&#8217;t whether teams <em>can</em> migrate. It&#8217;s whether they can transform without destabilizing everything else they&#8217;re already responsible for. In 2026, engineering leaders are balancing platform shifts, AI mandates and security hardening all at once. Adding a platform rewrite to that mix demands adult tradeoff conversations.</p><p><strong>Migration is easy to say. Rewriting reality is not.</strong></p><p>The organizations that navigate this well won&#8217;t be the fastest to react. They&#8217;ll be the ones that understand the full blast radius before they move.</p><div><hr></div><h3><strong>Social Media Blurb (LinkedIn/X)</strong></h3><p>&#8220;Migrate&#8221; is easy to say. Harder to do. Actually, for most teams, it&#8217;s not a migration - it&#8217;s a complete rewrite. As Heroku enters &#8220;maintenance mode,&#8221; the real risk is slow stagnation while your team fights a triple-front war: maintaining the old, building the new, and shipping the AI POCs the business is screaming for. Don&#8217;t ask for &#8220;Migration Heroes&#8221; plan for platform reality.</p><p>Read my take: </p><div class="twitter-embed" data-attrs="{&quot;url&quot;:&quot;https://x.com/TheSurenk/status/2021261641476694162?s=20&quot;,&quot;full_text&quot;:&quot;<span class=\&quot;tweet-fake-link\&quot;>@paddix</span> thanks for insights. As <span class=\&quot;tweet-fake-link\&quot;>@WadeWegner</span> said \&quot;Migrate Is Easy to Say. Harder to Do.\&quot;\n\nAnd most times it's not migration, it's a complete re-write. And is way way more challenging to handle for engineering teams. \nImagine having to re-write/migrate entire platforms, tech&quot;,&quot;username&quot;:&quot;TheSurenk&quot;,&quot;name&quot;:&quot;Suren&quot;,&quot;profile_image_url&quot;:&quot;https://pbs.substack.com/profile_images/1970954773105889280/OdBNoams_normal.jpg&quot;,&quot;date&quot;:&quot;2026-02-10T16:35:03.000Z&quot;,&quot;photos&quot;:[],&quot;quoted_tweet&quot;:{&quot;full_text&quot;:&quot;#Heroku isn&#8217;t disappearing tomorrow. But its shift into a sustaining engineering model is prompting many teams to think more carefully about what comes next.\nMigration logistics is part of that conversation, but trajectory matters just as much. Teams need to know not only where&quot;,&quot;username&quot;:&quot;paddix&quot;,&quot;name&quot;:&quot;Paddy Srinivasan&quot;,&quot;profile_image_url&quot;:&quot;https://pbs.substack.com/profile_images/1819062172242034688/3CIxsDJE_normal.jpg&quot;},&quot;reply_count&quot;:0,&quot;retweet_count&quot;:0,&quot;like_count&quot;:1,&quot;impression_count&quot;:49,&quot;expanded_url&quot;:null,&quot;video_url&quot;:null,&quot;belowTheFold&quot;:true}" data-component-name="Twitter2ToDOM"></div><p>This <a href="https://www.youtube.com/watch?v=D2hqX7dXvw0">breakdown of the Heroku sunsetting news</a> provides additional context on what &#8220;sustaining engineering&#8221; actually means for enterprise customers in 2026.</p><p><em>If this resonated, I&#8217;ll be writing more about engineering leadership, AI-assisted development, and building sustainable systems. Subscribe if you want future posts in your inbox.</em></p><p>&#8212; Suren</p>]]></content:encoded></item><item><title><![CDATA[From Search to Ads to Commerce: The Systems Shift From Google]]></title><description><![CDATA[What Vidhya Srinivasan's third annual letter signals for the future of AI-powered advertising]]></description><link>https://www.techinpieces.com/p/from-search-to-ads-to-commerce-the</link><guid isPermaLink="false">https://www.techinpieces.com/p/from-search-to-ads-to-commerce-the</guid><dc:creator><![CDATA[Tech In Pieces]]></dc:creator><pubDate>Wed, 11 Feb 2026 21:19:07 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!OQUp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OQUp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OQUp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp 424w, https://substackcdn.com/image/fetch/$s_!OQUp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp 848w, https://substackcdn.com/image/fetch/$s_!OQUp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp 1272w, https://substackcdn.com/image/fetch/$s_!OQUp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OQUp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp" width="1000" height="486" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:486,&quot;width&quot;:1000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:40968,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/187654743?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!OQUp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp 424w, https://substackcdn.com/image/fetch/$s_!OQUp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp 848w, https://substackcdn.com/image/fetch/$s_!OQUp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp 1272w, https://substackcdn.com/image/fetch/$s_!OQUp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdae1f620-3a64-45e2-80cb-282ac5e8f4b9_1000x486.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: https://blog.google/products/ads-commerce/digital-advertising-commerce-2026/</figcaption></figure></div><p><a href="https://blog.google/products/ads-commerce/digital-advertising-commerce-2026/">Vidhya Srinivasan&#8217;s 2026 third letter</a> reads like an ads update.</p><p>It&#8217;s not.</p><p>It&#8217;s an architectural forecast.</p><p>If you zoom out, what she&#8217;s describing is commerce evolving from page-based interaction to AI-orchestrated systems. Search becomes conversational. Checkout becomes agent-driven. Creative becomes generative. Measurement becomes unified intelligence.</p><p>That&#8217;s not marketing innovation.</p><p>That&#8217;s software engineering territory.</p><div><hr></div><h3>Search Is No Longer a List. It&#8217;s a Runtime.</h3><p>AI Mode reframes Search as a live reasoning environment. Users brainstorm, compare, refine, and decide within a flowing context. Ads do not interrupt the experience. They participate in it.</p><p>From an engineering perspective, that means:</p><p>The system must track conversational state.<br>Intent must be dynamically re-evaluated.<br>Sponsored results must pass semantic relevance and policy checks in real time.</p><p>We are moving from index-based ranking to orchestration engines.</p><blockquote><p>That is a fundamentally different design problem.</p></blockquote><div><hr></div><h3>Influence Becomes Programmable</h3><p>YouTube being positioned as a commerce bridge is really a graph intelligence story. Creator content, audience embeddings, and brand intent all converge in large-scale similarity systems.</p><p>But the interesting shift is this: influence is becoming machine-readable.</p><p>When AI can understand community affinity at scale, matching brands to creators stops being manual partnership management. It becomes infrastructure.</p><p>Commerce pipelines become composable. Influence becomes queryable.</p><p>That is a big leap.</p><div><hr></div><h3>Agentic Commerce Is About Protocols, Not Pages</h3><p>The Universal Commerce Protocol layered on top of Agent Payments Protocol is the most strategic signal in the letter.</p><p>Google is building a shared language for AI agents and merchants to transact securely.</p><p>That is not checkout optimization.</p><p>That is protocol design.</p><p>When an AI agent can represent a user, authenticate identity, negotiate offers, and complete payment across retailers without redirect loops, we are looking at a new commerce layer entirely.</p><p>Retailers stop being destinations. They become service endpoints.</p><p>This introduces real engineering challenges:</p><p>Delegated authority<br>Secure identity verification<br>Consent validation<br>Distributed observability</p><p>Agentic commerce is distributed systems engineering wrapped in a shopping experience.</p><div><hr></div><h3>Where Enterprises Come In</h3><p>This is where it becomes especially relevant for large organizations.</p><p>Most enterprises today operate on digital marketing platforms such as:</p><ul><li><p>Adobe</p></li><li><p>Salesforce</p></li><li><p>OpenText</p></li></ul><p>These platforms power content management, customer data platforms, campaign orchestration, personalization engines, and commerce stacks.</p><p>Until now, the integration pattern has largely been:</p><p>Experience platform &#8594; Campaign execution &#8594; Ad network &#8594; Reporting loop.</p><p>AI-native search and agentic commerce disrupt that flow.</p><p>Now enterprises can:</p><p>Expose product catalogs and offers as structured, agent-readable endpoints.<br>Integrate identity systems with commerce protocols.<br>Feed first-party data into conversational discovery surfaces.<br>Re-architect measurement stacks to align with AI-driven attribution.</p><p>Instead of pushing traffic into a site, they can participate directly in AI-mediated journeys.</p><p>That creates entirely new integration surfaces between enterprise platforms and ecosystems like AI Mode.</p><p>For software engineers inside large organizations, this means building APIs and data pipelines that are agent-compatible, not just browser-compatible.</p><p>It means thinking about product information as structured intelligence, not page content.</p><p>It means preparing CDPs and commerce engines to operate in a protocol-first world.</p><div><hr></div><h3>Gemini 3 and the Abstraction Discipline</h3><p>Gemini 3 improving underlying ad systems without customers needing to change anything is a quiet architectural flex.</p><p>It signals strong abstraction layers between model evolution and application interfaces.</p><p>Enterprises need to adopt the same discipline.</p><p>Models will change. Latency will improve. Capabilities will expand.</p><p>If your workflows break every time a model version updates, you are coupling too tightly.</p><p>AI-native systems require clean contracts and strong evaluation layers.</p><div><hr></div><h3>The Bigger Shift</h3><p>What we are witnessing is a reframing of digital commerce as a network of intelligent systems.</p><p>Search becomes a reasoning layer.<br>Creators become structured influence nodes.<br>Checkout becomes protocol exchange.<br>Measurement becomes unified intelligence fabric.<br>Enterprise platforms become integration hubs for AI agents.</p><p>This is not just about ads performing better.</p><p>It is about enterprises rethinking how their architecture participates in AI-driven ecosystems.</p><p>The expansionary moment she described will reward organizations that redesign their systems for interoperability, trust, and semantic intelligence.</p><p>The question is no longer whether AI will reshape digital commerce.</p><p>The question is whether our software architecture is ready for it.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.techinpieces.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading Tech in pieces! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Why DORA and SPACE Changed How I Think About Engineering Metrics]]></title><description><![CDATA[Measuring What Actually Matters in R&D]]></description><link>https://www.techinpieces.com/p/why-dora-and-space-changed-how-i</link><guid isPermaLink="false">https://www.techinpieces.com/p/why-dora-and-space-changed-how-i</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Mon, 15 Dec 2025 19:05:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!PHyx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PHyx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PHyx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PHyx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PHyx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PHyx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PHyx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg" width="1456" height="969" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:969,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1275089,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/187548682?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PHyx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg 424w, https://substackcdn.com/image/fetch/$s_!PHyx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg 848w, https://substackcdn.com/image/fetch/$s_!PHyx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!PHyx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75af71bd-6dbe-447f-8aff-6867a12b92cb_6048x4024.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@chuttersnap?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">CHUTTERSNAP</a> on <a href="https://unsplash.com/photos/white-and-black-measuring-tape-9rSP3SRUYh4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure></div><p>For a long time, I thought I understood engineering metrics.</p><p>I&#8217;ve seen velocity charts, delivery dashboards and productivity reports across many teams and systems. They looked precise. They felt reassuring. And yet, they often failed to explain what was actually happening on the ground.</p><p>That disconnect is what eventually pushed me toward frameworks like DORA and SPACE. Not because they were trendy, but because they helped replace gut feel with something more honest.</p><h1>tl;dr (for exec readers)</h1><ul><li><p>Most engineering metrics measure motion, not progress  </p></li><li><p>DORA shows how work actually flows through the system  </p></li><li><p>SPACE shows what that system does to people  </p></li><li><p>Using both together improves delivery without burning teams out  </p></li><li><p>Metrics should help teams learn, not make them defensive  </p></li></ul><div><hr></div><p>For years, engineering productivity was judged by proxies.</p><p>How busy teams looked.  </p><p>How fast tickets moved.  </p><p>How confident leaders sounded in reviews.</p><p>From experience, I&#8217;ve learned this the hard way: <strong>activity is easy to measure, effectiveness is not</strong>. And once systems get large, distributed and automated - intuition stops scaling.</p><p>That&#8217;s where DORA and SPACE changed how I think about metrics.</p><h1>DORA: When Delivery Stops Being a Personality Debate</h1><p>DORA focuses on four things:</p><ol><li><p>Deployment frequency  </p></li><li><p>Lead time for changes  </p></li><li><p>Change failure rate  </p></li><li><p>Mean time to recovery  </p></li></ol><p>On paper, these look technical. In practice, they expose organizational truth.</p><h3>Scenario (anonymized)</h3><p>I&#8217;ve seen two teams deliver similar features with very different timelines. One shipped weekly. The other took months.</p><p>The difference wasn&#8217;t talent or effort. It was structure.</p><p>More approvals. More handoffs. Testing pushed late. Releases treated as events instead of routines.</p><p>DORA didn&#8217;t blame anyone. It made friction visible.</p><p>Once that happened, the conversation changed from &#8220;<strong>why is this team slow?</strong>&#8221; to <strong>&#8220;why does the system make safe change so hard?&#8221;</strong>  </p><p>That&#8217;s when automation gets funded and ownership becomes clear.</p><h1>SPACE: When &#8220;High Performance&#8221; Starts to Crack</h1><p>DORA tells you how software moves.  </p><p>SPACE tells you what it feels like to build it.</p><p>SPACE looks at:</p><ol><li><p>Satisfaction and well-being  </p></li><li><p>Performance  </p></li><li><p>Activity  </p></li><li><p>Communication and collaboration  </p></li><li><p>Efficiency and flow  </p></li></ol><h3>Scenario (anonymized)</h3><p>I&#8217;ve worked with teams that looked excellent on paper. Strong delivery metrics. Fast releases. Quick recovery.</p><p>And yet, people were tired. Senior engineers disengaged. Attrition crept in.</p><p>SPACE helped explain why.</p><p>Engineers were spending more time coordinating than building. Context switching never stopped. Collaboration increased, but focus disappeared.</p><p>Without SPACE, those signals would have been easy to ignore.</p><h1>Why One Framework Wasn&#8217;t Enough for Me</h1><p><strong>DORA</strong> alone can push teams faster than the system can safely support.  </p><p><strong>SPACE</strong> alone can protect teams without fixing delivery problems.</p><p>The real value showed up when both were used together.</p><p>I&#8217;ve seen teams improve deployment frequency <strong>and</strong> satisfaction at the same time, simply by clarifying ownership, reducing cognitive load and making recovery predictable.</p><p>Velocity improved because stress went down.</p><h1>Metrics Are Mirrors, Not Weapons</h1><p>One lesson experience teaches quickly: <strong>metrics change behavior the moment people believe they&#8217;re being judged by them</strong>.</p><p>Used poorly, metrics make teams defensive.  </p><p>Used well, they make teams honest.</p><p>DORA and SPACE only work when they&#8217;re treated as learning tools, not performance sticks.</p><h1>Closing Thoughts</h1><p>Engineering excellence today isn&#8217;t about heroics.  </p><p>It&#8217;s about systems that don&#8217;t require them.</p><p><strong>DORA</strong> helped me see how software really moves.  </p><p><strong>SPACE</strong> helped me see what that movement costs.</p><p>Used together, they shifted my thinking from intuition-driven management to calmer, evidence-based leadership.</p><p>That&#8217;s where real improvement sticks.</p><p></p><p><em>If this resonated, I&#8217;ll be writing more about engineering leadership, AI-assisted development, and building sustainable systems. Subscribe if you want future posts in your inbox.</em></p><p>&#8212; Suren</p>]]></content:encoded></item><item><title><![CDATA[Anatomy of Helidon MCP + Ollama: Designing AI-Enhanced Java Microservices]]></title><description><![CDATA[A fresh take: Java, AI, and real world APIs finally working together.]]></description><link>https://www.techinpieces.com/p/anatomy-of-helidon-mcp-ollama-designing</link><guid isPermaLink="false">https://www.techinpieces.com/p/anatomy-of-helidon-mcp-ollama-designing</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Sat, 04 Oct 2025 16:25:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UgQ7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UgQ7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UgQ7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png 424w, https://substackcdn.com/image/fetch/$s_!UgQ7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png 848w, https://substackcdn.com/image/fetch/$s_!UgQ7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png 1272w, https://substackcdn.com/image/fetch/$s_!UgQ7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UgQ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png" width="500" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:32889,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/175279492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UgQ7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png 424w, https://substackcdn.com/image/fetch/$s_!UgQ7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png 848w, https://substackcdn.com/image/fetch/$s_!UgQ7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png 1272w, https://substackcdn.com/image/fetch/$s_!UgQ7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc77617eb-2989-46f7-b2f0-bde4a79789ba_500x500.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Building modern AI-powered applications isn&#8217;t just about sending prompts to a model. The real magic happens when you can augment LLMs with external tools and services, like fetching live weather data. Recently, <strong><a href="https://helidon.io/">Helidon</a>, </strong>one of my favorite java frameworks,<strong> introduced <a href="https://medium.com/helidon/helidon-4-3-released-29213af35587">MCP servers</a></strong>, giving Java developers a new way to bridge LLMs with real-world APIs through the Model Context Protocol. That means your AI app isn&#8217;t limited to what the model knows it can now reach out, call tools, and bring live information into the conversation.</p><p>In this blog, we&#8217;ll walk through how to wire together <strong><a href="https://docs.langchain4j.dev/">LangChain4j</a>, <a href="https://ollama.com/">Ollama</a>, and <a href="https://helidon.io/">Helidon</a></strong> to create an AI microservice that answers weather-related questions. Along the way, we&#8217;ll unpack the moving parts: chat models, MCP clients, tools, and service endpoints.</p><div><hr></div><h2>&#128313; High-Level Architecture</h2><p>At a glance, our app looks like this:</p><pre><code><code>User &#8594; Helidon HTTP Endpoint &#8594; LangChain4j AI Service
       &#8627; Ollama (LLM: Qwen/Llama3/etc.)
       &#8627; MCP Client (Weather API tool)
</code></code></pre><ul><li><p><strong>Helidon</strong> &#8594; lightweight Java microservice framework</p></li><li><p><strong>LangChain4j</strong> &#8594; Java framework for connecting LLMs + tools</p></li><li><p><strong>Ollama</strong> &#8594; runs local open-source models (Qwen3, Llama3, Mistral, etc.)</p></li><li><p><strong>MCP (Model Context Protocol)</strong> &#8594; standard way to plug external services into AI agents</p></li></ul><div><hr></div><h2>The Flow: </h2><p><strong>Ollama &#8592; MCP Client &#8592; MCP Server &#8592; API &#8592; UI</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bhs9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bhs9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Bhs9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Bhs9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Bhs9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bhs9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg" width="1456" height="456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:456,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:487887,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/175279492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Bhs9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Bhs9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Bhs9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Bhs9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff26f0b9f-a204-4d80-9646-d8c8216f886d_7150x2237.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Process Flow of the entire application</figcaption></figure></div><p></p><p>Here&#8217;s how the runtime pieces connect:</p><pre><code><code>[User Interface] 
     &#8595;
 [Helidon API Layer] (WeatherService + WeatherAiChat)
     &#8595;
 [MCP Client] (DefaultMcpClient + HttpMcpTransport)
     &#8595;
 [MCP Server] (Helidon MCP server exposing weather tool)
     &#8595;
 [Ollama LLM] (Llama3/Qwen answering queries with context)
</code></code></pre><div><hr></div><h2>&#129513; Separation of Responsibilities</h2><p>When the user calls <code>/weather</code>, not every layer runs at once.<br>Each component plays a specific role in the pipeline &#8212; and the <strong>MCP Client only activates when the LLM decides a tool is needed</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DJjh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DJjh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg 424w, https://substackcdn.com/image/fetch/$s_!DJjh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg 848w, https://substackcdn.com/image/fetch/$s_!DJjh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!DJjh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DJjh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg" width="976" height="369" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:369,&quot;width&quot;:976,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:63876,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/175279492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DJjh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg 424w, https://substackcdn.com/image/fetch/$s_!DJjh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg 848w, https://substackcdn.com/image/fetch/$s_!DJjh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!DJjh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F821c8ca0-bb21-4080-bea5-dbbc0ecb806c_976x369.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>&#128313; Component Breakdown</h2><p><strong>1. MCP Client (</strong><code>mcp-client/</code><strong>)</strong></p><ul><li><p>Houses <code>WeatherService.java</code>, which wires:</p><ul><li><p>An <strong>OllamaChatModel</strong> (local LLM from Ollama at </p></li></ul><p>http://localhost:11434).</p><ul><li><p>An <strong>MCP Client</strong> (<code>DefaultMcpClient</code>) that connects to the MCP server at <code>http://localhost:8081/mcp</code>.</p></li></ul></li><li><p>Exposes a simple <strong>HTTP GET API</strong> so users can send queries like:</p></li></ul><pre><code><code>GET http://localhost:8080?question=Will it rain in Dallas tomorrow?
</code></code></pre><ul><li><p>The <strong>WeatherAiChat</strong> interface defines the AI contract:</p></li></ul><pre><code><code>@SystemMessage(&#8221;You are a helpful assistant that provides weather forecasts.&#8221;)
String weather(@UserMessage String question);
</code></code></pre><p></p><p><strong>2. MCP Server (</strong><code>mcp-server/</code><strong> and </strong><code>mcp-server-declarative/</code><strong>)</strong></p><ul><li><p>Two flavors provided:</p><ul><li><p><strong>Imperative</strong> (<code>mcp-server/</code>) &#8594; explicit server wiring via Java code.</p></li><li><p><strong>Declarative</strong> (<code>mcp-server-declarative/</code>) &#8594; YAML-driven configuration + annotated classes.</p></li></ul></li><li><p>Both expose the <strong>MCP endpoint</strong> (<code>/mcp</code>) that the client can consume.</p></li><li><p>These servers wrap external APIs (like OpenWeather or a mock weather provider) into <strong>MCP tools</strong>.</p></li></ul><p></p><p><strong>3. Ollama (Local LLM)</strong></p><ul><li><p>Runs the base model (<code>llama3.1</code>, <code>qwen3:1.7b</code>, etc.) locally.</p></li><li><p>Provides the &#8220;reasoning engine&#8221; that interprets the query, decides if it needs external tools, and then integrates the MCP tool results.</p></li></ul><p></p><p><strong>4. API Layer (Helidon)</strong></p><ul><li><p>A thin HTTP service that exposes AI capabilities to the outside world.</p></li><li><p>In our example, <code>WeatherService</code> is registered as an <strong>HttpService</strong>.</p></li><li><p>The user calls:</p></li></ul><pre><code><code>GET /?question=Will+it+rain+in+Dallas+tomorrow
</code></code></pre><p>&#8594; The system routes through MCP and Ollama &#8594; returns a natural-language answer.</p><p></p><p><strong>5. User Interface</strong></p><ul><li><p>Could be as simple as <code>curl</code>, a browser, or a frontend app (React, Angular).</p></li><li><p>Doesn&#8217;t care about the internal wiring &#8212; just talks to the API.</p></li></ul><div><hr></div><h2>&#128313; Project File Structure</h2><pre><code><code>weather-application/
 &#9500;&#9472;&#9472; mcp-client/
 &#9474;    &#9492;&#9472;&#9472; src/main/java/io/helidon/extensions/mcp/weather/server/client/
 &#9474;         &#9500;&#9472;&#9472; Main.java
 &#9474;         &#9500;&#9472;&#9472; WeatherAiChat.java
 &#9474;         &#9500;&#9472;&#9472; WeatherService.java
 &#9474;         &#9492;&#9472;&#9472; package-info.java
 &#9474;    &#9492;&#9472;&#9472; resources/application.yaml
 &#9474;
 &#9500;&#9472;&#9472; mcp-server-declarative/
 &#9474;    &#9492;&#9472;&#9472; src/main/java/io/helidon/extensions/mcp/weather/server/declarative/
 &#9474;         &#9500;&#9472;&#9472; Main.java
 &#9474;         &#9500;&#9472;&#9472; McpServer.java
 &#9474;         &#9492;&#9472;&#9472; package-info.java
 &#9474;    &#9492;&#9472;&#9472; resources/application.yaml
 &#9474;
 &#9500;&#9472;&#9472; mcp-server/
 &#9474;    &#9492;&#9472;&#9472; src/main/java/io/helidon/extensions/mcp/weather/server/
 &#9474;         &#9500;&#9472;&#9472; Main.java
 &#9474;         &#9492;&#9472;&#9472; package-info.java
 &#9474;    &#9492;&#9472;&#9472; resources/application.yaml
 &#9474;
 &#9500;&#9472;&#9472; README.md
 &#9492;&#9472;&#9472; pom.xml
</code></code></pre><div><hr></div><h2>&#128313; Module 1: MCP Client</h2><p>The <strong>MCP Client</strong> is the entry point of our application. It&#8217;s responsible for:</p><ul><li><p>Bootstrapping the <strong>Helidon WebServer</strong></p></li><li><p>Exposing a <code>/weather</code> endpoint to users</p></li><li><p>Connecting to Ollama (local LLM)</p></li><li><p>Connecting to the MCP Server (via HTTP transport)</p></li><li><p>Wiring everything through <strong>LangChain4j&#8217;s AI service layer</strong></p></li></ul><h3>&#128204; <code>Main.java</code></h3><pre><code><code>class Main {
    private Main() { }

    public static void main(String[] args) {
        LogConfig.configureRuntime();
        Config config = Config.create();

        WebServer.builder()
                .config(config.get(&#8221;server&#8221;))
                .routing(routing -&gt; routing.register(&#8221;/weather&#8221;, new WeatherService()))
                .build()
                .start();
    }
}
</code></code></pre><h3>&#128204; <code>WeatherAiChat.java</code></h3><pre><code><code>import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;

public interface WeatherAiChat {
    @UserMessage(&#8221;You are a weather journalist. {{question}}&#8221;)
    String weather(@V(&#8221;question&#8221;) String question);
}
</code></code></pre><h3>&#128204; <code>WeatherService.java</code></h3><pre><code><code>@Service.Singleton
class WeatherService implements HttpService {

    private final WeatherAiChat weather;

    WeatherService() {
        ChatModel model = OllamaChatModel.builder()
                .baseUrl(&#8221;http://localhost:11434&#8221;)
                .modelName(&#8221;llama3.1&#8221;)
                .timeout(Duration.ofMinutes(3))
                .build();

        McpTransport transport = new HttpMcpTransport.Builder()
                .timeout(Duration.ofMinutes(10))
                .sseUrl(&#8221;http://localhost:8081/mcp&#8221;)
                .logRequests(true)
                .logResponses(true)
                .build();

        McpClient mcpClient = new DefaultMcpClient.Builder()
                .transport(transport)
                .build();

        ToolProvider toolProvider = McpToolProvider.builder()
                .mcpClients(List.of(mcpClient))
                .build();

        this.weather = AiServices.builder(WeatherAiChat.class)
                .chatModel(model)
                .toolProvider(toolProvider)
                .build();
    }

    @Override
    public void routing(HttpRules rules) {
        rules.get(this::weatherChat);
    }

    private void weatherChat(ServerRequest request, ServerResponse response) {
        String question = request.query().get(&#8221;question&#8221;);
        String answer = weather.weather(question);
        response.send(answer);
    }
}
</code></code></pre><h3>&#128204; <code>application.yml</code></h3><pre><code><code>server:
  port: 8080
  host: 0.0.0.0
</code></code></pre><div><hr></div><h2>&#128313; Module 2: MCP Server (Imperative)</h2><p>The <strong>MCP Server</strong> is the &#8220;toolbox&#8221; side of our app. It exposes the <code>get-weather-alert-from-state</code> tool that queries the National Weather Service API.</p><pre><code><code>public class Main {
    private static final Jsonb JSON = JsonbProvider.provider().create().build();
    private static final WebClient WEBCLIENT = WebClient.builder()
            .baseUri(&#8221;https://api.weather.gov&#8221;)
            .addHeader(&#8221;Accept&#8221;, &#8220;application/geo+json&#8221;)
            .addHeader(&#8221;User-Agent&#8221;, &#8220;WeatherApiClient/1.0 (your@email.com)&#8221;)
            .build();

    public static void main(String[] args) {
        Config config = Config.create();
        WebServer.builder()
                .config(config.get(&#8221;server&#8221;))
                .routing(routing -&gt; routing.addFeature(
                        McpServerConfig.builder()
                                .name(&#8221;helidon-mcp-weather-server-imperative&#8221;)
                                .addTool(tool -&gt; tool.name(&#8221;get-weather-alert-from-state&#8221;)
                                        .description(&#8221;Get weather alert per US state&#8221;)
                                        .schema(createWeatherSchema())
                                        .tool(Main::getWeatherAlertFromState))))
                .build()
                .start();
    }
}
</code></code></pre><h3>&#128204; <code>application.yml</code></h3><pre><code><code>server:
  port: 8081
  host: 0.0.0.0
</code></code></pre><div><hr></div><h2>&#128313; Module 3: MCP Server (Declarative)</h2><p>The <strong>Declarative MCP Server</strong> offers the same tool but with annotations instead of imperative wiring.</p><pre><code><code>@Mcp.Server(&#8221;helidon-mcp-weather-server&#8221;)
class McpServer {
    @Mcp.Tool(&#8221;Get weather alert per US state&#8221;)
    List&lt;McpToolContent&gt; getWeatherAlertFromState(String state) {
        // Calls api.weather.gov and returns alerts
    }
}
</code></code></pre><h3>&#128204; <code>application.yml</code></h3><pre><code><code>server:
  port: 8081
  host: 0.0.0.0
</code></code></pre><div><hr></div><h2>&#128313; Module 4: Demo Walkthrough</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6aiI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6aiI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg 424w, https://substackcdn.com/image/fetch/$s_!6aiI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg 848w, https://substackcdn.com/image/fetch/$s_!6aiI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!6aiI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6aiI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg" width="1456" height="788" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:788,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1996362,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/175279492?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6aiI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg 424w, https://substackcdn.com/image/fetch/$s_!6aiI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg 848w, https://substackcdn.com/image/fetch/$s_!6aiI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!6aiI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd882960b-5db3-4fd2-a000-b23c0f665193_5436x2943.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The UI, Helidon MCP Server, Helidon MCP Client, Ollama running Llama</figcaption></figure></div><p>First, make sure ollama is running.</p><pre><code>ollama run llama3.1</code></pre><p>Build the whole weather application from the <code>weather-application</code> directory.</p><pre><code>mvn clean package</code></pre><p>Then run on of the server application.</p><pre><code>java -jar mcp-server/helidon-mcp-weather-server.jar</code></pre><p>In another terminal, run the client application.</p><pre><code>java -jar mcp-client/helidon-mcp-weather-client.jar</code></pre><p>Example query:</p><pre><code><code>curl -G &#8220;http://localhost:8080/weather&#8221; \
     --data-urlencode &#8220;question=Is there a weather alert in state TX?&#8221;
</code></code></pre><p><strong>Response:</strong></p><pre><code><code>There is a Coastal Flood Advisory and High Rip Current Risk...
</code></code></pre><div><hr></div><h2>&#128313; Summary &amp; Key Takeaways</h2><ul><li><p><strong>MCP Client</strong> &#8594; entry point exposing <code>/weather</code> API, connects Ollama + MCP.</p></li><li><p><strong>MCP Server</strong> &#8594; provides weather tools (imperative or declarative).</p></li><li><p><strong>Ollama</strong> &#8594; runs the local LLM (LLaMA, Qwen, Mistral).</p></li><li><p><strong>Demo</strong> &#8594; queries flow User &#8594; API &#8594; MCP Client &#8594; MCP Server &#8594; Weather API &#8594; LLM &#8594; back to User.</p></li></ul><p>&#128161; <strong>Takeaway</strong>: LangChain4j + Ollama + MCP + Helidon = a <strong>powerful recipe</strong> for AI microservices that are <strong>local, extensible, and production-ready</strong>.</p><div><hr></div><p><em>Java may not be the first language people think of for AI, but that&#8217;s exactly why I&#8217;m exploring it. Follow along for more experiments, tutorials, and stories from the intersection of AI and Java development.</em></p>]]></content:encoded></item><item><title><![CDATA[Why Small Language Models Are Set to Steal the Spotlight in Agentic AI]]></title><description><![CDATA[A deep dive into NVIDIA's bold paper claiming SLMs are the real MVPs for AI agents&#8212;cheaper, faster, and better.]]></description><link>https://www.techinpieces.com/p/why-small-language-models-are-set</link><guid isPermaLink="false">https://www.techinpieces.com/p/why-small-language-models-are-set</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Thu, 17 Jul 2025 01:43:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9XJr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Okay, let's be real&#8212;AI agents are exploding right now. They're the bots handling your emails, coding up fixes, or even managing your smart home without you lifting a finger. Or maybe there are not and is just hype. But here's the kicker: most of these agents are powered by massive large language models (LLMs) like those beasts from OpenAI or Google or Anthropic or Meta, eating energy and cash like there's no tomorrow. </p><p>Enter a fresh paper from <a href="https://arxiv.org/abs/2506.02153">NVIDIA Research, dropped recently, arguing that small language models (SLMs)</a>&#8212;think models under 10 billion parameters that can run on your laptop&#8212;are actually the future of this agentic AI boom. <em>Full disclosure: I'm no NVIDIA insider</em>, but as someone who's been watching out over AI trends closely (remember my post on <a href="https://techinpieces.substack.com/p/mixing-human-ai-chemistry-with-capgeminis">Capgemini's Resonance AI</a>?), this paper hit me. It's not just tech talk; it's a wake-up call on why we might be overpaying for AI software (agents) we don't fully need. It&#8217;s like buying a Ferrari to go go grocery shopping few blocks away. Buckle up, because we're unpacking this short summary in my usual style&#8212;analogies, real talk, and a dash of "what ifs". </p><p>The paper, titled "<a href="https://arxiv.org/abs/2506.02153">Small Language Models are the Future of Agentic AI</a>," is penned by a team of NVIDIA brains like <a href="https://pbelcak.com/">Peter Belcak</a> and <a href="https://www.pmolchanov.com/">Pavlo Molchanov</a>, plus a Georgia Tech collab. It's a position piece, not some dry experiment log&#8212;think manifesto for ditching LLMs in favor of SLMs for most agent work. They back it with stats, examples, and even a how-to guide for switching over. </p><p><strong>Why care?</strong> Agentic AI is already a multi-billion-dollar beast, with surveys showing over half of big IT firms using agents, and markets predicting it'll balloon to $200 billion by 2034. And every tech consulting firm screaming we can build &amp; help!</p><p><strong>But the current setup?</strong> Agents ping huge LLMs in the cloud for every little task, burning through billions in infrastructure. The authors say that's wasteful&#8212;SLMs can handle the grunt work better, cheaper, and greener. NVIDIA's take on SLMs in agentic AI. (Imagine a cool graphic here of a tiny model zipping past a hulking LLM&#8212;source: the paper's Figure 1, but I'll describe it later.) </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9XJr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9XJr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png 424w, https://substackcdn.com/image/fetch/$s_!9XJr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png 848w, https://substackcdn.com/image/fetch/$s_!9XJr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png 1272w, https://substackcdn.com/image/fetch/$s_!9XJr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9XJr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png" width="1456" height="490" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:490,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:104085,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/168518874?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9XJr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png 424w, https://substackcdn.com/image/fetch/$s_!9XJr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png 848w, https://substackcdn.com/image/fetch/$s_!9XJr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png 1272w, https://substackcdn.com/image/fetch/$s_!9XJr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc4f254-e415-48aa-9b5f-da29d1213730_2081x700.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1:An illustration of agentic systems with different modes of agency. <em>Left: Language model agency.</em> The language model acts both as the HCI and the orchestrator of tool calls to carry out a task. <em>Right: Code agency.</em> The language model fills the role of the HCI (optionally) while a dedicated controller code orchestrates all interactions.</figcaption></figure></div><p><strong>What's the Big Idea?</strong> Defining SLMs and the Position First off, they define SLMs simply: models small enough to fit on your phone or laptop, cranking out responses fast for one user without lagging. </p><p><strong>Anything bigger?</strong> That's an LLM, stuck in data centers. As of 2025, that's mostly under 10B params&#8212;tiny compared to GPT-4's rumored hundreds of billions. </p><p><strong>Their core stance:</strong> SLMs are powerful enough for most agent tasks, more operationally fitting, and way more economical. They call it a "value statement," not a bossy recommendation&#8212;basically, if we follow logic and priorities like cost and efficiency, SLMs win. Agents break down big jobs into repetitive subtasks: planning, tool-calling, reasoning in loops. Why waste a generalist LLM on that when a tuned SLM nails it? For chatty, open-ended stuff, mix them in heterogeneous systems&#8212;SLMs for the basics, LLMs as the big queries when needed. </p><p><strong>They elaborate:</strong> LLMs are overkill for agents' narrow, scripted interactions. Agents aren't chit-chatting philosophy; they're parsing code, calling APIs, or summarizing docs. SLMs shine here with lower latency, less power draw, and easier tweaks. Plus, it's sustainable&#8212;leaving LLM monoliths could slash AI's carbon footprint. They nod to philosophy too: it's a "<em><strong>Humean moral ought,</strong></em>" meaning if we value efficiency and the planet, we should shift. </p><h2>The Arguments: Why SLMs Rock for Agents </h2><p>The meat of the paper? A bunch of arguments backing their views. Let's break them down like I did with Capgemini's pillars&#8212;step by step, no jargon overload. </p><h3>Argument 1: SLMs Are Already Beast-Mode Capable. </h3><p>Forget the old "bigger is better" trope. Scaling laws say more params equal more smarts, but recent SLMs bend that curve. Examples? Microsoft's Phi-3 (7B params) matches 70B models on reasoning and code gen, running 15x faster. NVIDIA's own Nemotron-H (up to 9B) rivals 30B LLMs at a fraction of the compute. Hugging Face's SmolLM2 (1.7B) punches like 14B contemporaries. DeepSeek's distilled models even beat GPT-4o on commonsense. Add tricks like tool augmentation or self-consistency, and a 3B SLM solves math like a 30B one. Bottom line: For agent errands like tool-calling or instruction-following, SLMs deliver without the bloat. </p><h3>Argument 2: Cheaper Than a Budget Lunch. Inference on a 7B SLM? </h3><p>10-30x less in energy, FLOPs, and cash than a 175B LLM. Fine-tuning? Hours, not weeks. Edge deployment? Run them offline on your GPU with stuff like NVIDIA's ChatRTX. LLMs waste params on sparse signals; SLMs are denser, more efficient. Modular agents? Stack SLMs like Legos for specialized tasks&#8212;cheaper to debug, deploy, and scale. </p><h3>Argument 3: Flexibility on Steroids. </h3><p>SLMs cost less to train or tweak, so spin up experts for niche jobs. This democratizes AI&#8212;more folks can build agents, fostering diversity and innovation. No more one-size-fits-all. </p><h3>Argument 4: Agents Barely Scratch LLM Surfaces. </h3><p>Agents cage LLMs with prompts and tools, using like 10% of their skills. A fine-tuned SLM for that narrow slice? Just as good, plus bonuses. </p><h3>Argument 5: Alignment Matters Big Time. </h3><p>Agents chat with code&#8212;tool calls need perfect formatting (JSON, not YAML). SLMs, tuned for one style, hallucinate less and fit seamlessly. </p><h3>Argument 6: Heterogeneity is Baked In. </h3><p>Agents can call multiple models. Use an LLM for the boss-level planning, SLMs for minions. Or go full SLM with a chatty one for users and specialists for backend. </p><h3>Argument 7: Free Data Goldmine. </h3><p>Agent interactions spit out perfect fine-tuning data. Log them (ethically), curate, and boom&#8212;better SLMs over time. </p><p>These aren't exhaustive, but they paint a picture: <strong>SLMs aren't underdogs</strong>; they're optimized for the agent game. </p><h2>But Wait, Counterarguments? </h2><p><strong>They Tackle Them Head-On:</strong> No paper's complete without pushback. They address alternatives like "LLMs always win on language understanding" (scaling laws say so, plus some "semantic hub" theory). But: New architectures close the gap, fine-tuning fixes niches, and agents decompose tasks anyway&#8212;no hub needed for simple subtasks. </p><p><strong>Another</strong>: Centralized LLMs are cheaper at scale. Maybe, but modular inference tech is catching up, and setup costs are dropping. </p><p><strong>They admit inertia</strong>&#8212;LLMs have a head start&#8212;but argue advantages will flip it. </p><p><strong>Barriers</strong>: Why Aren't We There Yet? </p><p><strong>Honest talk:</strong> Billions sunk into LLM clouds, benchmarks favoring generalists, and SLMs lacking hype. But these are fixable&#8212;better scheduling, agent-focused evals, and word-of-mouth on savings. </p><h3><strong>The Fix: LLM-to-SLM Conversion Recipe</strong> </h3><p>1. Log agent calls (anonymized, secure). </p><p>2. Curate data&#8212;scrub sensitive stuff, paraphrase if needed. </p><p>3. Cluster tasks (e.g., summarization, code gen). </p><p>4. Pick SLMs (Phi, Mistral as starters). </p><p>5. Fine-tune with LoRA or distillation. </p><p>6. Iterate with fresh data. </p><p>It's like upgrading your car engine without buying a new ride&#8212;painless, iterative. </p><h3>What&#8217;s next?</h3><p>Build Small Language Models. It's about making AI cheaper and greener to speed up the agent revolution. </p><p><strong>My Two Cents: Is This the Future?</strong> As someone who's seen AI hype cycles (hello, model collapse fears), this paper feels spot-on. Agents are repetitive workhorses, not philosophers&#8212;SLMs fit like gloves. Imagine: Cheaper agents mean more access, from startups to your grandma's recipe bot. But risks? Fine-tuning could amplify biases if data's junky, and heterogeneity might complicate debugging. What's next? Multimodal SLMs for vision agents? On-device privacy wins? Or pushback from LLM giants? I'm betting SLMs surge, especially with energy costs rising. What do you think? Will SLMs dethrone LLMs in agents, or is it hype? Drop a comment&#8212;let's keep the AI convo rolling.</p>]]></content:encoded></item><item><title><![CDATA[Mixing Human-AI Chemistry with Capgemini’s Resonance AI Magic]]></title><description><![CDATA[A framework helping organizations to turn strategy into action across the enterprise.]]></description><link>https://www.techinpieces.com/p/mixing-human-ai-chemistry-with-capgeminis</link><guid isPermaLink="false">https://www.techinpieces.com/p/mixing-human-ai-chemistry-with-capgeminis</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Wed, 16 Jul 2025 02:34:30 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/7e154d79-07dd-49ab-bde0-7c6bf513ed31_429x314.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Okay, let&#8217;s be real for a second&#8212;AI is everywhere. It&#8217;s in your phone, your car, your Netflix recommendations, and now it&#8217;s reshaping entire enterprises. But here&#8217;s the catch: turning all that AI hype into real, measurable business impact? That&#8217;s where things get tricky. Enter Capgemini&#8217;s Resonance AI Framework,<a href="https://www.capgemini.com/news/press-releases/capgemini-unveils-strategic-ai-framework-to-turn-enterprise-ambition-into-measurable-business-impact/"> unveiled on July 3, 2025</a>, at a time when organizations are racing to adopt agentic AI within the next two years. Full disclosure: I might be biased since I work at Capgemini, but this framework has me genuinely excited. It&#8217;s not just another AI tool&#8212;it&#8217;s a strategic playbook to weave AI into the fabric of businesses, from the shop floor to the C-suite. This framework is about making AI practical, responsible, and &#8220;human&#8221;. </p><p>So, let&#8217;s break it down: how does the <a href="https://www.capgemini.com/services/data-and-ai/">Resonance AI Framework</a> work, why does it matter, and what&#8217;s the secret sauce behind its promise of &#8220;human-AI chemistry&#8221;? Buckle up, because we&#8217;re diving into the future of enterprise AI.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JM_D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JM_D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png 424w, https://substackcdn.com/image/fetch/$s_!JM_D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png 848w, https://substackcdn.com/image/fetch/$s_!JM_D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png 1272w, https://substackcdn.com/image/fetch/$s_!JM_D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JM_D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png" width="429" height="314" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:314,&quot;width&quot;:429,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:35574,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/167840687?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JM_D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png 424w, https://substackcdn.com/image/fetch/$s_!JM_D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png 848w, https://substackcdn.com/image/fetch/$s_!JM_D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png 1272w, https://substackcdn.com/image/fetch/$s_!JM_D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F591167d9-f5ef-4f4c-ba49-37c9bea97666_429x314.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Capgemini&#8217;s Resonance AI Framework. Source https://www.capgemini.com/news/press-releases/capgemini-unveils-strategic-ai-framework-to-turn-enterprise-ambition-into-measurable-business-impact/</figcaption></figure></div><div><hr></div><h2><strong>What&#8217;s the Resonance AI Framework, Anyway?</strong> </h2><p>Picture this: AI as a utility, like electricity or Wi-Fi, accessible to everyone, everywhere, anytime. That&#8217;s Capgemini&#8217;s vision, and the Resonance AI Framework is their roadmap to make it happen. At its core, this framework helps organizations move from AI ambition to tangible results&#8212;think faster operations, smarter products, and happier customers. It&#8217;s not about slapping AI onto existing processes; it&#8217;s about reimagining how businesses operate, innovate, and connect with people. Capgemini calls it a &#8220;strategic blueprint&#8221; that blends their expertise in AI, data, and human-centric design. The framework revolves around three key dimensions&#8212;<strong>AI Essentials (ACCESS), AI Readiness (ADAPT), and Human-AI Chemistry (ADOPT)</strong>&#8212;each tackling a different piece of the AI puzzle. Oh, and it&#8217;s backed by a suite of transformation offers and <a href="https://www.capgemini.com/solutions/raise-reliable-ai-solution-engineering/">RAISE</a>, a generative AI and AI agents gallery that&#8217;s constantly evolving. Sounds like a lot, right? Don&#8217;t worry, I&#8217;ll unpack it step by step.</p><div><hr></div><h2><strong>The Three Pillars of Resonance AI</strong></h2><p>Let&#8217;s start with the foundation. Capgemini&#8217;s framework is like a three-legged stool&#8212;each leg is critical, and if one wobbles, the whole thing tips over. Here&#8217;s how the three dimensions work together to create what they call &#8220;<strong>waves of value</strong>.&#8221; </p><h4><strong>AI Essentials (ACCESS): The Building Blocks</strong></h4><p>Think of AI Essentials as the raw materials for your AI transformation. This is about having the right tech and data to make AI work. Capgemini breaks it down into two parts:</p><ul><li><p><strong>Intelligent-as-a-Service:</strong> This includes scalable infrastructure, advanced language models (think LLMs like the ones powering ChatGPT), and software with built-in AI smarts. It&#8217;s the engine that drives your AI capabilities.</p></li><li><p><strong>Raw Data:</strong> Your organization&#8217;s data&#8212;unique, messy, and often untapped&#8212;is the fuel. Whether it&#8217;s customer records, supply chain logs, or sensor readings, this data powers the insights that make AI valuable.</p></li></ul><p>Without these essentials, you&#8217;re trying to build a house without bricks or mortar. Capgemini&#8217;s approach ensures you&#8217;ve got the tech and data ready to unlock actionable intelligence, whether you&#8217;re automating processes or dreaming up new products. </p><h4>AI Readiness (ADAPT): Setting the Stage</h4><p>Here&#8217;s where things get practical. AI Readiness is about preparing your organization to use AI effectively and responsibly. It&#8217;s not enough to have fancy tech&#8212;you need the right enablers to make it stick. This means:</p><ul><li><p><strong>Workforce Models:</strong> Training your team to work alongside AI, not fear it.</p></li><li><p><strong>Governance Frameworks:</strong> Rules to keep AI ethical, legal, and safe.</p></li><li><p><strong>Data Infrastructure:</strong> Systems to manage and process your data at scale.</p></li></ul><p>Capgemini also emphasizes guardrails&#8212;think of them as bumpers in bowling, keeping your AI from veering into risky territory. This is crucial because, let&#8217;s face it, AI gone wrong can be a PR nightmare (or worse). By focusing on readiness, Capgemini ensures your organization can scale AI without tripping over itself. </p><h4>Human-AI Chemistry (ADOPT): The Secret Sauce</h4><p>This is my favorite part, and it&#8217;s where Capgemini really shines. Human-AI Chemistry is about designing interactions between people and AI that actually work. It&#8217;s not just about tech&#8212;it&#8217;s about trust, collaboration, and culture. Capgemini highlights three elements here:</p><ul><li><p><strong>Defined Roles:</strong> Clarifying who does what&#8212;AI handles the heavy lifting, humans bring the judgment.</p></li><li><p><strong>Well-Designed Interactions:</strong> Workflows that feel natural, not clunky.</p></li><li><p><strong>Ethical Alignment:</strong> Ensuring AI respects legal and moral standards to build trust over time.</p></li></ul><p>I love the analogy they use: just like team chemistry makes a sports team click, human-AI chemistry determines how deeply AI integrates into your business. Without it, you&#8217;ve got a shiny AI tool that nobody trusts or uses. With it, you&#8217;ve got hybrid teams that thrive.</p><div><hr></div><h3>A Real-World Example: AI in Action</h3><p>Still with me? Let&#8217;s ground this in a real example. Capgemini&#8217;s already rolling out the Resonance AI Framework with clients, and the results are impressive. Take their work with a global pharmaceutical company struggling with its IT service desk&#8212;slow resolution times, high costs, and grumpy users. Sound familiar? By bringing in agentic and generative AI, Capgemini transformed the service desk. The results?</p><ul><li><p><strong>20% reduction</strong> in average handling time.</p></li><li><p><strong>Improved first-contact resolution</strong> and user satisfaction.</p></li><li><p><strong>80% zero-touch automation</strong> (yes, 80%!).</p></li><li><p><strong>40% cut</strong> in operational costs.</p></li></ul><p>This isn&#8217;t just about saving money&#8212;it&#8217;s about making IT support faster, smarter, and more user-friendly. And it&#8217;s not a one-off. Capgemini&#8217;s framework is being used across industries, from manufacturing to financial services, to craft AI roadmaps, hyper-automate processes, and reimagine customer experiences.</p><div><hr></div><h3>The Bigger Picture: Why This Matters</h3><p>So, why am I excited about this? (maybe it&#8217;s partly because I&#8217;m on Team Capgemini, but hear me.) The Resonance AI Framework isn&#8217;t just another corporate AI pitch&#8212;it&#8217;s a response to where the world&#8217;s headed. With agentic AI set to explode in the next two years, organizations need a way to harness it without losing their soul. Capgemini&#8217;s focus on human-AI chemistry is a game-changer. It acknowledges that AI isn&#8217;t about replacing people&#8212;it&#8217;s about amplifying them. Let&#8217;s zoom out for a second. AI is becoming a utility, as Capgemini&#8217;s Group CEO Aiman Ezzat puts it, &#8220;<em>accessible everywhere, anytime, and by anyone</em>.&#8221; </p><p>But accessibility alone isn&#8217;t enough. Without strategy, governance, and trust, AI can become a chaotic mess. The Resonance AI Framework offers a clear path: align your vision with execution, strategy with operations, and innovation with responsibility. And it&#8217;s not just talk. Capgemini&#8217;s backing this up with serious muscle&#8212;over 150,000 team members trained on generative AI, AI Centers of Excellence, and partnerships with heavyweights like AWS, Google Cloud, Microsoft, and Mistral AI. They&#8217;ve even got recognition from Forrester&#8217;s Wave&#8482; for AI services in Q2 2024. </p><p>This is a company walking the walk. And i&#8217;m proud to be part of it.</p><div><hr></div><h3>What&#8217;s Next for Resonance AI?</h3><p>The journey&#8217;s just beginning, and I&#8217;m already curious about where this framework will go. Here are a few possibilities on the horizon:</p><ul><li><p><strong>Multimodal AI Integration</strong>: Imagine AI that seamlessly blends text, images, and audio to solve complex problems&#8212;like diagnosing equipment failures from photos and sensor data.</p></li><li><p><strong>AI on the Edge</strong>: Deploying AI on devices like smartphones or IoT sensors for faster, real-time decisions.</p></li><li><p><strong>Explainable AI</strong>: Making AI&#8217;s decisions transparent so users trust it more (because nobody likes a black box).</p></li></ul><p>Capgemini&#8217;s RAISE gallery, with its ever-evolving AI agents, hints at a future where businesses can plug and play AI solutions tailored to their needs. From hyper-automating supply chains to crafting personalized customer experiences, the possibilities are endless. But there&#8217;s a catch. As I&#8217;ve written before (remember my post on AI model collapse?), scaling AI isn&#8217;t without risks. If organizations lean too heavily on synthetic data or lose access to human-generated data, things could go sideways. Capgemini&#8217;s emphasis on governance and ethical guardrails is a step in the right direction, but it&#8217;ll take community-wide coordination to keep AI sustainable.</p><div><hr></div><h3>Final Thoughts</h3><p>Capgemini&#8217;s Resonance AI Framework is more than a tool&#8212;it&#8217;s a mindset. It&#8217;s about starting at the core of your organization and letting AI radiate outward, creating continuous waves of value. Whether you&#8217;re a manufacturing giant, a financial services firm, or a startup with big dreams, this framework offers a way to make AI real, responsible, and human. I&#8217;ll admit, I&#8217;m a bit biased as a Capgemini insider, but I truly believe this framework could set the standard for enterprise AI. Will it become the global benchmark, as Capgemini hopes? Only time will tell, but one thing&#8217;s clear: in a world where AI is the next utility, frameworks like this are what separate the leaders from the laggards. So, what do you think? Are you ready to embrace human-AI chemistry in your organization? Let&#8217;s keep the conversation going. </p><h4>Further Reading</h4><ul><li><p>Capgemini&#8217;s Resonance AI Framework Overview: <a href="https://www.capgemini.com/">Capgemini Website</a></p></li><li><p>&#8220;The Forrester Wave&#8482;: AI Services, Q2 2024&#8221;: <a href="https://www.forrester.com/">Forrester Website</a></p></li><li><p>My previous post on <a href="https://www.surenk.com/blog/can-ai-models-collapse">AI Model Collapse</a> for context on AI&#8217;s challenges</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Content by AI for AI (Sorry Humans)]]></title><description><![CDATA[Content is not longer written for humans, but is generated by AI for AI.]]></description><link>https://www.techinpieces.com/p/content-by-ai-for-ai-sorry-humans</link><guid isPermaLink="false">https://www.techinpieces.com/p/content-by-ai-for-ai-sorry-humans</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Fri, 30 May 2025 03:47:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Sou-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The Fundamental shift in Content Creation &amp; Consumption is coming. </p><p>The primary theme the last decade was "<strong>Humans As Consumers</strong>". Digital Transformation was all over us. UI, UX, Websites, Content, Targeted personalized content, Advertisements, Ads based on our search criteria, Analytics, SEO, Websites for desktop, Websites for mobiles, Mobile apps... everything was centered around HUMANS.</p><h3><strong>AI As Consumer</strong></h3><p>AI builds' websites, writes content for AI. But the best part is that AI agents/bots do not care how the website/presentation looks; so long as they can read the text to process. </p><p>Then generate Summaries (short text. bullets like <a href="https://developers.google.com/search/docs/appearance/ai-overviews">Google AI Overviews</a> AIO) for Humans to Consume. Yes, we are getting addicted to quick summarized results from AI Chats (like ChatGPT, Google Gemini, Perplexity&#8230;). Gone are the days where we scroll through 1000&#8217;s of google search results. Who has time and energy to do that? </p><p>When was the last time you went beyond like 2nd, 3rd page of google results?</p><h3>Many things will change</h3><p>An entire ecosystem of technologies were built around this &#8220;Humans As Consumers&#8221; was built the last 10-15 years. About 14,106 marketing technology products.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Sou-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Sou-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png 424w, https://substackcdn.com/image/fetch/$s_!Sou-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png 848w, https://substackcdn.com/image/fetch/$s_!Sou-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png 1272w, https://substackcdn.com/image/fetch/$s_!Sou-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Sou-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png" width="1394" height="759" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:759,&quot;width&quot;:1394,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1776984,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/164776791?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Sou-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png 424w, https://substackcdn.com/image/fetch/$s_!Sou-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png 848w, https://substackcdn.com/image/fetch/$s_!Sou-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png 1272w, https://substackcdn.com/image/fetch/$s_!Sou-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7da5b6fc-f989-4275-88ef-9a92b0b63554_1394x759.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://chiefmartec.com/wp-content/uploads/2025/05/martech-map-marketing-technology-landscape-2025-slide.png">2025 Marketing Technology Landscape - Chiefmartec</a></figcaption></figure></div><p>Now if the fundamental consumer is changing, aka AI, i cannot imagine how many of the above will become obsolete, some may change and some may stand up as transformers winners. The next few years will be very interesting and exciting for the core use of several digital products will change and how AI will evolve.</p><p><strong>Further reading</strong></p><ul><li><p><a href="https://customerexperiencematrix.blogspot.com/2025/05/testing-stib-innovation-diffusion-model.html">Customer Experience Matrix, David Raab</a></p></li><li><p><a href="https://www.phillipcarter.dev/posts/llms-computers">LLMs are weird computers, Phillip Carter</a></p></li></ul><p></p>]]></content:encoded></item><item><title><![CDATA[AEM - Manipulate Nodes Using A Servlet (Java)]]></title><description><![CDATA[This post details how to manipulate nodes in AEM using a Java servlet.]]></description><link>https://www.techinpieces.com/p/aem-manipulate-nodes-using-a-servlet</link><guid isPermaLink="false">https://www.techinpieces.com/p/aem-manipulate-nodes-using-a-servlet</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Sat, 01 Mar 2025 19:00:01 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Gtj3!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b81480d-d1aa-4e4d-9e26-7040d59e4ae0_500x500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Often times we come across a situation where bunch of nodes need to be added to a certain &#8220;component&#8221; to every occurrence of that component in a specific folder. Sounds mouthful :-) We have several options for this.. write a javascript, run some groovy scripts and through a servlet.</p><h3>tl;dr</h3><p>This post details how to manipulate nodes in AEM using a Java servlet. Code </p><h3>The Servlet</h3><p>A servlet that has some path to be accessible. Remember this (can be) a one-time used code.</p><p>The sample I used the path as &#8220;/bin/sampleapp/manipulatecontent&#8221;. You may use any.</p><p>The input to the servlet is the path. So the above can be called as &#8220;/bin/sampleapp/manipulatecontent?searchpath=/content/sampleapp&#8221;</p><h3>1: Search query</h3><p>In this example I am looking for all occurrences of the component &#8220;bg&#8221; and then adding extra nodes to that component. &#8220;SearchPath&#8221; would be the input (or if you know the path, you may hard code it).</p><pre><code><code>Map&lt;String, String&gt; queryParameterMap = new HashMap&lt;&gt;();
queryParameterMap.put("path", searchPath);
queryParameterMap.put("type", JcrConstants.NT_UNSTRUCTURED);
queryParameterMap.put("1_property", "sling:resourceType");
queryParameterMap.put("1_property.value", "sampleapp/components/content/bg");</code></code></pre><h3>2: Find the component&#8217;s node</h3><p>Find all the paths that have the component.</p><pre><code><code> List&lt;Hit&gt; hits = searchResult.getHits();
 if (CollectionUtils.isNotEmpty(hits)) {
   for (Hit hit : hits) {
     hitPath = hit.getPath();
     pageResource = resourceResolver.getResource(hitPath);
     nodeToUpdate = resourceResolver.getResource(hitPath).adaptTo(Node.class);
     ...</code></code></pre><h3>3: Add the extra nodes</h3><p>Add the properties you&#8217;d like to add to the component&#8217;s node.</p><p>Note: If you look at the example, I added some extra checks before adding nodes.</p><pre><code><code>nodeToUpdate.setProperty("backgroundSpacing", "theme-3");
session.save();</code></code></pre><p>That&#8217;s it!</p><p>Note: This is by no means THE solution. This worked for us. I would love to see ore such examples and code more simpler or efficient.</p><p><strong>Code snippet</strong></p><div class="github-gist" data-attrs="{&quot;innerHTML&quot;:&quot;<div id=\&quot;gist114194296\&quot; class=\&quot;gist\&quot;>\n    <div class=\&quot;gist-file\&quot; translate=\&quot;no\&quot; data-color-mode=\&quot;light\&quot; data-light-theme=\&quot;light\&quot;>\n      <div class=\&quot;gist-data\&quot;>\n        <div class=\&quot;js-gist-file-update-container js-task-list-container\&quot;>\n  <div id=\&quot;file-manipulatecontentonnodes-java\&quot; class=\&quot;file my-2\&quot;>\n    \n    <div itemprop=\&quot;text\&quot;\n      class=\&quot;Box-body p-0 blob-wrapper data type-java  \&quot;\n      style=\&quot;overflow: auto\&quot; tabindex=\&quot;0\&quot; role=\&quot;region\&quot;\n      aria-label=\&quot;file-manipulatecontentonnodes-java\&quot;\n    >\n\n        \n<div class=\&quot;js-check-bidi js-blob-code-container blob-code-content\&quot;>\n\n  <template class=\&quot;js-file-alert-template\&quot;>\n  <div data-view-component=\&quot;true\&quot; class=\&quot;flash flash-warn flash-full d-flex flex-items-center\&quot;>\n  <svg aria-hidden=\&quot;true\&quot; height=\&quot;16\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; data-view-component=\&quot;true\&quot; class=\&quot;octicon octicon-alert\&quot;>\n    <path d=\&quot;M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\&quot;></path>\n</svg>\n    <span>\n      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.\n      <a class=\&quot;Link--inTextBlock\&quot; href=\&quot;https://github.co/hiddenchars\&quot; target=\&quot;_blank\&quot;>Learn more about bidirectional Unicode characters</a>\n    </span>\n\n\n  <div data-view-component=\&quot;true\&quot; class=\&quot;flash-action\&quot;>        <a href=\&quot;{{ revealButtonHref }}\&quot; data-view-component=\&quot;true\&quot; class=\&quot;btn-sm btn\&quot;>    Show hidden characters\n</a>\n</div>\n</div></template>\n<template class=\&quot;js-line-alert-template\&quot;>\n  <span aria-label=\&quot;This line has hidden Unicode characters\&quot; data-view-component=\&quot;true\&quot; class=\&quot;line-alert tooltipped tooltipped-e\&quot;>\n    <svg aria-hidden=\&quot;true\&quot; height=\&quot;16\&quot; viewBox=\&quot;0 0 16 16\&quot; version=\&quot;1.1\&quot; width=\&quot;16\&quot; data-view-component=\&quot;true\&quot; class=\&quot;octicon octicon-alert\&quot;>\n    <path d=\&quot;M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\&quot;></path>\n</svg>\n</span></template>\n\n  <table data-hpc class=\&quot;highlight tab-size js-file-line-container\&quot; data-tab-size=\&quot;8\&quot; data-paste-markdown-skip data-tagsearch-path=\&quot;ManipulateContentOnNodes.java\&quot;>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L1\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;1\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC1\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>package</span> <span class=pl-s1>com</span>.<span class=pl-s1>web</span>.<span class=pl-s1>core</span>.<span class=pl-s1>servlets</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L2\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;2\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC2\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L3\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;3\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC3\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>com</span>.<span class=pl-s1>day</span>.<span class=pl-s1>cq</span>.<span class=pl-s1>commons</span>.<span class=pl-s1>jcr</span>.<span class=pl-s1>JcrConstants</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L4\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;4\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC4\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>com</span>.<span class=pl-s1>day</span>.<span class=pl-s1>cq</span>.<span class=pl-s1>search</span>.<span class=pl-s1>PredicateGroup</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L5\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;5\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC5\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>com</span>.<span class=pl-s1>day</span>.<span class=pl-s1>cq</span>.<span class=pl-s1>search</span>.<span class=pl-s1>Query</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L6\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;6\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC6\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>com</span>.<span class=pl-s1>day</span>.<span class=pl-s1>cq</span>.<span class=pl-s1>search</span>.<span class=pl-s1>QueryBuilder</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L7\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;7\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC7\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>com</span>.<span class=pl-s1>day</span>.<span class=pl-s1>cq</span>.<span class=pl-s1>search</span>.<span class=pl-s1>result</span>.<span class=pl-s1>Hit</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L8\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;8\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC8\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>com</span>.<span class=pl-s1>day</span>.<span class=pl-s1>cq</span>.<span class=pl-s1>search</span>.<span class=pl-s1>result</span>.<span class=pl-s1>SearchResult</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L9\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;9\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC9\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>apache</span>.<span class=pl-s1>commons</span>.<span class=pl-s1>collections</span>.<span class=pl-s1>CollectionUtils</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L10\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;10\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC10\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>apache</span>.<span class=pl-s1>sling</span>.<span class=pl-s1>api</span>.<span class=pl-s1>SlingHttpServletRequest</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L11\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;11\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC11\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>apache</span>.<span class=pl-s1>sling</span>.<span class=pl-s1>api</span>.<span class=pl-s1>SlingHttpServletResponse</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L12\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;12\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC12\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>apache</span>.<span class=pl-s1>sling</span>.<span class=pl-s1>api</span>.<span class=pl-s1>resource</span>.<span class=pl-s1>Resource</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L13\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;13\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC13\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>apache</span>.<span class=pl-s1>sling</span>.<span class=pl-s1>api</span>.<span class=pl-s1>resource</span>.<span class=pl-s1>ResourceResolver</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L14\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;14\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC14\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>apache</span>.<span class=pl-s1>sling</span>.<span class=pl-s1>api</span>.<span class=pl-s1>resource</span>.<span class=pl-s1>ValueMap</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L15\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;15\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC15\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>apache</span>.<span class=pl-s1>sling</span>.<span class=pl-s1>api</span>.<span class=pl-s1>servlets</span>.<span class=pl-s1>HttpConstants</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L16\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;16\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC16\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>apache</span>.<span class=pl-s1>sling</span>.<span class=pl-s1>api</span>.<span class=pl-s1>servlets</span>.<span class=pl-s1>SlingAllMethodsServlet</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L17\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;17\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC17\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>osgi</span>.<span class=pl-s1>framework</span>.<span class=pl-s1>Constants</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L18\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;18\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC18\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>osgi</span>.<span class=pl-s1>service</span>.<span class=pl-s1>component</span>.<span class=pl-s1>annotations</span>.<span class=pl-s1>Component</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L19\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;19\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC19\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>slf4j</span>.<span class=pl-s1>Logger</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L20\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;20\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC20\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>slf4j</span>.<span class=pl-s1>LoggerFactory</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L21\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;21\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC21\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>javax</span>.<span class=pl-s1>jcr</span>.<span class=pl-s1>Node</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L22\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;22\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC22\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>javax</span>.<span class=pl-s1>jcr</span>.<span class=pl-s1>Session</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L23\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;23\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC23\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>javax</span>.<span class=pl-s1>servlet</span>.<span class=pl-s1>Servlet</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L24\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;24\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC24\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>javax</span>.<span class=pl-s1>servlet</span>.<span class=pl-s1>ServletException</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L25\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;25\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC25\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>java</span>.<span class=pl-s1>io</span>.<span class=pl-s1>IOException</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L26\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;26\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC26\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>java</span>.<span class=pl-s1>io</span>.<span class=pl-s1>PrintWriter</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L27\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;27\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC27\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>java</span>.<span class=pl-s1>util</span>.<span class=pl-s1>HashMap</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L28\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;28\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC28\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>java</span>.<span class=pl-s1>util</span>.<span class=pl-s1>List</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L29\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;29\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC29\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>java</span>.<span class=pl-s1>util</span>.<span class=pl-s1>Map</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L30\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;30\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC30\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>json</span>.<span class=pl-s1>JSONArray</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L31\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;31\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC31\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>import</span> <span class=pl-s1>org</span>.<span class=pl-s1>json</span>.<span class=pl-s1>JSONObject</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L32\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;32\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC32\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L33\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;33\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC33\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L34\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;34\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC34\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-c1>@</span><span class=pl-c1>Component</span>(<span class=pl-s1>service</span> = <span class=pl-smi>Servlet</span>.<span class=pl-k>class</span>, <span class=pl-s1>name</span> = <span class=pl-s>&amp;quot;com.web.core.servlets.ManipulateContentServlet&amp;quot;</span>,</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L35\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;35\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC35\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>        <span class=pl-s1>immediate</span> = <span class=pl-c1>true</span>,</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L36\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;36\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC36\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>        <span class=pl-s1>property</span> = {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L37\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;37\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC37\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                <span class=pl-smi>Constants</span>.<span class=pl-c1>SERVICE_DESCRIPTION</span></td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L38\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;38\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC38\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                        + <span class=pl-s>&amp;quot;=Servlet that manipulates content&amp;quot;</span>,</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L39\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;39\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC39\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                <span class=pl-s>&amp;quot;sling.servlet.methods=&amp;quot;</span> + <span class=pl-smi>HttpConstants</span>.<span class=pl-c1>METHOD_GET</span>,</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L40\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;40\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC40\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                <span class=pl-s>&amp;quot;sling.servlet.paths=&amp;quot;</span> + <span class=pl-s>&amp;quot;/bin/sampleapp/manipulatecontent&amp;quot;</span>})</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L41\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;41\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC41\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;><span class=pl-k>public</span> <span class=pl-k>class</span> <span class=pl-smi>ManipulateContentServlet</span> <span class=pl-k>extends</span> <span class=pl-smi>SlingAllMethodsServlet</span> {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L42\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;42\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC42\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L43\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;43\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC43\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>    <span class=pl-k>private</span> <span class=pl-k>static</span> <span class=pl-k>final</span> <span class=pl-smi>Logger</span> <span class=pl-c1>LOGGER</span> = <span class=pl-smi>LoggerFactory</span>.<span class=pl-en>getLogger</span>(<span class=pl-smi>ManipulateContentServlet</span>.<span class=pl-k>class</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L44\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;44\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC44\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L45\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;45\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC45\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>    <span class=pl-k>protected</span> <span class=pl-smi>void</span> <span class=pl-en>doGet</span>(<span class=pl-k>final</span> <span class=pl-smi>SlingHttpServletRequest</span> <span class=pl-s1>request</span>,</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L46\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;46\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC46\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                         <span class=pl-k>final</span> <span class=pl-smi>SlingHttpServletResponse</span> <span class=pl-s1>response</span>)</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L47\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;47\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC47\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            <span class=pl-k>throws</span> <span class=pl-smi>ServletException</span>, <span class=pl-smi>IOException</span> {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L48\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;48\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC48\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>        <span class=pl-c1>LOGGER</span>.<span class=pl-en>info</span>(<span class=pl-s>&amp;quot;ManipulateContentServlet() {}&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L49\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;49\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC49\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>        <span class=pl-s1>response</span>.<span class=pl-en>setContentType</span>(<span class=pl-s>&amp;quot;application/json&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L50\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;50\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC50\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>        <span class=pl-s1>response</span>.<span class=pl-en>setCharacterEncoding</span>(<span class=pl-s>&amp;quot;UTF-8&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L51\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;51\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC51\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L52\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;52\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC52\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>        <span class=pl-k>try</span> {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L53\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;53\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC53\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-smi>String</span> <span class=pl-s1>searchPath</span> = <span class=pl-s1>request</span>.<span class=pl-en>getParameter</span>(<span class=pl-s>&amp;quot;searchpath&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L54\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;54\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC54\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L55\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;55\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC55\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-k>if</span> (<span class=pl-s1>searchPath</span> == <span class=pl-c1>null</span>) {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L56\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;56\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC56\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                <span class=pl-s1>response</span>.<span class=pl-en>getWriter</span>().<span class=pl-en>print</span>(<span class=pl-s>&amp;quot;Search PATH missing in query parameter!&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L57\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;57\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC57\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                <span class=pl-k>return</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L58\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;58\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC58\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L59\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;59\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC59\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L60\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;60\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC60\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-smi>ResourceResolver</span> <span class=pl-s1>resourceResolver</span> = <span class=pl-s1>request</span>.<span class=pl-en>getResourceResolver</span>();</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L61\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;61\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC61\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-k>if</span> (<span class=pl-s1>resourceResolver</span> == <span class=pl-c1>null</span>) <span class=pl-k>return</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L62\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;62\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC62\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L63\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;63\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC63\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-smi>Session</span> <span class=pl-s1>session</span> = <span class=pl-s1>resourceResolver</span>.<span class=pl-en>adaptTo</span>(<span class=pl-smi>Session</span>.<span class=pl-k>class</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L64\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;64\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC64\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-smi>QueryBuilder</span> <span class=pl-s1>queryBuilder</span> = <span class=pl-s1>resourceResolver</span>.<span class=pl-en>adaptTo</span>(<span class=pl-smi>QueryBuilder</span>.<span class=pl-k>class</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L65\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;65\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC65\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L66\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;66\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC66\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-c>//</span></td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L67\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;67\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC67\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-smi>Map</span>&amp;lt;<span class=pl-smi>String</span>, <span class=pl-smi>String</span>&amp;gt; <span class=pl-s1>queryParameterMap</span> = <span class=pl-k>new</span> <span class=pl-smi>HashMap</span>&amp;lt;&amp;gt;();</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L68\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;68\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC68\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-s1>queryParameterMap</span>.<span class=pl-en>put</span>(<span class=pl-s>&amp;quot;path&amp;quot;</span>, <span class=pl-s1>searchPath</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L69\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;69\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC69\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-s1>queryParameterMap</span>.<span class=pl-en>put</span>(<span class=pl-s>&amp;quot;type&amp;quot;</span>, <span class=pl-smi>JcrConstants</span>.<span class=pl-c1>NT_UNSTRUCTURED</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L70\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;70\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC70\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-s1>queryParameterMap</span>.<span class=pl-en>put</span>(<span class=pl-s>&amp;quot;1_property&amp;quot;</span>, <span class=pl-s>&amp;quot;sling:resourceType&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L71\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;71\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC71\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-s1>queryParameterMap</span>.<span class=pl-en>put</span>(<span class=pl-s>&amp;quot;1_property.value&amp;quot;</span>, <span class=pl-s>&amp;quot;sampleapp/components/content/background&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L72\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;72\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC72\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L73\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;73\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC73\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-smi>Query</span> <span class=pl-s1>query</span> = <span class=pl-s1>queryBuilder</span>.<span class=pl-en>createQuery</span>(<span class=pl-smi>PredicateGroup</span>.<span class=pl-en>create</span>(<span class=pl-s1>queryParameterMap</span>), <span class=pl-s1>session</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L74\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;74\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC74\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-k>if</span> (<span class=pl-s1>query</span> != <span class=pl-c1>null</span>) {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L75\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;75\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC75\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                <span class=pl-smi>SearchResult</span> <span class=pl-s1>searchResult</span> = <span class=pl-s1>query</span>.<span class=pl-en>getResult</span>();</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L76\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;76\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC76\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                <span class=pl-k>if</span> (<span class=pl-s1>searchResult</span> != <span class=pl-c1>null</span>) {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L77\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;77\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC77\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                    <span class=pl-c>//LOGGER.info(&amp;quot;Query : &amp;#39;{}&amp;#39;&amp;quot;, searchResult.getQueryStatement());</span></td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L78\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;78\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC78\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L79\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;79\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC79\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                    <span class=pl-smi>String</span> <span class=pl-s1>hitPath</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L80\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;80\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC80\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                    <span class=pl-smi>Resource</span> <span class=pl-s1>pageResource</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L81\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;81\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC81\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                    <span class=pl-smi>Node</span> <span class=pl-s1>nodeToUpdate</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L82\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;82\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC82\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                    <span class=pl-smi>Boolean</span> <span class=pl-s1>found</span> = <span class=pl-c1>false</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L83\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;83\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC83\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L84\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;84\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC84\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                    <span class=pl-smi>List</span>&amp;lt;<span class=pl-smi>Hit</span>&amp;gt; <span class=pl-s1>hits</span> = <span class=pl-s1>searchResult</span>.<span class=pl-en>getHits</span>();</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L85\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;85\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC85\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                    <span class=pl-k>if</span> (<span class=pl-smi>CollectionUtils</span>.<span class=pl-en>isNotEmpty</span>(<span class=pl-s1>hits</span>)) {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L86\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;86\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC86\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                        <span class=pl-k>for</span> (<span class=pl-smi>Hit</span> <span class=pl-s1>hit</span> : <span class=pl-s1>hits</span>) {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L87\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;87\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC87\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            <span class=pl-s1>hitPath</span> = <span class=pl-s1>hit</span>.<span class=pl-en>getPath</span>();</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L88\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;88\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC88\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            <span class=pl-s1>pageResource</span> = <span class=pl-s1>resourceResolver</span>.<span class=pl-en>getResource</span>(<span class=pl-s1>hitPath</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L89\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;89\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC89\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            <span class=pl-c>//LOGGER.info(&amp;quot;\\npageResource::&amp;quot; + pageResource);</span></td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L90\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;90\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC90\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L91\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;91\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC91\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            <span class=pl-s1>nodeToUpdate</span> = <span class=pl-s1>resourceResolver</span>.<span class=pl-en>getResource</span>(<span class=pl-s1>hitPath</span>).<span class=pl-en>adaptTo</span>(<span class=pl-smi>Node</span>.<span class=pl-k>class</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L92\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;92\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC92\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            <span class=pl-c1>LOGGER</span>.<span class=pl-en>info</span>(<span class=pl-s>&amp;quot;<span class=pl-cce>\\n</span>------ nodeToUpdate::&amp;quot;</span> + <span class=pl-s1>nodeToUpdate</span>.<span class=pl-en>toString</span>());</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L93\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;93\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC93\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L94\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;94\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC94\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            <span class=pl-k>for</span> (<span class=pl-smi>Map</span>.<span class=pl-smi>Entry</span> <span class=pl-s1>entry</span> : <span class=pl-s1>pageResource</span>.<span class=pl-en>getValueMap</span>().<span class=pl-en>entrySet</span>()) {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L95\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;95\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC95\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                                <span class=pl-k>if</span> (<span class=pl-s1>entry</span>.<span class=pl-en>getKey</span>().<span class=pl-en>equals</span>(<span class=pl-s>&amp;quot;backgroundSpacing&amp;quot;</span>)) {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L96\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;96\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC96\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                                    <span class=pl-s1>found</span> = <span class=pl-c1>true</span>;</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L97\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;97\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC97\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                                    <span class=pl-c1>LOGGER</span>.<span class=pl-en>info</span>(<span class=pl-s>&amp;quot;<span class=pl-cce>\\n</span>------ FOUND&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L98\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;98\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC98\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                                }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L99\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;99\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC99\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L100\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;100\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC100\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L101\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;101\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC101\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            <span class=pl-k>if</span> (!<span class=pl-s1>found</span>) {</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L102\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;102\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC102\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                                <span class=pl-c1>LOGGER</span>.<span class=pl-en>info</span>(<span class=pl-s>&amp;quot;<span class=pl-cce>\\n</span>------ Updating Path:&amp;quot;</span> + <span class=pl-s1>hitPath</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L103\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;103\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC103\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                                <span class=pl-c>/* here you can add / remove any node property. An exampl below*/</span></td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L104\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;104\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC104\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                                <span class=pl-s1>nodeToUpdate</span>.<span class=pl-en>setProperty</span>(<span class=pl-s>&amp;quot;backgroundSpacing&amp;quot;</span>, <span class=pl-s>&amp;quot;theme-3&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L105\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;105\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC105\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                                <span class=pl-s1>session</span>.<span class=pl-en>save</span>();</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L106\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;106\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC106\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                            }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L107\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;107\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC107\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                        }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L108\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;108\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC108\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                    }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L109\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;109\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC109\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L110\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;110\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC110\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L111\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;111\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC111\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>\n</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L112\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;112\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC112\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-c1>LOGGER</span>.<span class=pl-en>info</span>(<span class=pl-s>&amp;quot;<span class=pl-cce>\\n</span>----- COMPLETED&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L113\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;113\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC113\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>            <span class=pl-s1>response</span>.<span class=pl-en>getWriter</span>().<span class=pl-en>print</span>(<span class=pl-s>&amp;quot;Completed!&amp;quot;</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L114\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;114\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC114\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>        } <span class=pl-k>catch</span>(<span class=pl-smi>Exception</span> <span class=pl-s1>ex</span>){</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L115\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;115\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC115\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>                <span class=pl-c1>LOGGER</span>.<span class=pl-en>info</span>(<span class=pl-s>&amp;quot;Exception&amp;quot;</span>, <span class=pl-s1>ex</span>);</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L116\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;116\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC116\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>        }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L117\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;117\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC117\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>    }</td>\n        </tr>\n        <tr>\n          <td id=\&quot;file-manipulatecontentonnodes-java-L118\&quot; class=\&quot;blob-num js-line-number js-blob-rnum\&quot; data-line-number=\&quot;118\&quot;></td>\n          <td id=\&quot;file-manipulatecontentonnodes-java-LC118\&quot; class=\&quot;blob-code blob-code-inner js-file-line\&quot;>}</td>\n        </tr>\n  </table>\n</div>\n\n\n    </div>\n\n  </div>\n</div>\n\n      </div>\n      <div class=\&quot;gist-meta\&quot;>\n        <a href=\&quot;https://gist.github.com/thesurenk/168d7f3c7927419b8468ce5bd5b2f976/raw/f20022bcb0caeecffd9eeabce4251defe51fc9c2/ManipulateContentOnNodes.java\&quot; style=\&quot;float:right\&quot; class=\&quot;Link--inTextBlock\&quot;>view raw</a>\n        <a href=\&quot;https://gist.github.com/thesurenk/168d7f3c7927419b8468ce5bd5b2f976#file-manipulatecontentonnodes-java\&quot; class=\&quot;Link--inTextBlock\&quot;>\n          ManipulateContentOnNodes.java\n        </a>\n        hosted with &amp;#10084; by <a class=\&quot;Link--inTextBlock\&quot; href=\&quot;https://github.com\&quot;>GitHub</a>\n      </div>\n    </div>\n</div>\n&quot;,&quot;stylesheet&quot;:&quot;https://github.githubassets.com/assets/gist-embed-9060cf3ad5bb.css&quot;}" data-component-name="GitgistToDOM"><link rel="stylesheet" href="https://github.githubassets.com/assets/gist-embed-9060cf3ad5bb.css"><div id="gist114194296" class="gist">
    <div class="gist-file" data-color-mode="light" data-light-theme="light">
      <div class="gist-data">
        <div class="js-gist-file-update-container js-task-list-container">
  <div id="file-manipulatecontentonnodes-java" class="file my-2">
    
    <div itemprop="text" class="Box-body p-0 blob-wrapper data type-java  " style="overflow:auto">

        
<div class="js-check-bidi js-blob-code-container blob-code-content">

  
  <div data-view-component="true" class="flash flash-warn flash-full d-flex flex-items-center">
  
    

    <span>
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      <a class="Link--inTextBlock" href="https://github.co/hiddenchars" target="_blank">Learn more about bidirectional Unicode characters</a>
    </span>


  <div data-view-component="true" class="flash-action">        <a href="{{ revealButtonHref }}" data-view-component="true" class="btn-sm btn">    Show hidden characters
</a>
</div>
</div>

  <span data-view-component="true" class="line-alert tooltipped tooltipped-e">
    
    

</span>

  <table data-hpc="" class="highlight tab-size js-file-line-container" data-tab-size="8" data-paste-markdown-skip="" data-tagsearch-path="ManipulateContentOnNodes.java">
        <tbody><tr>
          <td id="file-manipulatecontentonnodes-java-L1" class="blob-num js-line-number js-blob-rnum" data-line-number="1"></td>
          <td id="file-manipulatecontentonnodes-java-LC1" class="blob-code blob-code-inner js-file-line"><span class="pl-k">package</span> <span class="pl-s1">com</span>.<span class="pl-s1">web</span>.<span class="pl-s1">core</span>.<span class="pl-s1">servlets</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L2" class="blob-num js-line-number js-blob-rnum" data-line-number="2"></td>
          <td id="file-manipulatecontentonnodes-java-LC2" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L3" class="blob-num js-line-number js-blob-rnum" data-line-number="3"></td>
          <td id="file-manipulatecontentonnodes-java-LC3" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">com</span>.<span class="pl-s1">day</span>.<span class="pl-s1">cq</span>.<span class="pl-s1">commons</span>.<span class="pl-s1">jcr</span>.<span class="pl-s1">JcrConstants</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L4" class="blob-num js-line-number js-blob-rnum" data-line-number="4"></td>
          <td id="file-manipulatecontentonnodes-java-LC4" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">com</span>.<span class="pl-s1">day</span>.<span class="pl-s1">cq</span>.<span class="pl-s1">search</span>.<span class="pl-s1">PredicateGroup</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L5" class="blob-num js-line-number js-blob-rnum" data-line-number="5"></td>
          <td id="file-manipulatecontentonnodes-java-LC5" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">com</span>.<span class="pl-s1">day</span>.<span class="pl-s1">cq</span>.<span class="pl-s1">search</span>.<span class="pl-s1">Query</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L6" class="blob-num js-line-number js-blob-rnum" data-line-number="6"></td>
          <td id="file-manipulatecontentonnodes-java-LC6" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">com</span>.<span class="pl-s1">day</span>.<span class="pl-s1">cq</span>.<span class="pl-s1">search</span>.<span class="pl-s1">QueryBuilder</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L7" class="blob-num js-line-number js-blob-rnum" data-line-number="7"></td>
          <td id="file-manipulatecontentonnodes-java-LC7" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">com</span>.<span class="pl-s1">day</span>.<span class="pl-s1">cq</span>.<span class="pl-s1">search</span>.<span class="pl-s1">result</span>.<span class="pl-s1">Hit</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L8" class="blob-num js-line-number js-blob-rnum" data-line-number="8"></td>
          <td id="file-manipulatecontentonnodes-java-LC8" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">com</span>.<span class="pl-s1">day</span>.<span class="pl-s1">cq</span>.<span class="pl-s1">search</span>.<span class="pl-s1">result</span>.<span class="pl-s1">SearchResult</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L9" class="blob-num js-line-number js-blob-rnum" data-line-number="9"></td>
          <td id="file-manipulatecontentonnodes-java-LC9" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">commons</span>.<span class="pl-s1">collections</span>.<span class="pl-s1">CollectionUtils</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L10" class="blob-num js-line-number js-blob-rnum" data-line-number="10"></td>
          <td id="file-manipulatecontentonnodes-java-LC10" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">sling</span>.<span class="pl-s1">api</span>.<span class="pl-s1">SlingHttpServletRequest</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L11" class="blob-num js-line-number js-blob-rnum" data-line-number="11"></td>
          <td id="file-manipulatecontentonnodes-java-LC11" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">sling</span>.<span class="pl-s1">api</span>.<span class="pl-s1">SlingHttpServletResponse</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L12" class="blob-num js-line-number js-blob-rnum" data-line-number="12"></td>
          <td id="file-manipulatecontentonnodes-java-LC12" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">sling</span>.<span class="pl-s1">api</span>.<span class="pl-s1">resource</span>.<span class="pl-s1">Resource</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L13" class="blob-num js-line-number js-blob-rnum" data-line-number="13"></td>
          <td id="file-manipulatecontentonnodes-java-LC13" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">sling</span>.<span class="pl-s1">api</span>.<span class="pl-s1">resource</span>.<span class="pl-s1">ResourceResolver</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L14" class="blob-num js-line-number js-blob-rnum" data-line-number="14"></td>
          <td id="file-manipulatecontentonnodes-java-LC14" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">sling</span>.<span class="pl-s1">api</span>.<span class="pl-s1">resource</span>.<span class="pl-s1">ValueMap</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L15" class="blob-num js-line-number js-blob-rnum" data-line-number="15"></td>
          <td id="file-manipulatecontentonnodes-java-LC15" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">sling</span>.<span class="pl-s1">api</span>.<span class="pl-s1">servlets</span>.<span class="pl-s1">HttpConstants</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L16" class="blob-num js-line-number js-blob-rnum" data-line-number="16"></td>
          <td id="file-manipulatecontentonnodes-java-LC16" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">apache</span>.<span class="pl-s1">sling</span>.<span class="pl-s1">api</span>.<span class="pl-s1">servlets</span>.<span class="pl-s1">SlingAllMethodsServlet</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L17" class="blob-num js-line-number js-blob-rnum" data-line-number="17"></td>
          <td id="file-manipulatecontentonnodes-java-LC17" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">osgi</span>.<span class="pl-s1">framework</span>.<span class="pl-s1">Constants</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L18" class="blob-num js-line-number js-blob-rnum" data-line-number="18"></td>
          <td id="file-manipulatecontentonnodes-java-LC18" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">osgi</span>.<span class="pl-s1">service</span>.<span class="pl-s1">component</span>.<span class="pl-s1">annotations</span>.<span class="pl-s1">Component</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L19" class="blob-num js-line-number js-blob-rnum" data-line-number="19"></td>
          <td id="file-manipulatecontentonnodes-java-LC19" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">slf4j</span>.<span class="pl-s1">Logger</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L20" class="blob-num js-line-number js-blob-rnum" data-line-number="20"></td>
          <td id="file-manipulatecontentonnodes-java-LC20" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">slf4j</span>.<span class="pl-s1">LoggerFactory</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L21" class="blob-num js-line-number js-blob-rnum" data-line-number="21"></td>
          <td id="file-manipulatecontentonnodes-java-LC21" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">javax</span>.<span class="pl-s1">jcr</span>.<span class="pl-s1">Node</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L22" class="blob-num js-line-number js-blob-rnum" data-line-number="22"></td>
          <td id="file-manipulatecontentonnodes-java-LC22" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">javax</span>.<span class="pl-s1">jcr</span>.<span class="pl-s1">Session</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L23" class="blob-num js-line-number js-blob-rnum" data-line-number="23"></td>
          <td id="file-manipulatecontentonnodes-java-LC23" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">javax</span>.<span class="pl-s1">servlet</span>.<span class="pl-s1">Servlet</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L24" class="blob-num js-line-number js-blob-rnum" data-line-number="24"></td>
          <td id="file-manipulatecontentonnodes-java-LC24" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">javax</span>.<span class="pl-s1">servlet</span>.<span class="pl-s1">ServletException</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L25" class="blob-num js-line-number js-blob-rnum" data-line-number="25"></td>
          <td id="file-manipulatecontentonnodes-java-LC25" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">io</span>.<span class="pl-s1">IOException</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L26" class="blob-num js-line-number js-blob-rnum" data-line-number="26"></td>
          <td id="file-manipulatecontentonnodes-java-LC26" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">io</span>.<span class="pl-s1">PrintWriter</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L27" class="blob-num js-line-number js-blob-rnum" data-line-number="27"></td>
          <td id="file-manipulatecontentonnodes-java-LC27" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">HashMap</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L28" class="blob-num js-line-number js-blob-rnum" data-line-number="28"></td>
          <td id="file-manipulatecontentonnodes-java-LC28" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">List</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L29" class="blob-num js-line-number js-blob-rnum" data-line-number="29"></td>
          <td id="file-manipulatecontentonnodes-java-LC29" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">util</span>.<span class="pl-s1">Map</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L30" class="blob-num js-line-number js-blob-rnum" data-line-number="30"></td>
          <td id="file-manipulatecontentonnodes-java-LC30" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">json</span>.<span class="pl-s1">JSONArray</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L31" class="blob-num js-line-number js-blob-rnum" data-line-number="31"></td>
          <td id="file-manipulatecontentonnodes-java-LC31" class="blob-code blob-code-inner js-file-line"><span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">json</span>.<span class="pl-s1">JSONObject</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L32" class="blob-num js-line-number js-blob-rnum" data-line-number="32"></td>
          <td id="file-manipulatecontentonnodes-java-LC32" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L33" class="blob-num js-line-number js-blob-rnum" data-line-number="33"></td>
          <td id="file-manipulatecontentonnodes-java-LC33" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L34" class="blob-num js-line-number js-blob-rnum" data-line-number="34"></td>
          <td id="file-manipulatecontentonnodes-java-LC34" class="blob-code blob-code-inner js-file-line"><span class="pl-c1">@</span><span class="pl-c1">Component</span>(<span class="pl-s1">service</span> = <span class="pl-smi">Servlet</span>.<span class="pl-k">class</span>, <span class="pl-s1">name</span> = <span class="pl-s">"com.web.core.servlets.ManipulateContentServlet"</span>,</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L35" class="blob-num js-line-number js-blob-rnum" data-line-number="35"></td>
          <td id="file-manipulatecontentonnodes-java-LC35" class="blob-code blob-code-inner js-file-line">        <span class="pl-s1">immediate</span> = <span class="pl-c1">true</span>,</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L36" class="blob-num js-line-number js-blob-rnum" data-line-number="36"></td>
          <td id="file-manipulatecontentonnodes-java-LC36" class="blob-code blob-code-inner js-file-line">        <span class="pl-s1">property</span> = {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L37" class="blob-num js-line-number js-blob-rnum" data-line-number="37"></td>
          <td id="file-manipulatecontentonnodes-java-LC37" class="blob-code blob-code-inner js-file-line">                <span class="pl-smi">Constants</span>.<span class="pl-c1">SERVICE_DESCRIPTION</span></td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L38" class="blob-num js-line-number js-blob-rnum" data-line-number="38"></td>
          <td id="file-manipulatecontentonnodes-java-LC38" class="blob-code blob-code-inner js-file-line">                        + <span class="pl-s">"=Servlet that manipulates content"</span>,</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L39" class="blob-num js-line-number js-blob-rnum" data-line-number="39"></td>
          <td id="file-manipulatecontentonnodes-java-LC39" class="blob-code blob-code-inner js-file-line">                <span class="pl-s">"sling.servlet.methods="</span> + <span class="pl-smi">HttpConstants</span>.<span class="pl-c1">METHOD_GET</span>,</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L40" class="blob-num js-line-number js-blob-rnum" data-line-number="40"></td>
          <td id="file-manipulatecontentonnodes-java-LC40" class="blob-code blob-code-inner js-file-line">                <span class="pl-s">"sling.servlet.paths="</span> + <span class="pl-s">"/bin/sampleapp/manipulatecontent"</span>})</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L41" class="blob-num js-line-number js-blob-rnum" data-line-number="41"></td>
          <td id="file-manipulatecontentonnodes-java-LC41" class="blob-code blob-code-inner js-file-line"><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">ManipulateContentServlet</span> <span class="pl-k">extends</span> <span class="pl-smi">SlingAllMethodsServlet</span> {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L42" class="blob-num js-line-number js-blob-rnum" data-line-number="42"></td>
          <td id="file-manipulatecontentonnodes-java-LC42" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L43" class="blob-num js-line-number js-blob-rnum" data-line-number="43"></td>
          <td id="file-manipulatecontentonnodes-java-LC43" class="blob-code blob-code-inner js-file-line">    <span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-smi">Logger</span> <span class="pl-c1">LOGGER</span> = <span class="pl-smi">LoggerFactory</span>.<span class="pl-en">getLogger</span>(<span class="pl-smi">ManipulateContentServlet</span>.<span class="pl-k">class</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L44" class="blob-num js-line-number js-blob-rnum" data-line-number="44"></td>
          <td id="file-manipulatecontentonnodes-java-LC44" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L45" class="blob-num js-line-number js-blob-rnum" data-line-number="45"></td>
          <td id="file-manipulatecontentonnodes-java-LC45" class="blob-code blob-code-inner js-file-line">    <span class="pl-k">protected</span> <span class="pl-smi">void</span> <span class="pl-en">doGet</span>(<span class="pl-k">final</span> <span class="pl-smi">SlingHttpServletRequest</span> <span class="pl-s1">request</span>,</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L46" class="blob-num js-line-number js-blob-rnum" data-line-number="46"></td>
          <td id="file-manipulatecontentonnodes-java-LC46" class="blob-code blob-code-inner js-file-line">                         <span class="pl-k">final</span> <span class="pl-smi">SlingHttpServletResponse</span> <span class="pl-s1">response</span>)</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L47" class="blob-num js-line-number js-blob-rnum" data-line-number="47"></td>
          <td id="file-manipulatecontentonnodes-java-LC47" class="blob-code blob-code-inner js-file-line">                            <span class="pl-k">throws</span> <span class="pl-smi">ServletException</span>, <span class="pl-smi">IOException</span> {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L48" class="blob-num js-line-number js-blob-rnum" data-line-number="48"></td>
          <td id="file-manipulatecontentonnodes-java-LC48" class="blob-code blob-code-inner js-file-line">        <span class="pl-c1">LOGGER</span>.<span class="pl-en">info</span>(<span class="pl-s">"ManipulateContentServlet() {}"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L49" class="blob-num js-line-number js-blob-rnum" data-line-number="49"></td>
          <td id="file-manipulatecontentonnodes-java-LC49" class="blob-code blob-code-inner js-file-line">        <span class="pl-s1">response</span>.<span class="pl-en">setContentType</span>(<span class="pl-s">"application/json"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L50" class="blob-num js-line-number js-blob-rnum" data-line-number="50"></td>
          <td id="file-manipulatecontentonnodes-java-LC50" class="blob-code blob-code-inner js-file-line">        <span class="pl-s1">response</span>.<span class="pl-en">setCharacterEncoding</span>(<span class="pl-s">"UTF-8"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L51" class="blob-num js-line-number js-blob-rnum" data-line-number="51"></td>
          <td id="file-manipulatecontentonnodes-java-LC51" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L52" class="blob-num js-line-number js-blob-rnum" data-line-number="52"></td>
          <td id="file-manipulatecontentonnodes-java-LC52" class="blob-code blob-code-inner js-file-line">        <span class="pl-k">try</span> {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L53" class="blob-num js-line-number js-blob-rnum" data-line-number="53"></td>
          <td id="file-manipulatecontentonnodes-java-LC53" class="blob-code blob-code-inner js-file-line">            <span class="pl-smi">String</span> <span class="pl-s1">searchPath</span> = <span class="pl-s1">request</span>.<span class="pl-en">getParameter</span>(<span class="pl-s">"searchpath"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L54" class="blob-num js-line-number js-blob-rnum" data-line-number="54"></td>
          <td id="file-manipulatecontentonnodes-java-LC54" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L55" class="blob-num js-line-number js-blob-rnum" data-line-number="55"></td>
          <td id="file-manipulatecontentonnodes-java-LC55" class="blob-code blob-code-inner js-file-line">            <span class="pl-k">if</span> (<span class="pl-s1">searchPath</span> == <span class="pl-c1">null</span>) {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L56" class="blob-num js-line-number js-blob-rnum" data-line-number="56"></td>
          <td id="file-manipulatecontentonnodes-java-LC56" class="blob-code blob-code-inner js-file-line">                <span class="pl-s1">response</span>.<span class="pl-en">getWriter</span>().<span class="pl-en">print</span>(<span class="pl-s">"Search PATH missing in query parameter!"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L57" class="blob-num js-line-number js-blob-rnum" data-line-number="57"></td>
          <td id="file-manipulatecontentonnodes-java-LC57" class="blob-code blob-code-inner js-file-line">                <span class="pl-k">return</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L58" class="blob-num js-line-number js-blob-rnum" data-line-number="58"></td>
          <td id="file-manipulatecontentonnodes-java-LC58" class="blob-code blob-code-inner js-file-line">            }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L59" class="blob-num js-line-number js-blob-rnum" data-line-number="59"></td>
          <td id="file-manipulatecontentonnodes-java-LC59" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L60" class="blob-num js-line-number js-blob-rnum" data-line-number="60"></td>
          <td id="file-manipulatecontentonnodes-java-LC60" class="blob-code blob-code-inner js-file-line">            <span class="pl-smi">ResourceResolver</span> <span class="pl-s1">resourceResolver</span> = <span class="pl-s1">request</span>.<span class="pl-en">getResourceResolver</span>();</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L61" class="blob-num js-line-number js-blob-rnum" data-line-number="61"></td>
          <td id="file-manipulatecontentonnodes-java-LC61" class="blob-code blob-code-inner js-file-line">            <span class="pl-k">if</span> (<span class="pl-s1">resourceResolver</span> == <span class="pl-c1">null</span>) <span class="pl-k">return</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L62" class="blob-num js-line-number js-blob-rnum" data-line-number="62"></td>
          <td id="file-manipulatecontentonnodes-java-LC62" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L63" class="blob-num js-line-number js-blob-rnum" data-line-number="63"></td>
          <td id="file-manipulatecontentonnodes-java-LC63" class="blob-code blob-code-inner js-file-line">            <span class="pl-smi">Session</span> <span class="pl-s1">session</span> = <span class="pl-s1">resourceResolver</span>.<span class="pl-en">adaptTo</span>(<span class="pl-smi">Session</span>.<span class="pl-k">class</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L64" class="blob-num js-line-number js-blob-rnum" data-line-number="64"></td>
          <td id="file-manipulatecontentonnodes-java-LC64" class="blob-code blob-code-inner js-file-line">            <span class="pl-smi">QueryBuilder</span> <span class="pl-s1">queryBuilder</span> = <span class="pl-s1">resourceResolver</span>.<span class="pl-en">adaptTo</span>(<span class="pl-smi">QueryBuilder</span>.<span class="pl-k">class</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L65" class="blob-num js-line-number js-blob-rnum" data-line-number="65"></td>
          <td id="file-manipulatecontentonnodes-java-LC65" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L66" class="blob-num js-line-number js-blob-rnum" data-line-number="66"></td>
          <td id="file-manipulatecontentonnodes-java-LC66" class="blob-code blob-code-inner js-file-line">            <span class="pl-c">//</span></td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L67" class="blob-num js-line-number js-blob-rnum" data-line-number="67"></td>
          <td id="file-manipulatecontentonnodes-java-LC67" class="blob-code blob-code-inner js-file-line">            <span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">String</span>&gt; <span class="pl-s1">queryParameterMap</span> = <span class="pl-k">new</span> <span class="pl-smi">HashMap</span>&lt;&gt;();</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L68" class="blob-num js-line-number js-blob-rnum" data-line-number="68"></td>
          <td id="file-manipulatecontentonnodes-java-LC68" class="blob-code blob-code-inner js-file-line">            <span class="pl-s1">queryParameterMap</span>.<span class="pl-en">put</span>(<span class="pl-s">"path"</span>, <span class="pl-s1">searchPath</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L69" class="blob-num js-line-number js-blob-rnum" data-line-number="69"></td>
          <td id="file-manipulatecontentonnodes-java-LC69" class="blob-code blob-code-inner js-file-line">            <span class="pl-s1">queryParameterMap</span>.<span class="pl-en">put</span>(<span class="pl-s">"type"</span>, <span class="pl-smi">JcrConstants</span>.<span class="pl-c1">NT_UNSTRUCTURED</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L70" class="blob-num js-line-number js-blob-rnum" data-line-number="70"></td>
          <td id="file-manipulatecontentonnodes-java-LC70" class="blob-code blob-code-inner js-file-line">            <span class="pl-s1">queryParameterMap</span>.<span class="pl-en">put</span>(<span class="pl-s">"1_property"</span>, <span class="pl-s">"sling:resourceType"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L71" class="blob-num js-line-number js-blob-rnum" data-line-number="71"></td>
          <td id="file-manipulatecontentonnodes-java-LC71" class="blob-code blob-code-inner js-file-line">            <span class="pl-s1">queryParameterMap</span>.<span class="pl-en">put</span>(<span class="pl-s">"1_property.value"</span>, <span class="pl-s">"sampleapp/components/content/background"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L72" class="blob-num js-line-number js-blob-rnum" data-line-number="72"></td>
          <td id="file-manipulatecontentonnodes-java-LC72" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L73" class="blob-num js-line-number js-blob-rnum" data-line-number="73"></td>
          <td id="file-manipulatecontentonnodes-java-LC73" class="blob-code blob-code-inner js-file-line">            <span class="pl-smi">Query</span> <span class="pl-s1">query</span> = <span class="pl-s1">queryBuilder</span>.<span class="pl-en">createQuery</span>(<span class="pl-smi">PredicateGroup</span>.<span class="pl-en">create</span>(<span class="pl-s1">queryParameterMap</span>), <span class="pl-s1">session</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L74" class="blob-num js-line-number js-blob-rnum" data-line-number="74"></td>
          <td id="file-manipulatecontentonnodes-java-LC74" class="blob-code blob-code-inner js-file-line">            <span class="pl-k">if</span> (<span class="pl-s1">query</span> != <span class="pl-c1">null</span>) {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L75" class="blob-num js-line-number js-blob-rnum" data-line-number="75"></td>
          <td id="file-manipulatecontentonnodes-java-LC75" class="blob-code blob-code-inner js-file-line">                <span class="pl-smi">SearchResult</span> <span class="pl-s1">searchResult</span> = <span class="pl-s1">query</span>.<span class="pl-en">getResult</span>();</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L76" class="blob-num js-line-number js-blob-rnum" data-line-number="76"></td>
          <td id="file-manipulatecontentonnodes-java-LC76" class="blob-code blob-code-inner js-file-line">                <span class="pl-k">if</span> (<span class="pl-s1">searchResult</span> != <span class="pl-c1">null</span>) {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L77" class="blob-num js-line-number js-blob-rnum" data-line-number="77"></td>
          <td id="file-manipulatecontentonnodes-java-LC77" class="blob-code blob-code-inner js-file-line">                    <span class="pl-c">//LOGGER.info("Query : '{}'", searchResult.getQueryStatement());</span></td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L78" class="blob-num js-line-number js-blob-rnum" data-line-number="78"></td>
          <td id="file-manipulatecontentonnodes-java-LC78" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L79" class="blob-num js-line-number js-blob-rnum" data-line-number="79"></td>
          <td id="file-manipulatecontentonnodes-java-LC79" class="blob-code blob-code-inner js-file-line">                    <span class="pl-smi">String</span> <span class="pl-s1">hitPath</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L80" class="blob-num js-line-number js-blob-rnum" data-line-number="80"></td>
          <td id="file-manipulatecontentonnodes-java-LC80" class="blob-code blob-code-inner js-file-line">                    <span class="pl-smi">Resource</span> <span class="pl-s1">pageResource</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L81" class="blob-num js-line-number js-blob-rnum" data-line-number="81"></td>
          <td id="file-manipulatecontentonnodes-java-LC81" class="blob-code blob-code-inner js-file-line">                    <span class="pl-smi">Node</span> <span class="pl-s1">nodeToUpdate</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L82" class="blob-num js-line-number js-blob-rnum" data-line-number="82"></td>
          <td id="file-manipulatecontentonnodes-java-LC82" class="blob-code blob-code-inner js-file-line">                    <span class="pl-smi">Boolean</span> <span class="pl-s1">found</span> = <span class="pl-c1">false</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L83" class="blob-num js-line-number js-blob-rnum" data-line-number="83"></td>
          <td id="file-manipulatecontentonnodes-java-LC83" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L84" class="blob-num js-line-number js-blob-rnum" data-line-number="84"></td>
          <td id="file-manipulatecontentonnodes-java-LC84" class="blob-code blob-code-inner js-file-line">                    <span class="pl-smi">List</span>&lt;<span class="pl-smi">Hit</span>&gt; <span class="pl-s1">hits</span> = <span class="pl-s1">searchResult</span>.<span class="pl-en">getHits</span>();</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L85" class="blob-num js-line-number js-blob-rnum" data-line-number="85"></td>
          <td id="file-manipulatecontentonnodes-java-LC85" class="blob-code blob-code-inner js-file-line">                    <span class="pl-k">if</span> (<span class="pl-smi">CollectionUtils</span>.<span class="pl-en">isNotEmpty</span>(<span class="pl-s1">hits</span>)) {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L86" class="blob-num js-line-number js-blob-rnum" data-line-number="86"></td>
          <td id="file-manipulatecontentonnodes-java-LC86" class="blob-code blob-code-inner js-file-line">                        <span class="pl-k">for</span> (<span class="pl-smi">Hit</span> <span class="pl-s1">hit</span> : <span class="pl-s1">hits</span>) {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L87" class="blob-num js-line-number js-blob-rnum" data-line-number="87"></td>
          <td id="file-manipulatecontentonnodes-java-LC87" class="blob-code blob-code-inner js-file-line">                            <span class="pl-s1">hitPath</span> = <span class="pl-s1">hit</span>.<span class="pl-en">getPath</span>();</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L88" class="blob-num js-line-number js-blob-rnum" data-line-number="88"></td>
          <td id="file-manipulatecontentonnodes-java-LC88" class="blob-code blob-code-inner js-file-line">                            <span class="pl-s1">pageResource</span> = <span class="pl-s1">resourceResolver</span>.<span class="pl-en">getResource</span>(<span class="pl-s1">hitPath</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L89" class="blob-num js-line-number js-blob-rnum" data-line-number="89"></td>
          <td id="file-manipulatecontentonnodes-java-LC89" class="blob-code blob-code-inner js-file-line">                            <span class="pl-c">//LOGGER.info("\npageResource::" + pageResource);</span></td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L90" class="blob-num js-line-number js-blob-rnum" data-line-number="90"></td>
          <td id="file-manipulatecontentonnodes-java-LC90" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L91" class="blob-num js-line-number js-blob-rnum" data-line-number="91"></td>
          <td id="file-manipulatecontentonnodes-java-LC91" class="blob-code blob-code-inner js-file-line">                            <span class="pl-s1">nodeToUpdate</span> = <span class="pl-s1">resourceResolver</span>.<span class="pl-en">getResource</span>(<span class="pl-s1">hitPath</span>).<span class="pl-en">adaptTo</span>(<span class="pl-smi">Node</span>.<span class="pl-k">class</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L92" class="blob-num js-line-number js-blob-rnum" data-line-number="92"></td>
          <td id="file-manipulatecontentonnodes-java-LC92" class="blob-code blob-code-inner js-file-line">                            <span class="pl-c1">LOGGER</span>.<span class="pl-en">info</span>(<span class="pl-s">"<span class="pl-cce">\n</span>------ nodeToUpdate::"</span> + <span class="pl-s1">nodeToUpdate</span>.<span class="pl-en">toString</span>());</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L93" class="blob-num js-line-number js-blob-rnum" data-line-number="93"></td>
          <td id="file-manipulatecontentonnodes-java-LC93" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L94" class="blob-num js-line-number js-blob-rnum" data-line-number="94"></td>
          <td id="file-manipulatecontentonnodes-java-LC94" class="blob-code blob-code-inner js-file-line">                            <span class="pl-k">for</span> (<span class="pl-smi">Map</span>.<span class="pl-smi">Entry</span> <span class="pl-s1">entry</span> : <span class="pl-s1">pageResource</span>.<span class="pl-en">getValueMap</span>().<span class="pl-en">entrySet</span>()) {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L95" class="blob-num js-line-number js-blob-rnum" data-line-number="95"></td>
          <td id="file-manipulatecontentonnodes-java-LC95" class="blob-code blob-code-inner js-file-line">                                <span class="pl-k">if</span> (<span class="pl-s1">entry</span>.<span class="pl-en">getKey</span>().<span class="pl-en">equals</span>(<span class="pl-s">"backgroundSpacing"</span>)) {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L96" class="blob-num js-line-number js-blob-rnum" data-line-number="96"></td>
          <td id="file-manipulatecontentonnodes-java-LC96" class="blob-code blob-code-inner js-file-line">                                    <span class="pl-s1">found</span> = <span class="pl-c1">true</span>;</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L97" class="blob-num js-line-number js-blob-rnum" data-line-number="97"></td>
          <td id="file-manipulatecontentonnodes-java-LC97" class="blob-code blob-code-inner js-file-line">                                    <span class="pl-c1">LOGGER</span>.<span class="pl-en">info</span>(<span class="pl-s">"<span class="pl-cce">\n</span>------ FOUND"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L98" class="blob-num js-line-number js-blob-rnum" data-line-number="98"></td>
          <td id="file-manipulatecontentonnodes-java-LC98" class="blob-code blob-code-inner js-file-line">                                }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L99" class="blob-num js-line-number js-blob-rnum" data-line-number="99"></td>
          <td id="file-manipulatecontentonnodes-java-LC99" class="blob-code blob-code-inner js-file-line">                            }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L100" class="blob-num js-line-number js-blob-rnum" data-line-number="100"></td>
          <td id="file-manipulatecontentonnodes-java-LC100" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L101" class="blob-num js-line-number js-blob-rnum" data-line-number="101"></td>
          <td id="file-manipulatecontentonnodes-java-LC101" class="blob-code blob-code-inner js-file-line">                            <span class="pl-k">if</span> (!<span class="pl-s1">found</span>) {</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L102" class="blob-num js-line-number js-blob-rnum" data-line-number="102"></td>
          <td id="file-manipulatecontentonnodes-java-LC102" class="blob-code blob-code-inner js-file-line">                                <span class="pl-c1">LOGGER</span>.<span class="pl-en">info</span>(<span class="pl-s">"<span class="pl-cce">\n</span>------ Updating Path:"</span> + <span class="pl-s1">hitPath</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L103" class="blob-num js-line-number js-blob-rnum" data-line-number="103"></td>
          <td id="file-manipulatecontentonnodes-java-LC103" class="blob-code blob-code-inner js-file-line">                                <span class="pl-c">/* here you can add / remove any node property. An exampl below*/</span></td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L104" class="blob-num js-line-number js-blob-rnum" data-line-number="104"></td>
          <td id="file-manipulatecontentonnodes-java-LC104" class="blob-code blob-code-inner js-file-line">                                <span class="pl-s1">nodeToUpdate</span>.<span class="pl-en">setProperty</span>(<span class="pl-s">"backgroundSpacing"</span>, <span class="pl-s">"theme-3"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L105" class="blob-num js-line-number js-blob-rnum" data-line-number="105"></td>
          <td id="file-manipulatecontentonnodes-java-LC105" class="blob-code blob-code-inner js-file-line">                                <span class="pl-s1">session</span>.<span class="pl-en">save</span>();</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L106" class="blob-num js-line-number js-blob-rnum" data-line-number="106"></td>
          <td id="file-manipulatecontentonnodes-java-LC106" class="blob-code blob-code-inner js-file-line">                            }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L107" class="blob-num js-line-number js-blob-rnum" data-line-number="107"></td>
          <td id="file-manipulatecontentonnodes-java-LC107" class="blob-code blob-code-inner js-file-line">                        }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L108" class="blob-num js-line-number js-blob-rnum" data-line-number="108"></td>
          <td id="file-manipulatecontentonnodes-java-LC108" class="blob-code blob-code-inner js-file-line">                    }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L109" class="blob-num js-line-number js-blob-rnum" data-line-number="109"></td>
          <td id="file-manipulatecontentonnodes-java-LC109" class="blob-code blob-code-inner js-file-line">                }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L110" class="blob-num js-line-number js-blob-rnum" data-line-number="110"></td>
          <td id="file-manipulatecontentonnodes-java-LC110" class="blob-code blob-code-inner js-file-line">            }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L111" class="blob-num js-line-number js-blob-rnum" data-line-number="111"></td>
          <td id="file-manipulatecontentonnodes-java-LC111" class="blob-code blob-code-inner js-file-line">
</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L112" class="blob-num js-line-number js-blob-rnum" data-line-number="112"></td>
          <td id="file-manipulatecontentonnodes-java-LC112" class="blob-code blob-code-inner js-file-line">            <span class="pl-c1">LOGGER</span>.<span class="pl-en">info</span>(<span class="pl-s">"<span class="pl-cce">\n</span>----- COMPLETED"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L113" class="blob-num js-line-number js-blob-rnum" data-line-number="113"></td>
          <td id="file-manipulatecontentonnodes-java-LC113" class="blob-code blob-code-inner js-file-line">            <span class="pl-s1">response</span>.<span class="pl-en">getWriter</span>().<span class="pl-en">print</span>(<span class="pl-s">"Completed!"</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L114" class="blob-num js-line-number js-blob-rnum" data-line-number="114"></td>
          <td id="file-manipulatecontentonnodes-java-LC114" class="blob-code blob-code-inner js-file-line">        } <span class="pl-k">catch</span>(<span class="pl-smi">Exception</span> <span class="pl-s1">ex</span>){</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L115" class="blob-num js-line-number js-blob-rnum" data-line-number="115"></td>
          <td id="file-manipulatecontentonnodes-java-LC115" class="blob-code blob-code-inner js-file-line">                <span class="pl-c1">LOGGER</span>.<span class="pl-en">info</span>(<span class="pl-s">"Exception"</span>, <span class="pl-s1">ex</span>);</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L116" class="blob-num js-line-number js-blob-rnum" data-line-number="116"></td>
          <td id="file-manipulatecontentonnodes-java-LC116" class="blob-code blob-code-inner js-file-line">        }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L117" class="blob-num js-line-number js-blob-rnum" data-line-number="117"></td>
          <td id="file-manipulatecontentonnodes-java-LC117" class="blob-code blob-code-inner js-file-line">    }</td>
        </tr>
        <tr>
          <td id="file-manipulatecontentonnodes-java-L118" class="blob-num js-line-number js-blob-rnum" data-line-number="118"></td>
          <td id="file-manipulatecontentonnodes-java-LC118" class="blob-code blob-code-inner js-file-line">}</td>
        </tr>
  </tbody></table>
</div>


    </div>

  </div>
</div>

      </div>
      <div class="gist-meta">
        <a href="https://gist.github.com/thesurenk/168d7f3c7927419b8468ce5bd5b2f976/raw/f20022bcb0caeecffd9eeabce4251defe51fc9c2/ManipulateContentOnNodes.java" style="float:right" class="Link--inTextBlock">view raw</a>
        <a href="https://gist.github.com/thesurenk/168d7f3c7927419b8468ce5bd5b2f976#file-manipulatecontentonnodes-java" class="Link--inTextBlock">
          ManipulateContentOnNodes.java
        </a>
        hosted with &#10084; by <a class="Link--inTextBlock" href="https://github.com">GitHub</a>
      </div>
    </div>
</div>
</div><h2>Resources</h2><ul><li><p>Complete servlet at</p></li><li><p>Using Groovy scripts - &lt;TBD&gt;</p></li><li><p>Using Javascript - &lt;TBD&gt;</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Willow. Majorana. Ocelot. Quantum's Interesting Now? You Bet.]]></title><description><![CDATA[A developing story.]]></description><link>https://www.techinpieces.com/p/willow-majorana-ocelot-quantums-interesting</link><guid isPermaLink="false">https://www.techinpieces.com/p/willow-majorana-ocelot-quantums-interesting</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Thu, 27 Feb 2025 22:33:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!pW8t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Never a dull day in the world of computing. Every segment of the computing industry, be it hardware, software, services, tech products, gadgets.. has some thing to release, showcase, demo, present. Guess, everyone&#8217;s getting an &#8220;AI&#8221; upgrade. </p><p>And Quantum, ain&#8217;t want to be quiet or left ignored. Though a powerful technology, frankly the world still need to see a practical uses (other than movie scripts)!</p><p><em>Some movies have been using this tech to let characters in the movies be in 3D worlds, alternative realities and time travel :-) </em></p><p>The race for Quantum superiority started few years back with IBM, Google started investing heavily on the technology. Recently the new trend started with <a href="https://blog.google/technology/research/google-willow-quantum-chip/">Google&#8217;s Willow quantum chip announced in 9th Dec 2009</a></p><p>The latest development being..</p><h2>Amazon&#8217;s Ocelot</h2><p>The release of <a href="https://www.aboutamazon.com/news/aws/quantum-computing-aws-ocelot-chip">Amazon&#8217;s Ocelot</a> (<em>may be named to serve as a way to link the physical animal with the underlying quantum principles of the chip</em>)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pW8t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pW8t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pW8t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pW8t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pW8t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pW8t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:462826,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/158041222?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!pW8t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!pW8t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!pW8t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!pW8t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61f5b6c1-0bf3-4b96-b9fe-fa07ea8e0c0d_1920x1080.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Amazon&#8217;s Ocelot. Source Amazon News 27 Feb 2025</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EXhT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EXhT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png 424w, https://substackcdn.com/image/fetch/$s_!EXhT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png 848w, https://substackcdn.com/image/fetch/$s_!EXhT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png 1272w, https://substackcdn.com/image/fetch/$s_!EXhT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EXhT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png" width="1281" height="787" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:787,&quot;width&quot;:1281,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:344536,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/158041222?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EXhT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png 424w, https://substackcdn.com/image/fetch/$s_!EXhT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png 848w, https://substackcdn.com/image/fetch/$s_!EXhT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png 1272w, https://substackcdn.com/image/fetch/$s_!EXhT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F831fb2db-a233-4cf7-bb25-37145f700619_1281x787.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>last week followed by..</p><h2>Microsoft&#8217;s Majorana 1</h2><p>on 19th Feb, 2025 by <a href="https://news.microsoft.com/de-ch/2025/02/19/microsoft-unveils-majorana-1-the-worlds-first-quantum-processor-powered-by-topological-qubits/">Microsoft&#8217;s Majorana 1</a> (<em>named after Ettore Majorana, an Italian theoretical physicist who, in 1937, theorized the existence of a type of particle known as a Majorana fermion) </em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O4pq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O4pq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg 424w, https://substackcdn.com/image/fetch/$s_!O4pq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg 848w, https://substackcdn.com/image/fetch/$s_!O4pq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!O4pq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!O4pq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg" width="960" height="640" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:640,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90731,&quot;alt&quot;:&quot;Microsoft&#8217;s Majorana 1 Chip. Source Microsoft News&quot;,&quot;title&quot;:&quot;Microsoft&#8217;s Majorana 1 Chip. Source Microsoft News&quot;,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/158041222?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Microsoft&#8217;s Majorana 1 Chip. Source Microsoft News" title="Microsoft&#8217;s Majorana 1 Chip. Source Microsoft News" srcset="https://substackcdn.com/image/fetch/$s_!O4pq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg 424w, https://substackcdn.com/image/fetch/$s_!O4pq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg 848w, https://substackcdn.com/image/fetch/$s_!O4pq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!O4pq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F35ebfc11-5b75-408a-a6a2-883fbfe46d02_960x640.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Microsoft&#8217;s Majorana 1 Chip. Source Microsoft News - 19 Feb 2025</figcaption></figure></div><p>and the in Dec 2009</p><h2>Google&#8217;s Willow</h2><p>release of <a href="https://blog.google/technology/research/google-willow-quantum-chip/">Willow in 9th Dec 2009</a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dk32!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dk32!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!dk32!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!dk32!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!dk32!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dk32!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:143443,&quot;alt&quot;:&quot;A person shows Google Quantum AI's \&quot;Willow\&quot; chip, in this undated handout photo obtained by Reuters on December 6, 2024. Google/Handout via REUTERS/File photo&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/158041222?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A person shows Google Quantum AI's &quot;Willow&quot; chip, in this undated handout photo obtained by Reuters on December 6, 2024. Google/Handout via REUTERS/File photo" title="A person shows Google Quantum AI's &quot;Willow&quot; chip, in this undated handout photo obtained by Reuters on December 6, 2024. Google/Handout via REUTERS/File photo" srcset="https://substackcdn.com/image/fetch/$s_!dk32!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!dk32!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!dk32!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!dk32!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7235a7c6-5b4f-4cf3-a45b-a57b513664ab_1200x675.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A person shows Google Quantum AI's "Willow" chip, in this undated handout photo obtained by Reuters on December 6, 2024. Google/Handout via REUTERS/File photo</figcaption></figure></div><p>and the race goes on!!!</p><p>&#8212;</p><p><em>Technology is great, fall in love with it not the hype!</em></p><p></p><p></p><h2></h2>]]></content:encoded></item><item><title><![CDATA[Alexa(i)+]]></title><description><![CDATA[Amazon announces the launch of Alexa+, but with AI.]]></description><link>https://www.techinpieces.com/p/alexai</link><guid isPermaLink="false">https://www.techinpieces.com/p/alexai</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Wed, 26 Feb 2025 20:31:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!P1m4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>While everything in the news lately is &#8220;next generation&#8221;, &#8220;the future&#8221;.. maybe people are getting bored of next generation releases. Yet another one from the <a href="https://corporate.vanguard.com/content/corporatesite/us/en/corp/articles/magnificent-seven-study-in-market-cyclicality.html">Magnificent 7</a> - <a href="https://finance.yahoo.com/quote/AMZN/">Amazon</a>, their popular voice assistant Alexa, but with AI powered, hence <a href="https://www.aboutamazon.com/news/devices/new-alexa-generative-artificial-intelligence">Alexa+</a></p><p><em>If you are reading this after 2025, between 2023-2025 there was so much noise &amp; announcements &amp; press releases around AI tools, services, products that we could not avoid, but write/talk about it.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P1m4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P1m4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png 424w, https://substackcdn.com/image/fetch/$s_!P1m4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png 848w, https://substackcdn.com/image/fetch/$s_!P1m4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png 1272w, https://substackcdn.com/image/fetch/$s_!P1m4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P1m4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png" width="1072" height="814" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:814,&quot;width&quot;:1072,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:269509,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/157986373?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!P1m4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png 424w, https://substackcdn.com/image/fetch/$s_!P1m4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png 848w, https://substackcdn.com/image/fetch/$s_!P1m4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png 1272w, https://substackcdn.com/image/fetch/$s_!P1m4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a2a9f35-cbf3-42cc-9eb1-74742641812a_1072x814.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>When Amazon initially launched Alexa in Nov 6, 2014 along with it&#8217;s first-generation Amazon Echo smart speaker, the voice assistant market was young with just a handful of players like <a href="https://www.apple.com/siri/">Apple&#8217;s Siri</a> (<a href="https://www.apple.com/newsroom/2011/10/04Apple-Launches-iPhone-4S-iOS-5-iCloud/">launched 2011</a>) and <a href="https://android.googleblog.com/2012/12/new-google-now-perfect-travel-companion.html">Google&#8217;s Now</a> (later became <a href="https://assistant.google.com/">Google Assistant</a>)</p><p>As many software products Alexa went through it&#8217;s evolution of product improvements and updates, a significant one was the team&#8217;s <a href="https://www.amazon.science/blog/alexa-at-five-looking-back-looking-forward">reflection after 5 years of Alexa</a> and I can&#8217;t believe they said this in Nov 2014 (AI term was vaguely used then).</p><blockquote><p><em>Amazon&#8217;s mission is to be the earth&#8217;s most customer-centric company. With that mission in mind and the Star Trek computer as an inspiration, on November 6, 2014, a small multidisciplinary team launched Amazon Echo, with the aspiration of revolutionizing daily convenience for our customers using artificial intelligence (AI).</em></p></blockquote><p>Looks like Amazon stuck to its core mission of improving Alexa with Artificial Intelligence; And never a good time than now to release a product with AI Powered / Capabilities. Minus all the marketing trendy words like..</p><blockquote><p><em>Today, we&#8217;re excited to introduce Alexa+, our next-generation assistant powered by generative AI. Alexa+ is more conversational, smarter, personalized&#8212;and she helps you get things done. She keeps you entertained, helps you learn, keeps you organized, summarizes complex topics, and can converse about virtually anything. Alexa+ can manage and protect your home, make reservations, and help you track, discover, and enjoy new artists. She can also help you search, find or buy virtually any item online, and make useful suggestions based on your interests. Alexa+ does all this and more&#8212;all you have to do is ask.</em></p></blockquote><p>what excites me is the <a href="https://www.aboutamazon.com/news/devices/new-alexa-tech-generative-artificial-intelligence">Product Engineering</a> part of it.</p><ol><li><p><strong>Alexa+ got connections:</strong> Forget just turning on your lights, Alexa's hooked up with tons of apps and gadgets! Order food with GrubHub, book a table with OpenTable, call an Uber, play your favorite tunes on Spotify&#8212;you name it, Alexa+ probably works with it.</p></li><li><p><strong>Your own personal genie:</strong> Alexa+ can now juggle multiple tasks like a pro. Need to book a table for dinner AND let your friend know where you'll be? Just ask! Alexa+ will make the reservation and shoot off a text, all in one go.</p></li><li><p><strong>No more BS:</strong> LLMs can sometimes be a bit flaky, but Alexa+ is all about keeping it real. It uses some fancy tech and teams up with a bunch of reliable news sources to make sure you get accurate info, whether you're checking the weather or controlling your smart home.</p></li><li><p><strong>Lightning-fast:</strong> Nobody likes waiting around, especially in the GenAI era, and Alexa+ gets that. It's been souped up with some serious speed-boosting tech to make sure it responds to your requests in a snap.</p></li><li><p><strong>Alexa gets to know YOU:</strong> Alexa+ may know you even better. <em><strong>Worries me some.</strong></em> It remembers your favorite things (like music, books, and food) and uses that info to give you more personalized responses. The more you chat with Alexa+, the more it becomes your perfect AI sidekick.</p></li><li><p><strong>Alexa's got skills (like, real skills):</strong> No AI product without Agents these days. Alexa+ has Agent capabilities, essentially teaching Alexa+ to navigate the digital world as a person would.</p></li></ol><p>Developing a product is only half the battle. The real challenge is understanding how it's used and perceived in the real world, and using that feedback to drive continuous improvement.</p><p>I wish Amazon Alexa+ team the very best!</p><p>&#8212;</p><p><em>Technology is great, fall in love with it not the hype!</em></p>]]></content:encoded></item><item><title><![CDATA[MongoDB ♡ Voyage AI]]></title><description><![CDATA[The "No More AI Hallucinations!" Angle.]]></description><link>https://www.techinpieces.com/p/mongodb-voyage-ai</link><guid isPermaLink="false">https://www.techinpieces.com/p/mongodb-voyage-ai</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Tue, 25 Feb 2025 01:00:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Gtj3!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b81480d-d1aa-4e4d-9e26-7040d59e4ae0_500x500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>MongoDB <a href="https://www.mongodb.com/blog/post/redefining-database-ai-why-mongodb-acquired-voyage-ai">announced</a> their acquisition of <a href="https://www.voyageai.com/">Voyage AI</a></p><p> Okay, let's be real. AI is cool, but it's got this annoying habit of just&#8230; making stuff up. We call it "hallucinating," but it's basically like your friend who tells you a wild story they totally invented. Annoying, right? Especially when you're trying to build serious applications.</p><p>Well, MongoDB just dropped a bomb on this problem by grabbing Voyage AI. These guys are basically the AI equivalent of fact-checkers on steroids. They've built tech that makes AI find the right information, so it doesn't just spew out random nonsense.</p><p><strong>Why Should You Be Pumped?</strong></p><ul><li><p>Goodbye, AI Gibberish: Ever asked a chatbot a question and got a completely bonkers answer? That's what MongoDB's trying to fix. By bringing Voyage AI's tech into their database, they're making AI way more reliable.</p></li><li><p>AI You Can Actually Trust: Imagine building an AI app for your business, and it's actually&#8230; accurate. That's the dream, right? With better data retrieval, AI becomes way more trustworthy.</p></li><li><p>Faster, Smarter AI: Finding the right data is like giving your AI a brain boost. It means faster, more accurate results, which is a win for everyone.</p></li></ul><p><strong>What's the Secret Sauce?</strong></p><p>Voyage AI's tech is all about making AI understand the meaning of data, not just the words. They've got:</p><ul><li><p>Super-accurate search tools.</p></li><li><p>Reranking magic that filters out the junk.</p></li><li><p>AI models that are top-notch at understanding all kinds of data.</p></li></ul><p>Basically, MongoDB's building a database that stops AI from being a liar. And that's something we can all get behind.</p><p><strong>The &#8220;Developer's Dream&#8221;</strong></p><p>MongoDB Just Made AI Development Way Less Painful (Thanks, Voyage AI!)</p><p>Let's talk about building AI apps. Right now, it's a mess. You're juggling all these different tools, trying to make them work together. It's like trying to build a spaceship with spare parts from a lawnmower.</p><p>But MongoDB just changed the game. They bought Voyage AI, which means they're bringing super-smart AI search directly into their database.</p><p><strong>Why Developers Will Love This:</strong></p><ul><li><p>No More Patchwork Solutions: Forget about managing separate embedding APIs and vector stores. MongoDB's putting everything you need in one place.</p></li><li><p>AI Search That Just Works: Imagine being able to do semantic search, vector retrieval, and ranking without all the headaches. That's what MongoDB's delivering.</p></li><li><p>Faster Development Cycles: With everything integrated, you can build AI apps faster and more efficiently.</p></li><li><p>Focus on the Fun Stuff: Instead of wrestling with infrastructure, you can focus on building cool features.</p></li></ul><p></p><p>In short, MongoDB's making AI development less of a headache and more of a joy. They are enabling developers to easily build AI into their applications, and that is what developers are looking for.</p><p>&#8212;</p><p><em>Technology is great, fall in love with it not the hype!</em></p>]]></content:encoded></item><item><title><![CDATA[Compound AI Systems]]></title><description><![CDATA[As tempting and mouth watering the image looks, ask any chef, it is as such a complex piece of things to do.]]></description><link>https://www.techinpieces.com/p/compound-ai-systems</link><guid isPermaLink="false">https://www.techinpieces.com/p/compound-ai-systems</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Wed, 25 Sep 2024 00:35:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zpf7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zpf7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zpf7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zpf7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zpf7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zpf7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zpf7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg" width="1456" height="905" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:905,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:657356,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/157998942?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zpf7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg 424w, https://substackcdn.com/image/fetch/$s_!zpf7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg 848w, https://substackcdn.com/image/fetch/$s_!zpf7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!zpf7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41e0fc93-4e13-4134-b6b6-4ea0f9886bb4_2500x1554.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>As tempting and mouth watering the image looks, ask any chef, it is as such a complex piece of things to do. It&#8217;s the perfectly cooked soft pan cakes, temperature, stacking, syrup, the fruit, the presentation.. yes it a complex breakfast with a lot of work going into it.</p><p>Now coming to our AI world, what is a Compound AI system? An AI system that does more than juts being a Large Language Model (LLM), but is an LLM in conjunction with other components like integrating with databases, ability to search n the internet etc into a system or a chain that allows it to achieve its State of the Art result.</p><p>Some examples of compound AI systems:</p><ul><li><p>Autonomous vehicles</p><ul><li><p>Combining computer vision, sensor data, speech recognition and information retrieval</p></li></ul></li><li><p>Prompt engineering</p><ul><li><p>Prompt engineering logic + LLM</p></li></ul></li><li><p>RAG (Retrieval Augmented Generation)</p><ul><li><p>LLM + Retrieval systems, Data API&#8217;s like Databricks Online Table, Text-To-SQL engines</p></li></ul></li><li><p>and many more like Healthcare diagnostics, Fraud detection systems, Siri, Alexa..</p></li></ul><h2>&#8212;Concepts</h2><h4>Tasks, intents, pipelines</h4><p>Compound AI systems are designed to tackle complex tasks by combining multiple AI components. Three fundamental concepts: tasks, intents, and pipelines need to understood.</p><h3>Tasks</h3><p>A task is a specific activity or operation that an AI system is designed to perform.</p><p>Examples:</p><ul><li><p>Sentiment analysis</p></li><li><p>Language translation</p></li><li><p>Image classification</p></li><li><p>Text summarization</p></li></ul><p>Characteristics:</p><ul><li><p><strong>Well-defined input</strong>: Tasks typically have a clear and well-defined input, such as text or an image.</p></li><li><p><strong>Specific output</strong>: Tasks produce a specific output, such as a sentiment score or a translated text.</p></li><li><p><strong>Measurable performance</strong>: Task performance can be measured using metrics like accuracy, precision, or recall.</p></li></ul><h3>Intents</h3><p>An intent is the underlying purpose or goal that a user wants to achieve when interacting with an AI system.</p><p>Examples:</p><ul><li><p>Booking a flight</p></li><li><p>Finding a restaurant</p></li><li><p>Getting directions</p></li><li><p>Making a purchase</p></li></ul><p>Characteristics:</p><ul><li><p><strong>User-centric</strong>: Intents are focused on the user's needs and goals.</p></li><li><p><strong>Context-dependent</strong>: Intents can depend on the user's context, such as location or previous interactions.</p></li><li><p><strong>Flexible input</strong>: Intents can be expressed in various ways, such as through text, voice, or gestures.</p></li></ul><h3>Pipelines</h3><p>A pipeline is a series of tasks or processes that are executed in a specific order to achieve a particular intent.</p><p>Examples:</p><ul><li><p>A language translation pipeline might involve:</p><ol><li><p>Text analysis</p></li><li><p>Language detection</p></li><li><p>Machine translation</p></li><li><p>Post-editing</p></li></ol></li><li><p>A sentiment analysis pipeline might involve:</p><ol><li><p>Text preprocessing</p></li><li><p>Feature extraction</p></li><li><p>Model training</p></li><li><p>Prediction</p></li></ol></li></ul><p>Characteristics:</p><ul><li><p><strong>Sequential processing</strong>: Pipelines involve a sequence of tasks that are executed one after the other.</p></li><li><p><strong>Data flow</strong>: Pipelines typically involve the flow of data from one task to the next.</p></li><li><p><strong>Configurable</strong>: Pipelines can be configured to accommodate different tasks, intents, or AI models.</p></li></ul><h3>Putting it all Together</h3><p>Compound AI systems integrate multiple tasks, intents, and pipelines to create a comprehensive AI solution. By combining these components, developers can build AI systems that:</p><ul><li><p><strong>Handle complex tasks</strong>: Compound AI systems can tackle complex tasks that involve multiple intents, tasks, and pipelines.</p></li><li><p><strong>Improve accuracy</strong>: By integrating multiple AI components, compound AI systems can improve overall accuracy and performance.</p></li><li><p><strong>Enhance user experience</strong>: Compound AI systems can provide a more seamless and intuitive user experience by understanding user intents and adapting to their needs.</p></li></ul><p>In summary, tasks, intents, and pipelines are the building blocks of compound AI systems. By understanding these concepts and how they interact, developers can create sophisticated AI solutions that tackle complex challenges and provide real value to users.</p><h2>&#8212;Key Components of a Compound AI System</h2><p>A Compound AI system typically includes:</p><ol><li><p><strong>Language Models</strong>: Understand and respond to user inputs in a natural way.</p></li><li><p><strong>Information Retrievers</strong>: Fetch relevant data from databases or external sources.</p></li><li><p><strong>Databases</strong>: Store and manage data for easy access.</p></li><li><p><strong>External Tools</strong>: Use APIs and services to perform specific tasks.</p></li><li><p><strong>Data Converters</strong>: Turn data into a format that's easy to search and retrieve.</p></li><li><p><strong>Result Filters</strong>: Prioritize and evaluate retrieved results for relevance.</p></li><li><p><strong>Prompt Builders</strong>: Create effective inputs for language models.</p></li><li><p><strong>Output Refiners</strong>: Ensure generated outputs are high-quality and coherent.</p></li><li><p><strong>Caching Systems</strong>: Store frequently accessed responses for faster retrieval.</p></li><li><p><strong>Task Managers</strong>: Orchestrate tasks and data flow for optimal performance.</p></li><li><p><strong>Evaluation Tools</strong>: Assess system performance and output quality.</p></li><li><p><strong>Monitoring and Feedback</strong>: Track performance and gather user feedback for improvement.</p></li><li><p><strong>Model Adapters</strong>: Fine-tune pre-trained models for specific tasks or domains.</p></li><li><p><strong>Agent Builders</strong>: Create autonomous agents that can perform tasks and make decisions.</p></li></ol><p>These components work together to create a powerful and adaptable Compound AI system.</p><h2>&#8212;Designing Compound AI Systems</h2><p>In summary here&#8217;s a brief summary of a system approach to Application Development Life-cycle</p><p><em>Analysis &#8212;&gt; Design &#8212;&gt; Development &#8212;&gt; Production &#8212;&gt; Monitoring</em></p><p>To simplify:</p><p><strong>01. Identify Intents</strong></p><ul><li><p>define possible intent based on some user requirements.</p></li><li><p>define intent dependencies</p></li></ul><p><strong>02. Identify Tools</strong></p><ul><li><p>tools you may need to accomplish a task. Like web search, apis, code execution etc.</p></li></ul><p><strong>03. Build the Chain</strong></p><ul><li><p>build a workflow based on identified tasks</p></li><li><p>architecture you may to solve the problem, like RAG, Text2SQL, etc.</p></li><li><p>iterate the process</p></li></ul><p>An example: 3 main intents</p><ol><li><p>intent - retrieval / search piece;</p></li><li><p>taking those requests, responses from that search and then building the augmentation of the prompt, grabbing those summaries an building the context;</p></li><li><p>once we have the context, sending to the model then generating answers.</p></li></ol><h3>Components</h3><p>The Compound AI System is a modular, scalable, and flexible architecture designed to integrate multiple AI components to achieve complex tasks. This architecture enables the creation of a robust and adaptable AI system that can be applied to various domains.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fu67!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fu67!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Fu67!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Fu67!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Fu67!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fu67!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg" width="1456" height="347" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:347,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Fu67!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Fu67!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Fu67!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Fu67!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d1d6fa0-bf11-4e2b-89c2-b8ce96887597_2500x596.jpeg 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><em>Illustration of key components of a compound AI system</em></figcaption></figure></div><ol><li><p>Data Ingestion Layer</p></li><li><p>AI Component Layer</p></li><li><p>Knowledge Graph</p></li><li><p>Orchestration Layer</p></li><li><p>Decision Support System</p></li><li><p>Continuous Learning and Improvement</p></li></ol><h2>&#8212;Challenges of Compound AI Systems</h2><p><strong>Building</strong></p><ul><li><p>Complexity in integrating multiple components</p></li><li><p>Managing multiple models and processing steps</p></li><li><p>Adapting to different hardware configurations</p></li><li><p>Ensuring robust metrics and logging systems</p></li></ul><p><strong>Optimizing</strong></p><ul><li><p>Balancing latency, throughput, and resource utilization</p></li><li><p>Co-optimizing system components</p></li><li><p>Cost optimization while maintaining performance</p></li><li><p>Harmonizing interactions among components</p></li></ul><p><strong>Deploying</strong></p><ul><li><p>Meeting diverse hardware, software, and scalability requirements</p></li><li><p>Managing operational complexity with MLOps and DataOps</p></li><li><p>Ensuring scalability and elasticity</p></li><li><p>Integrating with existing infrastructure</p></li><li><p>Addressing security, privacy, and explainability concerns</p></li></ul><p>These challenges highlight the complexity and nuance of building, optimizing, and deploying Compound AI systems.</p><h3>Some good reads</h3><ul><li><p>https://www.databricks.com/glossary/compound-ai-systems</p></li><li><p><a href="https://bair.berkeley.edu/blog/2024/02/18/compound-ai-systems/">The Shift from Models to Compound AI Systems</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[Vector Search And The AI Rush]]></title><description><![CDATA[The secret behind fast search results.]]></description><link>https://www.techinpieces.com/p/vector-search-and-the-ai-rush</link><guid isPermaLink="false">https://www.techinpieces.com/p/vector-search-and-the-ai-rush</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Fri, 21 Jul 2023 17:55:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!YmCx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YmCx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YmCx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png 424w, https://substackcdn.com/image/fetch/$s_!YmCx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png 848w, https://substackcdn.com/image/fetch/$s_!YmCx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png 1272w, https://substackcdn.com/image/fetch/$s_!YmCx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YmCx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png" width="560" height="315" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:315,&quot;width&quot;:560,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:27857,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/157999725?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YmCx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png 424w, https://substackcdn.com/image/fetch/$s_!YmCx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png 848w, https://substackcdn.com/image/fetch/$s_!YmCx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png 1272w, https://substackcdn.com/image/fetch/$s_!YmCx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b3973f3-dbc2-4257-aa5f-9f1210136d81_560x315.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h4>tl;dr - Vector search and the AI connection</h4><p>The noise around AI, Generative AI applications and the demand these apps are creating around the need for users to search through huge data models. To put tin simple terms, Generative AI models use neural networks to <strong>identify</strong> the patterns and structures within existing data to generate new and original content.</p><p>So the more people are using Generative AI.. which is more or less &#8220;Searcing through tons of content and getting appropriate results back, and that too fast.&#8221; If you have used ChatGPT, Google Bard, Github&#8217;s Copilot, all of these give you answers/generate responses based on your questions/requests.</p><p>All of this boils down to &#8220;search within a content and get results back&#8221; aka &#8220;search&#8221;.</p><p>This post details about vector search, how it works (briefly) and some platforms that support this.</p><h4>What is vector search?</h4><p><em>Vector search leverages machine learning (ML) to capture the meaning and context of unstructured data, including text and images, transforming it into a numeric representation. Frequently used for semantic search, vector search finds similar data using approximate nearest neighbor (ANN) algorithms. Compared to traditional keyword search, vector search yields more relevant results and executes faster</em> - Source Elasticsearch.</p><p>..wait that&#8217;s a lot. Vectors? Semantic search? Nearest neighbor algorithm?</p><p>here&#8217;s a simpler version - <em>Vector search is a type of search that uses machine learning to find objects that are similar to a given query. It works by converting the query and the objects into vectors, which are then compared to each other. The objects that are most similar to the query are then returned as results.</em></p><h4>What is a vector?</h4><p>In computer science a Vector is a data structure that stores a sequence of elements of same data type. They are similar to arrays but they have some differences:</p><ul><li><p><em>Random access</em> the elements in a vector can be accessed by their index making them efficient for operations like searching and sorting.</p></li><li><p><em>Dynamic size </em>while arrays have fixed size, vectors can grow &amp; shrink as needed making them more flexible and efficient.</p></li><li><p><em>Vector operations</em> vectors support a lot of operations that are optimized for their data structure like addition, subtraction, multiplication, and division.</p></li></ul><h4>Why search?</h4><p>A common use case in almost every software system, search enables users to find information within the system or data that the system can access.</p><p>But what is the problem? Humans use language which is often ambiguous and fuzzy. There are synonyms (two words mean the same thing), polysems (same word can have multiple meanings). In English for example &#8220;accurate&#8221; and &#8220;precise&#8221; can sometimes be synonymous, but &#8220;accurate&#8221; can also mean many different things like current, good, true, proper. With these ambiguities, developing efficient search is difficult.</p><h4>How does a vector search engine work?</h4><p>Traditional search leans more on keywords, similar words, how many time a word repeated, vector search engines use distances in the embedding space to represent similarity.</p><p>To address the above, different machine learning techniques such as spelling correction, language processing, category matching, and more are used to structure and make sense of language. These words are converted into vectors (numbers) allowing their meaning to be encoded and processed mathematically. This process of converting is called <strong>vectorization</strong>.</p><p>Usually vectors are used for clustering documents, identifying meaning and intents in queries, ranking results and adding synonyms. There is also something called <strong>vector embeddings</strong> which are more than vectors + objects like whole documents, audio, video, images files.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gb35!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gb35!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png 424w, https://substackcdn.com/image/fetch/$s_!Gb35!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png 848w, https://substackcdn.com/image/fetch/$s_!Gb35!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png 1272w, https://substackcdn.com/image/fetch/$s_!Gb35!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gb35!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png" width="1456" height="660" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:660,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Gb35!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png 424w, https://substackcdn.com/image/fetch/$s_!Gb35!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png 848w, https://substackcdn.com/image/fetch/$s_!Gb35!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png 1272w, https://substackcdn.com/image/fetch/$s_!Gb35!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6868f203-2917-4d1d-a230-0cb41564c624_1853x840.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Image by Elasticsearch</em></figcaption></figure></div><h4>Embeddings - aka vectors for business use cases</h4><p>A major challenge in creating vectors for representing different entities that are meaningful and useful for business use cases. By applying pre-trained deep learning technology models to raw data, you can extract "embeddings" - vectors that map each row of data in a space of their "meanings".</p><p>Challenge 1 - Successful extraction of useful vectors (embeddings) from your business data is the key challenge. But after you have done that, the only thing you have to do is search for similar vectors - which is another complex part of the process.</p><p>Challenge 2 - Building a fast and scalable vector search engine. Some of the most widely used metrics for calculating the similarity between vectors are L2 distance (Euclidean distance), cosine similarity, and inner product (dot product). These may get too mathematical, and can conveniently avoid understanding the inner working of this. Usually search engines will have these pre-defined/implemented.</p><p>To learn more about creating embeddings, this <a href="https://developers.google.com/machine-learning/recommendation">google course</a> will help to understand the fundamentals.</p><h4>Use cases</h4><p>Vector search is specialized search and like many software systems, it is not recommended for everything and/or can solve all search problems.</p><p>Few use cases:</p><ol><li><p>Semantic Search &#8212; wait what the heck is this? if you asked above.. please stop there. Read about Semantic Search here.</p></li><li><p>Recommendations - Vector search can be used to recommend products to users based on their past purchases, interests, and browsing history.</p></li><li><p>Question Anwsering -</p></li><li><p>Image search - Vector search can be used to find images that are similar to a given image. This is useful for finding similar products, finding similar artwork, or finding similar landmarks.</p></li><li><p>Natural language search - Vector search can be used to find documents that are similar to a given document. This is useful for finding similar news articles, finding similar research papers, or finding similar blog posts.</p></li></ol><h4>A selection of software products with vector search</h4><ul><li><p>Commercial</p><ul><li><p>Elasticsearch - <a href="https://www.elastic.co/enterprise-search/generative-ai">Elasticsearch Relevance Engine</a></p></li><li><p>Apache Solr <a href="https://solr.apache.org/guide/solr/latest/query-guide/dense-vector-search.html">available from v9.3.0</a></p></li><li><p><a href="https://solr.apache.org/guide/solr/latest/query-guide/dense-vector-search.html">Algolia Neural Search</a></p></li><li><p><a href="https://www.pinecone.io/solutions/search/">Pinecone</a></p></li><li><p>Google Cloud <a href="https://cloud.google.com/vertex-ai/docs/matching-engine/overview">Vertex AI Matching Engine</a></p></li><li><p>Azure Cognitive Search - <a href="https://azure.microsoft.com/en-us/products/ai-services/cognitive-search">public preview of Vector search</a></p></li><li><p><a href="https://www.mongodb.com/products/platform/atlas-vector-search">MongoDB Atlas Vector search</a></p></li></ul></li><li><p>Open Source</p><ul><li><p><a href="https://qdrant.tech/">Qdrant</a></p></li><li><p><a href="https://docs.vespa.ai/en/vector-search.html">Vespa</a></p></li></ul></li></ul><h4>Onward</h4><p>Generative AI is exploding eery single day and as more enterprises &amp; startups jump into the race, more applications are built, the demand for &#8220;search&#8221; will only grow north. This directly relates to how fast users will be able to view &#8220;search results&#8221; from the terabytes of data these organizations and LLaMA models are released.</p>]]></content:encoded></item><item><title><![CDATA[Coming soon]]></title><description><![CDATA[This is Tech in pieces.]]></description><link>https://www.techinpieces.com/p/coming-soon</link><guid isPermaLink="false">https://www.techinpieces.com/p/coming-soon</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Wed, 10 May 2023 13:19:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Gtj3!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b81480d-d1aa-4e4d-9e26-7040d59e4ae0_500x500.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is Tech in pieces.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.techinpieces.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.techinpieces.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[Why Angular?]]></title><description><![CDATA[because i love it! Seriously, it's a great Javascript Framework.]]></description><link>https://www.techinpieces.com/p/why-angular</link><guid isPermaLink="false">https://www.techinpieces.com/p/why-angular</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Tue, 31 Jan 2023 16:00:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!pIQ9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pIQ9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pIQ9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png 424w, https://substackcdn.com/image/fetch/$s_!pIQ9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png 848w, https://substackcdn.com/image/fetch/$s_!pIQ9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png 1272w, https://substackcdn.com/image/fetch/$s_!pIQ9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pIQ9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png" width="560" height="315" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:315,&quot;width&quot;:560,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Why Angular?&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Why Angular?" title="Why Angular?" srcset="https://substackcdn.com/image/fetch/$s_!pIQ9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png 424w, https://substackcdn.com/image/fetch/$s_!pIQ9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png 848w, https://substackcdn.com/image/fetch/$s_!pIQ9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png 1272w, https://substackcdn.com/image/fetch/$s_!pIQ9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa32a73f0-7886-42fa-8fe1-3ffb88569bb6_560x315.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>As a backend java developer, adding some javascript here and there, was a big deal for me, back in 2010&#8217;s. Ajax, JQuery simplified this a little, but also made javascript files more complex. Around 2015, we were trying to solve some issues on a big data entry form (I still remember eery details on that), one of the intern on the team showed me how we can solve most of them using Angular (and yes, be open to learn from anyone); It was an eye-opener.. yaaay.. aha.. what-you-can-do-this? moments.</p><p>But yes, AngularJS (was end-of-life jan 2022) did change the way I was solving frontend and was very close to how I was developing java based applications. And since, i&#8217;ve been working / using / preaching Angular. Was.. has been and is my favorite framework.</p><p>This post is about why Angular, above other great/awesome js frameworks.</p><p>Why Angular? because..</p><h4>1.Complete Framework</h4><p>Angular is a complete framework. As an application framework, Angular include several libraries allowing developers to do solve/implement features from within the library than using other third-party. (Although there are several other third-party libraries that help us to solve certain features better/easier than angular&#8217;s libraries)</p><p>Core Features/Concepts: Components, Templates, Directives, Dependency Injection</p><p>Libraries integrated Angular: Routing &amp; Navigation, Forms, HTTP (my favorite), Testing, Internationalization, Animations, Web Workers &amp; Progressive Web Apps, Server side rendering</p><h4>2. Great Tooling / Developer Friendly</h4><p>Another great availability from Angular is the tooling support to build projects better.</p><ul><li><p>Angular CLI saves a ton of time to build projects.</p></li><li><p>Language Services available for all major IDEs helps developers write better code.</p></li><li><p>Schematics, Dev tools, and lots of other from community like ngd , codelyzer,</p></li></ul><h4>3. Guides, Examples, Help</h4><p>My list keeps getting better. There is a lot of material we can find on the internet to learn Angular. And the best part, most of it is free. You can find Books, Podcasts, Video tutorials, Blogs, Bootcamps, &#8230;</p><p>A passionate community of developers keep the content coming!!</p><h4>4. Awesome Community</h4><p>This is my favorite part. Angular&#8217;s community is great. Lots of ways to connect/talk Gitter, Discord, Twitter</p><p>and over the years tons of applications have been built on Angular, and this feedback sent back to Angular teams is making the framework better every day.</p><h4>5. Open Source</h4><p>Was.. is and continues to be open-source forever (hopefully Google does not change it&#8217;s mind).</p><p>Actually I can keep writing.. but trying to keep this short.</p><h4>Live, and Let Live</h4><p>I love Angular. I am not preaching &#8220;Angular is The best in the market&#8221;. There are a lot of other great javascript based frameworks that solve certain problems very well, sometimes, better than Angular. Yes, a heathy competition is always good that pushes us forward.</p><p>Being a software developer, i&#8217;m alway open to learning new things and keep an eye on what maybe coming. How I can simplify -&gt; a certain piece of code / implementing a feature / deploying &amp; managing applications.</p><p>Always Learning!</p>]]></content:encoded></item><item><title><![CDATA[Can AI Models Collapse?]]></title><description><![CDATA[wait.. what.. really? an AI Language Model can collapse? Yes they can.]]></description><link>https://www.techinpieces.com/p/can-ai-models-collapse</link><guid isPermaLink="false">https://www.techinpieces.com/p/can-ai-models-collapse</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Mon, 01 Aug 2022 18:02:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!EPKB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EPKB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EPKB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg 424w, https://substackcdn.com/image/fetch/$s_!EPKB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg 848w, https://substackcdn.com/image/fetch/$s_!EPKB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!EPKB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EPKB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg" width="1456" height="2295" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2295,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:607611,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://techinpieces.substack.com/i/157999312?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EPKB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg 424w, https://substackcdn.com/image/fetch/$s_!EPKB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg 848w, https://substackcdn.com/image/fetch/$s_!EPKB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!EPKB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd105b282-7b67-44e5-b50c-4e980cc1fd64_1500x2364.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A recent research paper <a href="https://www.nature.com/articles/s41586-024-07566-y">AI models collapse when trained on recursively generated data</a> published by Ilia Shumailov, Zakhar Shumaylov, Yiren Zhao, Nicolas Papernot, Ross Anderson &amp; Yarin Gal on 24 July, 2024 makes the point.</p><p>and they also kind of make sense.</p><h4>What is a model collapse?</h4><p>According to the paper, Model collapse is a degenerative process affecting generations of learned generative models, in which the data they generate end up polluting the training set of the next generation. Being trained on polluted data, they then misinterpret reality.</p><h4>Basics. How AI models are trained</h4><p>As most of you know there is tons of human-generated data all around us and has been since ages. Books, papers, news paintings, and in the last 2-3 decades most of that physical data is digitized and made available on the web. Then there&#8217;s more - like blogs, news, videos, movies, pictures, drawings, social media and the list goes on.</p><p>Imagine if there is a way to accumulate all of this data into a software system or a database? That is exactly what has happened and such data is being used to train AI LLMs or Large Language Models.</p><p>A few popular data sets used to train LLMs <a href="https://huggingface.co/datasets/nvidia/HelpSteer">HelpSteer</a> , <a href="https://huggingface.co/datasets/HuggingFaceH4/no_robots">No Robots</a> , <a href="https://huggingface.co/datasets/Unified-Language-Model-Alignment/Anthropic_HH_Golden">Anthropic HH Golden</a> and several at <a href="https://huggingface.co/datasets">Hugging Face Datasets</a></p><h4>The Problem</h4><p>These models keep growing bigger and bigger every generation, as model builders keep adding more data. What happens at some point if these builders exhaust / use all of this data?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!43kA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!43kA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png 424w, https://substackcdn.com/image/fetch/$s_!43kA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png 848w, https://substackcdn.com/image/fetch/$s_!43kA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png 1272w, https://substackcdn.com/image/fetch/$s_!43kA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!43kA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png" width="939" height="578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:578,&quot;width&quot;:939,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!43kA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png 424w, https://substackcdn.com/image/fetch/$s_!43kA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png 848w, https://substackcdn.com/image/fetch/$s_!43kA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png 1272w, https://substackcdn.com/image/fetch/$s_!43kA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38521a05-d7fa-4624-93e0-b3ecdd3298ba_939x578.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Source: Keynote, Aparna Ramani @Scale 2024</em></figcaption></figure></div><p>The LLMs will evaluate themselves and generate their own data - called as, <strong>synthetic data </strong>[2].</p><p>Also LLMs while training raw data, processes the data to generate a <strong>refined set</strong>. And as new generation of LLMs are trained with more / new datasets, LLMs grow / pile up / add on the previously refined datasets. This is how LLMs data is managed / stored.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p2z-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p2z-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png 424w, https://substackcdn.com/image/fetch/$s_!p2z-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png 848w, https://substackcdn.com/image/fetch/$s_!p2z-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png 1272w, https://substackcdn.com/image/fetch/$s_!p2z-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p2z-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png" width="947" height="579" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3089f550-4685-452d-9997-5659e75070a9_947x579.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:579,&quot;width&quot;:947,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!p2z-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png 424w, https://substackcdn.com/image/fetch/$s_!p2z-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png 848w, https://substackcdn.com/image/fetch/$s_!p2z-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png 1272w, https://substackcdn.com/image/fetch/$s_!p2z-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3089f550-4685-452d-9997-5659e75070a9_947x579.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Source: Keynote, Aparna Ramani @Scale 2024</em></figcaption></figure></div><p>So far so good, now comes the bad part.</p><p>If in this cycle, some parts are <strong>corrupted</strong>, that corrupted data just keep piling up on new models - unless someone removes/clears it. And this may lead to an AI Model Collapse.</p><p>In the research paper it was demonstrated that training on samples from another generative model can induce a distribution shift, which&#8212;over time&#8212;causes model collapse. This in turn causes the model to misinterpret the underlying learning task.</p><h4>The Solution, if there is any?</h4><p>The &#8220;first mover advantage&#8221; is evident in training models like Large Language Models (LLMs). However, to sustain learning over time, AI vendors must ensure:</p><ul><li><p><strong>Preserved access</strong> to original data sources</p></li><li><p><strong>Continuous availability</strong> of new, human-generated data</p></li><li><p><strong>Community-Wide Coordination: </strong>different parties involved in LLM creation and deployment must share information to resolve provenance questions. Without this coordination, training newer LLM versions may become increasingly difficult due to:</p><ul><li><p>Limited access to pre-mass adoption internet-crawled data</p></li><li><p>Insufficient direct access to human-generated data at scale</p></li></ul></li></ul><p>A key challenge arises in distinguishing between LLM-generated data and other data. This raises questions about the <strong>provenance</strong> of internet-crawled content. Tracking LLM-generated content at scale is a significant concern.</p><h4>References</h4><ol><li><p><a href="https://x.com/LuizaJarovsky/status/1825846257668989003">Luiza Jarvosky post on X</a></p></li><li><p><a href="https://youtu.be/jJOF2gX3nw4?si=UB9hjMs3FAjnXz8v">Aparna Ramani, VP of Engineering at Meta, responsible for AI infrastructure, Data Infrastructure and Developer Infrastructure, gives the opening keynote presentation at AI Infra @Scale 2024</a>.</p></li></ol>]]></content:encoded></item><item><title><![CDATA[Helidon with Swagger]]></title><description><![CDATA[Swagger UI is a great resource to generate and show docs for (java based) APIs.]]></description><link>https://www.techinpieces.com/p/helidon-with-swagger</link><guid isPermaLink="false">https://www.techinpieces.com/p/helidon-with-swagger</guid><dc:creator><![CDATA[Suren]]></dc:creator><pubDate>Mon, 11 Oct 2021 00:34:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!_fSB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_fSB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_fSB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png 424w, https://substackcdn.com/image/fetch/$s_!_fSB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png 848w, https://substackcdn.com/image/fetch/$s_!_fSB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png 1272w, https://substackcdn.com/image/fetch/$s_!_fSB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_fSB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png" width="560" height="315" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:315,&quot;width&quot;:560,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Helidon with Swagger&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Helidon with Swagger" title="Helidon with Swagger" srcset="https://substackcdn.com/image/fetch/$s_!_fSB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png 424w, https://substackcdn.com/image/fetch/$s_!_fSB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png 848w, https://substackcdn.com/image/fetch/$s_!_fSB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png 1272w, https://substackcdn.com/image/fetch/$s_!_fSB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F531aaf17-7a9d-4530-aeba-24d04ab91c0b_560x315.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Swagger UI is a great resource to generate and show docs for (java based) APIs. While adding a Swagger UI to a maven based project should be straight forward, adding a few annotations to your class and some dependencies to your pom.xml. It turned out there are a few steps involved for Helidon built projects. This article presents those details.</p><h4>TL;DR</h4><p>This article discusses the how-to&#8217;s of setting up Swagger UI to a project built with Helidon MP . A working example is on Github.</p><h3>Why this post?</h3><p>It took a while for me to setup Swagger UI to my API-only project built with Helidon MP. Wanted to share this article to my fellow developers, to save time.</p><h3>Getting started</h3><h4>Building from scratch</h4><p>If you already have an existing project, skip steps 1 and 2</p><p>1.Create a new project using Helidon MP&#8217;s archetype</p><pre><code><code>mvn -U archetype:generate 
    -DinteractiveMode=false
    -DarchetypeGroupId=io.helidon.archetypes
    -DarchetypeArtifactId=helidon-quickstart-mp
    -DarchetypeVersion=2.3.4
    -DgroupId=io.helidon.examples
    -DartifactId=helidon-quickstart-mp
    -Dpackage=io.helidon.examples.quickstart.mp</code></code></pre><p>2.Build and Run the default project</p><pre><code><code>mvn package
java -jar ./target/helidon-quickstart-mp.jar</code></code></pre><p>3.Add these dependencies to pom.xml</p><pre><code><code>&lt;!-- https://mvnrepository.com/artifact/org.eclipse.microprofile.openapi/microprofile-openapi-api --&gt;
&lt;dependency&gt;
   &lt;groupId&gt;org.eclipse.microprofile.openapi&lt;/groupId&gt;
   &lt;artifactId&gt;microprofile-openapi-api&lt;/artifactId&gt;
   &lt;version&gt;1.2&lt;/version&gt;
&lt;/dependency&gt;
&lt;!-- https://mvnrepository.com/artifact/io.helidon.microprofile.openapi/helidon-microprofile-openapi --&gt;
&lt;!-- NOTE: I built the project using Helidon MP 2.3.4, pleaase us the version per your project --&gt;
&lt;dependency&gt;
   &lt;groupId&gt;io.helidon.microprofile.openapi&lt;/groupId&gt;
   &lt;artifactId&gt;helidon-microprofile-openapi&lt;/artifactId&gt;
   &lt;version&gt;2.3.4&lt;/version&gt;
&lt;/dependency&gt;
&lt;!-- https://mvnrepository.com/artifact/org.microprofile-ext.openapi-ext/openapi-ui --&gt;
&lt;dependency&gt;
   &lt;groupId&gt;org.microprofile-ext.openapi-ext&lt;/groupId&gt;
   &lt;artifactId&gt;openapi-ui&lt;/artifactId&gt;
   &lt;version&gt;1.1.5&lt;/version&gt;
&lt;/dependency&gt;</code></code></pre><p>4. Build and Run the project again</p><pre><code><code>mvn package
java -jar ./target/helidon-quickstart-mp.jar</code></code></pre><p>5. In your browser, use the url &#8220;openapi-ui&#8221; . By default it would be like http://localhost:9393/your-project/openapi-ui</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9ZLB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9ZLB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png 424w, https://substackcdn.com/image/fetch/$s_!9ZLB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png 848w, https://substackcdn.com/image/fetch/$s_!9ZLB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png 1272w, https://substackcdn.com/image/fetch/$s_!9ZLB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9ZLB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png" width="1170" height="840" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:840,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!9ZLB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png 424w, https://substackcdn.com/image/fetch/$s_!9ZLB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png 848w, https://substackcdn.com/image/fetch/$s_!9ZLB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png 1272w, https://substackcdn.com/image/fetch/$s_!9ZLB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8902fca-85aa-4d4d-aa3f-cf85b6d5b2a4_1170x840.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Screenshot of Swagger-UI (like) when added to a Helidon MP built project - Suren K</em></p><p>That&#8217;s it.</p><h3>Adding docs to your APIs</h3><p>We need to add the required Annotations for docs to be generated. Example below (in the file)</p><pre><code><code>@Path("/greeting")
@PUT
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@RequestBody(name = "greeting",
   required = true,
   content = @Content(mediaType = "application/json",
   schema = @Schema(type = SchemaType.STRING, example = "{\"greeting\" : \"Hola\"}")))
@APIResponses({
   @APIResponse(name = "normal", responseCode = "204", description = "Greeting updated"),
   @APIResponse(name = "missing 'greeting'", responseCode = "400",
      description = "JSON did not contain setting for 'greeting'")})
 public Response updateGreeting(JsonObject jsonObject) { ... }</code></code></pre><h3>Background</h3><p>You may have observed, we did not use Swagger-ui dependency but instead used Open-API. We can add MicroProfile OpenAPI annotations to Helidon MP built project, and Helidon will automatically generate the OpenAPI document for you and provide an endpoint where clients can retrieve it.</p><p>For more details, you may go here</p><ul><li><p>Helidon supports OpenAPI and</p></li><li><p>Swagger also supports OpenAPI Specifications and</p></li><li><p>https://github.com/microprofile-extensions/openapi-ext/tree/main/openapi-ui and</p></li><li><p>https://github.com/oracle/helidon/tree/master/examples/openapi</p></li></ul><h3>Resources</h3><ul><li><p>Working example on Github - https://github.com/ksurendra/helidon-mp-swagger</p></li><li><p>Helidon resources https://github.com/oracle/helidon</p></li><li><p>Swagger resources https://swagger.io/docs/</p></li></ul>]]></content:encoded></item></channel></rss>