<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Manoj Aggarwal</title>
    <description>The latest articles on DEV Community by Manoj Aggarwal (@manoj6543).</description>
    <link>https://dev.to/manoj6543</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3665780%2Fee3dfc42-16cf-4b53-8a2a-547fd949b464.png</url>
      <title>DEV Community: Manoj Aggarwal</title>
      <link>https://dev.to/manoj6543</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manoj6543"/>
    <language>en</language>
    <item>
      <title>Agentic AI in Payments Is Exciting. It’s Also a Minefield.</title>
      <dc:creator>Manoj Aggarwal</dc:creator>
      <pubDate>Sun, 08 Mar 2026 00:09:05 +0000</pubDate>
      <link>https://dev.to/manoj6543/agentic-ai-in-payments-is-exciting-its-also-a-minefield-3hk</link>
      <guid>https://dev.to/manoj6543/agentic-ai-in-payments-is-exciting-its-also-a-minefield-3hk</guid>
      <description>&lt;p&gt;We're on the verge of AI that doesn't just advise on payments — it &lt;em&gt;executes&lt;/em&gt; them. Book the flight, split the bill, pay the invoice, trigger the refund. All autonomously, on your behalf.&lt;/p&gt;

&lt;p&gt;That's genuinely powerful. It's also terrifying if you think about it for more than five seconds.&lt;/p&gt;

&lt;p&gt;The moment an AI agent has real financial authority, you've introduced a new attack surface for fraud, a new compliance headache for PCI-DSS, and a new category of failure where the system doesn't hallucinate text — it hallucinates a &lt;em&gt;transaction&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A few things I kept coming back to while thinking through this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Latency vs. safety is a real tradeoff.&lt;/strong&gt; Payments are optimized for speed. Fraud checks, human-in-the-loop review, and agent sandboxing all add friction. Where do you draw the line before the UX collapses?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Autonomous doesn't mean unaccountable.&lt;/strong&gt; If an AI agent executes a payment incorrectly, who owns it? The user who granted permissions? The company that deployed the agent? The model provider? This isn't solved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Constrained agents are underrated.&lt;/strong&gt; The instinct is to give agents as much autonomy as possible. But scoped permissions — agents that can &lt;em&gt;only&lt;/em&gt; act within explicit guardrails — are probably the right default for high-stakes financial actions. Boring, but correct.&lt;/p&gt;

&lt;p&gt;I wrote up the full breakdown on HackerNoon, covering fraud detection architecture, compliance risk, decision boundaries, and what "human-in-the-loop" actually needs to look like for this to work in production.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://hackernoon.com/agentic-ai-in-payments-balancing-autonomy-and-risk" rel="noopener noreferrer"&gt;Read the full article on HackerNoon&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Curious whether others building in this space are leaning into full autonomy or keeping agents on a shorter leash — and why.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>fintech</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>The Advertising Model is Coming for AI Agents (And It's Worse Than You Think)</title>
      <dc:creator>Manoj Aggarwal</dc:creator>
      <pubDate>Mon, 02 Mar 2026 05:32:06 +0000</pubDate>
      <link>https://dev.to/manoj6543/the-advertising-model-is-coming-for-ai-agents-and-its-worse-than-you-think-fe3</link>
      <guid>https://dev.to/manoj6543/the-advertising-model-is-coming-for-ai-agents-and-its-worse-than-you-think-fe3</guid>
      <description>&lt;p&gt;We already know how the advertising model corrupted social media. Now it's heading for AI agents — and the mechanics make it potentially worse.&lt;/p&gt;

&lt;p&gt;When an agent books your flight, recommends a tool, or summarizes your options, how will you know if that answer was shaped by a sponsored result? Unlike a clearly labeled Google ad, the influence could be baked directly into the model's training data or RAG pipeline — invisible to the user.&lt;/p&gt;

&lt;p&gt;I wrote about where this is already happening (Perplexity's sponsored answers), how affiliate-style incentives could quietly distort agent recommendations, and what "hyper-personalized" ad targeting looks like when the agent knows everything about you.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://hackernoon.com/the-advertising-model-is-coming-for-ai-agents-and-its-worse-than-you-think" rel="noopener noreferrer"&gt;Read the full article on HackerNoon&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Curious if others are thinking about this — especially those building agents that make recommendations or take actions on behalf of users.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Would I Use LLMs to Build Dynamic Product Ads Today? Maybe</title>
      <dc:creator>Manoj Aggarwal</dc:creator>
      <pubDate>Mon, 09 Feb 2026 21:16:09 +0000</pubDate>
      <link>https://dev.to/manoj6543/would-i-use-llms-to-build-dynamic-product-ads-today-maybe-2dmk</link>
      <guid>https://dev.to/manoj6543/would-i-use-llms-to-build-dynamic-product-ads-today-maybe-2dmk</guid>
      <description>&lt;p&gt;I led Dynamic Product Ads at Twitter, where we matched millions of users to hundreds of millions of e-commerce products in real time. The output was the top 5-6 products that each user was most likely to buy. The system used product and user embeddings with classic ML models to serve personalized ads at Twitter's scale. We saw 15-18% improvements in CTR and 12% improvements in conversion rates compared to brand advertisements.&lt;/p&gt;

&lt;p&gt;This was a few years ago. But now, everyone is talking about AI and Large Language Models as if they will revolutionize everything. So, I was reflecting on if I would build the Dynamic Product Ads today, would I use LLMs? And more importantly, what would not change at all, and why?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The answer: I'd use LLMs for about 20% of the system, specifically for generating embeddings, and keep everything else the same.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Our Original Approach
&lt;/h2&gt;

&lt;p&gt;The problem at hand: recommend products to a user that they are most likely to click and buy, while they are quickly scrolling their timeline. There were millions of products to choose from and advertisers. On top of that, there were millions of users scrolling at the same time. The system had to make predictions for millions of users within sub-millisecond latency. The Ad Serving pipeline would need to complete the prediction in under 50 milliseconds, at a maximum. The approach was very textbook (for 2022 at least).&lt;/p&gt;

&lt;h3&gt;
  
  
  Product Embeddings
&lt;/h3&gt;

&lt;p&gt;We used each product's metadata, like title, description, category, price, etc., and encoded it in a 128-dimensional dense vector space. We also utilized signals like user engagement with this product or conversion patterns to calculate embeddings.&lt;/p&gt;

&lt;h3&gt;
  
  
  User Embeddings
&lt;/h3&gt;

&lt;p&gt;Users were represented by vectors based on signals like their engagement on the platform, profile information, and past purchases. Even geographies and the time of day played a key role here.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Matching Model
&lt;/h3&gt;

&lt;p&gt;At inference time, we would use a two-stage approach. First, we would run a fast approximate nearest neighbor search to retrieve candidate products whose embeddings were close to user embeddings. Then, we would use a gradient boosted decision tree to score those candidates, incorporating additional features like recency, price signals, and context like time of day.&lt;/p&gt;

&lt;p&gt;This approach worked. The model and ANN (approximate nearest neighbor) were explainable, debuggable, and most importantly, fast enough for Twitter's scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I'd Approach This Today?
&lt;/h2&gt;

&lt;p&gt;It's 2026 now. If I were building this system today, here's what I'd actually change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Better Product Embeddings with LLM Encoders
&lt;/h3&gt;

&lt;p&gt;The biggest improvement would be in generating better product embeddings. Modern Large Language Models are remarkably good at understanding semantic meaning and context. Instead of stitching together product descriptions (most of which were pretty bad to begin with), I'd use an LLM-based encoder to generate product embeddings.&lt;/p&gt;

&lt;p&gt;This matters because a product titled "running shoes" would be semantically close to "sneakers for jogging", even though they don't share the exact words. Modern sentence transformers from Hugging Face, like all-MiniLM-L6-v2 handle this effortlessly.&lt;/p&gt;

&lt;p&gt;We once had a Nike product catalog entry titled 'Air Max 270 React' that our 2022 embeddings couldn't match to users searching for 'cushioned running shoes' or 'athletic sneakers' because there was no keyword overlap. The product got 35-40% fewer impressions than similar items in its first week until we collected enough engagement data. An LLM-based encoder would have understood the semantic relationship immediately.&lt;/p&gt;

&lt;h3&gt;
  
  
  Improved Cold-Start Handling
&lt;/h3&gt;

&lt;p&gt;LLMs would also make the cold-start handling a bit better. When a new product appears in a catalog, LLM can extract rich signals from product descriptions, reviews, and images to generate a reasonable initial embedding. Similarly, for new users with sparse engagement history, modern encoders can better understand their profile information and initial tweets (if they have any) to create meaningful representations. Cold start was always our weakest point in classic embeddings-based user-product matching solutions.&lt;/p&gt;

&lt;p&gt;So, where would LLMs fit into the actual architecture?&lt;/p&gt;

&lt;h3&gt;
  
  
  Hybrid Approach
&lt;/h3&gt;

&lt;p&gt;I would still use classic ML for actual storing and serving layers. The architecture would look like:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;LLM or Classic&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;LLM-based encoder to generate user and product embeddings&lt;/td&gt;
&lt;td&gt;LLM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Match embeddings to generate candidate products per user&lt;/td&gt;
&lt;td&gt;Classic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Final scoring and ranking&lt;/td&gt;
&lt;td&gt;Classic&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Why would I use classic models for scoring? The reasons are latency, cost, and explainability.&lt;/p&gt;

&lt;p&gt;LLMs cannot predict products for millions of users in under 10 milliseconds. They are an overkill for combining numerical features and making a ranking decision. Classic models would do this in microseconds. At Twitter's scale, the difference between 1ms and 10ms inference time translates to millions of dollars in infrastructure costs and measurable drops in user engagement.&lt;/p&gt;

&lt;p&gt;Cost matters more than people admit. Running LLM inference for every prediction request would cost 50-100x more than our classic approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  What About Generating Ad Copy?
&lt;/h2&gt;

&lt;p&gt;There is a lot of hype on the internet about using LLMs to generate personalized ad copy on the fly or to reason about user intent in real time. This is where it gets hard to decide if LLMs would actually be useful or not.&lt;/p&gt;

&lt;p&gt;Generating ad copy with LLMs introduces unacceptable risks like hallucinations about product features, inconsistent branding, and hard-to-review content at this scale. The system would need to show millions of ad variations per day, and there would be no way to review them for accuracy and brand safety. One hallucinated claim about a product like "waterproof" when it's not, or "FDA-approved" when it isn't, would create legal liability. The risk doesn't justify the marginal lift in engagement.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does Not Change?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Understanding user intent is still the hardest part.&lt;/strong&gt; Whether the system uses embeddings from 2022 or LLMs from 2026, the fundamental challenge remains the same: inferring what someone wants from noisy signals. Someone who tweets about running shoes might be a marathon runner shopping for their next pair, or a casual observer who just watched a race on television. This problem needs good data to solve, thoughtful feature engineering, and lots of experimentation. No model architecture solves this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Latency requirements are non-negotiable.&lt;/strong&gt; At scale, every millisecond counts. Users would abandon experiences that feel slow. Ad systems cannot slow down the loading of the timeline. I have seen several ML infrastructure systems crumble in A/B tests because they added 100ms of latency to a well-oiled system. The model could be better, but the latency requirement trumps all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Last-mile problems remain the same.&lt;/strong&gt; Issues like cold start for new products or users, and data quality issues when catalogs have missing or incorrect product descriptions, are still there. These problems are orthogonal to the model architecture and require system design thinking, and not model architecture building.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Iteration speed beats model sophistication.&lt;/strong&gt; A team that can run 10 experiments per week with a simpler model will constantly outperform a team running 1 experiment per week with a very sophisticated model. The ability to test quickly, measure results, and iterate is more valuable than marginal improvements in model quality. When we launched Dynamic Product Ads, we ran 3-4 experiments per week. We tested different embedding dimensions, different ANN algorithms, and different features in the scoring model. Most experiments failed. But the ones that worked compounded. That velocity mattered more than picking the "perfect" model architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Question is: Where Is The Bottleneck?
&lt;/h2&gt;

&lt;p&gt;To be honest, most of the "how would you build it today with modern AI" discussion misses the point. The question should not be what is possible with the new technology. It should be, "What is the actual bottleneck in your system where AI can help?"&lt;/p&gt;

&lt;p&gt;For us, the bottleneck was never about the quality of the embeddings. It was about understanding user intent, handling data quality issues in the product catalogs, and managing cold-start problems, as well as building systems that could handle scale. Modern AI genuinely helps with some of these, and there is real value in using AI. However, the fundamental system challenges don't change.&lt;/p&gt;

&lt;p&gt;If I were building this system today, I'd spend 20% of my effort on "using LLM to generate better embeddings" and 80% on the same problems of scale, data quality, experimentation, and understanding user intent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Unpopular Opinion
&lt;/h2&gt;

&lt;p&gt;The tech industry loves revolutionizing narratives. There was similar hype around blockchain and Web3 a few years ago. But the truth is, most production ML systems work, scale, and make money. The revolutionary approach of using LLM would make 5% improvement, but would be 10x slower and 100x more expensive. Modern AI is genuinely valuable when applied thoughtfully to bottlenecks, not as a replacement for the entire system that already works.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
      <category>architecture</category>
    </item>
    <item>
      <title>AI and my workflow</title>
      <dc:creator>Manoj Aggarwal</dc:creator>
      <pubDate>Tue, 20 Jan 2026 18:52:35 +0000</pubDate>
      <link>https://dev.to/manoj6543/ai-and-my-workflow-2gej</link>
      <guid>https://dev.to/manoj6543/ai-and-my-workflow-2gej</guid>
      <description>&lt;p&gt;I used to spend weeks writing technical design documents. But last month, I had one ready within a day. The difference was not that I got faster, but that my approach to document writing changed.&lt;/p&gt;

&lt;p&gt;After spending a decade building software for users and enterprises, this year felt different. Not because the problems changed, but because how I approached them did.&lt;/p&gt;

&lt;p&gt;AI tools quietly integrated themselves into my workflow and now everything has shifted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Document Writing and Reviewing
&lt;/h2&gt;

&lt;p&gt;As an engineering leader, my job requires me to write and review technical and product documentation, ranging from proof-of-concept proposals to full-fledged design documents containing structured API design, system diagrams and storage layouts. Until last year, writing a solid technical design document would take me weeks. Most of the time went into structuring the document so that reviewers can quickly grasp my proposed solution, critique it and approve.&lt;/p&gt;

&lt;p&gt;That changed this year.&lt;/p&gt;

&lt;p&gt;Now, I start by prompting what is this document for?&lt;/p&gt;

&lt;p&gt;Is it a system design proposal for a feature or an entirely new system?&lt;/p&gt;

&lt;p&gt;What problem is this system solving?&lt;/p&gt;

&lt;p&gt;And does AI need to refer to existing documents like product requirements?&lt;/p&gt;

&lt;p&gt;Within seconds, I have a well-structured first draft. Recently, for a proof-of-concept proposal, it generated placeholder content with sections like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Overview&lt;/li&gt;
&lt;li&gt;Proposed System Design (with a blank Lucidchart link)&lt;/li&gt;
&lt;li&gt;Logic and Value proposition&lt;/li&gt;
&lt;li&gt;Screenshots&lt;/li&gt;
&lt;li&gt;Success Criteria&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At that point, all I had to do was fill in the blanks. More than half the mechanical work was done.&lt;/p&gt;

&lt;p&gt;What AI didn't do was tell me whether this was the right system to build. It didn't challenge me about the scale or dependencies. That judgement still required me.&lt;/p&gt;

&lt;p&gt;Document reviewing became easier too. Instead of reading through entire Product requirement documents end to end, I ask Gemini to summarize it and answer targeted questions like "Who is the audience for this feature?". It answers using the document as the source of truth in natural language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing and reviewing code
&lt;/h2&gt;

&lt;p&gt;Writing unit tests was never fun and will never be. But they are essential! What differentiates a good software engineer isn't just writing code, but thinking through edge cases and proving that those cases are handled through thorough testing.&lt;/p&gt;

&lt;p&gt;Until recently, writing unit or integration tests would be a time-consuming manual process. Boilerplate code to initialize mocks, setup factories and fetching test data had to be manually written. That workflow has changed.&lt;/p&gt;

&lt;p&gt;After writing a new controller for a .NET API, along with its business logic, CRUD layer and mongo repository, I prompt Copilot to generate unit tests. In seconds, it produces *Tests.cs file for each new file I have written with unit tests covering most happy paths and several common error cases.&lt;/p&gt;

&lt;p&gt;Most, but not all.&lt;/p&gt;

&lt;p&gt;Here's where it gets interesting: Copilot generated tests for a POST api that looked perfect. They had proper assertions, clean setup methods and good naming conventions, and they all passed. But they were all useless. The business logic behind the api was writing to three different collections in a mongo database in a single transaction. The tests checked that calling the api would write to the database, not that the write happened transactionally such that one failure would fail the entire transaction. The tests tested the happy path but not other meaningful scenarios.&lt;/p&gt;

&lt;p&gt;It is still my responsibility to identify the true corner cases, ones that require product context. And when I give Copilot additional prompts about the new cases to test, it fills in the remaining tests quickly and accurately. I still have to think about some of these scenarios, but the execution does not have to be done by me.&lt;/p&gt;

&lt;p&gt;Code review has also become more focused. Rather than spending time on mechanical issues like missing error handling or unsafe type casts, automated workflows send the entire diff to models like Claude, Gemini or OpenAI to generate a first pass of comments on Github.&lt;/p&gt;

&lt;p&gt;My role is to ensure those comments are resolved correctly, the business logic makes sense and the system isn't regressing in subtle ways. That authority to approve a pull request still lies with me, given I have the product context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Research
&lt;/h2&gt;

&lt;p&gt;Understanding unfamiliar codebase is never easy. Every team has its own conventions for structuring code, managing configurations and handling service-to-service communication. Yet this understanding is crucial when designing a new feature, especially when it needs to integrate with existing systems.&lt;/p&gt;

&lt;p&gt;Previously, I would spend hours using tools like Sourcegraph or GitHub code search to build a mental model of how a system worked. Tracing how service A interacted with service B took effort and manually reading through large portions of code.&lt;/p&gt;

&lt;p&gt;Not anymore.&lt;/p&gt;

&lt;p&gt;Now, I clone each repository, open them in VSCode and ask targeted questions to Copilot. For example:&lt;/p&gt;

&lt;p&gt;Does this service emit events to the kafka topic XYZ?&lt;br&gt;
If not, list all the topics that this service emits to.&lt;/p&gt;

&lt;p&gt;Using Claude Sonnet 4.5 in Copilot's Agent mode, it scans through the relevant source files and responds in natural language within a minute. No more scratching my head, understanding code archaeology. I get a clear, high level understanding almost immediately.&lt;/p&gt;

&lt;p&gt;This is where AI delivers disproportionate value. Not in writing code, but in reading it and understanding it quickly enough that I can make architectural decisions fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Changed
&lt;/h2&gt;

&lt;p&gt;Over the past year, my role quietly shifted. I spend more time deciding what to build and less time actually building.&lt;/p&gt;

&lt;p&gt;AI gave me confidence, not just raw productivity. I can now explore unfamiliar codebases faster and validate ideas off ChatGPT without second guessing myself.&lt;/p&gt;

&lt;p&gt;What AI has not changed is accountability. Every line of code I ship, every pull request I approve, and every design document I author, still carries my name. If something breaks, that responsibility is mine, not ChatGPT's or Claude's or Gemini's. The trap is that it is easier than ever to ship something that might look real, but is fundamentally wrong.&lt;/p&gt;

&lt;p&gt;The engineers who thrive in 2026 won't be those who use AI the most, but those who know what to ask for and what to verify. Those who understand that AI doesn't replace judgement, it amplifies it, both good or bad.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>documentation</category>
      <category>productivity</category>
      <category>writing</category>
    </item>
  </channel>
</rss>
