<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>RajaCSP</title><link href="https://blogs.rajacsp.com/" rel="alternate"/><link href="https://blogs.rajacsp.com/feeds/all.atom.xml" rel="self"/><id>https://blogs.rajacsp.com/</id><updated>2026-12-09T00:00:00-04:00</updated><entry><title>What We Can Learn from IE: Ilaiyaraaja and Elon</title><link href="https://blogs.rajacsp.com/what-we-can-learn-from-ie.html" rel="alternate"/><published>2026-12-09T00:00:00-04:00</published><updated>2026-12-09T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-12-09:/what-we-can-learn-from-ie.html</id><summary type="html">&lt;p&gt;&lt;img alt="1796527822457" src="image/2026-12-09-what-we-can-learn-from-ie/1796527822457-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;One grew up in Pannaipuram, a small village in Theni district. He often walked long distances to his music lessons because he could not afford the bus fare. The other grew up in Pretoria, read through the night and taught himself to code before he was a teenager. One shaped …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1796527822457" src="image/2026-12-09-what-we-can-learn-from-ie/1796527822457-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;One grew up in Pannaipuram, a small village in Theni district. He often walked long distances to his music lessons because he could not afford the bus fare. The other grew up in Pretoria, read through the night and taught himself to code before he was a teenager. One shaped the sound of Tamil cinema for half a century. The other is trying to make humans a multi-planet species.&lt;/p&gt;
&lt;p&gt;Ilaiyaraaja and Elon Musk, or IE, could not look more different. They come from different worlds, crafts and generations. But put their lives side by side and the same engine is running underneath: a refusal to stay small.&lt;/p&gt;
&lt;p&gt;This is not about worshipping heroes. It is about borrowing their habits. Here are ten lessons, five from each, that you can start using on Monday morning.&lt;/p&gt;
&lt;h2&gt;The Maestro: Lessons from Ilaiyaraaja&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Learn Constantly&lt;/strong&gt;
Ilaiyaraaja arrived in Madras with village folk songs and almost nothing else. He studied under Dhanraj Master, whose tiny room was filled with Bach, Mozart and Beethoven, and he taught other students to pay for his lessons, sometimes on an empty stomach. Later he earned a gold medal in classical guitar from Trinity College of Music, London, through distance learning. There were no shortcuts. He kept showing up every day until the knowledge was his.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Never Stop Learning&lt;/strong&gt;
Most people slow down at 80. In 2024, Ilaiyaraaja wrote a four-movement symphony in about a month. In March 2025, at 81, he premiered Symphony No. 1, Valiant, at the Eventim Apollo in London, and then called it just the beginning. Learning is not one stage of life. It is a way of living.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Experiment&lt;/strong&gt;
He composed Thiruvasagam as an oratorio. He released albums like How to Name It?, a conversation between Tyagaraja and Bach. Not every experiment works. But if you never experiment, you will only ever repeat yourself.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Break the Rules&lt;/strong&gt;
Tamil film music in the 1970s followed set formulas. Ilaiyaraaja brought in Western orchestration, unusual chord movements and background scores that could carry a story on their own. He did not ask for permission. He made the work so good that the rules had to change.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mixed Strategies&lt;/strong&gt;
Village folk, Carnatic ragas and Western counterpoint can all appear in one song, sometimes within a single minute. He never picked one tradition over the others. He made them work together. The lesson: your edge often lies in the combination, not in a single skill.&lt;/p&gt;
&lt;h2&gt;The Builder: Lessons from Elon&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Think from First Principles&lt;/strong&gt;
When batteries seemed too expensive, Elon asked what a battery is actually made of and what those materials cost. When rockets cost too much, he asked the same question. Don't accept "that's how it's done." Break the problem down to what is true and build up from there.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Set Audacious Missions&lt;/strong&gt;
Make life multi-planetary. Speed up the world's move to sustainable energy. These goals sound impossible, and that is the point. A big enough mission attracts people who want to do the best work of their lives.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Own the Whole Stack&lt;/strong&gt;
SpaceX builds most of its key rocket parts in-house. When you control the important pieces, you control your speed, your cost and your quality. Rely on others for what is not essential, and own what is.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Move Fast and Iterate in Public&lt;/strong&gt;
Starship prototypes exploded on live streams, and the team kept building. Each failure became data for the next attempt. Learning fast beats planning perfectly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bet on Yourself and Keep Going&lt;/strong&gt;
In 2008, the first three Falcon 1 launches had failed and Tesla was close to running out of money. Elon put nearly everything he had into both companies. The fourth launch reached orbit that September, and weeks later NASA signed a major contract. When things are darkest, the people who stay are the ones who win.&lt;/p&gt;
&lt;h2&gt;Side by Side&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Theme&lt;/th&gt;
&lt;th&gt;Ilaiyaraaja&lt;/th&gt;
&lt;th&gt;Elon&lt;/th&gt;
&lt;th&gt;What It Means for You&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Foundation&lt;/td&gt;
&lt;td&gt;Mastered notation and folk roots&lt;/td&gt;
&lt;td&gt;Reasons from first principles&lt;/td&gt;
&lt;td&gt;Know the basics better than anyone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ambition&lt;/td&gt;
&lt;td&gt;A symphony in London at 81&lt;/td&gt;
&lt;td&gt;Mars and sustainable energy&lt;/td&gt;
&lt;td&gt;Pick a goal that scares you a little&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rules&lt;/td&gt;
&lt;td&gt;Rewrote film music formulas&lt;/td&gt;
&lt;td&gt;Questioned industry costs&lt;/td&gt;
&lt;td&gt;Ask "why" before "how"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Experiments&lt;/td&gt;
&lt;td&gt;Oratorio and fusion albums&lt;/td&gt;
&lt;td&gt;Rapid prototypes, public tests&lt;/td&gt;
&lt;td&gt;Treat failure as data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Combination&lt;/td&gt;
&lt;td&gt;Folk + Carnatic + Western&lt;/td&gt;
&lt;td&gt;Software + hardware + manufacturing&lt;/td&gt;
&lt;td&gt;Combine skills others keep separate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Endurance&lt;/td&gt;
&lt;td&gt;50 years and still composing&lt;/td&gt;
&lt;td&gt;Survived the 2008 near-collapse&lt;/td&gt;
&lt;td&gt;Stay long enough to win&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;The Common Thread&lt;/h2&gt;
&lt;p&gt;Take away the fame and the headlines, and IE share one quality: they treat themselves as unfinished.&lt;/p&gt;
&lt;p&gt;A village boy became the Maestro because he kept learning when he had every reason to stop. A restless kid from Pretoria built rockets because he refused to accept that the cost of reaching space was fixed forever. Neither started with privilege of skill. Both earned it, one note and one launch at a time.&lt;/p&gt;
&lt;p&gt;You don't need to write a symphony or launch a rocket. You need to learn something this week that you did not know last week. Try one experiment. Break one rule that no longer serves you. Combine two skills that nobody expects to see together. And when it gets hard, and it will, stay.&lt;/p&gt;
&lt;p&gt;Ilaiyaraaja was 81 when he stood on a London stage to premiere his first symphony. Elon was near ruin before his first rocket reached orbit. Their best moments came after their hardest ones.&lt;/p&gt;
&lt;p&gt;The music will come. The rocket will lift.&lt;/p&gt;
&lt;p&gt;Start today.&lt;/p&gt;</content><category term="Inspiration"/><category term="Ilaiyaraaja"/><category term="Elon Musk"/><category term="Learning"/><category term="Mindset"/><category term="Growth"/></entry><entry><title>Understanding KV Cache: Why Chatbots Can Reply So Fast</title><link href="https://blogs.rajacsp.com/understanding-kv-cache.html" rel="alternate"/><published>2026-12-08T00:00:00-04:00</published><updated>2026-12-08T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-12-08:/understanding-kv-cache.html</id><summary type="html">&lt;p&gt;&lt;img alt="1796526189717" src="image/2026-12-08-understanding-kv-cache/1796526189717-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;When you chat with an AI like ChatGPT or Claude, the reply shows up one word at a time. Have you ever wondered how it keeps up that speed, even after you've pasted in a long document?&lt;/p&gt;
&lt;p&gt;A big part of the answer is a simple trick called the KV …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1796526189717" src="image/2026-12-08-understanding-kv-cache/1796526189717-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;When you chat with an AI like ChatGPT or Claude, the reply shows up one word at a time. Have you ever wondered how it keeps up that speed, even after you've pasted in a long document?&lt;/p&gt;
&lt;p&gt;A big part of the answer is a simple trick called the KV Cache. Almost every modern chatbot uses it. It's also one of the main reasons AI needs so much GPU memory.&lt;/p&gt;
&lt;p&gt;This article explains what the KV Cache is, why it exists, and why engineers spend so much time working on it. You won't need any maths.&lt;/p&gt;
&lt;h2&gt;First, How Does a Chatbot Write?&lt;/h2&gt;
&lt;p&gt;A Large Language Model (LLM) doesn't write a whole sentence at once. It writes one small piece at a time, and that piece is called a token. A token is usually a word or part of a word.&lt;/p&gt;
&lt;p&gt;Here is what happens when you ask, "What is the capital of France?"&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;What the Model Sees&lt;/th&gt;
&lt;th&gt;What It Writes Next&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;What is the capital of France?&lt;/td&gt;
&lt;td&gt;The&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;What is the capital of France? The&lt;/td&gt;
&lt;td&gt;capital&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;What is the capital of France? The capital&lt;/td&gt;
&lt;td&gt;is&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;What is the capital of France? The capital is&lt;/td&gt;
&lt;td&gt;Paris&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Notice the pattern. At each step the model looks at everything so far and then adds one new token. This is called generating "one token at a time."&lt;/p&gt;
&lt;h2&gt;The Hidden Problem: Doing the Same Work Again and Again&lt;/h2&gt;
&lt;p&gt;To choose the next word, the model has to understand how all the earlier words relate to each other. This step is called Attention. It's how the model knows that "it" in a sentence refers to "the cat" and not "the table."&lt;/p&gt;
&lt;p&gt;For attention, the model makes three small notes for every token:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;th&gt;Simple Meaning&lt;/th&gt;
&lt;th&gt;Everyday Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Query (Q)&lt;/td&gt;
&lt;td&gt;"What am I looking for?"&lt;/td&gt;
&lt;td&gt;A question you ask in a library&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Key (K)&lt;/td&gt;
&lt;td&gt;"What do I contain?"&lt;/td&gt;
&lt;td&gt;The label on each book's spine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Value (V)&lt;/td&gt;
&lt;td&gt;"Here is my actual information."&lt;/td&gt;
&lt;td&gt;The content inside the book&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The new token uses its Query to check every earlier token's Key, finds the ones that matter, and then reads their Values.&lt;/p&gt;
&lt;p&gt;Here is the problem. Without any trick, the model recalculates the Keys and Values for ALL earlier tokens at every single step, even though those tokens never change.&lt;/p&gt;
&lt;p&gt;Imagine reading a book. Every time you turn a page, you go back and reread the whole book from page 1 before continuing. That is extremely slow, and it gets worse the longer the book is.&lt;/p&gt;
&lt;h2&gt;The Fix: Just Save Your Notes&lt;/h2&gt;
&lt;p&gt;The KV Cache fixes this with a very simple idea.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;KV Cache&lt;/strong&gt;
Once the model works out the Key and Value for a token, it saves them in memory. On the next step it reuses the saved notes and only calculates the Key and Value for the one new token.&lt;/p&gt;
&lt;p&gt;Back to the book example: instead of rereading the whole book, you keep sticky notes on what each page said. When you turn a page, you read only the new page and glance at your sticky notes for the rest.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Without KV Cache&lt;/th&gt;
&lt;th&gt;With KV Cache&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recalculates notes for every earlier token, every step&lt;/td&gt;
&lt;td&gt;Calculates notes only for the newest token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Work grows bigger and bigger with each new word&lt;/td&gt;
&lt;td&gt;Work per new word stays small&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slow for long replies&lt;/td&gt;
&lt;td&gt;Fast for long replies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uses less memory&lt;/td&gt;
&lt;td&gt;Uses more memory to store saved notes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;That last row is the catch. The KV Cache trades memory for speed.&lt;/p&gt;
&lt;h2&gt;Why Only K and V? Why Not Q?&lt;/h2&gt;
&lt;p&gt;Beginners often ask this, and it's a good question.&lt;/p&gt;
&lt;p&gt;The Query belongs to the token that is asking the question, which is always the newest token. Once that token has done its job, its Query is never needed again.&lt;/p&gt;
&lt;p&gt;Keys and Values are different. Every future token will need to check them, so they are worth saving.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;th&gt;Needed Again Later?&lt;/th&gt;
&lt;th&gt;Saved in Cache?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Query&lt;/td&gt;
&lt;td&gt;No, only the newest token uses it&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Key&lt;/td&gt;
&lt;td&gt;Yes, every future token checks it&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Value&lt;/td&gt;
&lt;td&gt;Yes, every future token reads it&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;The Two Phases of a Chat Reply&lt;/h2&gt;
&lt;p&gt;When you send a message, the model works in two phases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase 1: Prefill&lt;/strong&gt;
The model reads your whole prompt at once and builds the KV Cache for all of it. This is why there's sometimes a short pause before the first word appears, especially with long prompts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase 2: Decode&lt;/strong&gt;
The model writes the reply one token at a time. Each new token adds its own Key and Value to the cache, so the cache grows with every word.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;What Happens&lt;/th&gt;
&lt;th&gt;Speed Feeling&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Prefill&lt;/td&gt;
&lt;td&gt;Reads the full prompt and fills the cache&lt;/td&gt;
&lt;td&gt;The short wait before the first word&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decode&lt;/td&gt;
&lt;td&gt;Writes one token at a time and adds to the cache&lt;/td&gt;
&lt;td&gt;Words streaming onto the screen&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;The Price: KV Cache Gets Big, Fast&lt;/h2&gt;
&lt;p&gt;Saving notes is great for speed, but those notes take up space on the GPU. The cache gets bigger when there are:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What Grows&lt;/th&gt;
&lt;th&gt;Why the Cache Grows&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Longer conversations&lt;/td&gt;
&lt;td&gt;Every token needs its own saved notes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bigger models&lt;/td&gt;
&lt;td&gt;More layers means more notes per token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;More users at once&lt;/td&gt;
&lt;td&gt;Each user's chat has its own cache&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Here is a rough example for a 7-billion-parameter model like Llama 2 7B, using standard 16-bit numbers:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Conversation Length&lt;/th&gt;
&lt;th&gt;Approximate KV Cache Size&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1 token&lt;/td&gt;
&lt;td&gt;About 0.5 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1,000 tokens&lt;/td&gt;
&lt;td&gt;About 0.5 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4,000 tokens&lt;/td&gt;
&lt;td&gt;About 2 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;32,000 tokens&lt;/td&gt;
&lt;td&gt;About 16 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The model weights themselves are about 13 to 14 GB. With a long chat, the KV Cache can end up bigger than the model. Serve many users at once and memory runs out quickly.&lt;/p&gt;
&lt;p&gt;This is why "long context" is expensive, and why so many engineers focus on making the KV Cache smaller and smarter.&lt;/p&gt;
&lt;h2&gt;How Engineers Shrink the KV Cache&lt;/h2&gt;
&lt;p&gt;Here are the most common ideas, explained simply.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grouped-Query Attention (GQA)&lt;/strong&gt;
Instead of every attention "head" keeping its own set of notes, a group of heads shares one set. It's like a study group sharing one notebook instead of each person writing their own. Llama 3 8B uses this and needs about 4 times less KV memory per token than Llama 2 7B.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Multi-Query Attention (MQA)&lt;/strong&gt;
This is the extreme version of GQA: all heads share just one set of notes. It saves the most memory, though quality can drop a little.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;KV Cache Quantization&lt;/strong&gt;
The saved notes are stored with fewer digits, for example 8-bit or 4-bit numbers instead of 16-bit. It's like writing "approx. 3.14" instead of "3.14159265." It takes less space and is usually close enough.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PagedAttention&lt;/strong&gt;
This idea comes from the vLLM project. Instead of reserving one big block of memory for each chat, the cache is stored in small pages, like an operating system manages computer memory. Less space is wasted, so more users fit on one GPU.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prefix Caching&lt;/strong&gt;
Many chats start with the same long instructions, such as a system prompt. The model computes the cache for that shared part once and reuses it for everyone, like photocopying a common first page instead of handwriting it each time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sliding Window&lt;/strong&gt;
The model keeps saved notes for only the most recent tokens and drops the oldest ones. This saves memory, but the model may "forget" very early parts of a long chat.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technique&lt;/th&gt;
&lt;th&gt;Main Idea&lt;/th&gt;
&lt;th&gt;Saves Memory By&lt;/th&gt;
&lt;th&gt;Trade-off&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GQA&lt;/td&gt;
&lt;td&gt;Groups of heads share notes&lt;/td&gt;
&lt;td&gt;Fewer sets of K and V&lt;/td&gt;
&lt;td&gt;Very small quality impact&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MQA&lt;/td&gt;
&lt;td&gt;All heads share one set&lt;/td&gt;
&lt;td&gt;Far fewer K and V&lt;/td&gt;
&lt;td&gt;Some quality loss possible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quantization&lt;/td&gt;
&lt;td&gt;Store notes with fewer digits&lt;/td&gt;
&lt;td&gt;Smaller numbers&lt;/td&gt;
&lt;td&gt;Tiny accuracy loss&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PagedAttention&lt;/td&gt;
&lt;td&gt;Store cache in small pages&lt;/td&gt;
&lt;td&gt;Less wasted space&lt;/td&gt;
&lt;td&gt;More complex system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prefix Caching&lt;/td&gt;
&lt;td&gt;Reuse cache for shared starts&lt;/td&gt;
&lt;td&gt;No repeated work&lt;/td&gt;
&lt;td&gt;Only helps with shared prompts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sliding Window&lt;/td&gt;
&lt;td&gt;Keep only recent notes&lt;/td&gt;
&lt;td&gt;Dropping old tokens&lt;/td&gt;
&lt;td&gt;May forget early content&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Why This Matters to You&lt;/h2&gt;
&lt;p&gt;Even if you never build a model, the KV Cache explains many things you see every day:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What You Notice&lt;/th&gt;
&lt;th&gt;KV Cache Reason&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A pause before the first word with long prompts&lt;/td&gt;
&lt;td&gt;Prefill is building the cache&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Words stream out quickly after that&lt;/td&gt;
&lt;td&gt;Decode reuses saved notes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long-context models cost more&lt;/td&gt;
&lt;td&gt;A bigger cache needs more GPU memory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"Cached input" is cheaper on some AI APIs&lt;/td&gt;
&lt;td&gt;Prefix caching reuses saved work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Running big models locally runs out of memory&lt;/td&gt;
&lt;td&gt;The cache grows with chat length&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you run models on your own machine with tools like llama.cpp or Ollama, you'll see settings such as context size and KV cache type. Now you know what they control: how many notes are kept, and how tightly they are packed.&lt;/p&gt;
&lt;h2&gt;Key Takeaways&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;LLMs write one token at a time, and each new token looks back at all earlier ones.&lt;/li&gt;
&lt;li&gt;Attention uses three notes per token: Query, Key and Value.&lt;/li&gt;
&lt;li&gt;The KV Cache saves Keys and Values so they aren't recalculated at every step.&lt;/li&gt;
&lt;li&gt;This makes replies much faster but uses a lot of GPU memory.&lt;/li&gt;
&lt;li&gt;Techniques like GQA, quantization and PagedAttention keep the cache under control.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The KV Cache is a perfect example of a common idea in computing: remember what you've already worked out, so you don't have to do it again. It's a small trick, but it's one of the reasons modern AI chat feels instant.&lt;/p&gt;</content><category term="GenAI for Beginners"/><category term="KV Cache"/><category term="LLM Inference"/><category term="Transformers"/><category term="Attention"/><category term="Memory"/><category term="Beginners"/></entry><entry><title>ZipLoRA Explained Simply: How AI Can Draw Any Subject in Any Style</title><link href="https://blogs.rajacsp.com/ziplora-explained-simply.html" rel="alternate"/><published>2026-12-07T00:00:00-04:00</published><updated>2026-12-07T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-12-07:/ziplora-explained-simply.html</id><summary type="html">&lt;p&gt;&lt;img alt="1796525593820" src="image/2026-12-07-ziplora-explained-simply/1796525593820-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Imagine you have a photo of your pet dog and a painting you love, maybe a watercolour or a bright sticker-style drawing. You ask an AI image tool to draw your dog in that exact painting style.&lt;/p&gt;
&lt;p&gt;That sounds easy, but it's one of the trickier problems in AI image …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1796525593820" src="image/2026-12-07-ziplora-explained-simply/1796525593820-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Imagine you have a photo of your pet dog and a painting you love, maybe a watercolour or a bright sticker-style drawing. You ask an AI image tool to draw your dog in that exact painting style.&lt;/p&gt;
&lt;p&gt;That sounds easy, but it's one of the trickier problems in AI image generation. In late 2023, a team from Google Research and the University of Illinois (UIUC) published a simple, clever fix and called it ZipLoRA.&lt;/p&gt;
&lt;p&gt;This article explains what ZipLoRA is, why it was needed, and how it works, using plain words and everyday examples. You won't need any heavy maths.&lt;/p&gt;
&lt;h2&gt;First, A Few Basic Ideas&lt;/h2&gt;
&lt;p&gt;Before we get to ZipLoRA, here are a few building blocks.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Term&lt;/th&gt;
&lt;th&gt;What It Means&lt;/th&gt;
&lt;th&gt;Everyday Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Image Generation Model&lt;/td&gt;
&lt;td&gt;An AI that draws pictures from text&lt;/td&gt;
&lt;td&gt;You type "a cat on a sofa" and get a picture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SDXL&lt;/td&gt;
&lt;td&gt;Stable Diffusion XL, the open model used in this paper&lt;/td&gt;
&lt;td&gt;The "artist" doing the drawing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Personalization&lt;/td&gt;
&lt;td&gt;Teaching the AI about one specific thing using a few photos&lt;/td&gt;
&lt;td&gt;Teaching it what YOUR dog looks like&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LoRA&lt;/td&gt;
&lt;td&gt;A small add-on file that holds new knowledge without changing the main model&lt;/td&gt;
&lt;td&gt;A sticker on a laptop: the laptop stays the same, the sticker adds something personal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subject&lt;/td&gt;
&lt;td&gt;The WHAT in the picture&lt;/td&gt;
&lt;td&gt;Your dog, your teapot, your toy car&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Style&lt;/td&gt;
&lt;td&gt;The HOW of the picture&lt;/td&gt;
&lt;td&gt;Watercolour, oil painting, 3D cartoon, flat sticker art&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In this paper, the team trains one LoRA for the subject and a separate LoRA for the style.&lt;/p&gt;
&lt;h2&gt;The Problem: Two Add-ons Don't Mix Well&lt;/h2&gt;
&lt;p&gt;So now you have two small add-ons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A subject LoRA that knows your dog.&lt;/li&gt;
&lt;li&gt;A style LoRA that knows your favourite painting style.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The natural next step is to combine them. The simplest approach people tried was to add them together, like mixing two paints in a bowl. This is called a "direct merge."&lt;/p&gt;
&lt;p&gt;The results were often disappointing. Sometimes the dog looked right but the style disappeared. Other times the style was perfect but the dog looked like some other dog, not yours. People had to keep adjusting "how much of each" by trial and error for every new pair.&lt;/p&gt;
&lt;p&gt;Here is how the older approaches compare:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;How It Works&lt;/th&gt;
&lt;th&gt;Main Problem&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Direct Merge&lt;/td&gt;
&lt;td&gt;Add both LoRAs together&lt;/td&gt;
&lt;td&gt;Subject or style often gets lost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manual Weight Tuning&lt;/td&gt;
&lt;td&gt;Try different mix amounts by hand&lt;/td&gt;
&lt;td&gt;Slow, needs guesswork, works on some pairs and not others&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Joint Training&lt;/td&gt;
&lt;td&gt;Train subject and style together from scratch&lt;/td&gt;
&lt;td&gt;Takes a lot of time and memory, and you lose plug-and-play&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The ZipLoRA team asked a simple question: can we merge any subject LoRA with any style LoRA, quickly and reliably, without endless manual tweaking?&lt;/p&gt;
&lt;h2&gt;Two Simple Discoveries&lt;/h2&gt;
&lt;p&gt;The team looked closely inside these LoRA add-ons and noticed two things.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Discovery 1: Most of a LoRA Is Almost Empty&lt;/strong&gt;
Most of the numbers inside a LoRA are very close to zero. The team could switch off around 80 to 90 percent of the smallest values and the images still looked almost the same. Picture a big notebook where only a few pages have useful notes and the rest are nearly blank.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Discovery 2: Overlap Causes Fights&lt;/strong&gt;
A LoRA is made of many columns. Think of them as little knobs. When a knob in the subject LoRA points the same way as a knob in the style LoRA, adding them together causes a clash and one of them loses. Knobs that point in different directions work side by side without trouble. It's like two people talking about the same topic at the same time and interrupting each other, while two people in different corners of a room can both be heard clearly.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Discovery&lt;/th&gt;
&lt;th&gt;What They Found&lt;/th&gt;
&lt;th&gt;Why It Helps&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sparsity&lt;/td&gt;
&lt;td&gt;80 to 90 percent of LoRA values barely matter&lt;/td&gt;
&lt;td&gt;There's lots of free room to fit two LoRAs together&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Overlap&lt;/td&gt;
&lt;td&gt;Columns pointing the same way clash when added&lt;/td&gt;
&lt;td&gt;If we push them apart, both survive the merge&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;The ZipLoRA Idea: A Smart Volume Mixer&lt;/h2&gt;
&lt;p&gt;Using these two discoveries, the team built ZipLoRA.&lt;/p&gt;
&lt;p&gt;Instead of adding both LoRAs at one fixed amount, ZipLoRA gives every column (every knob) its own small volume control. One set of controls is for the subject and another set is for the style.&lt;/p&gt;
&lt;p&gt;Every volume control starts at 1, which is exactly the same as a direct merge. ZipLoRA then slowly learns how to adjust each knob so that three goals are met:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;th&gt;What ZipLoRA Checks&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Keep the Subject&lt;/td&gt;
&lt;td&gt;The merged model still draws your dog like the original subject LoRA did&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keep the Style&lt;/td&gt;
&lt;td&gt;The merged model still draws the style like the original style LoRA did&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stop the Fights&lt;/td&gt;
&lt;td&gt;Subject knobs and style knobs stop pointing the same way&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Think of a sound engineer in a music studio. If a singer and a guitarist are loud at the same frequency, the song sounds muddy. The engineer adjusts many small sliders so both can be heard clearly. ZipLoRA does that job for AI add-ons.&lt;/p&gt;
&lt;p&gt;The name fits, too. Like a zipper, ZipLoRA joins two sides neatly, tooth by tooth, without them crashing into each other.&lt;/p&gt;
&lt;h2&gt;Why It Is Fast and Light&lt;/h2&gt;
&lt;p&gt;ZipLoRA doesn't retrain the big model or the two LoRAs. All three stay frozen, and the only thing it learns is the small set of volume controls. That makes a big difference:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What We Measure&lt;/th&gt;
&lt;th&gt;ZipLoRA&lt;/th&gt;
&lt;th&gt;Other Methods&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Time on One GPU&lt;/td&gt;
&lt;td&gt;About 560 seconds (under 10 minutes)&lt;/td&gt;
&lt;td&gt;About 3,500 to 5,000 seconds (1 to 1.5 hours)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Values to Learn&lt;/td&gt;
&lt;td&gt;About 1.6 million&lt;/td&gt;
&lt;td&gt;About 180 million&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPU Memory Needed&lt;/td&gt;
&lt;td&gt;About 21 GB&lt;/td&gt;
&lt;td&gt;About 38 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Storage Size&lt;/td&gt;
&lt;td&gt;About 6.5 MB&lt;/td&gt;
&lt;td&gt;About 360 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Learning Steps&lt;/td&gt;
&lt;td&gt;100 at most&lt;/td&gt;
&lt;td&gt;Many more&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;That is more than 100 times fewer values to learn and roughly 6 to 9 times faster.&lt;/p&gt;
&lt;h2&gt;A Nice Surprise About Style&lt;/h2&gt;
&lt;p&gt;While doing this work, the team found that SDXL can learn a new art style from just ONE reference image. You don't need a big collection of paintings.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What You Need&lt;/th&gt;
&lt;th&gt;How Much&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Photos of Your Subject&lt;/td&gt;
&lt;td&gt;About 4 to 5 images&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Images of the Style&lt;/td&gt;
&lt;td&gt;Just 1 image&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This makes ZipLoRA much more practical for everyday use.&lt;/p&gt;
&lt;h2&gt;How Well Does It Work?&lt;/h2&gt;
&lt;p&gt;The team tested ZipLoRA in two ways.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Human Opinion&lt;/strong&gt;
They asked 45 people to compare images from ZipLoRA with images from other methods. Here is how often people preferred ZipLoRA:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Compared Against&lt;/th&gt;
&lt;th&gt;People Who Picked ZipLoRA&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Direct Merge&lt;/td&gt;
&lt;td&gt;82.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Joint Training&lt;/td&gt;
&lt;td&gt;71.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;StyleDrop + DreamBooth&lt;/td&gt;
&lt;td&gt;68.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mix-of-Show&lt;/td&gt;
&lt;td&gt;87.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom Diffusion&lt;/td&gt;
&lt;td&gt;88.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Computer Scores&lt;/strong&gt;
They also used automatic scoring tools to check three things. Higher is better.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What Is Checked&lt;/th&gt;
&lt;th&gt;ZipLoRA&lt;/th&gt;
&lt;th&gt;Best Other Method&lt;/th&gt;
&lt;th&gt;Winner&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Does the subject look right?&lt;/td&gt;
&lt;td&gt;0.420&lt;/td&gt;
&lt;td&gt;0.394&lt;/td&gt;
&lt;td&gt;ZipLoRA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Does the image match the text prompt?&lt;/td&gt;
&lt;td&gt;0.303&lt;/td&gt;
&lt;td&gt;0.296&lt;/td&gt;
&lt;td&gt;ZipLoRA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Does the style look right?&lt;/td&gt;
&lt;td&gt;0.699&lt;/td&gt;
&lt;td&gt;0.702&lt;/td&gt;
&lt;td&gt;About the same&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Extra Things ZipLoRA Can Do&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Put the Subject in New Scenes&lt;/strong&gt;
You can ask for "my dog riding a bicycle" or "my teapot on the beach" and keep both the subject and the style.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Control How Strong the Style Is&lt;/strong&gt;
A simple slider from 0 to 1 lets you choose anything from a light touch of style to a full makeover.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keep the Originals Working&lt;/strong&gt;
After merging, the model can still draw only the subject or only the style. Nothing is lost.&lt;/p&gt;
&lt;h2&gt;Where It Falls Short&lt;/h2&gt;
&lt;p&gt;No method is perfect, and the authors were honest about the limits.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Limitation&lt;/th&gt;
&lt;th&gt;What Happens&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Objects in Style Images&lt;/td&gt;
&lt;td&gt;If the style image has something like a cliff in it, the AI may treat the cliff as part of the style and add it to every picture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Only Two at a Time&lt;/td&gt;
&lt;td&gt;It merges one subject with one style. Mixing three or more is left for future work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Works Best on SDXL&lt;/td&gt;
&lt;td&gt;Results are weaker on the older Stable Diffusion 1.5, which isn't good at learning style from one image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scoring Tools Are Limited&lt;/td&gt;
&lt;td&gt;Automatic scores miss small artistic details, so human opinion still matters&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Why This Matters for GenAI Beginners&lt;/h2&gt;
&lt;p&gt;ZipLoRA teaches a lesson that goes beyond pictures. When you combine two pieces of AI knowledge, simply adding them can make them clash. A smarter way is to find where they overlap and gently separate them.&lt;/p&gt;
&lt;p&gt;People now use the same thinking when they merge add-ons for language models, not just image models. If you are starting your GenAI journey, ZipLoRA is a good example of how a small, clever idea can save hours of computing time and give better results.&lt;/p&gt;
&lt;p&gt;The key takeaway is that you don't always need a bigger model or more training. Sometimes you just need a better way to combine what you already have.&lt;/p&gt;
&lt;p&gt;Source: Shah et al., "ZipLoRA: Any Subject in Any Style by Effectively Merging LoRAs", arXiv:2311.13600 (Google Research and UIUC, 2023).&lt;/p&gt;
&lt;p&gt;Paper: &lt;a href="https://arxiv.org/pdf/2311.13600"&gt;https://arxiv.org/pdf/2311.13600&lt;/a&gt;&lt;/p&gt;</content><category term="GenAI for Beginners"/><category term="ZipLoRA"/><category term="LoRA"/><category term="Image Generation"/><category term="Stable Diffusion"/><category term="Personalization"/><category term="Beginners"/></entry><entry><title>Sliding Window Attention: How AI Models Read Long Text Without Running Out of Memory</title><link href="https://blogs.rajacsp.com/sliding-window-attention-for-beginners.html" rel="alternate"/><published>2026-12-06T00:00:00-04:00</published><updated>2026-12-06T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-12-06:/sliding-window-attention-for-beginners.html</id><summary type="html">&lt;p&gt;&lt;img alt="1796524014909" src="image/2026-12-06-sliding-window-attention-for-beginners/1796524014909-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;When you chat with an AI model like ChatGPT, Claude or Gemma, it feels like the model "remembers" everything you said. You paste a long document, ask a question about page 3, and it answers. But behind the scenes, remembering everything is expensive. The longer the text, the more work …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1796524014909" src="image/2026-12-06-sliding-window-attention-for-beginners/1796524014909-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;When you chat with an AI model like ChatGPT, Claude or Gemma, it feels like the model "remembers" everything you said. You paste a long document, ask a question about page 3, and it answers. But behind the scenes, remembering everything is expensive. The longer the text, the more work the model has to do and the more memory it needs.&lt;/p&gt;
&lt;p&gt;Sliding Window Attention, or SWA for short, is one of the clever tricks model builders use to keep that cost under control. In this article, we will explain what it is, why it exists, and which models use it. No heavy maths, no scary jargon. Just the idea.&lt;/p&gt;
&lt;h2&gt;The Problem: Reading Everything, Every Time&lt;/h2&gt;
&lt;p&gt;Imagine you are reading a 500-page novel. Every time you read a new word, someone forces you to flip back and re-check every single word you have read so far. Word 10? Check the 9 words before it. Word 10,000? Check all 9,999 words before it.&lt;/p&gt;
&lt;p&gt;That would be exhausting. And it gets worse the further you go.&lt;/p&gt;
&lt;p&gt;This is roughly how a normal language model reads text. Each new word looks back at every earlier word to understand its meaning. This "looking back" step is called attention. It works very well, but the cost grows quickly as the text gets longer.&lt;/p&gt;
&lt;p&gt;There is also a memory problem. To avoid re-doing the same work again and again, the model saves notes about every word it has already seen. These saved notes are called the KV cache (you can think of it as the model's notebook). Long text means a thick notebook, and a thick notebook needs a lot of computer memory.&lt;/p&gt;
&lt;h2&gt;What Is Attention? (A Quick Picture)&lt;/h2&gt;
&lt;p&gt;Before we slide any windows, let us get a simple picture of attention.&lt;/p&gt;
&lt;p&gt;Take the sentence: "Priya put the cake in the fridge because it was hot outside."&lt;/p&gt;
&lt;p&gt;What does "it" mean? The cake? The fridge? The weather? To figure this out, the model lets the word "it" look at the other words and decide which ones matter most. That is attention: every word asks, "Which earlier words should I pay attention to?"&lt;/p&gt;
&lt;p&gt;In normal attention, which we call global attention, every word is allowed to look at every other earlier word in the whole text. Nothing is hidden. That is powerful, but as we saw, it is also costly.&lt;/p&gt;
&lt;h2&gt;Enter Sliding Window Attention&lt;/h2&gt;
&lt;p&gt;Sliding Window Attention changes one simple rule:&lt;/p&gt;
&lt;p&gt;Instead of looking at all earlier words, each word only looks at a fixed number of recent words.&lt;/p&gt;
&lt;p&gt;That fixed number is the window size. If the window is 1,024 words (or more precisely, 1,024 tokens, which are small pieces of words), then each new token only looks back at the last 1,024 tokens. Anything older is outside the window.&lt;/p&gt;
&lt;p&gt;As the model moves forward through the text, the window moves with it, like a torch beam sliding along a dark wall. That is where the name comes from.&lt;/p&gt;
&lt;p&gt;Think of it like a train window. You see the trees and houses passing right now, plus a little behind. You do not see the station you left an hour ago. You only see what is near.&lt;/p&gt;
&lt;p&gt;This is why SWA is called local attention. Normal attention is global (it sees everything), and sliding window attention is local (it sees only what is nearby).&lt;/p&gt;
&lt;h2&gt;Seeing It in a Picture: The Attention Mask&lt;/h2&gt;
&lt;p&gt;The easiest way to see the difference is to look at an attention mask. A mask is a small grid that tells the model which tokens each token is allowed to look at.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Regular causal self-attention mask compared with sliding window attention mask" src="image/2026-12-06-sliding-window-attention-for-beginners/1796524472491-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;The picture uses the sentence "The model attends to past tokens". Each row is the token that is currently being read. Each column is a token it might look at. A blue square with a 1 means "allowed to look". A dark square with a 0 means "not allowed".&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Left side: regular (causal) attention&lt;/strong&gt;
A language model reads from left to right, so a token can never peek at words that come after it. That is why the upper-right half of the grid is all 0s. But everything before the token, and the token itself, is allowed. Look at the row for "to". It has 1s under "The", "model", "attends" and "to". The yellow arrows show "to" looking back at all of them. By the last row, "tokens" looks at the whole sentence. As the text grows, the blue triangle grows with it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Right side: sliding window attention&lt;/strong&gt;
The upper-right half is still 0, because the model still cannot see the future. The difference is on the lower-left. In the row for "to", the square under "The" has changed from 1 to 0. With a window of 3, "to" can only look at itself and the two tokens just before it: "model", "attends" and "to". The word "The" has slid out of view.&lt;/p&gt;
&lt;p&gt;Now read down the rows. In the last row, "tokens" only sees "to", "past" and "tokens". The blue squares form a narrow diagonal band instead of a full triangle. That band is the sliding window.&lt;/p&gt;
&lt;h3&gt;What the picture tells us&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Same rule against the future.&lt;/strong&gt; Both masks block tokens that come later. SWA adds a second limit: tokens that are too far in the past are also blocked.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The number of blue squares per row stops growing.&lt;/strong&gt; In regular attention, row 6 has 6 blue squares, and a row at position 10,000 would have 10,000. With a window of 3, no row ever has more than 3. This is exactly where the saving in compute and memory comes from.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Early tokens look the same in both.&lt;/strong&gt; The first three rows are identical on both sides, because there are not yet more than 3 tokens to look at. The two masks only start to differ once the text is longer than the window.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In a real model, the window is far bigger than 3 (for example 1,024 tokens, as in Gemma 3), and the text is far longer than 6 tokens. The shape of the mask is the same, just much larger.&lt;/p&gt;
&lt;h2&gt;But Wait, Doesn't the Model Forget Things?&lt;/h2&gt;
&lt;p&gt;Good question. If each token only sees the last 1,024 tokens, what happens to an important fact mentioned 20,000 tokens ago?&lt;/p&gt;
&lt;p&gt;This is where model builders get smart. They do not make every part of the model local. A language model is built from many layers stacked on top of each other, like floors in a building. Builders mix two kinds of floors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Local floors that use sliding window attention (cheap, short view)&lt;/li&gt;
&lt;li&gt;Global floors that use normal attention (expensive, full view)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The local floors handle nearby details, like grammar and the meaning of the current sentence. The occasional global floor makes sure information from far away can still travel across the whole text.&lt;/p&gt;
&lt;p&gt;It is like a team in an office. Most people only talk to the colleague sitting next to them, which is fast and easy. But once in a while, there is a full team meeting where everyone shares updates. Nobody gets left out, and the office does not spend all day in meetings.&lt;/p&gt;
&lt;h2&gt;The Two Knobs: Window Size and Ratio&lt;/h2&gt;
&lt;p&gt;Sebastian Raschka describes SWA as a tunable knob. In practice, there are two settings that builders play with:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Window Size&lt;/strong&gt;
How many recent tokens each local layer can look at. Bigger windows see more but cost more.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Local-to-Global Ratio&lt;/strong&gt;
How many local layers you use for every one global layer. A ratio of 5:1 means five local layers, then one global layer, then repeat.&lt;/p&gt;
&lt;p&gt;Turning these knobs changes how "aggressive" the model is about saving cost. A small window with many local layers saves a lot. A big window with fewer local layers saves less but keeps more direct long-range view.&lt;/p&gt;
&lt;h2&gt;Real Models That Use It&lt;/h2&gt;
&lt;p&gt;Here is where it gets interesting. Different model families have made different choices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gemma 2 (Google)&lt;/strong&gt;
Used a 1:1 ratio, meaning it switched back and forth between a local layer and a global layer. Each local layer had a window of about 4,000 tokens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gemma 3 (Google)&lt;/strong&gt;
Became much more aggressive. It moved to a 5:1 ratio (five local layers for every global layer) and shrank the window from 4,096 to just 1,024 tokens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OLMo 3 and Arcee Trinity&lt;/strong&gt;
Use a 3:1 ratio, sitting in the middle ground.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Xiaomi MiMo-V2-Flash&lt;/strong&gt;
Uses the same 5:1 ratio as Gemma 3, but with a tiny window of only 128 tokens. That is far smaller than Gemma's 1,024 and a very bold choice.&lt;/p&gt;
&lt;p&gt;Other models in the gallery that use SWA include Step 3.5 Flash and Tiny Aya. So this is not a niche idea. It has quietly become a standard tool in modern model design.&lt;/p&gt;
&lt;h2&gt;Why It Saves Memory&lt;/h2&gt;
&lt;p&gt;Remember the model's notebook, the KV cache? In a normal global layer, the notebook keeps notes for every token in the whole conversation. A 100,000-token document means 100,000 sets of notes in that layer.&lt;/p&gt;
&lt;p&gt;In a sliding window layer with a window of 1,024, the layer only needs notes for the most recent 1,024 tokens. Older notes can be thrown away for that layer, because it will never look at them again.&lt;/p&gt;
&lt;p&gt;Now multiply that by many layers. If five out of every six layers are local, most of the model's notebook stays small no matter how long the text gets. Only the few global layers keep the full, thick notebook.&lt;/p&gt;
&lt;p&gt;That is the big win. Long documents, long chats and long code files become much cheaper to handle, especially on smaller GPUs or laptops.&lt;/p&gt;
&lt;h2&gt;Does It Hurt Quality?&lt;/h2&gt;
&lt;p&gt;You might expect a model that "sees less" to become dumber. Surprisingly, the evidence says the damage is small.&lt;/p&gt;
&lt;p&gt;When Google tested Gemma 3's design, they compared the smaller window and the more aggressive 5:1 ratio against less aggressive setups. The quality score (a measure called perplexity, which roughly tells you how well the model predicts the next word) barely changed.&lt;/p&gt;
&lt;p&gt;Why? Because most of what a word needs to understand itself is close by. The meaning of "it" in a sentence usually depends on the words in that same sentence or paragraph, not on something 50 pages earlier. And for the rare cases where far-away information matters, the global layers are there to help.&lt;/p&gt;
&lt;h2&gt;SWA Plays Well With Other Tricks&lt;/h2&gt;
&lt;p&gt;SWA is not the only memory-saving trick in modern models. Another popular one is called Grouped-Query Attention, or GQA. You do not need the details. Just know this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sliding Window Attention&lt;/strong&gt;
Saves memory by keeping notes for fewer tokens (only the recent window).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grouped-Query Attention&lt;/strong&gt;
Saves memory by making each token's notes smaller (sharing parts of them).&lt;/p&gt;
&lt;p&gt;Because they save memory in different ways, you can use both together. Gemma 3, for example, uses SWA and GQA at the same time.&lt;/p&gt;
&lt;h2&gt;A Tiny Code Picture&lt;/h2&gt;
&lt;p&gt;If you are curious, here is a very small Python sketch that shows which earlier tokens each token is allowed to see. A "1" means "can look", a "0" means "cannot look".&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;window&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[1, 0, 0, 0, 0, 0]&lt;/span&gt;
&lt;span class="k"&gt;[1, 1, 0, 0, 0, 0]&lt;/span&gt;
&lt;span class="k"&gt;[1, 1, 1, 0, 0, 0]&lt;/span&gt;
&lt;span class="k"&gt;[0, 1, 1, 1, 0, 0]&lt;/span&gt;
&lt;span class="k"&gt;[0, 0, 1, 1, 1, 0]&lt;/span&gt;
&lt;span class="k"&gt;[0, 0, 0, 1, 1, 1]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;See how the band of 1s slides down and to the right? That band is the window. In global attention, the whole lower-left triangle would be filled with 1s.&lt;/p&gt;
&lt;h2&gt;Key Terms at a Glance&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Token&lt;/strong&gt;
A small piece of text, often a word or part of a word. Models read text token by token.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Attention&lt;/strong&gt;
The step where each token looks at earlier tokens to understand its own meaning.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Global Attention&lt;/strong&gt;
Every token can look at every earlier token. Full view, high cost.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sliding Window Attention (SWA)&lt;/strong&gt;
Each token only looks at a fixed number of recent tokens. Short view, low cost.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;KV Cache&lt;/strong&gt;
The model's notebook of saved notes about earlier tokens, so it does not redo work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Local-to-Global Ratio&lt;/strong&gt;
How many sliding window layers a model uses for each full attention layer.&lt;/p&gt;
&lt;h2&gt;The Takeaway&lt;/h2&gt;
&lt;p&gt;Sliding Window Attention is a simple idea with a big effect: most words only need to look at their neighbours. By letting most layers focus on a small, sliding window and keeping a few layers with a full view, models like Gemma 3, OLMo 3 and Xiaomi MiMo can handle long text with much less memory, while staying almost as smart.&lt;/p&gt;
&lt;p&gt;Next time an AI model reads your 100-page PDF without breaking a sweat, there is a good chance a sliding window is quietly doing part of the work.&lt;/p&gt;</content><category term="GenAI Basics"/><category term="LLM"/><category term="Attention"/><category term="Sliding Window Attention"/><category term="SWA"/><category term="KV Cache"/><category term="Beginners"/></entry><entry><title>Why Flow Models are the Future of AI</title><link href="https://blogs.rajacsp.com/flow-models-vs-auto-regressive.html" rel="alternate"/><published>2026-12-02T00:00:00-04:00</published><updated>2026-12-02T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-12-02:/flow-models-vs-auto-regressive.html</id><summary type="html">&lt;p&gt;&lt;img alt="1796507069785" src="image/2026-12-02-flow-models-vs-auto-regressive/1796507069785-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Every chatbot you have used so far writes like a typist: one token, then the next, then the next. It can never go back, and it can never skip ahead. That approach is called auto-regressive (AR) generation, and it took us from GPT-2 to today's frontier models. A second way …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1796507069785" src="image/2026-12-02-flow-models-vs-auto-regressive/1796507069785-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Every chatbot you have used so far writes like a typist: one token, then the next, then the next. It can never go back, and it can never skip ahead. That approach is called auto-regressive (AR) generation, and it took us from GPT-2 to today's frontier models. A second way of generating is now arriving from the image world, where it already won. It is called the flow model, and it writes the way a painter paints: it sketches the whole canvas roughly, then sharpens all of it at once.&lt;/p&gt;
&lt;p&gt;In December 2026, Black Forest Labs, the team behind the FLUX image models, released FLUNG 8B. It is a language model trained from scratch with a continuous flow objective. It matches open diffusion LLMs of similar size on math, code and instruction following, it decodes up to 6.5 tokens per forward pass, and after distillation it needs up to 13x fewer passes. That moment is a good time to understand what flow models are and why they matter.&lt;/p&gt;
&lt;h2&gt;What Is a Flow Model?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Flow Model&lt;/strong&gt;
A generative model that learns to move data from pure noise to a clean output along a smooth path, step by step, refining the whole output in parallel.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flow Matching&lt;/strong&gt;
The training method. You take real data, mix it with noise at a random strength t, and teach the network the "velocity" (direction and speed) that moves the noisy sample back toward the real one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rectified Flow&lt;/strong&gt;
A variant that makes the path from noise to data as straight as possible. Straighter paths need fewer steps, and fewer steps mean faster generation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Variational Flow Matching (VFM)&lt;/strong&gt;
The extension that makes flows work for text. The model does not regress a velocity. It predicts a probability over the vocabulary at each position, trained with ordinary cross-entropy, and the velocity is derived from that prediction.&lt;/p&gt;
&lt;p&gt;Think of it with EL8 (Explain Like 8): an auto-regressive model builds a Lego wall brick by brick from left to right. A flow model starts with a blurry photo of the finished wall and keeps making it sharper until every brick is clear.&lt;/p&gt;
&lt;h2&gt;What Is an Auto-Regressive Model?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Auto-Regressive Model&lt;/strong&gt;
A model that predicts the next token given all the tokens before it. Generating N tokens takes N forward passes, strictly in order.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Causal Attention&lt;/strong&gt;
Each token can only look backward. That is what makes AR training simple and stable, and it is also why AR models cannot revise earlier words.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;KV Cache&lt;/strong&gt;
The memory trick that keeps AR inference fast enough. Past attention states are stored so they are not recomputed. It is also the main consumer of GPU memory in long chats.&lt;/p&gt;
&lt;h2&gt;The Clear Architecture of a Flow Language Model&lt;/h2&gt;
&lt;p&gt;Both families use the same Transformer backbone. The difference lies in what goes in, what comes out, and how the loop runs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Token Embedding&lt;/strong&gt;
Each token in the training text is converted into a continuous vector. Text is now "image-like": a grid of numbers instead of discrete symbols.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Noise Injection&lt;/strong&gt;
A time value t between 0 and 1 is sampled, and Gaussian noise is mixed into the embeddings. At t = 0 you have pure noise. At t = 1 you have the clean text.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Bidirectional Transformer&lt;/strong&gt;
The noisy sequence, the prompt and the time t go into a Transformer with full (non-causal) attention. Every position sees every other position, both left and right.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4: Token Posterior Head&lt;/strong&gt;
The output is a probability distribution over the vocabulary at every position. Training uses cross-entropy, exactly like an LLM, which is why ordinary LLM tooling still fits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5: Noise-Threshold Scheduling&lt;/strong&gt;
At heavy noise the token is unrecognisable, and at light noise it is obvious. Learning happens around the threshold where a token starts to reveal itself. FLUNG's recipe concentrates training around this zone.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 6: Block Decoding at Inference&lt;/strong&gt;
Text is generated in blocks (FLUNG uses 128 tokens). Inside a block, all tokens are denoised together. Blocks proceed left to right, so long outputs stay coherent.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 7: Early Stopping&lt;/strong&gt;
When the model is confident about a token, that token is frozen and the step budget goes to the hard positions. This is how FLUNG moves from 2 to 6.5 tokens per forward pass.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 8: Flow-Map Distillation&lt;/strong&gt;
A student model learns to jump from one noise level directly to a much later one, skipping intermediate steps. Result: up to 13x fewer forward passes than the teacher.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 9: RL Post-Training&lt;/strong&gt;
Reinforcement learning works on top, just as it does for AR reasoning models. Flow LLMs are not locked out of the post-training playbook.&lt;/p&gt;
&lt;h2&gt;Auto-Regressive vs Flow: Head to Head&lt;/h2&gt;
&lt;p&gt;The most important difference is the shape of the compute. An AR model spends one full forward pass per token, no matter how easy the token is. Writing "the" costs as much as writing a key line of code. A flow model spends a fixed number of refinement steps per block, and with early stopping it spends them only where the text is uncertain. Easy text becomes cheap, and hard text gets the attention.&lt;/p&gt;
&lt;p&gt;The second difference is direction. An AR model commits to a word and can never take it back, so an early mistake carries forward into everything after it. A flow model looks at the whole block in both directions on every step, so it can fix the beginning of a sentence after seeing the end. That is why flow and diffusion models are naturally good at infilling, editing and structured output, where the end constrains the start.&lt;/p&gt;
&lt;p&gt;The third difference is hardware fit. AR decoding is memory-bandwidth bound: the GPU mostly waits for weights and the KV cache to stream in, just to produce one token. Flow decoding processes a whole block per pass, which turns idle bandwidth into useful parallel compute. That suits GPUs, and it suits CPUs with matrix units even better.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Auto-Regressive&lt;/th&gt;
&lt;th&gt;Flow Model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Generation order&lt;/td&gt;
&lt;td&gt;Strictly left to right&lt;/td&gt;
&lt;td&gt;Whole block in parallel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tokens per pass&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2 to 6.5+ (FLUNG)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Attention&lt;/td&gt;
&lt;td&gt;Causal (backward only)&lt;/td&gt;
&lt;td&gt;Bidirectional&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-correction&lt;/td&gt;
&lt;td&gt;None once a token is emitted&lt;/td&gt;
&lt;td&gt;Every step revises the block&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Infilling / editing&lt;/td&gt;
&lt;td&gt;Awkward, needs tricks&lt;/td&gt;
&lt;td&gt;Native&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Speed knob&lt;/td&gt;
&lt;td&gt;Fixed by length&lt;/td&gt;
&lt;td&gt;Tunable: fewer steps = faster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Distillation upside&lt;/td&gt;
&lt;td&gt;Limited (speculative decode)&lt;/td&gt;
&lt;td&gt;Large (13x fewer passes)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KV cache pressure&lt;/td&gt;
&lt;td&gt;Grows every token&lt;/td&gt;
&lt;td&gt;Lower, block-level&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hardware use&lt;/td&gt;
&lt;td&gt;Bandwidth bound&lt;/td&gt;
&lt;td&gt;Compute dense, parallel friendly&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Auto-Regressive&lt;/th&gt;
&lt;th&gt;Flow Model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Training loss&lt;/td&gt;
&lt;td&gt;Cross-entropy&lt;/td&gt;
&lt;td&gt;Cross-entropy (via VFM)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backbone&lt;/td&gt;
&lt;td&gt;Transformer&lt;/td&gt;
&lt;td&gt;Transformer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RL post-training&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multimodal unification&lt;/td&gt;
&lt;td&gt;Separate image/audio stack&lt;/td&gt;
&lt;td&gt;Same math as image, audio, video&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maturity today&lt;/td&gt;
&lt;td&gt;Very high&lt;/td&gt;
&lt;td&gt;Rising quickly&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The second table matters as much as the first. A flow LLM is not an exotic research toy. It reuses the Transformer, the cross-entropy loss and the RL pipeline. Teams do not throw away their stack. They change the generation loop.&lt;/p&gt;
&lt;h2&gt;Why Flow Models Are the Better Bet&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Speed Is the New Quality&lt;/strong&gt;
For agents, coding assistants and voice, latency decides whether a product feels usable. Parallel decoding attacks latency at its root, not with patches.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost per Token Falls&lt;/strong&gt;
Fewer forward passes means less GPU time per answer. At scale, that is the difference between a profitable AI product and a subsidised one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One Math for Every Modality&lt;/strong&gt;
FLUX for images, Movie Gen for video, Voicebox and F5-TTS for speech, and now FLUNG for text all share flow matching. One team, one theory and one infrastructure can serve every modality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Built-In Revision&lt;/strong&gt;
Models that can revise their own draft hallucinate structure less often in tasks like code, JSON and tables, where the end of the output must agree with the start.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Adjustable Thinking Budget&lt;/strong&gt;
Want a fast draft? Use 8 steps. Want a careful answer? Use 64. AR models have no equivalent knob for the cost of a single answer.&lt;/p&gt;
&lt;p&gt;To be fair, the quality crown at the very frontier still belongs to AR models, which have had years and trillions more tokens of investment. FLUNG reached diffusion-LLM parity on roughly 1T tokens, a fraction of a frontier AR training budget. The trajectory is the story: the gap is closing quickly while the efficiency advantage is structural.&lt;/p&gt;
&lt;h2&gt;Why You Need to Know Flow Models&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;For Engineers&lt;/strong&gt;
Inference stacks, batching, caching and serving will change. Those who understand block decoding and step schedules will build the next generation of inference servers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For Founders&lt;/strong&gt;
Products built on cheap, fast, parallel generation (real-time agents, on-device assistants, live coding) become viable when the cost per token drops sharply.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For Researchers&lt;/strong&gt;
Noise schedules, distillation and RL for flow models are wide open. This is where new papers and patents are being written right now.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For Lean Inference&lt;/strong&gt;
Fewer, denser forward passes fit CPU matrix units and edge chips far better than the token-by-token AR loop. Flow models are a natural partner for CPU-first formats.&lt;/p&gt;
&lt;h2&gt;Flow and Diffusion Models in the Market&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Company / Lab&lt;/th&gt;
&lt;th&gt;Modality&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;FLUNG 8B&lt;/td&gt;
&lt;td&gt;Black Forest Labs&lt;/td&gt;
&lt;td&gt;Text&lt;/td&gt;
&lt;td&gt;Continuous flow (VFM), open&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FLUX family&lt;/td&gt;
&lt;td&gt;Black Forest Labs&lt;/td&gt;
&lt;td&gt;Image&lt;/td&gt;
&lt;td&gt;Rectified flow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stable Diffusion 3&lt;/td&gt;
&lt;td&gt;Stability AI&lt;/td&gt;
&lt;td&gt;Image&lt;/td&gt;
&lt;td&gt;Rectified flow&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Movie Gen&lt;/td&gt;
&lt;td&gt;Meta&lt;/td&gt;
&lt;td&gt;Video&lt;/td&gt;
&lt;td&gt;Flow matching&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Voicebox&lt;/td&gt;
&lt;td&gt;Meta&lt;/td&gt;
&lt;td&gt;Speech&lt;/td&gt;
&lt;td&gt;Flow matching&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F5-TTS&lt;/td&gt;
&lt;td&gt;Open source&lt;/td&gt;
&lt;td&gt;Speech&lt;/td&gt;
&lt;td&gt;Flow matching&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mercury&lt;/td&gt;
&lt;td&gt;Inception Labs&lt;/td&gt;
&lt;td&gt;Text / Code&lt;/td&gt;
&lt;td&gt;Diffusion LLM, commercial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini Diffusion&lt;/td&gt;
&lt;td&gt;Google DeepMind&lt;/td&gt;
&lt;td&gt;Text&lt;/td&gt;
&lt;td&gt;Diffusion LLM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemma Diffusion&lt;/td&gt;
&lt;td&gt;Google&lt;/td&gt;
&lt;td&gt;Text&lt;/td&gt;
&lt;td&gt;Diffusion LLM, open weights&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLaDA 8B&lt;/td&gt;
&lt;td&gt;Open research&lt;/td&gt;
&lt;td&gt;Text&lt;/td&gt;
&lt;td&gt;Masked diffusion, open&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dream 7B&lt;/td&gt;
&lt;td&gt;Open research&lt;/td&gt;
&lt;td&gt;Text&lt;/td&gt;
&lt;td&gt;Masked diffusion, open&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The text models in this table share one idea: stop typing and start refining. FLUNG is the first to bring continuous flow matching, the same math behind FLUX, to language at the 8B scale.&lt;/p&gt;
&lt;h2&gt;Final Word&lt;/h2&gt;
&lt;p&gt;Auto-regressive models taught machines to write. Flow models are teaching them to write fast, revise as they go, and use the same math for every modality. The typist had a great decade, and the painter is now ready to take over the canvas.&lt;/p&gt;</content><category term="GenAI"/><category term="Flow Matching"/><category term="Diffusion LLM"/><category term="Auto-Regressive"/><category term="FLUNG"/><category term="LLM Inference"/><category term="Architecture"/></entry><entry><title>Copilot Studio Workflow Basic Usecases</title><link href="https://blogs.rajacsp.com/copilot-studio-workflow-basic-usecases.html" rel="alternate"/><published>2026-11-28T00:00:00-04:00</published><updated>2026-11-28T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-11-28:/copilot-studio-workflow-basic-usecases.html</id><summary type="html">&lt;p&gt;&lt;img alt="1795894440036" src="image/2026-11-28-copilot-studio-workflow-usecaes/1795894440036-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Ten small use cases for practicing Copilot Studio workflows. In each one, the user gives an input, a workflow calls a FastAPI endpoint (your own or a third-party one), and the result comes back as the reply.&lt;/p&gt;
&lt;h2&gt;1. Simple Reverser&lt;/h2&gt;
&lt;p&gt;Get the text from the user and reverse it with …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1795894440036" src="image/2026-11-28-copilot-studio-workflow-usecaes/1795894440036-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Ten small use cases for practicing Copilot Studio workflows. In each one, the user gives an input, a workflow calls a FastAPI endpoint (your own or a third-party one), and the result comes back as the reply.&lt;/p&gt;
&lt;h2&gt;1. Simple Reverser&lt;/h2&gt;
&lt;p&gt;Get the text from the user and reverse it with the help of FastAPI.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;one&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;eno&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2. Country Info&lt;/h2&gt;
&lt;p&gt;Get the country name from the user and return its details with the help of a third-party FastAPI endpoint.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;Canada&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;Capital: Ottawa | Currency: Canadian dollar | Languages: English, French&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;3. Word Counter&lt;/h2&gt;
&lt;p&gt;Get the text from the user and return the number of words with the help of FastAPI.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;I love Toronto winters&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;4&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;4. Temperature Converter&lt;/h2&gt;
&lt;p&gt;Get the temperature in Celsius from the user and convert it to Fahrenheit with the help of FastAPI.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;25&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;77 °F&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;5. Currency Converter&lt;/h2&gt;
&lt;p&gt;Get the amount in CAD from the user and convert it to INR with the help of a third-party FastAPI endpoint.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;100&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;₹6,150&lt;/code&gt; (based on the live exchange rate)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;6. Mortgage Payment Calculator&lt;/h2&gt;
&lt;p&gt;Get the home price, down payment, interest rate and amortization period from the user. Use FastAPI to calculate the monthly mortgage payment with Canadian semi-annual compounding, and return the total interest over the amortization.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;$600,000, $100,000 down, 5%, 25 years&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;Monthly payment: $2,908 | Total interest: $372,400&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;7. Provincial Sales Tax Calculator&lt;/h2&gt;
&lt;p&gt;Get the item price and province from the user. Use FastAPI to apply the right sales tax (GST, PST or HST) for that province, and return the tax breakdown and final price.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;$200, Ontario&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;HST (13%): $26 | Total: $226&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;8. Weather Alert by Postal Code&lt;/h2&gt;
&lt;p&gt;Get a Canadian postal code from the user. Use third-party FastAPI endpoints to find the city, fetch the current Environment Canada forecast and any active weather warnings, and return a short summary with advice.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;M5J&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;Toronto, ON | -6 °C, snow | Warning: Snowfall 15–20 cm tonight | Advice: Allow extra commute time, take the TTC&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;9. Tip and Bill Splitter&lt;/h2&gt;
&lt;p&gt;Get the bill amount, tip percentage and number of people from the user. Use FastAPI to calculate the tip, the total and the amount each person pays.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;$120, 15%, 4 people&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;Tip: $18.00 | Total: $138.00 | Per person: $34.50&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;10. Fuel Consumption Converter&lt;/h2&gt;
&lt;p&gt;Get the fuel consumption in L/100 km from the user and convert it to US miles per gallon (mpg) with the help of FastAPI.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Input: &lt;code&gt;8&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Output: &lt;code&gt;29.4 mpg (US)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="Generative AI"/><category term="Copilot Studio"/><category term="FastAPI"/><category term="Workflow"/><category term="Agents"/><category term="Low Code"/></entry><entry><title>How I fixed an error that AI tool created</title><link href="https://blogs.rajacsp.com/how-i-fixed-an-error-that-ai-tool-created.html" rel="alternate"/><published>2026-11-28T00:00:00-04:00</published><updated>2026-11-28T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-11-28:/how-i-fixed-an-error-that-ai-tool-created.html</id><summary type="html">&lt;p&gt;&lt;img alt="1795921395075" src="image/2026-11-15-how-i-fixed-an-error-that-ai-tool-created/1795921395075-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;A US-based startup I do freelance work for sent me an urgent message: "Reports aren't going out. Please fix ASAP." They had 270 subscribed clients. Only one of them was getting a report.&lt;/p&gt;
&lt;p&gt;No crash. No stack trace. No red lines in the logs. The job ran, finished "successfully", and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1795921395075" src="image/2026-11-15-how-i-fixed-an-error-that-ai-tool-created/1795921395075-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;A US-based startup I do freelance work for sent me an urgent message: "Reports aren't going out. Please fix ASAP." They had 270 subscribed clients. Only one of them was getting a report.&lt;/p&gt;
&lt;p&gt;No crash. No stack trace. No red lines in the logs. The job ran, finished "successfully", and quietly did 1/270th of its work.&lt;/p&gt;
&lt;p&gt;The cause turned out to be a single indentation change made by an AI coding tool. One line moved four spaces to the left.&lt;/p&gt;
&lt;h2&gt;The Code That Worked&lt;/h2&gt;
&lt;p&gt;The reporting job looked roughly like this. The real loop had about 100 lines of business logic in the middle.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subscribed_clients&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
    &lt;span class="o"&gt;..&lt;/span&gt;
    &lt;span class="c1"&gt;# (complex logic of 100 lines)&lt;/span&gt;
    &lt;span class="o"&gt;..&lt;/span&gt;
    &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current_client&lt;/span&gt;


    &lt;span class="n"&gt;send_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;send_report(j)&lt;/code&gt; sits inside the loop. Every client goes through the logic, and every client gets a report. 270 clients, 270 reports.&lt;/p&gt;
&lt;h2&gt;The Code After the AI Tool Touched It&lt;/h2&gt;
&lt;p&gt;During an unrelated change, an AI tool reformatted this block. When it was done, the last line looked like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subscribed_clients&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
    &lt;span class="o"&gt;..&lt;/span&gt;
    &lt;span class="c1"&gt;# (complex logic of 100 lines)&lt;/span&gt;
    &lt;span class="o"&gt;..&lt;/span&gt;
    &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current_client&lt;/span&gt;


&lt;span class="n"&gt;send_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;send_report(j)&lt;/code&gt; is now outside the loop. The loop runs 270 times and keeps overwriting &lt;code&gt;j&lt;/code&gt;. When the loop ends, &lt;code&gt;j&lt;/code&gt; holds only the last client. Then &lt;code&gt;send_report(j)&lt;/code&gt; runs once.&lt;/p&gt;
&lt;p&gt;Result: the last client got their report. The other 269 got nothing.&lt;/p&gt;
&lt;h2&gt;Why Nobody Noticed&lt;/h2&gt;
&lt;p&gt;This bug is quiet. Several things worked together to hide it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Python is fine with it&lt;/strong&gt;
In Python, indentation is the syntax. Moving a line out of a block is not an error; it is a different, perfectly valid program.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;j = None&lt;/code&gt; hid the problem&lt;/strong&gt;
Because &lt;code&gt;j&lt;/code&gt; was set before the loop, it always exists after the loop. Without that line, linters like Pylint can warn about a loop variable used outside its loop. With it, there's nothing to flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The blank lines made it easy to miss&lt;/strong&gt;
Two empty lines sat between &lt;code&gt;j = current_client&lt;/code&gt; and &lt;code&gt;send_report(j)&lt;/code&gt;. After 100 lines of logic, a reviewer's eye doesn't measure four spaces of whitespace after a gap.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The job still "succeeded"&lt;/strong&gt;
One report was sent. No exception, exit code 0, the scheduler showed green. From the outside, everything looked healthy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The diff looked like formatting&lt;/strong&gt;
The AI change touched many lines for formatting. One whitespace change in a sea of whitespace changes looks like noise, not a logic change.&lt;/p&gt;
&lt;h2&gt;How I Found It&lt;/h2&gt;
&lt;p&gt;I didn't start with the code. I started with the numbers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Count what went out&lt;/strong&gt;
I compared the number of reports sent with the number of subscribed clients. 1 vs 270. That one number ruled out a lot. This wasn't a mail server outage or a bad email template. If delivery were broken, zero reports would go out. Exactly one meant the logic was running, just not enough times.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Check which client got it&lt;/strong&gt;
The one client who received a report was the last one in the subscriber list. That's a strong signal. "Only the last item" almost always means something that should happen inside a loop is happening after it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Add a log line inside the loop&lt;/strong&gt;
I added logging for each client the loop processed and another one at the &lt;code&gt;send_report&lt;/code&gt; call. The loop logged 270 times. &lt;code&gt;send_report&lt;/code&gt; logged once. So the loop was fine; the send call wasn't in it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4: Look at the history&lt;/strong&gt;
I checked the git history for the file. The last commit came from an AI-assisted change. I looked at the diff with whitespace changes visible (no &lt;code&gt;-w&lt;/code&gt; flag) and there it was: &lt;code&gt;send_report(j)&lt;/code&gt; had lost its indentation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5: Confirm before fixing&lt;/strong&gt;
I wrote a quick test with three fake clients and a mocked &lt;code&gt;send_report&lt;/code&gt;. It was called once. That proved the bug exactly.&lt;/p&gt;
&lt;h2&gt;The Fix&lt;/h2&gt;
&lt;p&gt;The immediate fix was one line: indent &lt;code&gt;send_report(j)&lt;/code&gt; back into the loop. I tested it with the same three-client mock, and &lt;code&gt;send_report&lt;/code&gt; was called three times. Then I ran it on staging against the real subscriber list and confirmed 270 reports.&lt;/p&gt;
&lt;p&gt;But I didn't want this to happen again, so I also restructured the code to make this mistake harder to make:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;build_client_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="o"&gt;..&lt;/span&gt;
    &lt;span class="c1"&gt;# (complex logic, now in its own function)&lt;/span&gt;
    &lt;span class="o"&gt;..&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt;


&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;subscribed_clients&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;build_client_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;send_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Pulled the 100 lines into a function&lt;/strong&gt;
The loop is now three lines long. When the loop is short, it's obvious what is inside it and what isn't.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Removed &lt;code&gt;j = None&lt;/code&gt;&lt;/strong&gt;
There's no reason for a variable to live outside the loop anymore. If someone moves the send call out by mistake, linters can catch it again.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Looped over clients directly&lt;/strong&gt;
&lt;code&gt;for client in subscribed_clients&lt;/code&gt; reads better than &lt;code&gt;for i in range(...)&lt;/code&gt; and removes the extra variable juggling.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Added a test that checks the count&lt;/strong&gt;
The test asserts that &lt;code&gt;send_report&lt;/code&gt; is called once per subscribed client. If this ever regresses, CI fails before the client notices.&lt;/p&gt;
&lt;h2&gt;What I Learned About AI Coding Tools&lt;/h2&gt;
&lt;p&gt;I use AI tools every day. This isn't a story about avoiding them. It's about how to review them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI changes need real review, not a skim&lt;/strong&gt;
An AI tool can produce a diff that looks like harmless formatting and still changes behaviour. In Python, a whitespace change can be a logic change.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Look at diffs with whitespace on&lt;/strong&gt;
Many of us hide whitespace changes to make diffs easier to read. For Python, that hides exactly this kind of bug. Keep whitespace visible for AI-generated changes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ask the AI to keep changes small&lt;/strong&gt;
If you ask for one fix, don't accept a diff that also reformats 200 lines. Small diffs are easier to check.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Long loops are a risk&lt;/strong&gt;
A 100-line loop body is hard for people and AI tools to reason about. Short functions protect you from both.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Test counts, not just success&lt;/strong&gt;
"The job ran" isn't the same as "the job did its work." A test or alert that checks how many reports went out would have caught this in minutes.&lt;/p&gt;
&lt;h2&gt;Final Thoughts&lt;/h2&gt;
&lt;p&gt;The fix took one line. Finding it took careful work: compare the numbers, notice the pattern (only the last client), confirm with logs, check the history, prove it with a test.&lt;/p&gt;
&lt;p&gt;The AI tool didn't break the code in a loud way. It broke it quietly, and quiet bugs are the expensive ones. For a startup with 270 clients waiting on reports, quiet bugs cost trust.&lt;/p&gt;
&lt;p&gt;Use AI tools. Just remember they can move a line four spaces to the left, and only you will notice.&lt;/p&gt;</content><category term="AI Engineering"/><category term="Python"/><category term="Debugging"/><category term="AI Coding Tools"/><category term="Code Review"/><category term="Freelancing"/></entry><entry><title>Calling a FastAPI Text Reverser from a Copilot Studio Workflow</title><link href="https://blogs.rajacsp.com/copilot-studio-workflow-fastapi-text-reverser.html" rel="alternate"/><published>2026-11-27T00:00:00-04:00</published><updated>2026-11-27T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-11-27:/copilot-studio-workflow-fastapi-text-reverser.html</id><summary type="html">&lt;p&gt;&lt;img alt="1795902015140" src="image/2026-11-27-co-workflow-simple-reverser/1795902015140-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Copilot Studio can call any public REST API from a topic. This post builds a small workflow that takes text from the user, sends it to a FastAPI service, and returns the reversed text.&lt;/p&gt;
&lt;p&gt;Example: the user types &lt;code&gt;one&lt;/code&gt;, and the agent replies &lt;code&gt;eno&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;The API&lt;/h2&gt;
&lt;p&gt;The FastAPI service is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1795902015140" src="image/2026-11-27-co-workflow-simple-reverser/1795902015140-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Copilot Studio can call any public REST API from a topic. This post builds a small workflow that takes text from the user, sends it to a FastAPI service, and returns the reversed text.&lt;/p&gt;
&lt;p&gt;Example: the user types &lt;code&gt;one&lt;/code&gt;, and the agent replies &lt;code&gt;eno&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;The API&lt;/h2&gt;
&lt;p&gt;The FastAPI service is already deployed on Vercel. It has one endpoint, &lt;code&gt;GET /reverse&lt;/code&gt;, which takes the text in an &lt;code&gt;input&lt;/code&gt; query parameter.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-X&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;GET&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;https://simple-reverser-api.vercel.app/reverse?input=one&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;-H&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;accept: */*&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Response:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;input&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;one&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;output&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;eno&amp;quot;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The workflow only needs the &lt;code&gt;output&lt;/code&gt; field.&lt;/p&gt;
&lt;h2&gt;The Workflow&lt;/h2&gt;
&lt;p&gt;The topic has four steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ask the user for the text.&lt;/li&gt;
&lt;li&gt;Call the API with an HTTP request node.&lt;/li&gt;
&lt;li&gt;Read &lt;code&gt;output&lt;/code&gt; from the JSON response.&lt;/li&gt;
&lt;li&gt;Send &lt;code&gt;output&lt;/code&gt; back to the user.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="1795901705649" src="image/2026-11-27-co-workflow-simple-reverser/1795901705649-opt.jpg"&gt;&lt;/p&gt;
&lt;h3&gt;Step 1: Ask a question&lt;/h3&gt;
&lt;p&gt;Add a &lt;strong&gt;Question&lt;/strong&gt; node and set the prompt to something like "What text should I reverse?". Save the answer to a variable, for example &lt;code&gt;Topic.UserText&lt;/code&gt;, using the &lt;strong&gt;Entire response&lt;/strong&gt; identity.&lt;/p&gt;
&lt;h3&gt;Step 2: Call the API&lt;/h3&gt;
&lt;p&gt;Add a &lt;strong&gt;Send HTTP request&lt;/strong&gt; node (under &lt;strong&gt;Advanced&lt;/strong&gt;) and configure it:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setting&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;URL&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"https://simple-reverser-api.vercel.app/reverse?input=" &amp;amp; EncodeUrl(Topic.UserText)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Method&lt;/td&gt;
&lt;td&gt;&lt;code&gt;GET&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Header&lt;/td&gt;
&lt;td&gt;&lt;code&gt;accept: */*&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Response data type&lt;/td&gt;
&lt;td&gt;From sample data (paste the JSON above)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Save response as&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Topic.ReverseResponse&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;code&gt;EncodeUrl&lt;/code&gt; matters. Without it, a user message containing spaces, &lt;code&gt;&amp;amp;&lt;/code&gt;, or &lt;code&gt;#&lt;/code&gt; produces a broken or wrong query string.&lt;/p&gt;
&lt;h3&gt;Step 3: Use the result&lt;/h3&gt;
&lt;p&gt;Because the response type comes from the sample JSON, Copilot Studio generates the fields for you. The reversed text is available as &lt;code&gt;Topic.ReverseResponse.output&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Step 4: Reply&lt;/h3&gt;
&lt;p&gt;Add a &lt;strong&gt;Send a message&lt;/strong&gt; node:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Reversed text: {Topic.ReverseResponse.output}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;img alt="1795901682647" src="image/2026-11-27-co-workflow-simple-reverser/1795901682647.png"&gt;&lt;/p&gt;
&lt;h2&gt;Testing&lt;/h2&gt;
&lt;p&gt;Open the &lt;strong&gt;Test your agent&lt;/strong&gt; panel, trigger the topic, and enter &lt;code&gt;one&lt;/code&gt;. The agent should reply with &lt;code&gt;eno&lt;/code&gt;. Try a text with spaces, such as &lt;code&gt;hello world&lt;/code&gt;, to confirm the URL encoding works. The expected reply is &lt;code&gt;dlrow olleh&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The API has no authentication, so no credentials or connection setup are needed. For a protected API, add the key as a header in the HTTP request node.&lt;/li&gt;
&lt;li&gt;If the call fails, check the &lt;strong&gt;Error handling&lt;/strong&gt; option on the HTTP node and add a message for that branch. Do not substitute a made-up reply when the API fails.&lt;/li&gt;
&lt;li&gt;Vercel free-tier functions can take a moment on the first call after idle time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;A Copilot Studio topic needs one HTTP request node to use an existing FastAPI endpoint. Ask for input, URL-encode it into the query string, read the typed response, and send it back.&lt;/p&gt;</content><category term="GenAI"/><category term="Copilot Studio"/><category term="FastAPI"/><category term="Power Platform"/><category term="HTTP"/><category term="API"/></entry><entry><title>Meet 20 RAG Family Members</title><link href="https://blogs.rajacsp.com/meet-20-rag-family-members.html" rel="alternate"/><published>2026-11-14T00:00:00-04:00</published><updated>2026-11-14T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-11-14:/meet-20-rag-family-members.html</id><summary type="html">&lt;p&gt;&lt;img alt="1794670605169" src="image/2026-11-14-meet-20-rag-family-members/1794670605169.png"&gt;&lt;/p&gt;
&lt;p&gt;Retrieval Augmented Generation, better known as RAG, gives a language model an open book. Instead of answering from memory alone, the model first looks up relevant information, then writes its answer from what it found. This reduces hallucinations and keeps answers grounded in your own data. Simple idea, but the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1794670605169" src="image/2026-11-14-meet-20-rag-family-members/1794670605169.png"&gt;&lt;/p&gt;
&lt;p&gt;Retrieval Augmented Generation, better known as RAG, gives a language model an open book. Instead of answering from memory alone, the model first looks up relevant information, then writes its answer from what it found. This reduces hallucinations and keeps answers grounded in your own data. Simple idea, but the family has grown fast. Today there are many RAG strategies, each built to fix a specific weakness of the one before it.&lt;/p&gt;
&lt;p&gt;In this article, we meet 20 members of the RAG family. We group them into four branches: Better Retrieval, Structured Knowledge, Self-Correcting Loops, and Agentic Systems. For each member, you get a one-line definition and two real-world use cases.&lt;/p&gt;
&lt;h2&gt;Branch 1: Better Retrieval&lt;/h2&gt;
&lt;p&gt;This branch focuses on one question: how do we find the right chunks?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Naive RAG&lt;/strong&gt;
Embed your documents, retrieve the closest matches to the question, and pass them to the LLM.
Use cases: an HR chatbot answering leave-policy questions; a product FAQ assistant on a company website.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Hybrid RAG&lt;/strong&gt;
Combine keyword search (BM25) with vector search to catch both exact terms and meaning.
Use cases: bank support search for codes like "IFRS 9 Stage 2"; IT helpdesk search for error codes and vague complaints.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Re-ranking RAG&lt;/strong&gt;
Retrieve many candidates, then use a cross-encoder to reorder them by true relevance.
Use cases: legal research surfacing the strongest precedent first; enterprise search ranking the most useful policy page on top.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Metadata-filtered RAG&lt;/strong&gt;
Filter by tags such as date, region, or document type before searching.
Use cases: finding only Ontario contracts signed after 2024; retrieving only the latest version of a compliance manual.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Multi-query RAG (RAG-Fusion)&lt;/strong&gt;
Rewrite the question several ways, search with each, and merge the results.
Use cases: customer support where "card not working" also means "card declined"; academic search across different terminology.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. HyDE (Hypothetical Document Embeddings)&lt;/strong&gt;
Let the LLM draft a hypothetical answer, then search using that draft.
Use cases: medical Q&amp;amp;A where patient words differ from clinical terms; searching technical docs with plain-language questions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7. Parent-document RAG&lt;/strong&gt;
Match on small chunks but return the larger section they belong to.
Use cases: policy manuals where one sentence needs its full section; textbooks where a definition needs its surrounding explanation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8. Contextual Retrieval&lt;/strong&gt;
Add document-level context to every chunk before embedding it.
Use cases: quarterly financial reports where "revenue grew 3%" needs company and quarter attached; multi-client contract libraries.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9. Multi-vector RAG (ColBERT)&lt;/strong&gt;
Store many vectors per document so fine details still match.
Use cases: e-commerce search for "waterproof hiking boots, wide fit"; patent search where small technical details matter.&lt;/p&gt;
&lt;h2&gt;Branch 2: Structured Knowledge&lt;/h2&gt;
&lt;p&gt;This branch changes how knowledge is organized before retrieval.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10. GraphRAG&lt;/strong&gt;
Build a knowledge graph of entities and relationships, then retrieve over it.
Use cases: fraud investigation linking accounts and transactions; tracing citations between court cases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11. Hierarchical RAG (RAPTOR)&lt;/strong&gt;
Build a tree of summaries so questions can be answered at any level of detail.
Use cases: summarizing themes across 500 customer complaints; answering big-picture questions about a long book.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;12. Multimodal RAG&lt;/strong&gt;
Retrieve across text, images, tables, and PDFs together.
Use cases: insurance claims combining damage photos with policy documents; manufacturing support using diagrams and manuals.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13. SQL RAG&lt;/strong&gt;
Convert the question into SQL and answer straight from the database.
Use cases: "top 5 branches by loan volume last quarter"; sales teams querying CRM numbers in plain English.&lt;/p&gt;
&lt;h2&gt;Branch 3: Self-Correcting Loops&lt;/h2&gt;
&lt;p&gt;This branch teaches the system to check and fix its own work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14. Self-RAG&lt;/strong&gt;
The model decides when to retrieve and critiques its own answer.
Use cases: a medical assistant that skips retrieval for greetings but fact-checks dosage questions; a research assistant flagging unsupported claims.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15. Corrective RAG (CRAG)&lt;/strong&gt;
Grade the retrieved documents and fall back to web search when they are weak.
Use cases: an internal knowledge bot whose docs may be outdated; a news assistant needing current facts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16. Adaptive RAG&lt;/strong&gt;
Route each query to a simple or deep retrieval path based on complexity.
Use cases: support bots answering FAQs instantly while handling billing disputes in depth; cost control in high-traffic apps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;17. Multi-hop RAG&lt;/strong&gt;
Chain several retrieval steps to connect facts across documents.
Use cases: "Which director of the acquiring company sits on another board?"; due diligence across linked filings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;18. Speculative RAG&lt;/strong&gt;
A small model drafts answers from retrieved documents and a large model verifies them.
Use cases: high-volume customer chatbots that need speed; reducing inference costs in production.&lt;/p&gt;
&lt;h2&gt;Branch 4: Agentic Systems&lt;/h2&gt;
&lt;p&gt;This branch hands the retrieval strategy to an agent.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;19. Agentic RAG&lt;/strong&gt;
An agent chooses which tools, sources, and steps to use.
Use cases: an analyst assistant checking SQL, policy docs, and the web in one task; a coding agent searching repos and documentation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;20. Memory RAG&lt;/strong&gt;
Retrieve from past conversations and user history to personalize answers.
Use cases: a tutoring bot remembering last week's weak topic; a support agent recalling a customer's earlier tickets.&lt;/p&gt;
&lt;h2&gt;Choosing Your Family Member&lt;/h2&gt;
&lt;p&gt;You don't need all 20. Most production systems start with Naive RAG, then add Hybrid search, Re-ranking, and Metadata filters. Those four solve most real problems. Before adding a new member, measure first. Tools like RAGAs or DeepEval show whether retrieval or generation is the weak link, so you fix the right problem instead of adding complexity for its own sake. Move to GraphRAG or Multi-hop when questions need connected facts, and to Self-correcting or Agentic designs when accuracy and flexibility matter more than speed.&lt;/p&gt;
&lt;p&gt;The RAG family keeps growing, and new members appear every few months. But almost every newcomer fits into one of these four branches. Learn the branches, and you will always know where a new member belongs.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Simple reverser&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Get the text from user and reverse with the help of FastAPI.&lt;/p&gt;
&lt;p&gt;input: one
output: eno&lt;/p&gt;</content><category term="Generative AI"/><category term="RAG"/><category term="Retrieval Augmented Generation"/><category term="LLM"/><category term="GenAI"/><category term="AI Engineering"/></entry><entry><title>Agentic AI Roadmap</title><link href="https://blogs.rajacsp.com/agentic-ai-roadmap.html" rel="alternate"/><published>2026-11-09T00:00:00-04:00</published><updated>2026-11-09T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-11-09:/agentic-ai-roadmap.html</id><summary type="html">&lt;p&gt;&lt;img alt="1794411004084" src="image/2026-11-09-agentic-roadmap/1794411004084.png"&gt;&lt;/p&gt;
&lt;p&gt;Are you interested to start your career or switch your career into GenAI? After working 3 years in GenAI, I came up with this AgenticAI Roadmap.&lt;/p&gt;
&lt;p&gt;This is good enough to make your strong career in GenAI.&lt;/p&gt;
&lt;h1&gt;Phase 1: Retrieval Foundations&lt;/h1&gt;
&lt;h2&gt;1. RAG Fundamentals&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1.1 Simple RAG&lt;/strong&gt;
Embed the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1794411004084" src="image/2026-11-09-agentic-roadmap/1794411004084.png"&gt;&lt;/p&gt;
&lt;p&gt;Are you interested to start your career or switch your career into GenAI? After working 3 years in GenAI, I came up with this AgenticAI Roadmap.&lt;/p&gt;
&lt;p&gt;This is good enough to make your strong career in GenAI.&lt;/p&gt;
&lt;h1&gt;Phase 1: Retrieval Foundations&lt;/h1&gt;
&lt;h2&gt;1. RAG Fundamentals&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1.1 Simple RAG&lt;/strong&gt;
Embed the query, retrieve the top matching chunks, and pass them to the LLM as context.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.2 Chunking Strategies&lt;/strong&gt;
Fixed, recursive, semantic, document-aware and hierarchical splitting. How you chunk often matters more than which model you use.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.3 Embeddings&lt;/strong&gt;
Turn text into vectors so the system can search by meaning rather than exact keywords.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.4 Vector Databases&lt;/strong&gt;
pgvector, Qdrant, FAISS and Elasticsearch store vectors and serve fast similarity search.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.5 Metadata Filtering&lt;/strong&gt;
Narrow retrieval by source, date, owner or type before similarity ranking.&lt;/p&gt;
&lt;h2&gt;2. Advanced RAG&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;2.1 Hybrid RAG&lt;/strong&gt;
Combine dense retrieval with sparse BM25 and merge the two result lists using Reciprocal Rank Fusion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.2 Reranking&lt;/strong&gt;
Re-score the retrieved candidates with a cross-encoder so the best chunks reach the prompt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.3 Multi-Query RAG&lt;/strong&gt;
Rewrite one question into several queries to widen recall.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.4 HyDE&lt;/strong&gt;
Generate a hypothetical answer first, then retrieve using that answer's embedding.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.5 Parent-Child RAG&lt;/strong&gt;
Match on small chunks but return their larger parent sections for fuller context.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.6 Multi-Hop RAG&lt;/strong&gt;
Chain retrievals so each step's answer feeds the next query.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.7 Adaptive RAG&lt;/strong&gt;
Route each query to no retrieval, single-step or multi-step retrieval based on its difficulty.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.8 Corrective RAG (CRAG)&lt;/strong&gt;
Grade the retrieved documents and fall back to rewriting or web search when they are weak.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.9 Self-RAG&lt;/strong&gt;
The model decides when to retrieve and critiques its own output against the sources.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.10 GraphRAG&lt;/strong&gt;
Build a knowledge graph of entities and relations, then retrieve across it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.11 Agentic RAG&lt;/strong&gt;
An agent plans, picks retrieval tools and iterates until it can answer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.12 Multimodal RAG&lt;/strong&gt;
Retrieve over images, tables, charts and audio as well as text.&lt;/p&gt;
&lt;h1&gt;Phase 2: Engineering the System&lt;/h1&gt;
&lt;h2&gt;3. Context Engineering&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;3.1 System Instructions&lt;/strong&gt;
The fixed role, rules and output format the model works under.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.2 Dynamic Context&lt;/strong&gt;
Information injected at runtime, such as the user, time, state or task.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.3 Retrieved Context&lt;/strong&gt;
Documents pulled in by RAG for the current query.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.4 Conversation Context&lt;/strong&gt;
The prior turns kept, trimmed or summarized.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.5 Memory&lt;/strong&gt;
Facts carried across sessions and recalled when relevant.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.6 Tool Context&lt;/strong&gt;
Tool definitions plus the results returned by tool calls.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.7 Context Compression&lt;/strong&gt;
Summarize or prune content so more signal fits in fewer tokens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.8 Context Selection&lt;/strong&gt;
Choose which candidate pieces of context make it into the prompt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.9 Context Prioritization&lt;/strong&gt;
Order and place content so the most important parts get the model's attention.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3.10 Context Window Management&lt;/strong&gt;
Budget tokens across all sources and stay within the model's limit.&lt;/p&gt;
&lt;h2&gt;4. Harness Engineering&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;4.1 Model&lt;/strong&gt;
The LLM at the core, along with its settings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.2 Context&lt;/strong&gt;
What the harness feeds the model on each step.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.3 Memory&lt;/strong&gt;
State the harness persists between steps and sessions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.4 Tools&lt;/strong&gt;
The actions the model can call.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.5 Permissions&lt;/strong&gt;
What each tool or agent is allowed to touch.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.6 Guardrails&lt;/strong&gt;
Input and output checks that block unsafe or off-policy behaviour.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.7 Execution&lt;/strong&gt;
Running tool calls safely, with sandboxing and timeouts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.8 Verification&lt;/strong&gt;
Checking outputs and results before they are accepted.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.9 Retry / Recovery&lt;/strong&gt;
Handling failures, timeouts and bad outputs gracefully.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.10 Audit&lt;/strong&gt;
Logging every decision and action for review.&lt;/p&gt;
&lt;h2&gt;5. Loop Engineering&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;5.1 Generate → Evaluate → Regenerate&lt;/strong&gt;
Produce a draft, score it, and improve it until it passes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.2 Retrieve → Evaluate → Retrieve Again&lt;/strong&gt;
Check retrieval quality and search again when the context is insufficient.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.3 Plan → Execute → Observe → Replan&lt;/strong&gt;
The core agent loop, adjusted after each observation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.4 Critic / Reviewer Loop&lt;/strong&gt;
A second model or prompt reviews the work before it is accepted.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.5 Reflection&lt;/strong&gt;
The model reasons about its own mistakes and how to fix them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.6 Self-Correction&lt;/strong&gt;
The model revises its output using errors or feedback.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.7 Retry Strategy&lt;/strong&gt;
When to retry, how many times, and with what changes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.8 Loop Termination&lt;/strong&gt;
Stop conditions such as a quality threshold, step limit or budget so loops never run forever.&lt;/p&gt;
&lt;h1&gt;Phase 3: Agents&lt;/h1&gt;
&lt;h2&gt;6. Agentic AI&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;6.1 Tool Calling&lt;/strong&gt;
The model emits structured calls to functions and APIs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.2 ReAct&lt;/strong&gt;
Interleave reasoning steps with actions and observations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.3 Planning&lt;/strong&gt;
Break a goal into ordered sub-tasks before acting.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.4 Single Agent&lt;/strong&gt;
One agent with tools handles the whole task.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.5 Multi-Agent&lt;/strong&gt;
Several specialised agents collaborate on a task.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.6 Supervisor / Worker&lt;/strong&gt;
A supervisor delegates tasks to worker agents and merges their results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.7 Planner / Executor&lt;/strong&gt;
One agent plans while another carries out the steps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.8 Router Agent&lt;/strong&gt;
Sends each request to the right agent, tool or model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.9 Critic Agent&lt;/strong&gt;
Reviews other agents' outputs and flags problems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.10 Human-in-the-Loop&lt;/strong&gt;
A person approves or corrects the agent at key points.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.11 Durable Agents&lt;/strong&gt;
Long-running agents that survive restarts through checkpointed state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.12 Agentic RAG&lt;/strong&gt;
Retrieval driven by an agent's own decisions.&lt;/p&gt;
&lt;h2&gt;7. MCP / Tool Ecosystem&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;7.1 MCP Architecture&lt;/strong&gt;
Agent → MCP Client → MCP Server. The server exposes tools in a standard way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7.2 MCP Server Integrations&lt;/strong&gt;
Databases, REST APIs, search, files and enterprise systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7.3 A2A&lt;/strong&gt;
Agent-to-agent protocols that let independent agents talk to each other.&lt;/p&gt;
&lt;h2&gt;8. Memory&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;8.1 Working Memory&lt;/strong&gt;
Scratch state for the current task.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.2 Conversation Memory&lt;/strong&gt;
What was said in this session.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.3 Episodic Memory&lt;/strong&gt;
Records of past events and interactions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.4 Semantic Memory&lt;/strong&gt;
Distilled facts and knowledge.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.5 Procedural Memory&lt;/strong&gt;
Learned how-tos and skills.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.6 User / Profile Memory&lt;/strong&gt;
Stable facts and preferences about the user.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.7 Long-Term Memory&lt;/strong&gt;
Persistent storage across sessions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.8 Memory Tooling&lt;/strong&gt;
Mem0, TencentDB memory approaches, LangGraph persistence and checkpoints, Redis, vector DB memory and graph-based memory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.9 Memory Lifecycle&lt;/strong&gt;
Write → extraction → consolidation → retrieval → forgetting / TTL → conflict resolution.&lt;/p&gt;
&lt;h2&gt;9. Prompt / Program Engineering&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;9.1 Zero-Shot&lt;/strong&gt;
Instructions only, with no examples.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9.2 Few-Shot&lt;/strong&gt;
Instructions plus a handful of worked examples.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9.3 DSPy&lt;/strong&gt;
Treat prompts as programs and optimise them automatically against a metric.&lt;/p&gt;
&lt;h1&gt;Phase 4: Model Adaptation and Evaluation&lt;/h1&gt;
&lt;h2&gt;10. Fine-Tuning&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;10.1 Prompt Engineering&lt;/strong&gt;
Adapt the model's behaviour without changing its weights.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.2 RAG&lt;/strong&gt;
Adapt through external knowledge instead of training.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.3 SFT&lt;/strong&gt;
Supervised fine-tuning on input-output pairs, including instruction tuning.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.4 PEFT&lt;/strong&gt;
Parameter-efficient tuning with LoRA and QLoRA: train small adapters instead of the full model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.5 Preference Optimization&lt;/strong&gt;
Align the model to preferred answers using DPO.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.6 Reinforcement Fine-Tuning&lt;/strong&gt;
Train with reward signals from graders or verifiers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.7 Distillation&lt;/strong&gt;
Teach a small model to imitate a larger one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.8 Continued Pretraining&lt;/strong&gt;
Extend the model's knowledge with domain text.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10.9 POC: RAG vs Fine-Tuning vs RAG + Fine-Tuning&lt;/strong&gt;
Compare the three approaches on the same task and dataset.&lt;/p&gt;
&lt;h2&gt;11. Evaluation&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;11.1 RAG Evaluation&lt;/strong&gt;
RAGAS metrics: faithfulness, context precision, context recall and answer relevance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.2 LLM-as-a-Judge&lt;/strong&gt;
An LLM scores outputs, using DeepEval or a custom judge.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.3 Custom Metrics&lt;/strong&gt;
Domain-specific scores that fit your use case.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.4 Golden Dataset&lt;/strong&gt;
A curated set of questions with expected answers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.5 Regression Testing&lt;/strong&gt;
Re-run evals on every change to catch quality drops.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.6 Human Evaluation&lt;/strong&gt;
People rate outputs as the ground truth.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.7 Pairwise Evaluation&lt;/strong&gt;
Compare two outputs head to head.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.8 Agent Evaluation&lt;/strong&gt;
Score task success, number of steps and trajectory quality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.9 Tool-Call Evaluation&lt;/strong&gt;
Check that the right tool was called with the right arguments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11.10 POC: RAGAS vs DeepEval vs Custom LLM-as-a-Judge vs Human Labels&lt;/strong&gt;
Measure how well each automated method agrees with human judgement.&lt;/p&gt;
&lt;h1&gt;Phase 5: Production&lt;/h1&gt;
&lt;h2&gt;12. Observability&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;12.1 Tracing Tools&lt;/strong&gt;
Langfuse, Arize Phoenix, OpenTelemetry and LangSmith.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;12.2 What to Trace&lt;/strong&gt;
User query, retrieval, reranking, prompt, model, tool calls, tokens, cost, latency and evaluation score.&lt;/p&gt;
&lt;h2&gt;13. AI Safety / Guardrails&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;13.1 Prompt Injection&lt;/strong&gt;
Detect instructions hidden in inputs or retrieved content.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.2 Jailbreak Detection&lt;/strong&gt;
Catch attempts to get around the model's rules.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.3 PII Detection&lt;/strong&gt;
Find and mask personal data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.4 Data Leakage&lt;/strong&gt;
Prevent sensitive data from leaving through outputs or tools.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.5 Toxicity&lt;/strong&gt;
Filter harmful or abusive language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.6 Hallucination Detection&lt;/strong&gt;
Flag claims the sources do not support.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.7 Grounding Verification&lt;/strong&gt;
Check each answer against the retrieved evidence.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.8 Tool Permissions&lt;/strong&gt;
Limit what tools and agents are allowed to do.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.9 Content Filtering&lt;/strong&gt;
Apply policy filters to inputs and outputs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13.10 Human Approval&lt;/strong&gt;
Require sign-off before high-risk actions.&lt;/p&gt;
&lt;h2&gt;14. Multimodal AI&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;14.1 Text → Image Understanding&lt;/strong&gt;
Ask questions about images.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14.2 PDF / Document Intelligence&lt;/strong&gt;
Extract structure and meaning from documents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14.3 OCR + LLM&lt;/strong&gt;
Read scanned text, then reason over it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14.4 Charts / Tables&lt;/strong&gt;
Interpret visual data and tabular data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14.5 Vision-Language Models&lt;/strong&gt;
Models that take images and text together.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14.6 Audio → LLM&lt;/strong&gt;
Feed audio into the model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14.7 Speech → LLM&lt;/strong&gt;
Transcribe speech, then process it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14.8 Multimodal RAG&lt;/strong&gt;
Retrieve across several modalities.&lt;/p&gt;
&lt;h2&gt;15. Structured Generation / Constrained AI&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;15.1 JSON Schema&lt;/strong&gt;
Define the exact output shape the model must produce.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15.2 Pydantic Structured Output&lt;/strong&gt;
Typed Python models for LLM output, a natural fit with FastAPI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15.3 Function Calling&lt;/strong&gt;
Get arguments back that match a function's signature.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15.4 Constrained Decoding&lt;/strong&gt;
Force tokens to follow a grammar or schema during generation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15.5 Validation / Retry&lt;/strong&gt;
Validate the output and re-prompt when it fails.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15.6 Schema Repair&lt;/strong&gt;
Fix almost-valid output instead of discarding it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15.7 Example Flow&lt;/strong&gt;
User → LLM → Pydantic schema → validation → business API.&lt;/p&gt;
&lt;h2&gt;16. Production Model Engineering&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;16.1 Model Routing&lt;/strong&gt;
Send each request to the best-fit model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.2 Model Fallback&lt;/strong&gt;
Switch to a backup model when the primary fails.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.3 Small vs Large Models&lt;/strong&gt;
Use cheap models where they suffice and large ones where they are needed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.4 Quantization&lt;/strong&gt;
Shrink model weights for faster, cheaper inference.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.5 Caching&lt;/strong&gt;
Reuse responses or prompt prefixes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.6 Batching&lt;/strong&gt;
Group requests to increase throughput.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.7 Streaming&lt;/strong&gt;
Return tokens as they are generated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.8 Rate Limits&lt;/strong&gt;
Handle provider limits and quotas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.9 Token Optimization&lt;/strong&gt;
Cut tokens without losing quality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16.10 Cost / Latency / Quality Trade-offs&lt;/strong&gt;
Balance the three for each use case.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;POC Tracker&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;01 RAG&lt;/strong&gt; (Fundamentals done)
Simple, Hybrid, Reranking, Multi-Hop, HyDE, GraphRAG, Adaptive / CRAG / Self-RAG, Agentic RAG.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;02 Context Engineering&lt;/strong&gt;
Selection, compression, prioritization and window management.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;03 Harness Engineering&lt;/strong&gt;
Tools, permissions, guardrails, verification, recovery and audit.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;04 Loop Engineering&lt;/strong&gt;
Evaluate-and-retry loops with clear termination.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;05 Agentic AI&lt;/strong&gt;
Tool calling, single agent, multi-agent, human-in-the-loop.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;06 MCP / A2A&lt;/strong&gt;
MCP servers and agent-to-agent communication.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;07 Memory&lt;/strong&gt;
Layered memory, Mem0, TencentDB.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;08 Prompt / Program Engineering&lt;/strong&gt;
DSPy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;09 Fine-Tuning&lt;/strong&gt;
SFT, LoRA / QLoRA, DPO, distillation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10 Evaluation&lt;/strong&gt;
RAGAS, DeepEval, LLM-as-a-Judge, custom evaluation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11 Observability&lt;/strong&gt;
Langfuse, Phoenix, OpenTelemetry.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;12 Guardrails / AI Safety&lt;/strong&gt;
Injection, PII, hallucination and permission controls.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13 Multimodal AI&lt;/strong&gt;
Documents, OCR, vision, audio and speech.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14 Structured Generation&lt;/strong&gt;
Schema-validated output into business APIs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15 Production AI&lt;/strong&gt;
Routing, caching, cost, latency, security, monitoring.&lt;/p&gt;</content><category term="AI Engineering"/><category term="Agentic AI"/><category term="RAG"/><category term="Context Engineering"/><category term="Harness Engineering"/><category term="Loop Engineering"/><category term="MCP"/><category term="Memory"/><category term="Fine-Tuning"/><category term="Evaluation"/><category term="Observability"/><category term="Guardrails"/></entry><entry><title>Beyond the Persona: Adding Skill and Goal Layers to TencentDB Agent Memory</title><link href="https://blogs.rajacsp.com/tencentdb-agent-memory-l4-skill-l5-goal.html" rel="alternate"/><published>2026-10-31T00:00:00-03:00</published><updated>2026-10-31T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-10-31:/tencentdb-agent-memory-l4-skill-l5-goal.html</id><summary type="html">&lt;p&gt;&lt;img alt="1793461927972" src="image/2026-10-31-tencentdb-agent-memory-l4-skill-l5-goal/1793461927972-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Most RAG applications retrieve the right documents, generate a good answer, and then forget the person who asked. Every session starts from zero, and the user repeats their preferences all over again.&lt;/p&gt;
&lt;p&gt;TencentDB Agent Memory tackles this with a layered design it calls a semantic pyramid. It stops at four …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1793461927972" src="image/2026-10-31-tencentdb-agent-memory-l4-skill-l5-goal/1793461927972-opt.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Most RAG applications retrieve the right documents, generate a good answer, and then forget the person who asked. Every session starts from zero, and the user repeats their preferences all over again.&lt;/p&gt;
&lt;p&gt;TencentDB Agent Memory tackles this with a layered design it calls a semantic pyramid. It stops at four layers. In this article, we extend it with two more: a Skill layer that learns how to help, and a Goal layer that remembers why the user is here.&lt;/p&gt;
&lt;h2&gt;The Four Layers TencentDB Gives You&lt;/h2&gt;
&lt;p&gt;TencentDB organizes memory by meaning, not by time. Each layer is built from the one below it, and each one is smaller and denser than the last.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;L0 Conversation&lt;/strong&gt;
The raw dialogue, stored exactly as it happened. This is the ground truth that every higher layer traces back to.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;L1 Atom&lt;/strong&gt;
Single facts about the user, extracted by an LLM every few turns. One atom holds one fact, such as "owns a 2019 Honda Civic."&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;L2 Scenario&lt;/strong&gt;
Related atoms grouped into topic blocks, stored as plain Markdown. A scenario might read "car maintenance on a budget."&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;L3 Persona&lt;/strong&gt;
A short profile synthesized from many scenarios. It captures stable habits, communication style, and preferences.&lt;/p&gt;
&lt;p&gt;The strength of this design is traceability. When the agent needs evidence, it drills down from persona to scenario to atom to the original message. Nothing is lost to an irreversible summary.&lt;/p&gt;
&lt;h2&gt;What the Pyramid Is Missing&lt;/h2&gt;
&lt;p&gt;The four layers answer three questions well: what was said, what is true, and who the user is. They do not answer two questions that matter just as much in a real product.&lt;/p&gt;
&lt;p&gt;The first is how to help. If a user has twice approved a price comparison laid out as a table, the agent should learn that procedure and reuse it without being asked. That is procedural memory, and it is different from a fact.&lt;/p&gt;
&lt;p&gt;The second is why the user is here. A persona might say "cost-conscious car owner." A goal says "keep this car running ten years at the lowest total cost." The goal changes which answer is most useful, not just how it is phrased.&lt;/p&gt;
&lt;h2&gt;Introducing L4 and L5&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;L4 Skill&lt;/strong&gt;
A reusable procedure learned from conversations that succeeded. It records the task, the steps, when to use it, and the sessions it came from.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;L5 Goal&lt;/strong&gt;
The user's one to three long-term objectives, rebuilt periodically from the persona. It is short enough to inject into every prompt.&lt;/p&gt;
&lt;p&gt;The full pyramid now reads: Conversation, Atom, Scenario, Persona, Skill, Goal. In plain terms, that is what was said, what is true, what is happening, who they are, how to help, and why it matters.&lt;/p&gt;
&lt;h2&gt;Implementation Strategy&lt;/h2&gt;
&lt;p&gt;TencentDB's gateway exposes routes for L0 through L3 only. So we keep TencentDB in charge of the first four layers and build L4 and L5 as a thin extension beside it. Since TencentDB is still in beta, keeping your extension outside its storage means an upgrade will not break your custom layers.&lt;/p&gt;
&lt;p&gt;Skills live in a small SQLite database with full-text search. Goals live in one Markdown file per user.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Pyramid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;learn_skill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;session_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;          &lt;span class="c1"&gt;# L4, on a thumbs-up&lt;/span&gt;
        &lt;span class="n"&gt;convo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tdai&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query_conversation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;session_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;skill&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm_json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Extract a reusable procedure as &amp;quot;&lt;/span&gt;
                         &lt;span class="s2"&gt;&amp;quot;{task, steps, when_to_use}, or null:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;convo&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;skill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;save_or_merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;skill&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;session_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;rebuild_goals&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;                    &lt;span class="c1"&gt;# L5, weekly&lt;/span&gt;
        &lt;span class="n"&gt;persona&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_persona&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;goals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;List this user&amp;#39;s 1-3 long-term goals:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;persona&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dir&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;goals.md&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;goals&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;context_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;goals&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_goals&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;                       &lt;span class="c1"&gt;# L5&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;persona&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_persona&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;                   &lt;span class="c1"&gt;# L3&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;skills&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;find_skills&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;                &lt;span class="c1"&gt;# L4&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;facts&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tdai&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search_atomic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;    &lt;span class="c1"&gt;# L1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The flow inside a RAG application is simple. Record every turn into TencentDB. When the user gives a thumbs-up, try to learn a skill from that session. Once a week, rebuild the goals. Before answering any question, assemble goals, persona, matching skills, and relevant facts into the system prompt, next to your retrieved documents.&lt;/p&gt;
&lt;h2&gt;Design Rules That Matter&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Require a success signal&lt;/strong&gt;
Skills should only be learned from conversations that worked. Without a thumbs-up or a "no correction" signal, the system learns bad procedures as eagerly as good ones.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Merge, do not pile up&lt;/strong&gt;
When a new skill resembles an existing one, let the LLM merge them and append the new session reference. Otherwise you end up with ten versions of the same procedure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let goals steer, not override&lt;/strong&gt;
Tell the model to use goals for prioritizing, while still answering the question asked. Without this, every reply drifts toward the goal.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Keep the drill-down path&lt;/strong&gt;
Every skill stores the sessions it came from. That preserves TencentDB's core promise: any memory can be traced back to the conversation that produced it.&lt;/p&gt;
&lt;h2&gt;A Short Example&lt;/h2&gt;
&lt;p&gt;A Toronto car owner asks over several weeks about snow tires and oil changes, approving two price comparisons laid out as tables. Later, they mention wanting to keep the car for ten years. In week five they type only: "Brakes are squeaking. What now?"&lt;/p&gt;
&lt;p&gt;The Goal layer frames the answer around long-term cost. The Skill layer runs the price-comparison procedure automatically. The Persona keeps the reply short, and the Atoms supply the car model and neighbourhood. The user typed one sentence; the memory supplied the rest.&lt;/p&gt;
&lt;h2&gt;Closing Thoughts&lt;/h2&gt;
&lt;p&gt;Memory layering works because each layer has one job. Adding Skill and Goal layers turns a system that remembers the user into one that learns how to serve them. Automatic skill generation is on TencentDB's roadmap; when it arrives, swap in the native L4 and keep L5 as it is.&lt;/p&gt;</content><category term="GenAI Engineering"/><category term="agent memory"/><category term="TencentDB"/><category term="RAG"/><category term="LLM"/><category term="Python"/><category term="memory layering"/></entry><entry><title>TEE is the Solution for Caste Discrimination</title><link href="https://blogs.rajacsp.com/tee-is-the-solution-for-caste-discrimination.html" rel="alternate"/><published>2026-09-28T00:00:00-03:00</published><updated>2026-09-28T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-28:/tee-is-the-solution-for-caste-discrimination.html</id><summary type="html">&lt;p&gt;&lt;img alt="1790570960126" src="image/2026-09-13-zzemplatecopy/1790570960126.png"&gt;&lt;/p&gt;
&lt;h2&gt;Why I Call Them Hustlers, Not SC/ST&lt;/h2&gt;
&lt;p&gt;Before we go further, a word on language, because words decide how you see yourself. Throughout this piece I refuse to use the label "SC/ST." That term is a bureaucrat's box, a category designed by the very system doing the discriminating …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1790570960126" src="image/2026-09-13-zzemplatecopy/1790570960126.png"&gt;&lt;/p&gt;
&lt;h2&gt;Why I Call Them Hustlers, Not SC/ST&lt;/h2&gt;
&lt;p&gt;Before we go further, a word on language, because words decide how you see yourself. Throughout this piece I refuse to use the label "SC/ST." That term is a bureaucrat's box, a category designed by the very system doing the discriminating. It reduces living, striving people to a classification on a form. So I call them something else: Hustlers. And the name is earned, not decorative. Caste discrimination in India has a body count — every year, talented young people from these communities are pushed to the edge, and too many are lost to despair and suicide because the world kept telling them they were less. But that is not the whole story. Against that same crushing pressure, most do the opposite of breaking. They grind, adapt, out-work, and out-last. They turn exclusion into fuel and become the living proof of survival of the fittest. That is not a victim class. That is a Hustler class — and the rest of this article is written for them.&lt;/p&gt;
&lt;h2&gt;The TEE Blueprint: What Sri Lanka's Tamils Taught the World&lt;/h2&gt;
&lt;p&gt;There is a lesson buried in one of South Asia's hardest chapters. For decades, Sri Lanka's Tamil minority faced systematic discrimination — shut out of jobs, universities, and dignity, and eventually out of safety itself. When the pressure became unbearable, they did not spend their lives waiting for the majority to have a change of heart. They left. Tamils rebuilt entire communities in Canada, the United Kingdom, the Netherlands, Germany, and Switzerland. Toronto alone became home to one of the largest Sri Lankan Tamil populations on earth. Call it the Tamil Exodus Effect — TEE. The discrimination meant to crush them instead scattered them into places where their talent could finally breathe. A generation told it did not belong went on to produce doctors, engineers, entrepreneurs, and leaders. The exodus was not surrender; it was strategy. And for any Hustler in India still suffocating under the weight of caste, the TEE offers a template that is uncomfortable but honest: sometimes the fastest way to win a rigged game is to stop playing it locally.&lt;/p&gt;
&lt;h2&gt;You Can't Change the People Around You — But You Can Change the People Around You&lt;/h2&gt;
&lt;p&gt;Read that subtitle twice, because the whole philosophy lives inside the pun. The first meaning is a hard truth: you cannot reprogram the casteist uncle, the matrimonial column, or the neighbor who asks your surname before your name. Attitudes hardened over a thousand years do not soften because you argued well at a wedding. The second meaning is your escape hatch: while you cannot change &lt;em&gt;the people&lt;/em&gt;, you can absolutely change &lt;em&gt;which people&lt;/em&gt; surround you. You can move to a city, a country, an ecosystem where your caste is not a category anyone thinks to check. This is the Hustler's edge — refusing to burn your one life fighting a wall built to outlast you. Reform is noble, but reform is slow, and you are not obligated to be a martyr for a system that would never return the favor. Change your zip code and you change your reality. The casteist grid only has power where it is enforced. Step outside its map, and the coordinates mean nothing.&lt;/p&gt;
&lt;h2&gt;Love Beyond the Grid: Why Crossing Borders Dissolves Caste&lt;/h2&gt;
&lt;p&gt;Here is where the strategy turns personal. In India, love is rarely just love — it is a background check. The moment you fall for someone locally, two families begin auditing gotras, surnames, and generations of so-called purity. Step outside that world and the interrogation simply vanishes. Fall in love with someone who was never taught the caste code — a partner from another country, another culture, another way of seeing — and your caste stops being a verdict. It becomes, at most, a piece of trivia. They are not evaluating your bloodline; they are meeting &lt;em&gt;you&lt;/em&gt;. This is not about treating a relationship as a getaway car — genuine love is the whole point. It is about giving yourself the chance to be loved as a full person rather than a caste certificate. When you build a family free of inherited hierarchy, your children inherit freedom instead of a label. That single choice quietly breaks a chain no protest march could snap. Sometimes the most radical anti-caste act is falling for the "wrong" person on purpose.&lt;/p&gt;
&lt;h2&gt;The 30-Year Boomerang: Leave, Build, Return&lt;/h2&gt;
&lt;p&gt;But the TEE is only half a story if the exodus is permanent. The real masterstroke is the return. Leave — yes — but come back thirty years later as a different kind of force. Sri Lanka's diaspora did exactly this, funding schools, rebuilding towns, and pouring resources and hard-won influence back into the homeland from abroad. Imagine a generation of Hustlers who spent three decades earning, learning, and living in societies where caste held no currency, and then came home. They return not as supplicants begging the old guard for acceptance, but as people with capital, credibility, and a completely rewired sense of what is normal. They fund the schools that teach children to ignore surnames. They hire on merit. They marry across lines and make it ordinary. Distance gives you the one thing India cannot: the ability to see the cage from the outside. A person who has lived free of caste for thirty years cannot be gaslit back into it — and that immunity, brought home at scale, is how you finally starve the system.&lt;/p&gt;
&lt;h2&gt;The Hustler's Real Exit&lt;/h2&gt;
&lt;p&gt;So what does the TEE actually ask of you? Not bitterness, and not abandoning your roots — just clarity. The Hustler's mindset has always been about optimizing the game you are actually in, and if the local game is rigged by an accident of birth, the smartest move is to expand the board. Get out. Get educated. Get resourced. Fall in love without a permission slip. Raise a family that does not know what your caste is supposed to mean. Then, when you are strong enough that no one can look down on you, come back and pull others up. The Tamils did not escape discrimination by winning an argument; they escaped it by outgrowing the place that discriminated against them, and then returning to reshape it. Casteism survives on your presence and your compliance. Withdraw both, build somewhere your worth is measured honestly, and let your success become the argument you never had to make. The exit is not running away — it is the beginning of the fix.&lt;/p&gt;</content><category term="Society"/><category term="caste"/><category term="diaspora"/><category term="migration"/><category term="mindset"/><category term="TEE"/><category term="hustlers"/></entry><entry><title>Believers' Circle: Faith at the Center, Impact Everywhere</title><link href="https://blogs.rajacsp.com/believers-circle-2026.html" rel="alternate"/><published>2026-09-26T00:00:00-03:00</published><updated>2026-09-26T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-26:/believers-circle-2026.html</id><summary type="html">&lt;p&gt;&lt;img alt="1790393920365" src="image/2026-09-26-believers-circle/1790393920365.png"&gt;&lt;/p&gt;
&lt;p&gt;Every movement begins with a conviction that will not stay quiet. For me, that conviction arrived as a calling: to gather believers into a fellowship where Jesus stands at the center, where caste has no place at the table, and where faith shapes not only how we pray but how …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1790393920365" src="image/2026-09-26-believers-circle/1790393920365.png"&gt;&lt;/p&gt;
&lt;p&gt;Every movement begins with a conviction that will not stay quiet. For me, that conviction arrived as a calling: to gather believers into a fellowship where Jesus stands at the center, where caste has no place at the table, and where faith shapes not only how we pray but how we heal, build, govern, and create. That fellowship is Believers' Circle, or BC.&lt;/p&gt;
&lt;h2&gt;Why Believers' Circle?&lt;/h2&gt;
&lt;p&gt;Many of us owe a great deal to the Evangelical Union (EU) and the Evangelical Graduates Fellowship (EGF). These movements shaped generations of students, taught us to read Scripture seriously, and pushed the church toward meaningful social engagement. BC stands on their shoulders with gratitude.&lt;/p&gt;
&lt;p&gt;Yet over time, a large share of that energy has been directed toward full-time ministry as the highest expression of a surrendered life. BC holds a different conviction. Full-time ministry is a sacred and necessary calling, and we expect perhaps one to three percent of our members to answer it. But God's kingdom also needs believers in operating theatres, engineering labs, district collectorates, boardrooms, and start-up garages. A Christian doctor who treats the poor with dignity is doing kingdom work. So is an engineer who refuses to cut corners, a civil servant who refuses a bribe, and an entrepreneur who pays fair wages.&lt;/p&gt;
&lt;p&gt;There is a danger in this vision, and we name it openly: money. When believers pursue professional excellence, wealth often follows, and wealth has a way of quietly replacing God. BC exists to hold that tension honestly. We want members who prosper, but never members who are derailed by prosperity. Our measure of success is faithfulness, not bank balances.&lt;/p&gt;
&lt;h2&gt;Our Mission&lt;/h2&gt;
&lt;p&gt;BC's mission rests on a few simple but demanding commitments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jesus Is the Center&lt;/strong&gt;
We believe in Jesus Christ, and everything else orbits around Him. BC is not tied to any single church or denomination. Members may worship in any congregation, provided Jesus remains the center. Our unity comes from Him, not from shared liturgy or leadership structures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Casteless Brotherhood&lt;/strong&gt;
In too many places, caste still quietly decides who sits together, who marries whom, and who leads. In BC, it decides nothing. We are one family, brothers and sisters in Christ, and we mean that literally. Our fellowship is casteless by design, and we will guard that commitment carefully.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact Across Society&lt;/strong&gt;
We want to raise more doctors, engineers, civil servants, business owners, and entrepreneurs who carry their faith into their work, because a nation is shaped by those who lead its hospitals, offices, and marketplaces. We will encourage students, mentor young professionals, and celebrate members who excel in their fields while serving others.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A People of Prayer&lt;/strong&gt;
BC will be built on its knees. Our Early Prayer Birds will begin the day with God before the world wakes, and our Late Night Prayer Warriors will intercede while others sleep. We envision a Prayer Tower, a Prayer Temple, and a Prayer Wall: dedicated places and practices where requests are lifted up continuously and answered prayers are remembered with thanksgiving.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Faith That Engages Science&lt;/strong&gt;
Many young believers quietly wonder whether they must choose between their faith and their education. We say no. BC will create space to explore complex scientific questions through the lens of Scripture, with honesty and humility, so that members can grow intellectually without losing their faith.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Standing Together in Hard Times&lt;/strong&gt;
Job losses, illness, failed businesses, grief: every member will face seasons of difficulty. BC commits to carrying one another's burdens in prayer, presence, and practical help.&lt;/p&gt;
&lt;h2&gt;How We Gather&lt;/h2&gt;
&lt;p&gt;Fellowship is not only built in meetings. It grows in shared experiences, laughter, and creativity. BC will host a range of events designed to bring believers together.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Faith and Fellowship Tourism&lt;/strong&gt;
Journeys that combine rest, worship, and relationship. We plan visits to the tea-covered hills of Valparai, the churches and backwaters of Kerala, and, further afield, Sri Lanka and the Philippines, where we can meet fellow believers, learn from their stories, and see how the gospel has taken root in different cultures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Comedy Show&lt;/strong&gt;
Guided by biblical principles, proving that joy and holiness are not opposites. Clean, thoughtful humor can heal and unite in ways sermons sometimes cannot.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Biblical Singing Competition&lt;/strong&gt;
A celebration of worship through music, giving our gifted voices a stage to glorify God together.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Biblical Speech Competition&lt;/strong&gt;
Training young people to articulate their faith clearly and confidently, a skill every Christian professional needs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Monthly Magazine&lt;/strong&gt;
Connecting our members across cities and countries, carrying testimonies, Bible reflections, career stories, prayer requests, and updates on what God is doing through the Circle.&lt;/p&gt;
&lt;h2&gt;An Invitation&lt;/h2&gt;
&lt;p&gt;Believers' Circle is not a replacement for your church, and it is not a competitor to the movements that came before it. It is a circle: open, connected, and centered on one Person. If you are a student wondering how your degree fits into God's plan, a professional hungry for fellowship that understands your world, or a believer longing for a family where caste and status do not matter, there is a place for you here.&lt;/p&gt;
&lt;p&gt;Our prayer is simple. May BC raise a generation that prays early and late, works with excellence, walks humbly, and never lets money take the place of Christ. If that prayer stirs something in you, come and join the Circle.&lt;/p&gt;</content><category term="Faith &amp; Community"/><category term="Believers Circle"/><category term="Christian Fellowship"/><category term="Casteless Fellowship"/><category term="Prayer"/><category term="Faith and Science"/><category term="Society Impact"/></entry><entry><title>Dude, Make Up Your Mind</title><link href="https://blogs.rajacsp.com/dude-make-up-your-mind.html" rel="alternate"/><published>2026-09-12T00:00:00-03:00</published><updated>2026-09-12T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-12:/dude-make-up-your-mind.html</id><summary type="html">&lt;p&gt;&lt;img alt="1789236654112" src="image/2026-09-10-make-up-your-mind/1789236654112.png"&gt;&lt;/p&gt;
&lt;p&gt;There's a special kind of exhaustion reserved for people who work with Microsoft products. It's not the exhaustion of debugging a null pointer at 2 a.m., or the exhaustion of a meeting that should've been an email. It's the exhaustion of opening a tutorial you bookmarked four months ago …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1789236654112" src="image/2026-09-10-make-up-your-mind/1789236654112.png"&gt;&lt;/p&gt;
&lt;p&gt;There's a special kind of exhaustion reserved for people who work with Microsoft products. It's not the exhaustion of debugging a null pointer at 2 a.m., or the exhaustion of a meeting that should've been an email. It's the exhaustion of opening a tutorial you bookmarked four months ago and realizing every single product name in it is now wrong.&lt;/p&gt;
&lt;p&gt;Let me tell you what set me off this time.&lt;/p&gt;
&lt;h2&gt;A Platform With an Identity Crisis&lt;/h2&gt;
&lt;p&gt;It started as &lt;strong&gt;Azure AI Studio&lt;/strong&gt;. Fine. Reasonable name. It's a studio, it's on Azure, it does AI.&lt;/p&gt;
&lt;p&gt;Then at Ignite 2024, it became &lt;strong&gt;Azure AI Foundry&lt;/strong&gt;. Okay, sure. "Foundry" sounds more industrial, more serious. I updated my slides. I updated the one paragraph in my docs that mentioned it.&lt;/p&gt;
&lt;p&gt;Then — appreciate the timing here — barely twelve months later at Ignite 2025, it became &lt;strong&gt;Microsoft Foundry&lt;/strong&gt;. They dropped the "Azure." The official justification is that dropping "Azure" signals agents are now "first-class citizens" in the Microsoft ecosystem rather than just another Azure service. The agents got a promotion. I got homework.&lt;/p&gt;
&lt;p&gt;That's two rebrands in twelve months for one product. The half-life of a Microsoft product name is now shorter than the time it takes me to finish the course explaining it.&lt;/p&gt;
&lt;h2&gt;This Is Not an Isolated Incident. This Is a Lifestyle.&lt;/h2&gt;
&lt;p&gt;If Foundry were a one-off, I'd let it slide. But Microsoft renames things the way other people breathe.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Azure Active Directory → Microsoft Entra ID.&lt;/strong&gt; Which is genuinely funny, because now Azure Active Directory isn't Azure Active Directory anymore, but &lt;em&gt;Active Directory&lt;/em&gt; — the actual on-prem thing — is still Active Directory. Cleared that right up.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Office → Office 365 → Microsoft 365 → Microsoft 365 Copilot.&lt;/strong&gt; At this point calling it "Office" is like calling a stadium by the name of a company that stopped sponsoring it a decade ago. Everyone knows what you mean, and everyone knows you're old.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Configuration Manager holds the record.&lt;/strong&gt; SMS → SCCM → Endpoint Configuration Manager → Configuration Manager. Four names. It renamed itself back to almost where it started, like a man who tries three haircuts and goes back to the original.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Someone built a rename tracker.&lt;/strong&gt; It catalogues over 40 products and 65+ name changes going back to 2006. The renaming is so relentless it spawned its own cottage industry of tools whose only job is to help you figure out what the thing you already own is called this week.&lt;/p&gt;
&lt;h2&gt;The Thing Is, They're Not Wrong — And That's What's So Annoying&lt;/h2&gt;
&lt;p&gt;Here's the infuriating part. Every rename has a defensible reason.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Azure AI Studio genuinely outgrew "studio."&lt;/strong&gt; It became a full platform with an agent service, model catalog, evaluations, and governance. Dropping "Azure" genuinely reflects that Foundry now reaches into GitHub, VS Code, Microsoft 365, and runs locally off the cloud too.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Renaming Azure AD to Entra genuinely reduced confusion&lt;/strong&gt; with on-prem Active Directory — while creating a whole new confusion, but let's not relitigate.&lt;/p&gt;
&lt;p&gt;Each individual decision, in a well-lit conference room, makes sense. But strategy changes every eighteen months, and so does the name. And nobody in that room is the one explaining to a room full of bootcamp students why the platform in their official study materials has a different name than the platform on the actual screen. That person is me.&lt;/p&gt;
&lt;h2&gt;The Real Cost Isn't Confusion. It's Trust.&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Rename once, people update. Rename twice in a year, people stop learning the name at all.&lt;/strong&gt; They just wait to see if it sticks. That's the actual damage — the slow erosion of anyone treating the name as load-bearing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Every reference now comes with a genealogy.&lt;/strong&gt; I catch myself writing "Microsoft Foundry (formerly Azure AI Foundry, formerly Azure AI Studio)" like I'm reading the credits of a witness protection program. Every doc needs a footnote. Every conversation starts with a five-second disambiguation ritual.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The machinery doesn't care what the marquee says.&lt;/strong&gt; Under all the names, the URLs, APIs, endpoints, and keys usually stay the same. So the rename changed nothing that functions and everything that's documented — maximum disruption to humans, zero disruption to the product.&lt;/p&gt;
&lt;h2&gt;So, Microsoft, From One Tired Engineer&lt;/h2&gt;
&lt;p&gt;I'm not asking you to never rename anything. Products evolve. Names should too, occasionally, with ceremony and warning and a very good reason.&lt;/p&gt;
&lt;p&gt;I'm asking you to pick a name and sit with it. Let it get old. Let it get comfortable. Let a full generation of Stack Overflow answers reference it before you tear it all down again. Let me write one tutorial that's still accurate by the time someone reads it.&lt;/p&gt;
&lt;p&gt;Dude. Make up your mind.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;And if it's changed again by the time you're reading this — no it hasn't. I refuse.&lt;/em&gt;&lt;/p&gt;</content><category term="Cloud &amp; AI"/><category term="Microsoft"/><category term="Azure"/><category term="Rebranding"/><category term="Developer Experience"/><category term="Rant"/></entry><entry><title>I am a modern Ekalaivan of IIT Madras</title><link href="https://blogs.rajacsp.com/i-am-a-modern-ekailavan-of-iit-madras.html" rel="alternate"/><published>2026-09-11T00:00:00-03:00</published><updated>2026-09-11T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-11:/i-am-a-modern-ekailavan-of-iit-madras.html</id><summary type="html">&lt;p&gt;&lt;img alt="1789261480725" src="image/2026-09-11-i-am-a-modern-ekailavan-of-iit-madras/1789261480725.png"&gt;&lt;/p&gt;
&lt;p&gt;They call me Ekalaivan of IIT.&lt;/p&gt;
&lt;p&gt;If you know the Mahabharata, you know why that name means something to me. Ekalaivan learned archery without ever formally sitting before his teacher. He absorbed the craft through devotion, observation, and relentless practice. That is my story too. I never held an IIT …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1789261480725" src="image/2026-09-11-i-am-a-modern-ekailavan-of-iit-madras/1789261480725.png"&gt;&lt;/p&gt;
&lt;p&gt;They call me Ekalaivan of IIT.&lt;/p&gt;
&lt;p&gt;If you know the Mahabharata, you know why that name means something to me. Ekalaivan learned archery without ever formally sitting before his teacher. He absorbed the craft through devotion, observation, and relentless practice. That is my story too. I never held an IIT degree, yet IIT shaped the engineer I became.&lt;/p&gt;
&lt;p&gt;Let me take you back.&lt;/p&gt;
&lt;h2&gt;Where It Began&lt;/h2&gt;
&lt;p&gt;In the early days of my IT journey, I joined NMSWorks Software, a company incubated inside the Indian Institute of Technology, Madras. It was there that I met the man who would change the trajectory of my life: Mani Subramanian, my Guru.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mani was no ordinary professor.&lt;/strong&gt; He held a Ph.D. from Purdue, managed research at Bell Labs, founded companies acquired by Scientific Atlanta and later Cisco, and authored the network management textbook used in over fifteen countries.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;At IIT Madras, he set the standard.&lt;/strong&gt; He served as the Analog Devices Chair Professor and led NMSWorks to world leadership in Optical Transport Network Management. To be near a mind like that was an education no classroom could sell.&lt;/p&gt;
&lt;p&gt;For three years, I worked under Mani on telecommunications projects, and for that time I lived on the IIT Madras campus. I breathed the air of one of the most demanding institutions on earth. I ate in its mess halls, walked its corridors at midnight, and worked alongside research scholars who treated problems not as obstacles but as invitations.&lt;/p&gt;
&lt;h2&gt;The Master I Chose&lt;/h2&gt;
&lt;p&gt;Here is the truth about Ekalaivan that most people forget. He did not passively receive knowledge. He chose his teacher, built a discipline around that choice, and out-practiced everyone who had the formal privilege he lacked.&lt;/p&gt;
&lt;p&gt;I chose Mani. And in choosing him, I chose a standard.&lt;/p&gt;
&lt;p&gt;I was preparing to pursue a Master's at IIT Madras under his guidance. It was my dream. Personal circumstances meant it never came to pass, and for a long time that felt like a door closing. But looking back now, twenty years later, I understand something I couldn't see then: the preparation itself became the gift. The rigor I built while chasing that dream became the engine of a lifelong learning curve that has never slowed down.&lt;/p&gt;
&lt;h2&gt;What IIT Actually Taught Me&lt;/h2&gt;
&lt;p&gt;People assume the secret of IIT is its entrance exam or its brand. It isn't. I lived inside that campus, and I watched closely. The real secrets are quieter, and they are available to anyone willing to live by them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Intensity without permission.&lt;/strong&gt; Nobody at IIT waits to be told to work hard. The late-night hustle I learned in those NMSWorks labs, solving telecom problems that had no textbook answers, is a habit I carry into every GenAI system I build today.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Learning by proximity.&lt;/strong&gt; I did not need to be enrolled to absorb how the best engineers thought. I only needed to be in the room, paying attention, asking questions, and being useful.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems before credentials.&lt;/strong&gt; At IIT, your worth is measured by what you can solve, not what certificate you hold. That belief carried me further than any diploma could have.&lt;/p&gt;
&lt;h2&gt;The Long Road to Canada&lt;/h2&gt;
&lt;p&gt;In 2010, I moved to Canada for higher studies, and I have called it home ever since. But I never stopped being that campus engineer at heart.&lt;/p&gt;
&lt;p&gt;Every weekend, I took on freelance projects, not for the money but for the fuel. Each project was a chance to sharpen my edge on whatever technology was emerging. While others rested, I was learning. That discipline, first forged inside IIT Madras, is the reason I sit where I sit today: a Senior GenAI Researcher and Engineer at one of North America's top ten banks.&lt;/p&gt;
&lt;p&gt;The mantras I learned on that campus did not expire when I left India. They compounded.&lt;/p&gt;
&lt;h2&gt;Why I'm Sharing This Now&lt;/h2&gt;
&lt;p&gt;For years, I kept these lessons to myself, treating them as private fuel. But knowledge hoarded is knowledge wasted. Ekalaivan's story ends in sacrifice, but mine doesn't have to. I would rather pass the craft forward.&lt;/p&gt;
&lt;p&gt;So I am ready, finally, to share the secrets of IIT, but only in the domain I have earned the right to teach: computing. Specifically GenAI, Linux, Ubuntu, and Mac. These are the tools I have spent two decades mastering, and these are the areas where my hard-won lessons can actually serve you.&lt;/p&gt;
&lt;p&gt;If you are self-taught, if you never got the formal seat you dreamed of, if you feel like the outsider looking in, hear me clearly: the seat was never the point. The devotion is the point. The practice is the point. The refusal to wait for permission is the point.&lt;/p&gt;
&lt;p&gt;Ekalaivan learned archery by aiming at a target no one gave him. You can learn GenAI the same way.&lt;/p&gt;
&lt;p&gt;Let me show you how.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;In gratitude to Mani Subramanian, who taught me that the walls of a classroom are the smallest part of an education.&lt;/em&gt;&lt;/p&gt;</content><category term="Career"/><category term="IIT"/><category term="GenAI"/><category term="Self-Taught"/><category term="Mentorship"/><category term="Linux"/><category term="Autodidacticism"/><category term="Autodidact"/></entry><entry><title>Azure App Service vs Container Apps vs ACI vs AKS</title><link href="https://blogs.rajacsp.com/azure-app-service-container-apps-aci-aks.html" rel="alternate"/><published>2026-09-08T00:00:00-03:00</published><updated>2026-09-08T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-08:/azure-app-service-container-apps-aci-aks.html</id><summary type="html">&lt;p&gt;&lt;img alt="1789002679851" src="image/2026-09-08-azure-app-service-container-apps-aci-aks/1789002679851.png"&gt;&lt;/p&gt;
&lt;p&gt;Choosing between Azure's container and app-hosting services comes down to how much control you need versus how much operational burden you're willing to carry. Four services cover most scenarios, ranging from fully managed PaaS to full Kubernetes. The trick is matching the abstraction level to the workload rather than reaching …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1789002679851" src="image/2026-09-08-azure-app-service-container-apps-aci-aks/1789002679851.png"&gt;&lt;/p&gt;
&lt;p&gt;Choosing between Azure's container and app-hosting services comes down to how much control you need versus how much operational burden you're willing to carry. Four services cover most scenarios, ranging from fully managed PaaS to full Kubernetes. The trick is matching the abstraction level to the workload rather than reaching for the most powerful option by default.&lt;/p&gt;
&lt;h2&gt;Azure App Service&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt; A platform-as-a-service for hosting web apps, REST APIs, and backends. You push code (.NET, Node, Python, Java, PHP) or a single container image and Azure manages the OS, patching, and underlying compute entirely.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where it shines&lt;/strong&gt; Built-in features do the heavy lifting: managed TLS certificates, custom domains, authentication via Easy Auth, deployment slots for staging and swap, and autoscale rules out of the box. It's the fastest path from code to a running, production-grade URL.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Watch out for&lt;/strong&gt; It's opinionated about the single-app model. Multi-container microservice topologies, sidecars, and fine-grained networking get awkward. Cold starts on lower tiers and cost creep on higher Premium plans are the usual friction points.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best fit&lt;/strong&gt; A team shipping a web app or API that wants minimal ops and doesn't want to think about containers or orchestration at all.&lt;/p&gt;
&lt;h2&gt;Azure Container Apps&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt; A serverless container platform built on Kubernetes and KEDA, with the cluster fully abstracted away. You bring container images; Azure handles scheduling, scaling, and ingress without exposing any Kubernetes surface.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where it shines&lt;/strong&gt; Scale-to-zero and event-driven autoscaling (HTTP traffic, queue depth, or any KEDA scaler) make it efficient for bursty and microservice workloads. Native Dapr integration simplifies service-to-service calls, pub/sub, and state, while revisions give you blue-green and canary deploys for free.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Watch out for&lt;/strong&gt; You trade Kubernetes control for simplicity — no direct access to nodes, custom operators, or arbitrary cluster-level configuration. If you eventually need that control, migration means stepping up to AKS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best fit&lt;/strong&gt; Microservices and event-driven systems that want container flexibility and modern deploy patterns without owning a Kubernetes cluster.&lt;/p&gt;
&lt;h2&gt;Azure Container Instances (ACI)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt; A low-level primitive that runs a single container or a container group on demand, billed per second, with near-instant startup. There's no built-in orchestration, load balancing, or autoscaling.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where it shines&lt;/strong&gt; Fast, ephemeral compute: batch jobs, scheduled tasks, CI/CD runners, and one-off processing. It also serves as elastic burst capacity behind AKS via the Virtual Kubelet, absorbing spikes without adding permanent nodes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Watch out for&lt;/strong&gt; It's a building block, not a full service. Running long-lived production apps on ACI alone means reinventing routing, scaling, and health management yourself — which is exactly what the higher-level services already solve.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best fit&lt;/strong&gt; Short-lived, self-contained container tasks, or burst compute that complements another orchestrator.&lt;/p&gt;
&lt;h2&gt;Azure Kubernetes Service (AKS)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What it is&lt;/strong&gt; Fully managed Kubernetes. Azure runs the control plane for free; you own the node pools, networking model, upgrades, scaling policies, and all the YAML that goes with them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where it shines&lt;/strong&gt; Maximum control and the entire Kubernetes ecosystem — Helm, operators, service meshes (Istio, Linkerd), GitOps, custom controllers, and advanced networking. It's the right foundation for complex, multi-region, or highly customized platforms and for teams already fluent in Kubernetes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Watch out for&lt;/strong&gt; The operational burden is real: node patching, version upgrades, capacity planning, security hardening, and cluster observability all become your responsibility. It's easy to over-adopt AKS for workloads the simpler services would handle with a fraction of the effort.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Best fit&lt;/strong&gt; Teams that genuinely need Kubernetes — for ecosystem, control, or scale — and have the capacity to operate it well.&lt;/p&gt;
&lt;h2&gt;Decision Guide&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Deploy a web app or API with minimal ops&lt;/strong&gt; Reach for App Service; it gets you to production fastest with the least to manage.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Microservices or event-driven work without Kubernetes ops&lt;/strong&gt; Reach for Container Apps; you get scaling and modern deploys without cluster overhead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One-off container, job, or burst compute&lt;/strong&gt; Reach for ACI; pay per second for exactly the work you run.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Full control and the Kubernetes ecosystem&lt;/strong&gt; Reach for AKS; accept the ops cost in exchange for total flexibility.&lt;/p&gt;
&lt;h2&gt;Rule of Thumb&lt;/h2&gt;
&lt;p&gt;Start at App Service or Container Apps for most workloads — they cover the large majority of real-world apps and APIs. Drop to ACI when you need a job or burst runner rather than a standing service. Move to AKS only when a concrete requirement — ecosystem, control, or scale — justifies the operational weight it brings. Choosing the lightest service that meets the need is almost always the cheaper and more maintainable call.&lt;/p&gt;</content><category term="Cloud"/><category term="Azure"/><category term="Containers"/><category term="Kubernetes"/><category term="PaaS"/></entry><entry><title>Found our second diamond via our DSP: Prasanna</title><link href="https://blogs.rajacsp.com/dsp-2-prasanna.html" rel="alternate"/><published>2026-09-08T00:00:00-03:00</published><updated>2026-09-08T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-08:/dsp-2-prasanna.html</id><summary type="html">&lt;p&gt;&lt;img alt="1788926638075" src="image/2026-09-07-dsp-2-pg-prasanna/1788926638075.png"&gt;&lt;/p&gt;
&lt;p&gt;The Diamond Sourcing Program (DSP) is a community support initiative personally funded by Raja CSP Raman via Kactii. Through our DSP, we find fresh diamonds — people whose efforts and dreams deserve recognition, but who may not yet have the tools to fully chase them. As a gesture of appreciation, we …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1788926638075" src="image/2026-09-07-dsp-2-pg-prasanna/1788926638075.png"&gt;&lt;/p&gt;
&lt;p&gt;The Diamond Sourcing Program (DSP) is a community support initiative personally funded by Raja CSP Raman via Kactii. Through our DSP, we find fresh diamonds — people whose efforts and dreams deserve recognition, but who may not yet have the tools to fully chase them. As a gesture of appreciation, we offer an old MacBook to support them on their journey. This is not a grant, a scholarship, or a contract — it is simply a community gesture, given with no strings attached. Full details live at &lt;a href="https://wiki.kactii.com/dsp.html"&gt;https://wiki.kactii.com/dsp.html&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;What the DSP Is About&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A Small Tool, A Big Message&lt;/strong&gt; A used MacBook may seem like a modest gift, but its real value is the message behind it: someone sees your effort, believes in your dreams, and wants you to keep going. Sometimes that belief is the push a person needs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Community, Not Charity&lt;/strong&gt; The DSP is built on the idea of a community lifting up its own. We are not looking for the most accomplished or the most credentialed — we are looking for genuine effort and honest dreams, wherever they come from.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Personally Funded&lt;/strong&gt; Every device in this program is funded personally by Raja CSP Raman through Kactii. It reflects a personal commitment to giving back, one diamond at a time.&lt;/p&gt;
&lt;h2&gt;Season 2&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A New Season, A New Diamond&lt;/strong&gt; Season 2 continues what Season 1 began: finding people who are quietly working toward something meaningful and giving them a small boost. Each season, we hope to widen the circle a little more.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second Recipient&lt;/strong&gt; In Season 2, we are glad to hand over our second MacBook to a deserving diamond — the second recipient in the history of the program.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;P.G.Prasanna&lt;/strong&gt; Based in Ulundurpet, Tamil Nadu, India, Prasanna is the recipient of DSP #2. This MacBook is a small token to appreciate his efforts and dreams. We are proud to welcome him into the growing DSP family.&lt;/p&gt;
&lt;h2&gt;Looking Ahead&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;More Diamonds to Come&lt;/strong&gt; Prasanna is the second of many. As the program grows, we look forward to discovering more fresh diamonds and celebrating the effort and ambition that so often goes unseen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Know a Diamond?&lt;/strong&gt; If you know someone whose effort and dreams deserve a little recognition, the DSP is always looking. Learn more and reach out at &lt;a href="https://wiki.kactii.com/dsp.html"&gt;https://wiki.kactii.com/dsp.html&lt;/a&gt;.&lt;/p&gt;</content><category term="Community"/><category term="DSP"/><category term="Kactii"/><category term="Community Support"/><category term="MacBook"/></entry><entry><title>FDFS Freak — But in GenAI</title><link href="https://blogs.rajacsp.com/fdfs-freak-but-in-genai.html" rel="alternate"/><published>2026-09-05T00:00:00-03:00</published><updated>2026-09-05T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-05:/fdfs-freak-but-in-genai.html</id><summary type="html">&lt;p&gt;&lt;img alt="1789004953502" src="image/2026-09-06-fdfs-freak-but-in-genai/1789004953502.png"&gt;&lt;/p&gt;
&lt;p&gt;I'm not showing off. This is just what I am.&lt;/p&gt;
&lt;p&gt;I'm an FDFS Freak — First Day, First Show. But in GenAI.&lt;/p&gt;
&lt;p&gt;You know the type. The fan who books the earliest possible screening, front row, opening day. Not for the review scores, not for the crowd — for the sheer thrill …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1789004953502" src="image/2026-09-06-fdfs-freak-but-in-genai/1789004953502.png"&gt;&lt;/p&gt;
&lt;p&gt;I'm not showing off. This is just what I am.&lt;/p&gt;
&lt;p&gt;I'm an FDFS Freak — First Day, First Show. But in GenAI.&lt;/p&gt;
&lt;p&gt;You know the type. The fan who books the earliest possible screening, front row, opening day. Not for the review scores, not for the crowd — for the sheer thrill of being there when it drops. That's me. Except my screen isn't in a theatre. It's a terminal.&lt;/p&gt;
&lt;p&gt;When something like FreeToken lands — a frontier-scale MoE engine that runs 284B on a single RTX 5090 — I'm not waiting for the think-pieces. I'm cloning the repo, reading the paper, watching the experts stream over PCIe on my own machine. First day. First show. Front row.&lt;/p&gt;
&lt;p&gt;This isn't a job thing. It's a wiring thing.&lt;/p&gt;
&lt;p&gt;I'm Raja CSP Raman, Senior GenAI Engineer at one of the top 10 banks in North America. The day work is serious — but the FDFS instinct is what got me here and what keeps me here.&lt;/p&gt;
&lt;p&gt;I've published 12 research papers on arXiv. When a new idea drops, I don't just consume it — I contribute back to the record.&lt;/p&gt;
&lt;p&gt;I've published two books, and I'm writing my third: &lt;em&gt;Risk Taking Gene&lt;/em&gt;. The title says most of what you need to know about how I'm wired.&lt;/p&gt;
&lt;p&gt;The FDFS instinct is the compulsion to be first through the door on new GenAI. New model, new engine, new paper — I want to run it before it's cool, not after it's safe.&lt;/p&gt;
&lt;p&gt;And in a field moving this fast, being first-day-first-show isn't fandom for its own sake. It's how I figure out what's real, what's hype, and what actually changes the game.&lt;/p&gt;
&lt;p&gt;The credits haven't even rolled and I'm already looking for the next release.&lt;/p&gt;
&lt;p&gt;FDFS. Always.&lt;/p&gt;</content><category term="Personal"/><category term="GenAI"/><category term="Engineering"/><category term="Open Source"/><category term="Inference"/><category term="Builder"/><category term="Author"/><category term="Research"/></entry><entry><title>UC Berkeley Open-Sources FreeToken: Frontier-Scale MoE on Consumer Hardware</title><link href="https://blogs.rajacsp.com/freetoken-edge-native-moe-inference.html" rel="alternate"/><published>2026-09-05T00:00:00-03:00</published><updated>2026-09-05T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-05:/freetoken-edge-native-moe-inference.html</id><summary type="html">&lt;p&gt;UC Berkeley has open-sourced &lt;strong&gt;FreeToken&lt;/strong&gt;, an edge-native inference engine that runs frontier-scale Mixture-of-Experts (MoE) models on consumer hardware. It treats GPU, CPU, host memory, and PCIe interconnects as a single unified inference platform.&lt;/p&gt;
&lt;p&gt;The approach works because of how MoE models are structured. A model like DeepSeek-V4-Flash carries 284B total …&lt;/p&gt;</summary><content type="html">&lt;p&gt;UC Berkeley has open-sourced &lt;strong&gt;FreeToken&lt;/strong&gt;, an edge-native inference engine that runs frontier-scale Mixture-of-Experts (MoE) models on consumer hardware. It treats GPU, CPU, host memory, and PCIe interconnects as a single unified inference platform.&lt;/p&gt;
&lt;p&gt;The approach works because of how MoE models are structured. A model like DeepSeek-V4-Flash carries 284B total parameters but activates only 13B per token — 6 of 256 routed experts at each layer. The per-token computation is feasible; the real problem is that the full expert pool must stay accessible in memory, far exceeding GPU VRAM.&lt;/p&gt;
&lt;p&gt;FreeToken resolves this with a two-level hierarchy. Non-expert weights stay resident on the GPU, the full expert pool lives in host RAM, and only the experts needed for each token are fetched over PCIe. A bandwidth-adaptive policy continuously decides whether to fetch experts to the GPU or compute them on CPU, based on the machine's actual measured PCIe bandwidth.&lt;/p&gt;
&lt;p&gt;The results span a wide hardware range: an 8GB-VRAM laptop runs Qwen3.6-35B, a single RTX 5090 runs DeepSeek-V4-Flash at 284B, and a workstation GPU runs GLM-5.2 at 753B. No GGUF conversion is required — it loads HuggingFace safetensors directly, is OpenAI- and Anthropic-API compatible on localhost, and ships with a native GUI, one-click install on Windows and Linux, and built-in agent harnesses.&lt;/p&gt;
&lt;h2&gt;Key Capabilities&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Two-Level Expert Hierarchy&lt;/strong&gt; GPU holds non-expert weights while the full expert pool resides in host RAM. This keeps the always-needed weights fast and the large expert pool addressable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bandwidth-Adaptive Co-Execution&lt;/strong&gt; CPU-GPU execution is calibrated to your machine. The engine measures real PCIe bandwidth and routes expert work accordingly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Global LRU Expert Caching&lt;/strong&gt; Least-recently-used caching operates across all MoE layers. Frequently used experts stay hot rather than being refetched.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Semantic-Aware KV Caching&lt;/strong&gt; KV caching is tuned for agentic workflows. It preserves reusable context across multi-step agent runs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Direct Safetensors Loading&lt;/strong&gt; HuggingFace safetensors load directly with no GGUF conversion. This removes a conversion step from the deployment path.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Local API Compatibility&lt;/strong&gt; OpenAI and Anthropic APIs are supported on localhost. Existing clients can point at the local endpoint unchanged.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Native GUI with Agent Harnesses&lt;/strong&gt; A native interface ships with agent harnesses built in. One-click install is available on Windows and Linux.&lt;/p&gt;
&lt;p&gt;FreeToken is 100% open source.&lt;/p&gt;
&lt;p&gt;Links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Paper: &lt;a href="https://arxiv.org/pdf/2608.16157"&gt;https://arxiv.org/pdf/2608.16157&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/FlashML-org/FreeToken"&gt;https://github.com/FlashML-org/FreeToken&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="AI Infrastructure"/><category term="MoE"/><category term="Inference"/><category term="Edge AI"/><category term="Open Source"/><category term="LLM"/></entry><entry><title>Let's end Casteism on Teachers' day</title><link href="https://blogs.rajacsp.com/radhakrishnan-casteism-teachers-day.html" rel="alternate"/><published>2026-09-05T00:00:00-03:00</published><updated>2026-09-05T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-05:/radhakrishnan-casteism-teachers-day.html</id><summary type="html">&lt;p&gt;&lt;img alt="1789004378381" src="image/2026-09-05-Indias-teachers-day-and-casteism/1789004378381.png"&gt;&lt;/p&gt;
&lt;p&gt;September 5th is Teachers' Day, marking the birthday of Dr. Sarvepalli Radhakrishnan — philosopher, statesman, and India's second President. He once described casteism as a cancer afflicting India. In that spirit, this piece revisits his views on the subject and asks that we treat Teachers' Day as an occasion to confront …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1789004378381" src="image/2026-09-05-Indias-teachers-day-and-casteism/1789004378381.png"&gt;&lt;/p&gt;
&lt;p&gt;September 5th is Teachers' Day, marking the birthday of Dr. Sarvepalli Radhakrishnan — philosopher, statesman, and India's second President. He once described casteism as a cancer afflicting India. In that spirit, this piece revisits his views on the subject and asks that we treat Teachers' Day as an occasion to confront India's foremost social ailment.&lt;/p&gt;
&lt;h2&gt;Five Aspects of Radhakrishnan's Views on Casteism&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1. Distinguishing Varna from Jati&lt;/strong&gt;
Radhakrishnan drew a sharp line between the original varna system, which he read as a classification rooted in guna — innate qualities, aptitude, and temperament — and the later jati system, which hardened into rigid heredity. He held that the ancient varna concept was meant to be fluid and function-based rather than birth-based, and that its calcification into hereditary caste was a historical corruption of Hindu social ideals.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Opposition to Untouchability&lt;/strong&gt;
He was unequivocally against untouchability and the discrimination it carried. He saw it as a moral stain on Hindu civilization and backed its abolition, believing, like many reformers of his era, that spiritual Hinduism had to be cleansed of such social hierarchies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Philosophical Hinduism over Ritual Hierarchy&lt;/strong&gt;
Radhakrishnan consistently foregrounded the philosophical and mystical dimensions of Hinduism — the Upanishads, Vedanta, and the Gita — over ritual, priestcraft, and social rank. For him, the true essence of Hinduism was spiritual universalism, not caste orthodoxy.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Reformist, Not Revolutionary&lt;/strong&gt;
He was a moderate reformer rather than a radical social revolutionary in the mould of B.R. Ambedkar. Though he criticized caste and supported reform, he worked largely within a reinterpreted Hinduism rather than calling for its wholesale dismantling, favouring education and spiritual renewal over political agitation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. In Practice&lt;/strong&gt;
As Vice-President and later President, he upheld the constitutional values of equality and non-discrimination. His personal life and public positions reflected a cosmopolitan, caste-transcending outlook.&lt;/p&gt;
&lt;h2&gt;In Summary&lt;/h2&gt;
&lt;p&gt;Radhakrishnan opposed casteism, untouchability, and birth-based hierarchy, viewing them as deviations from Hinduism's true philosophical spirit. His approach was that of a scholar-reformer seeking to restore an idealized, merit-based social vision — not that of a revolutionary bent on destroying the system outright.&lt;/p&gt;
&lt;p&gt;As Radhakrishnan dreamed of killing Casteism, let's end Casteism in India. Let the Modern India start with us!&lt;/p&gt;</content><category term="Society"/><category term="Radhakrishnan"/><category term="Casteism"/><category term="Teachers Day"/><category term="Social Reform"/><category term="Hinduism"/></entry><entry><title>Understanding Caste Origin in Tamil Nadu</title><link href="https://blogs.rajacsp.com/thevar-title-not-caste-origins.html" rel="alternate"/><published>2026-09-05T00:00:00-03:00</published><updated>2026-09-05T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-05:/thevar-title-not-caste-origins.html</id><summary type="html">&lt;p&gt;A claim from social researchers in Tamil Nadu holds that "Thevar" was never a caste name at its root — it was a title given to the leader of a rural place, and only later came to be read as a community label. There is significant truth in this. It reflects …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A claim from social researchers in Tamil Nadu holds that "Thevar" was never a caste name at its root — it was a title given to the leader of a rural place, and only later came to be read as a community label. There is significant truth in this. It reflects a well-documented South Indian pattern in which honorific titles gradually harden into caste identities.&lt;/p&gt;
&lt;h2&gt;The Etymology: Title, Not Clan&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What the Word Means&lt;/strong&gt;
"Thevar" (தேவர்) literally means "celestial being" in Tamil. It was historically an honorific for Tamil kings and royalty, for palayakkarars (local chieftains and warrior-lords), for village heads and leaders of rural settlements, and in some contexts for deities. At its origin, then, it marked authority and leadership — not genealogical descent.&lt;/p&gt;
&lt;h2&gt;How It Became a Community Identity&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Title Solidification&lt;/strong&gt;
The shift follows a process common across South India. Warrior-landholder lineages that supplied rural leaders held the title so consistently that, over generations, outsiders came to hear the title as an identity. In the 20th century, leaders such as Pasumpon Muthuramalinga Thevar consolidated these lineages under the single term, turning a scattered honorific into a cohesive social and political identity.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Is It "Wrongly Assumed"?&lt;/strong&gt;
Not exactly wrong today — an identity is real once people believe in it and organize their lives around it. But the researchers are historically and linguistically correct: the origin was a title of leadership and respect, and the community designation came afterward.&lt;/p&gt;
&lt;h2&gt;This Pattern Is Extremely Common&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Titles That Became Identities&lt;/strong&gt;
The same process shaped many Tamil and Telugu names, where a word for a role or rank came to be read as a community label.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Original Meaning&lt;/th&gt;
&lt;th&gt;Later Became&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Naidu (leader/commander)&lt;/td&gt;
&lt;td&gt;A community identity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pillai (child of king/noble)&lt;/td&gt;
&lt;td&gt;A title of respect&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mudaliar (treasurer/first rank)&lt;/td&gt;
&lt;td&gt;A community name&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gounder (landholder)&lt;/td&gt;
&lt;td&gt;A community identity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reddy (from "Raddi" — ruler)&lt;/td&gt;
&lt;td&gt;A community name&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Was It Found in Every Group — Even in Olden Days?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;No — It Was an Elite Marker&lt;/strong&gt;
This is the sharper question, and the honest answer is no. Traditional Tamil villages had a segmented leadership structure: every group had its own internal headman, but the title "Thevar" attached specifically to the dominant landed and warrior lineages that controlled local resources and held military and administrative authority.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who Was Not Called Thevar&lt;/strong&gt;
Village priests and accountants, artisan and service groups, the headmen of the most marginalized communities, and mercantile leaders each had their own honorifics — but "Thevar," carrying connotations of political authority, landownership, and martial status, was not among them.&lt;/p&gt;
&lt;h2&gt;Why the Confusion Arises&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Functional, Not Caste-Blind&lt;/strong&gt;
Two facts feed the "it was universal" impression: the title was functional rather than strictly hereditary in its earliest use, and different dominant lineages in different localities each produced their own leaders called "Thevar." But circulating among dominant landed and warrior strata across many localities is not the same as belonging to every group. It clustered at the top, not across the whole.&lt;/p&gt;
&lt;h2&gt;The Regional Angle&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A Southern Concentration&lt;/strong&gt;
The title was historically concentrated in southern Tamil Nadu — Madurai, Ramnad, Sivaganga, Tirunelveli — and parts of Kongu Nadu, regions with strong palayakkarar traditions. In areas with different power structures, local leaders were simply not called "Thevar."&lt;/p&gt;
&lt;h2&gt;The Religious Exception&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Where the Word Is Universal&lt;/strong&gt;
There is one setting in which "Thevar" belongs to everyone: temples. Deities across traditions are addressed as "Thevar," as in Kallazhagar Thevar or Palani Andavar. Here the word belongs to all Tamils — but this is religious vocabulary, not social identity.&lt;/p&gt;
&lt;h2&gt;Bottom Line&lt;/h2&gt;
&lt;p&gt;The researchers are right about the essential point: "Thevar" began as a title of authority, not a caste name in the traditional jati sense. Yet even in the older systems that title was never democratized. It was an elite marker tied to land, military status, and local sovereignty — one that later solidified into a specific community identity. The origin was titular; the transformation is historically real.&lt;/p&gt;</content><category term="History"/><category term="Thevar"/><category term="Tamil Nadu"/><category term="Titles"/><category term="Onomastics"/><category term="Social History"/></entry><entry><title>Deploying a Local FastAPI App to Azure App Service</title><link href="https://blogs.rajacsp.com/deploy-fastapi-azure-app-service.html" rel="alternate"/><published>2026-09-01T00:00:00-03:00</published><updated>2026-09-01T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-09-01:/deploy-fastapi-azure-app-service.html</id><summary type="html">&lt;p&gt;&lt;img alt="1789004104021" src="image/2026-09-01-deploy-fastapi-azure-app-service/1789004104021.png"&gt;&lt;/p&gt;
&lt;p&gt;Deploying a FastAPI application from your local machine to Azure App Service is a straightforward process once you know the sequence. This guide walks through authenticating, provisioning the infrastructure, configuring the runtime, and shipping your code. Replace the placeholder names below with your own resource group and app names.&lt;/p&gt;
&lt;h2&gt;Authenticate …&lt;/h2&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1789004104021" src="image/2026-09-01-deploy-fastapi-azure-app-service/1789004104021.png"&gt;&lt;/p&gt;
&lt;p&gt;Deploying a FastAPI application from your local machine to Azure App Service is a straightforward process once you know the sequence. This guide walks through authenticating, provisioning the infrastructure, configuring the runtime, and shipping your code. Replace the placeholder names below with your own resource group and app names.&lt;/p&gt;
&lt;h2&gt;Authenticate and Select Subscription&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Log in to Azure&lt;/strong&gt;
Start by authenticating your CLI session and pointing it at the correct subscription.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;login
az&lt;span class="w"&gt; &lt;/span&gt;account&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--subscription&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;00000000-1111-2222-3333-444444444444&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Clean Up and Verify Existing Resources&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Delete the old app&lt;/strong&gt;
Remove the previous web app if you're starting fresh.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;webapp&lt;span class="w"&gt; &lt;/span&gt;delete&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;myapp-sample-test1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Verify existing plans&lt;/strong&gt;
List the App Service plans in your resource group to confirm what's already there.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;appservice&lt;span class="w"&gt; &lt;/span&gt;plan&lt;span class="w"&gt; &lt;/span&gt;list&lt;span class="w"&gt; &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;table
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Provision the Infrastructure&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Create an App Service plan&lt;/strong&gt;
Create a Linux-based plan on the B1 SKU to host the new app.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;appservice&lt;span class="w"&gt; &lt;/span&gt;plan&lt;span class="w"&gt; &lt;/span&gt;create&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;myapp-testing-plan&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--sku&lt;span class="w"&gt; &lt;/span&gt;B1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--is-linux
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Create the web app&lt;/strong&gt;
Provision the web app on the Python 3.12 runtime, attached to the plan you just created.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;webapp&lt;span class="w"&gt; &lt;/span&gt;create&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--plan&lt;span class="w"&gt; &lt;/span&gt;myapp-testing-plan&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;myapp-fastapi-13&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--runtime&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;PYTHON:3.12&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Configure Build and Startup&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Enable build during deployment&lt;/strong&gt;
Turn on Oryx build automation so dependencies are installed during deployment.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;webapp&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;appsettings&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;myapp-fastapi-13&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--settings&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;SCM_DO_BUILD_DURING_DEPLOYMENT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Clone your app locally&lt;/strong&gt;
Pull your source code down to your machine.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class="w"&gt; &lt;/span&gt;clone&lt;span class="w"&gt; &lt;/span&gt;https://github.com/myorg/fastapi-sample
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;fastapi-sample
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Confirm the port binding&lt;/strong&gt;
Make sure your &lt;code&gt;app.py&lt;/code&gt; reads the port from the environment so Azure can route traffic correctly.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;PORT&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8000&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;uvicorn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;0.0.0.0&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Set the startup command&lt;/strong&gt;
Tell App Service how to launch your application.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;webapp&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;myapp-fastapi-13&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--startup-file&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;python app.py&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Zip and Deploy&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Package the app&lt;/strong&gt;
Create a deployment archive, excluding version control and virtual environment artifacts.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;zip&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;deploy.zip&lt;span class="w"&gt; &lt;/span&gt;.&lt;span class="w"&gt; &lt;/span&gt;-x&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;*.git*&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-x&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;*__pycache__*&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-x&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;*.venv*&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-x&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;*venv*&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Deploy the archive&lt;/strong&gt;
Push the zip to Azure App Service.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;webapp&lt;span class="w"&gt; &lt;/span&gt;deploy&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;myapp-fastapi-13&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--src-path&lt;span class="w"&gt; &lt;/span&gt;deploy.zip&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--type&lt;span class="w"&gt; &lt;/span&gt;zip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Stream the logs&lt;/strong&gt;
Watch the live deployment and startup logs to confirm a clean boot.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;webapp&lt;span class="w"&gt; &lt;/span&gt;log&lt;span class="w"&gt; &lt;/span&gt;tail&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;myapp-fastapi-13
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Retrieve the Live URL&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Get the default hostname&lt;/strong&gt;
Fetch the public URL of your deployed app.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;az&lt;span class="w"&gt; &lt;/span&gt;webapp&lt;span class="w"&gt; &lt;/span&gt;show&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--resource-group&lt;span class="w"&gt; &lt;/span&gt;myapp-rg&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--name&lt;span class="w"&gt; &lt;/span&gt;myapp-fastapi-13&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;--query&lt;span class="w"&gt; &lt;/span&gt;defaultHostName&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;tsv
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Your app is now live at &lt;code&gt;myapp-fastapi-13.azurewebsites.net&lt;/code&gt;.&lt;/p&gt;</content><category term="Cloud Deployment"/><category term="azure"/><category term="fastapi"/><category term="app-service"/><category term="python"/><category term="devops"/></entry><entry><title>Requirements or Technical Design? Choosing Where a Kiro Spec Begins</title><link href="https://blogs.rajacsp.com/kiro-requirements-vs-technical-design.html" rel="alternate"/><published>2026-08-29T00:00:00-03:00</published><updated>2026-08-29T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-08-29:/kiro-requirements-vs-technical-design.html</id><summary type="html">&lt;p&gt;Every Kiro spec opens with a small but consequential fork: what do you author first? The IDE offers two starting points — Requirements or Technical Design — and treats Requirements as the recommended default. The choice isn't cosmetic. It decides which artifact is the source of truth and which is derived, and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Every Kiro spec opens with a small but consequential fork: what do you author first? The IDE offers two starting points — Requirements or Technical Design — and treats Requirements as the recommended default. The choice isn't cosmetic. It decides which artifact is the source of truth and which is derived, and that ordering shapes how traceable, defensible, and maintainable the resulting spec turns out to be. Get it right and the spec reads like a clean argument from need to implementation. Get it wrong and you spend the rest of the project reverse-justifying decisions no one can quite explain.&lt;/p&gt;
&lt;h2&gt;The Two Entry Points&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Requirements-first&lt;/strong&gt;
You begin by gathering and documenting requirements, typically as user stories paired with EARS-style acceptance criteria. Kiro then generates the technical design from those requirements, and implementation tasks flow from the design. The chain runs requirements → design → tasks, so every architectural decision can be traced back to an explicit, agreed-upon need.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Design-first&lt;/strong&gt;
You begin with the technical design — architecture, components, data models, interfaces — and requirements are reverse-derived from that design. The spec becomes documentation of what is being built rather than a driver of what should be built.&lt;/p&gt;
&lt;h2&gt;The Underlying Model: Spec-Driven Development&lt;/h2&gt;
&lt;p&gt;Both paths sit inside the same three-artifact structure that defines how Kiro works. A spec is not a single document; it's a &lt;code&gt;requirements&lt;/code&gt; file, a &lt;code&gt;design&lt;/code&gt; file, and a &lt;code&gt;tasks&lt;/code&gt; file that stay linked. The entry-point question is really about which of those three you seed by hand and which you let Kiro generate. Understanding this makes the choice less about preference and more about causality: whatever you author first becomes the thing everything else must stay consistent with.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Requirements artifact&lt;/strong&gt;
The contract. It states what the system must do in terms a stakeholder can verify, independent of how it's built.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Design artifact&lt;/strong&gt;
The bridge. It translates the contract into architecture — the components, boundaries, and data flows that will satisfy each requirement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tasks artifact&lt;/strong&gt;
The execution plan. It breaks the design into discrete, ordered units of work an agent or engineer can pick up one at a time.&lt;/p&gt;
&lt;h2&gt;Why Requirements Is the Default&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Traceability&lt;/strong&gt;
When requirements come first, the design exists to satisfy them. Anyone reviewing the spec can ask "why does this component exist?" and follow the thread back to a stated need. Design-first inverts this, and the "why" is easier to lose.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scope discipline&lt;/strong&gt;
Writing requirements before architecture forces you to agree on the problem before committing to a solution. It reduces the classic failure mode of shipping something well-engineered that doesn't map to what anyone actually asked for.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reviewability&lt;/strong&gt;
Requirements written as user stories with acceptance criteria are legible to non-engineers. Stakeholders can sign off on intent before a single interface is drawn.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Better inputs for the agent&lt;/strong&gt;
An AI agent generating a design produces sharper output when it's constrained by concrete acceptance criteria than when it's asked to invent both the goal and the means. Clear requirements narrow the search space and reduce the wandering, speculative design that comes from an underspecified prompt.&lt;/p&gt;
&lt;h2&gt;When Design-First Earns Its Place&lt;/h2&gt;
&lt;p&gt;The recommendation is a default, not a rule. Design-first fits a handful of real situations:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Back-filling existing code&lt;/strong&gt;
You already have a working system and want a spec that documents it. Here the design genuinely came first in reality, so deriving requirements from it is honest bookkeeping rather than a shortcut.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hard technical constraints drive the product&lt;/strong&gt;
Sometimes the architecture isn't a choice — a latency budget, a hardware target, a protocol you must speak. When the technical envelope is the binding constraint, starting from design and deriving what it can deliver reflects how the decisions actually flow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exploratory or spike work&lt;/strong&gt;
When you're proving a technical approach is even feasible, formal requirements can be premature. Sketch the design, see if it holds, and let requirements crystallize once you know what's possible.&lt;/p&gt;
&lt;h2&gt;A Common Failure Mode&lt;/h2&gt;
&lt;p&gt;The trap isn't picking the "wrong" entry point — it's picking design-first out of impatience and then pretending requirements were the source of truth. You end up with requirements written to match a design you'd already committed to, which quietly launders architectural decisions into "needs." The result looks traceable but isn't; the requirements can't actually constrain the design because they were derived from it. If you go design-first, be honest that you did, and treat the derived requirements as documentation rather than as an independent check.&lt;/p&gt;
&lt;h2&gt;A Working Rule&lt;/h2&gt;
&lt;p&gt;Reach for Requirements on greenfield or ambiguous work, where you want the design justified by needs and the scope pinned down before you build. Reach for Technical Design when the architecture is settled and the spec's job is to record and rationalize it.&lt;/p&gt;
&lt;p&gt;The question to ask yourself is simple: in this project, did the need or the architecture actually come first? Author in that order, and the spec will tell the truth about how the work happened. A spec that matches reality is one you can trust six months later; a spec that inverts it is one you'll spend those six months quietly working around.&lt;/p&gt;
&lt;h2&gt;Takeaways&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Order encodes causality&lt;/strong&gt;
Whatever you author first becomes the source of truth. Choose it to match how the decisions really flowed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Requirements-first is the safe default&lt;/strong&gt;
It maximizes traceability, scope discipline, and reviewability, and it gives the agent sharper constraints to design against.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Design-first is a deliberate tool, not a shortcut&lt;/strong&gt;
Use it for back-filling, hard technical constraints, or spikes — and stay honest that the design led.&lt;/p&gt;</content><category term="Agentic Engineering"/><category term="kiro"/><category term="spec-driven-development"/><category term="requirements"/><category term="technical-design"/><category term="ai-ides"/></entry><entry><title>Toponymic Surnames — Why Telugu Family Names Are Named After Places</title><link href="https://blogs.rajacsp.com/toponymic-surnames-telugu-naming.html" rel="alternate"/><published>2026-08-29T00:00:00-03:00</published><updated>2026-08-29T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-08-29:/toponymic-surnames-telugu-naming.html</id><summary type="html">&lt;p&gt;A toponymic surname is a family name derived from a place — a village, town, city, region, or geographic feature. It is one of the oldest and most widespread ways human families have come to be named, and among Telugu people it is close to the rule rather than the exception …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A toponymic surname is a family name derived from a place — a village, town, city, region, or geographic feature. It is one of the oldest and most widespread ways human families have come to be named, and among Telugu people it is close to the rule rather than the exception.&lt;/p&gt;
&lt;h2&gt;What a Toponymic Surname Is&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;
A surname taken from the name of a place tied to the family — most often an ancestral village or town, but sometimes a region or a nearby geographic feature such as a canal or river.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A Few Illustrations&lt;/strong&gt;
Sarvepalli comes from the village of Sarvepalli in the Nellore district. Nehru traces to "Nahar," a canal, the family having lived near one. Milanović derives from Milan, a place in the Balkans. London, York, and Washington all began as city or place names before becoming family names.&lt;/p&gt;
&lt;h2&gt;Is This Common Among Telugu People?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Extremely Common&lt;/strong&gt;
Most traditional Telugu family names are toponymic. It is a deeply rooted convention across Telugu-speaking regions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How It Works&lt;/strong&gt;
A family would adopt the name of its ancestral village or town, frequently carrying a place-suffix. Common ones include -palli or -palle (village), as in Sarvepalli; -pudi; and -peta, -padu, -palem, and -gudem. In many cases the raw village name is used with no suffix at all.&lt;/p&gt;
&lt;h2&gt;Famous Telugu Examples&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Person&lt;/th&gt;
&lt;th&gt;Surname Origin&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;P. V. Narasimha Rao&lt;/td&gt;
&lt;td&gt;Vangara, an ancestral village in Karimnagar ("Rao" being an honorific)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;N. T. Rama Rao&lt;/td&gt;
&lt;td&gt;"Rao" is a title/surname; his family was from Nimmakuru&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tanguturi Prakasam&lt;/td&gt;
&lt;td&gt;From the village of Tanguturu&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Non-Telugu Indian Examples&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Beyond Andhra and Telangana&lt;/strong&gt;
The pattern extends across India. Tharoor comes from Tharoor village in Kerala. Menon, Nair, and Pillai are Kerala and Tamil names that are place- or clan-based.&lt;/p&gt;
&lt;h2&gt;How Toponymic Names Differ from Other Surname Types&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Based on&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Toponymic&lt;/td&gt;
&lt;td&gt;Place&lt;/td&gt;
&lt;td&gt;Sarvepalli, Tharoor, Lahiri, Bhabha&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Patronymic&lt;/td&gt;
&lt;td&gt;Father's name&lt;/td&gt;
&lt;td&gt;Mohammed bin Salman, Icelandic -son/-dóttir&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Occupational&lt;/td&gt;
&lt;td&gt;Job&lt;/td&gt;
&lt;td&gt;Smith, Carpenter&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;In Summary&lt;/h2&gt;
&lt;p&gt;Telugu surnames are predominantly toponymic. If you meet someone from Andhra Pradesh or Telangana whose surname sounds like a village name, it very likely is one — a small piece of geography carried forward through generations of a family.&lt;/p&gt;</content><category term="Language"/><category term="Toponymic Surnames"/><category term="Telugu"/><category term="Onomastics"/><category term="Naming Conventions"/><category term="India"/></entry><entry><title>WeeLLM — Running 20B Diffusion Models on a 4GB GPU</title><link href="https://blogs.rajacsp.com/weellm-layer-streaming-inference.html" rel="alternate"/><published>2026-08-22T00:00:00-03:00</published><updated>2026-08-22T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-08-22:/weellm-layer-streaming-inference.html</id><summary type="html">&lt;p&gt;WeeLLM is a layer-streaming inference engine for large diffusion models. Its
one claim is unusual: run a ~12B FLUX model, or even a ~20B Qwen-Image model,
in under 4GB of VRAM — with no quantization. Full bfloat16 weights, degraded
only in speed, never in precision.&lt;/p&gt;
&lt;h2&gt;The Core Idea&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Layer Streaming&lt;/strong&gt;
The …&lt;/p&gt;</summary><content type="html">&lt;p&gt;WeeLLM is a layer-streaming inference engine for large diffusion models. Its
one claim is unusual: run a ~12B FLUX model, or even a ~20B Qwen-Image model,
in under 4GB of VRAM — with no quantization. Full bfloat16 weights, degraded
only in speed, never in precision.&lt;/p&gt;
&lt;h2&gt;The Core Idea&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Layer Streaming&lt;/strong&gt;
The whole model never sits in VRAM at once. One transformer layer is loaded
from disk, executed, evicted, and the next takes its place. Peak VRAM is
bounded by the largest single layer, not the total parameter count.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Traditional&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;load&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ALL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;layers&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;into&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;VRAM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="n"&gt;VRAM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;full&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt;

&lt;span class="n"&gt;WeeLLM&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;denoising_steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;                   &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;                       &lt;/span&gt;&lt;span class="nb"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GPU&lt;/span&gt;
&lt;span class="w"&gt;                       &lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;                       &lt;/span&gt;&lt;span class="n"&gt;evict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="n"&gt;VRAM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;one&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The Payoff&lt;/strong&gt;
This decoupling of VRAM from parameter count is why the benchmarks invert
what you'd expect — a 20B model can cost less VRAM than a 6.6B one.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;FLUX&lt;/span&gt;&lt;span class="mf"&gt;.1&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;1.51&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GB&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;peak&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;VRAM&lt;/span&gt;
&lt;span class="n"&gt;Qwen&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;2.47&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GB&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;peak&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;VRAM&lt;/span&gt;
&lt;span class="n"&gt;SDXL&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mf"&gt;6.6&lt;/span&gt;&lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;2.98&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GB&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;peak&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;VRAM&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Why It Works for Diffusion&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Step Count Is the Trick&lt;/strong&gt;
Diffusion models denoise a latent over a handful of discrete steps, typically
4 to 20. The full weight set is streamed from disk only that many times per
image — costly, but finite.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;FLUX&lt;/span&gt;&lt;span class="mf"&gt;.1&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;schnell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;steps&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sweeps&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mi"&gt;159&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;
&lt;span class="n"&gt;SDXL&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;steps&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sweeps&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Where It Breaks: Autoregressive Models&lt;/strong&gt;
Vision-language and autoregressive image models generate pixels as tokens,
sequentially. A 1024x1024 image is 1000+ tokens = 1000+ full forward passes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="mf"&gt;20&lt;/span&gt;&lt;span class="n"&gt;GB&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mf"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;for&lt;/span&gt;&lt;span class="n"&gt;ward&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;passes&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;~&lt;/span&gt;&lt;span class="mf"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TB&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;streamed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;disk&lt;/span&gt;
&lt;span class="w"&gt;                                    &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;several&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;hours&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;per&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The code runs, but the wall-clock time is impractical. WeeLLM is upfront about
this: for those models, use quantization instead.&lt;/p&gt;
&lt;h2&gt;The Hard Dependency: Disk I/O&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Disk Is the Bottleneck&lt;/strong&gt;
Every layer is re-read from disk on every step, so the disk &lt;em&gt;is&lt;/em&gt; the engine.
This architecture is built for local NVMe SSDs, not throttled cloud volumes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Fast&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NVMe&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;streaming&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;keeps&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GPU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fed&lt;/span&gt;
&lt;span class="n"&gt;Cloud&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;disk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;T4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;throttled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;O&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;severe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;slowdown&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The bfloat16 Trap on Older GPUs&lt;/strong&gt;
On Turing cards (Kaggle/Colab T4), bfloat16 isn't natively supported. Forcing
it silently disables FlashAttention and falls back to the Math backend, which
materializes the full N x N attention matrix — blowing the VRAM budget you
came here to save.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Symptom&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GB&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;saw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GB&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;
&lt;span class="n"&gt;Cause&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;dtype&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bfloat16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;supporting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;hardware&lt;/span&gt;
&lt;span class="n"&gt;Fix&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;dtype&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;what&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GPU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;actually&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;supports&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Using It&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;CLI — Point It at a Hugging Face Repo ID&lt;/strong&gt;
No manual download step. Pass a repo ID and a prompt; it streams directly from
the HF safetensors.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip install -r requirements.txt

python main.py \
    --model black-forest-labs/FLUX.1-dev \
    --prompt &amp;quot;A majestic lion at golden hour&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Python API&lt;/strong&gt;
The same engine wrapped as a pipeline object, with RAM caching optional.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;weellm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;WeePipeline&lt;/span&gt;

&lt;span class="n"&gt;pipe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;WeePipeline&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;from_pretrained&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Tongyi-MAI/Z-Image-Turbo&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;cuda&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;cache_to_ram&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;pipe&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;A serene Japanese zen garden at sunrise&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;num_inference_steps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;seed&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;output.png&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;The Verdict&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What It Buys You&lt;/strong&gt;
State-of-the-art image models on consumer hardware you'd normally be told is
far too weak — an RTX 3050 running full-precision FLUX and Qwen-Image.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Costs&lt;/strong&gt;
Time. Generation runs into minutes for the biggest models. The trade is memory
for wall-clock, and it only holds on a fast local SSD with diffusion-style
models. Inside that envelope, it's a genuinely clever piece of engineering.&lt;/p&gt;</content><category term="Inference"/><category term="diffusion"/><category term="low-vram"/><category term="layer-streaming"/><category term="flux"/><category term="local-inference"/></entry><entry><title>Why Lean Inference Matters</title><link href="https://blogs.rajacsp.com/why-lean-inference-matters.html" rel="alternate"/><published>2026-08-21T00:00:00-03:00</published><updated>2026-08-21T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-08-21:/why-lean-inference-matters.html</id><summary type="html">&lt;p&gt;The frontier of AI is no longer just about who has the biggest model. It's
about who can run intelligence cheaply, quickly, and everywhere. That shift
is what Lean Inference is about: treating inference cost, latency, and
accessibility as first-class engineering problems rather than afterthoughts.&lt;/p&gt;
&lt;p&gt;For years the industry chased …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The frontier of AI is no longer just about who has the biggest model. It's
about who can run intelligence cheaply, quickly, and everywhere. That shift
is what Lean Inference is about: treating inference cost, latency, and
accessibility as first-class engineering problems rather than afterthoughts.&lt;/p&gt;
&lt;p&gt;For years the industry chased scale. Bigger models, longer context windows,
more parameters. But the bill for that ambition arrives at inference time —
every token generated, every prompt processed, every agent loop executed
costs money and milliseconds. As agentic workflows chain dozens of model
calls and reasoning models emit thousands of tokens per answer, inference has
quietly become the real bottleneck. Lean Inference is the discipline of
attacking that bottleneck deliberately.&lt;/p&gt;
&lt;h2&gt;Why It Matters Now&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Inference is the recurring cost, not training&lt;/strong&gt;
Training a model is a one-time capital expense. Inference is the bill that
never stops arriving. Every user query, every agent step, every retry
compounds — so a 30% efficiency gain at inference is worth more over time
than almost any training optimization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Agentic workflows multiply the load&lt;/strong&gt;
A single user request now fans out into planning, tool calls, retries, and
verification steps. Each is a separate inference pass. What looked like one
prompt becomes twenty, and the cost scales with it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context windows are getting expensive&lt;/strong&gt;
Long contexts are powerful but the prefill step grows with prompt length.
Feeding a model a large document or a full conversation history is often the
single most expensive part of a request.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Access is a moat&lt;/strong&gt;
The teams that can serve good-enough intelligence at a fraction of the cost
will reach markets that frontier-priced APIs never can — SMBs, edge devices,
regions where every dollar of compute counts.&lt;/p&gt;
&lt;h2&gt;The Core Principles&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Lean Prefill&lt;/strong&gt;
The prompt-reading step is often the heaviest. Compress prompts, cache what
repeats, and offload prefill work to smaller or cheaper components wherever
the quality tradeoff is acceptable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lean Caching&lt;/strong&gt;
The KV cache is memory you already paid for — reuse it. Semantic caching,
prefix sharing, and cache reuse across similar requests turn repeated work
into near-free lookups.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lean Routing&lt;/strong&gt;
Not every query needs your most expensive model. Route easy requests to
small models and reserve the heavyweight only for genuinely hard problems.
Most traffic is easier than the worst case it's provisioned for.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Lean Serving&lt;/strong&gt;
Batching, scheduling, quantization, and paged attention squeeze more
throughput out of the same hardware. The systems layer is where theoretical
savings become real ones.&lt;/p&gt;
&lt;h2&gt;Why Local-First Belongs Here&lt;/h2&gt;
&lt;p&gt;Running inference on your own hardware isn't nostalgia — it's the purest form
of Lean Inference. No per-token markup, no data leaving your machine, no
dependency on a provider's pricing whims. When you own the stack, every
efficiency gain lands directly in your pocket, and the discipline of working
within real hardware limits forces genuinely lean engineering.&lt;/p&gt;
&lt;h2&gt;The Takeaway&lt;/h2&gt;
&lt;p&gt;Lean Inference isn't about being cheap for its own sake. It's about refusing
to accept that intelligence must be expensive. The best result at the lowest
cost and latency isn't a compromise — it's the actual goal. The teams that
internalize this won't just save money; they'll reach places the frontier
can't afford to go.&lt;/p&gt;</content><category term="AI Engineering"/><category term="inference"/><category term="LLM"/><category term="efficiency"/><category term="cost-optimization"/><category term="local-first"/></entry><entry><title>How 19 Year Old Dropped Out Changed the World - The Mark Zuckerberg Story</title><link href="https://blogs.rajacsp.com/mark-zuckerberg-success-story.html" rel="alternate"/><published>2026-07-28T00:00:00-03:00</published><updated>2026-07-28T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-07-28:/mark-zuckerberg-success-story.html</id><summary type="html">&lt;p&gt;Mark Zuckerberg went from building a home messaging app at age 12 to running the world's largest social network. This is the story of how a self-taught programming prodigy turned a dorm-room project into a platform used by billions — and the controversies he weathered along the way.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Young Mark Zuckerberg" src="https://blogs.rajacsp.com/image/2026-07-28-mark/young-mark.png"&gt;&lt;/p&gt;
&lt;h2&gt;The Kid From …&lt;/h2&gt;</summary><content type="html">&lt;p&gt;Mark Zuckerberg went from building a home messaging app at age 12 to running the world's largest social network. This is the story of how a self-taught programming prodigy turned a dorm-room project into a platform used by billions — and the controversies he weathered along the way.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Young Mark Zuckerberg" src="https://blogs.rajacsp.com/image/2026-07-28-mark/young-mark.png"&gt;&lt;/p&gt;
&lt;h2&gt;The Kid From Dobbs Ferry&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Born in New York&lt;/strong&gt; Mark Zuckerberg was born on 14 May 1984 just outside Manhattan, the only son of Edward (a dentist) and Karen (a psychiatrist, later stay-at-home mother), growing up with three sisters as the family's "prince."&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Early gifts&lt;/strong&gt; His love of mathematics and science showed young, earning him a place at the highly selective Phillips Exeter Academy, where he won prizes in mathematics, astronomy, physics, and classics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First code&lt;/strong&gt; His father taught him Atari BASIC. By 12 he had built ZuckNet, a messaging program his father used in his dental office and the family used at home. Zuckerberg would also turn his artist friends' drawings into games.&lt;/p&gt;
&lt;h2&gt;From BASIC to Brilliant — A Timeline&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approx. Age / Time&lt;/th&gt;
&lt;th&gt;Grade / Stage&lt;/th&gt;
&lt;th&gt;Milestone&lt;/th&gt;
&lt;th&gt;Event&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;~6 (early 1990s)&lt;/td&gt;
&lt;td&gt;Childhood&lt;/td&gt;
&lt;td&gt;First Lines of Code&lt;/td&gt;
&lt;td&gt;Father Edward introduces Mark to Atari BASIC at home&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;~11-12 (mid-1990s)&lt;/td&gt;
&lt;td&gt;~6th grade&lt;/td&gt;
&lt;td&gt;The Home Network&lt;/td&gt;
&lt;td&gt;Builds ZuckNet, a messaging system linking home and father's dental office&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;~11-12 (mid-1990s)&lt;/td&gt;
&lt;td&gt;~6th-7th grade&lt;/td&gt;
&lt;td&gt;Enter the Mentor&lt;/td&gt;
&lt;td&gt;Parents hire David Newman, who tutors him once a week at the house&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Following ~3 years&lt;/td&gt;
&lt;td&gt;Middle/high school&lt;/td&gt;
&lt;td&gt;Outpacing the Classroom&lt;/td&gt;
&lt;td&gt;Newman continues intensive, college-level programming instruction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Still in high school&lt;/td&gt;
&lt;td&gt;Ardsley High School&lt;/td&gt;
&lt;td&gt;College Before College&lt;/td&gt;
&lt;td&gt;Starts a graduate computer course Thursday nights at Mercy College&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Too Fast for His Tutors&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A private tutor&lt;/strong&gt; Recognizing his talent, his parents hired computer tutor David Newman to work with him once a week — though Newman eventually couldn't keep pace, as Zuckerberg was already taking graduate courses at Mercy College.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Synapse&lt;/strong&gt; Still in high school, under the company name Intelligent Media Group, he built a music player called Synapse. Microsoft reportedly offered $9.5 million for it. He turned them down.&lt;/p&gt;
&lt;h2&gt;The Harvard Years (Sort Of)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Arriving with a reputation&lt;/strong&gt; He enrolled at Harvard in 2002 already known, per The New Yorker, as a "programming prodigy," studying psychology and computer science.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CourseMatch&lt;/strong&gt; In his sophomore year he wrote CourseMatch, letting students pick classes based on others' selections and form study groups.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;FaceMash&lt;/strong&gt; Built over a weekend, it invited students to vote on who was "hotter" from paired photos. Harvard took it down by Monday amid complaints about unauthorized photo use, and Zuckerberg publicly apologized, calling it "completely improper."&lt;/p&gt;
&lt;h2&gt;A Dorm Room That Changed the World&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Harvard Connection pitch&lt;/strong&gt; In late 2003, Cameron and Tyler Winklevoss and Divya Narendra approached him about a social networking idea. He worked on it briefly before leaving to pursue his own.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The launch&lt;/strong&gt; With Dustin Moskovitz, Chris Hughes, and Eduardo Saverin, he launched The Facebook on 4 February 2004 — Harvard-only at first, then expanding to schools like NYU, Columbia, Stanford, and Cornell.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Going west&lt;/strong&gt; The team moved to Palo Alto, planned to return to Harvard, then dropped out as opportunity grew. Facebook had roughly 1 million users within months.&lt;/p&gt;
&lt;h2&gt;Saying No to Billions, Building One Instead&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;First major investment&lt;/strong&gt; In 2005, Accel Partners invested $12.7 million. Zuckerberg opened the platform to more colleges and high schools, and membership reached about 5.5 million by late 2005.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Turning down buyers&lt;/strong&gt; Offers came from Yahoo! and MTV Networks, but he refused, citing a vision of "an open information flow for people" over corporate ownership.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Global scale&lt;/strong&gt; By 2021 Facebook had about 2.8 billion active users, becoming the world's most powerful social network.&lt;/p&gt;
&lt;h2&gt;The Lawsuit That Wouldn't Go Away&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The lawsuit&lt;/strong&gt; In 2006, Narendra and the Winklevoss twins claimed he had stolen the Harvard Connection idea. Investigation of his messages revealed links between the projects, and an initial $65 million settlement was reached.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Further dispute&lt;/strong&gt; In 2011 the three claimed they had been misled about the value of their Facebook stock.&lt;/p&gt;
&lt;h2&gt;From Dorm Room to World's Rich List&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The takeaway&lt;/strong&gt; Zuckerberg dropped out of Harvard to chase his vision, and Facebook's staying power owes much to its constant evolution. His story is a reminder that belief and persistence can carry a dream far — he started at 19 in a dorm room and became the youngest person on the world's rich list.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Source: I read it somewhere&lt;/em&gt;&lt;/p&gt;</content><category term="Founder Stories"/><category term="Zuckerberg"/><category term="Facebook"/><category term="Startups"/><category term="Tech History"/></entry><entry><title>My Darkest &amp; Challenging Days in India</title><link href="https://blogs.rajacsp.com/my-darkest-and-challenging-days-in-india.html" rel="alternate"/><published>2026-06-29T00:00:00-03:00</published><updated>2026-06-29T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-29:/my-darkest-and-challenging-days-in-india.html</id><summary type="html">&lt;p&gt;&lt;img alt="1789005143407" src="image/2026-06-29-my-darkest-and-challenging-days-in-india/1789005143407.png"&gt;&lt;/p&gt;
&lt;p&gt;Everyone has their dark days. Here are the toughest situations I went through — the ones that shaped my life and taught me to face any challenge that comes my way.&lt;/p&gt;
&lt;h2&gt;The Fall&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Second Class Graduate&lt;/strong&gt; — I graduated second class in Engineering, and no employer would even consider me for an …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="1789005143407" src="image/2026-06-29-my-darkest-and-challenging-days-in-india/1789005143407.png"&gt;&lt;/p&gt;
&lt;p&gt;Everyone has their dark days. Here are the toughest situations I went through — the ones that shaped my life and taught me to face any challenge that comes my way.&lt;/p&gt;
&lt;h2&gt;The Fall&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Second Class Graduate&lt;/strong&gt; — I graduated second class in Engineering, and no employer would even consider me for an interview.
Though I had been programming since my 2nd year, they judged my marks alone, never my skills.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The 3000 INR Allowance&lt;/strong&gt; — While job-hunting in Bangalore, my mom sent me 3000 INR (~$50) a month.
My classmates were making 35,000 INR (~$600) monthly at the same time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Two Meals a Day&lt;/strong&gt; — I ate only twice a day because I couldn't afford more during my job search.
Mostly I was embarrassed by my rock-bottom situation and punished myself as a kind of judgement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Under 10 INR a Day&lt;/strong&gt; — I survived on less than 10 INR (~20 cents) a day in Bangalore for a year.
That meant 4 INR for brunch and 5.5 INR for dinner at roadside shops.&lt;/p&gt;
&lt;h2&gt;The Weight of It&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Psychological Toll&lt;/strong&gt; — Being jobless humiliated me, and I blamed only myself and my own actions for the fiasco.
I was my school's 10th-grade topper but became jobless in 2005 — the hurt was so deep I even consulted a psychologist, who was surprised when I said I had no suicidal thoughts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prayers Without Bread&lt;/strong&gt; — My church group prayed for my job but never asked for my resume to forward.
They didn't even ask whether I had eaten for the day.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Death Prediction&lt;/strong&gt; — A renowned Hindu astrologer (from my ex-girlfriend's family) predicted I would die in 3 years, convincing her to break up and marry someone else.
I kept this secret for a long time because I didn't want anyone to panic or worry about me.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Judged by Relatives&lt;/strong&gt; — Some relatives laughed at my situation and blamed "bad parenting" for my hardship.
That kind of mindset is very typical in India.&lt;/p&gt;
&lt;h2&gt;Small Kindnesses&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Muslim Woman's Compassion&lt;/strong&gt; — A Muslim woman at a Bangalore roadside shop understood my situation and offered me more food for less, sometimes free.
She did this even knowing I had stopped believing in God and such theories.&lt;/p&gt;
&lt;h2&gt;The Grind&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Teaching Myself Java&lt;/strong&gt; — Too embarrassed to ask for help, and with friends busy and mostly from non-IT backgrounds, I taught myself Java.
The internet was expensive and I couldn't ask my mom for extra money.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Robbed by Institutes&lt;/strong&gt; — Most private institutes robbed money from candidates like me, treating us as easy victims and teaching nothing.
I skipped them after losing 8k — a bigger loss than my 3k monthly allowance — and never told my mom.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Coding in My Head&lt;/strong&gt; — When my PC broke for a month, I practiced Java in my notebook — handwritten programs compiled in my mind.
I had no choice but to practice hard.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Huawei Rejection&lt;/strong&gt; — I reached the final interview at Huawei but was rejected for two reasons.
I showed up 10 minutes late, and I had a Mechanical Engineering background.&lt;/p&gt;
&lt;h2&gt;The Climb&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;0–300 INR&lt;/strong&gt; — I worked for 0–300 INR (~$5) for my first 9 months.
It was the beginning of everything.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3–4k INR&lt;/strong&gt; — I upgraded to 3–4k INR (~$50) at a startup.
There I learned JavaScript, Ubuntu, and startup techniques.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13k INR at IIT-Madras&lt;/strong&gt; — After a year of experience, I reached 13k INR (~$200) — my first manageable salary.
Working alongside IIT students and researchers became my best learning-anvil.&lt;/p&gt;
&lt;h2&gt;What I Learned&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;15x the Effort&lt;/strong&gt; — Many friends stopped learning after their Engineering degree.
I put in 15 times the effort I gave in college and kept going at high speed — still learning rigorously today.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Never Stop&lt;/strong&gt; — Never stop learning, and never give up your life for any reason.
Here I am in 2026: I wrote my technical book, sold my startup, work as a consultant to feed it, and still dream big — I literally erased "give up" from my dictionary.&lt;/p&gt;</content><category term="Personal"/><category term="resilience"/><category term="career"/><category term="learning"/><category term="life-lessons"/></entry><entry><title>How Canada Outlasted South Africa to Reach the Round of 16</title><link href="https://blogs.rajacsp.com/canada-south-africa-round-of-32.html" rel="alternate"/><published>2026-06-28T00:00:00-03:00</published><updated>2026-06-28T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-28:/canada-south-africa-round-of-32.html</id><summary type="html">&lt;p&gt;Canada beat South Africa 1-0 at SoFi Stadium in Inglewood on June 28, 2026, with a Stephen Eustáquio goal in the 92nd minute, advancing to the World Cup Round of 16 for the first time in the nation's history. The match stayed scoreless deep into stoppage time, a tight and …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Canada beat South Africa 1-0 at SoFi Stadium in Inglewood on June 28, 2026, with a Stephen Eustáquio goal in the 92nd minute, advancing to the World Cup Round of 16 for the first time in the nation's history. The match stayed scoreless deep into stoppage time, a tight and nervy knockout between two sides playing their first-ever World Cup knockout match. South Africa came in with a clear defensive plan and nearly held it; Canada refused to settle for a draw and got rewarded at the death.&lt;/p&gt;
&lt;h2&gt;What Canada Did Differently&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Stayed on the attack&lt;/strong&gt;
South Africa's effort was too conservative, while Canada kept pushing and was ultimately rewarded for staying on the front foot rather than playing for extra time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Committed to their attacking identity&lt;/strong&gt;
Canada was one of the tournament's best attacking sides in the group stage, with 22 on-target attempts that tied France and Germany for the most. Against a stubborn low block they kept generating chances instead of getting frustrated and going passive.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Alphonso Davies introduction&lt;/strong&gt;
Davies hadn't played a single minute all tournament due to a hamstring injury and came off the bench rather than starting. Once on, his sharp passing, width, and pace stretched the South African defense and helped create the late chances that broke the game open.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Midfield control through Eustáquio&lt;/strong&gt;
Eustáquio ran Canada's midfield all tournament and is their primary set-piece taker. Fittingly, he scored the winner himself in the 92nd minute.&lt;/p&gt;
&lt;h2&gt;Why South Africa Fell Short&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A defensive plan that almost worked&lt;/strong&gt;
South Africa relied on defensive solidity with two banks of defenders to wear opponents down, then break quickly on the counter. The plan held for over 90 minutes but invited too much pressure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Passivity cost them&lt;/strong&gt;
By trying to protect the scoreless draw and push the tie to extra time, South Africa surrendered the initiative. Canada kept attacking, freshened things up, and found the breakthrough right at the end.&lt;/p&gt;
&lt;h2&gt;What's Next&lt;/h2&gt;
&lt;p&gt;Canada advances to the Round of 16 in Houston on July 4, where they will face the winner of Monday's match between the Netherlands and Morocco.&lt;/p&gt;</content><category term="Sports"/><category term="world-cup"/><category term="canada"/><category term="south-africa"/><category term="knockout-stage"/><category term="jesse-marsch"/></entry><entry><title>FACommerce: How Agentic Fashion-Commerce Will Change the Way We Buy</title><link href="https://blogs.rajacsp.com/facommerce-the-future-of-buying.html" rel="alternate"/><published>2026-06-28T00:00:00-03:00</published><updated>2026-06-28T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-28:/facommerce-the-future-of-buying.html</id><summary type="html">&lt;p&gt;For two decades, online shopping has asked us to do the work. We type queries, scroll grids, open ten tabs, compare sizing charts, abandon carts, and come back three days later when the algorithm finally serves the right ad. The store is a catalog and we are the search engine …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For two decades, online shopping has asked us to do the work. We type queries, scroll grids, open ten tabs, compare sizing charts, abandon carts, and come back three days later when the algorithm finally serves the right ad. The store is a catalog and we are the search engine. FACommerce — Fashion-Agentic-Commerce — inverts that relationship. Instead of a human navigating a store, an agent navigates the market on the human's behalf. You state intent; the agent does the buying.&lt;/p&gt;
&lt;p&gt;This is not "better recommendations." It is a different mechanic for how a purchase happens.&lt;/p&gt;
&lt;h2&gt;What FACommerce Actually Is&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;From browsing to delegating&lt;/strong&gt;
The core shift is that the shopper stops operating the interface. You say "I need three work outfits for a new job, business-casual, under $600, nothing that needs dry cleaning" and the agent assembles, sizes, and checks out — across multiple brands, in one pass.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fashion as the proving ground&lt;/strong&gt;
Fashion is the hardest commerce category to automate well: fit, taste, return rates, seasonality, and emotion all collide. If agents can handle clothing, they can handle almost anything. That is why fashion, not groceries, is where agentic commerce gets interesting first.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Agent-native, not agent-bolted-on&lt;/strong&gt;
A chatbot stapled to a store is not FACommerce. FACommerce means the store, the catalog, and the checkout are all built to be read and operated by agents — structured product data, machine-readable inventory, and APIs the agent can transact against directly.&lt;/p&gt;
&lt;h2&gt;How a Purchase Changes&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Intent replaces search&lt;/strong&gt;
You no longer translate a need into keywords. "Something for a beach wedding in October that hides a sunburn" is a valid input. The agent decomposes it into attributes, constraints, and candidates.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The agent comparison-shops at machine scale&lt;/strong&gt;
Where you compare three tabs, the agent compares three hundred listings across brands, factoring price, real fit data, return history, and delivery speed — then presents a short, reasoned set instead of an infinite grid.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fit becomes a solved variable&lt;/strong&gt;
The single biggest driver of fashion returns is sizing. An agent that holds your true measurements and learns from what you kept versus returned can pre-filter the 80% of items that would never have fit you anyway.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Checkout disappears into the background&lt;/strong&gt;
No cart, no forms, no coupon-hunting. The agent negotiates promotions, applies the working discount code, and completes the transaction once you approve — the human stays the final yes, the machine handles the friction.&lt;/p&gt;
&lt;h2&gt;Why This Breaks the Old Playbook&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;SEO and ad spend lose their grip&lt;/strong&gt;
If an agent is choosing, then ranking-by-ad-budget stops working. Brands win by exposing clean data and genuinely good products, not by buying the top of a results page. Discovery moves from "who paid most" to "what fits the stated intent."&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The product page stops being the destination&lt;/strong&gt;
For twenty years the product detail page was where conversion happened. In FACommerce the agent reads the structured data behind that page and may never render it for a human at all. Brands that hide their data behind pretty-but-unreadable pages become invisible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Loyalty shifts from store to agent&lt;/strong&gt;
You won't be loyal to a retailer's app. You'll be loyal to the agent that knows your closet, your taste, and your measurements. The retailer becomes a supplier the agent shops from — a quiet but enormous power shift down the supply chain.&lt;/p&gt;
&lt;h2&gt;What It Means for the Three Players&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;For shoppers&lt;/strong&gt;
Less time, fewer returns, less decision fatigue, and a buying experience shaped around stated intent rather than around whatever the platform wants to sell. The risk is taste flattening — agents optimizing everyone toward the same safe choices unless they're built to respect individuality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For brands and retailers&lt;/strong&gt;
A hard pivot from "win the human's attention" to "win the agent's trust." That means structured catalogs, honest fit data, transparent pricing, and transactable APIs. The brands that treat their data as a first-class product will be the ones agents actually buy from.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For builders&lt;/strong&gt;
A wide-open infrastructure layer: identity and measurement profiles, agent-readable catalog standards, fit-prediction models, trust and return-history signals, and safe transaction rails where the human approves but doesn't operate. This is where the early technical moats get built.&lt;/p&gt;
&lt;h2&gt;The Honest Caveats&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Trust is the gating problem&lt;/strong&gt;
Letting software spend your money on clothes requires guardrails — spend limits, approval steps, and clear accountability when an agent gets it wrong. Adoption moves at the speed of trust, not at the speed of capability.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data quality is the bottleneck&lt;/strong&gt;
Agents are only as good as the catalog data they read. Most fashion inventory data today is messy, inconsistent, and incomplete. The unglamorous work of cleaning and structuring catalogs is the real prerequisite.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Taste is not fully reducible&lt;/strong&gt;
Some of why we buy clothes is irrational, emotional, and social. An agent that optimizes purely for fit-and-price misses the point of fashion. The winning FACommerce systems will leave deliberate room for human delight and serendipity.&lt;/p&gt;
&lt;h2&gt;The Takeaway&lt;/h2&gt;
&lt;p&gt;FACommerce reframes shopping from a task we perform into an outcome we delegate. The interface we've all learned — search, scroll, compare, cart, checkout — is an artifact of an era when humans were the only agents in the loop. Once a capable agent sits between intent and inventory, that entire ritual collapses into a sentence and an approval. Fashion is simply the hardest, highest-stakes place to prove it works. Get it right there, and the rest of commerce follows.&lt;/p&gt;</content><category term="Commerce"/><category term="agentic-commerce"/><category term="fashion"/><category term="retail"/><category term="AI-agents"/><category term="FACommerce"/></entry><entry><title>From Static Graphs to Thinking Systems: Agentic GraphRAG for COBOL Codebases</title><link href="https://blogs.rajacsp.com/agentic-graphrag-cobol-codebases.html" rel="alternate"/><published>2026-06-22T00:00:00-03:00</published><updated>2026-06-22T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-22:/agentic-graphrag-cobol-codebases.html</id><summary type="html">&lt;p&gt;Disclaimer:
This is a shadow article of https://medium.com/@vineetchachondia/from-static-graphs-to-thinking-systems-agentic-graphrag-for-cobol-codebases-fcea6d1b62a6
as Medium is paywalled&lt;/p&gt;
&lt;p&gt;Part-3 of the Knowledge Graph Series&lt;/p&gt;
&lt;p&gt;What if your legacy COBOL codebase could explain itself — collaboratively, intelligently, and on demand?&lt;/p&gt;
&lt;p&gt;For decades, COBOL systems have quietly powered banks, insurance firms, and governments. And for …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Disclaimer:
This is a shadow article of https://medium.com/@vineetchachondia/from-static-graphs-to-thinking-systems-agentic-graphrag-for-cobol-codebases-fcea6d1b62a6
as Medium is paywalled&lt;/p&gt;
&lt;p&gt;Part-3 of the Knowledge Graph Series&lt;/p&gt;
&lt;p&gt;What if your legacy COBOL codebase could explain itself — collaboratively, intelligently, and on demand?&lt;/p&gt;
&lt;p&gt;For decades, COBOL systems have quietly powered banks, insurance firms, and governments. And for decades, teams have struggled with the same questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;"Which programs read this file?"&lt;/li&gt;
&lt;li&gt;"What breaks if we touch this batch job?"&lt;/li&gt;
&lt;li&gt;"Who really understands this code?"&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the previous parts of this series, we explored Knowledge Graphs as a way to bring structure and relationships to legacy systems. But structure alone isn't enough anymore. We need systems that reason. We need systems that collaborate. We need Agentic GraphRAG.&lt;/p&gt;
&lt;p&gt;This article shows how a team of AI agents can analyze a COBOL codebase, construct a Neo4j knowledge graph, enrich it semantically using LLMs, and let you query it in natural language — all in a production-ready architecture.&lt;/p&gt;
&lt;h2&gt;Why Traditional RAG Breaks Down for COBOL&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Classic RAG treats code like documents&lt;/strong&gt;
Chunk → Embed → Retrieve → Generate. That approach fails for COBOL because the language is highly structured and meaning lives in relationships, not text.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Behavior spans files&lt;/strong&gt;
Program behavior spreads across multiple files, and impact analysis requires graph traversal, not cosine similarity. This is exactly where GraphRAG shines — but even GraphRAG has a ceiling.&lt;/p&gt;
&lt;h2&gt;The Missing Piece: Agency&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Static pipelines fall short&lt;/strong&gt;
Most GraphRAG systems parse everything, build the graph, then query it. Real systems don't work that way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Real analysis is dynamic&lt;/strong&gt;
It is incremental, multi-step, collaborative, and context-aware. That's where Agentic Architectures change the game.&lt;/p&gt;
&lt;h2&gt;The COBOL Agentic Knowledge Graph System&lt;/h2&gt;
&lt;p&gt;This system treats code understanding as a team sport. Instead of one monolithic pipeline, we introduce 7 specialized agents, each with a clear responsibility, coordinated via LangGraph. Think of it as a virtual COBOL analysis team.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;Ingestion&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;→&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;What files do we have?&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;Validation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;→&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Is this valid COBOL?&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;Parsing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;→&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;What entities and relations exist?&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;Enrichment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;→&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;What does this code mean?&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;Graph&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Builder&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;→&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;How do we model this in Neo4j?&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;Cypher&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt;        &lt;/span&gt;→&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;How do we query this?&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;Retrieval&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;→&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;What&amp;#39;s the answer?&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Each agent does one thing well — and collaborates through shared state.&lt;/p&gt;
&lt;h2&gt;Architecture at a Glance&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cobol_agentic_kg/
├── agents/                 # Specialized AI agents
├── workflows/              # LangGraph orchestration
├── utils/                  # State, Neo4j, logging
├── ui/                     # Streamlit dashboard
└── tests/                  # Production-grade tests
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Tech Stack&lt;/strong&gt;
Python as the language, LangGraph for AI agents, OpenAI for the LLM, Neo4j for the knowledge graph, and Streamlit for the UI.&lt;/p&gt;
&lt;h2&gt;How the Agents Collaborate&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Ingestion Agent&lt;/strong&gt;
Pulls COBOL files from upload or Git repositories. Tracks metadata, version, and progress.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;Ingestion Agent - Handles file uploads and repository scanning&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Dict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Any&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;utils.state&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;CobolProcessingState&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;utils.logger&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;logger&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;chardet&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;IngestionAgent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;Agent responsible for ingesting COBOL files&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;supported_extensions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;.cob&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;.cbl&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;.cobol&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;.cpy&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CobolProcessingState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;CobolProcessingState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="sd"&gt;        Ingest COBOL file and extract metadata&lt;/span&gt;

&lt;span class="sd"&gt;        Args:&lt;/span&gt;
&lt;span class="sd"&gt;            state: Current processing state&lt;/span&gt;

&lt;span class="sd"&gt;        Returns:&lt;/span&gt;
&lt;span class="sd"&gt;            Updated state with file content and metadata&lt;/span&gt;
&lt;span class="sd"&gt;        &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;🔽 INGESTION AGENT: Processing &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;file_path&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Read file with encoding detection&lt;/span&gt;
            &lt;span class="n"&gt;file_content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_read_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;file_path&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

            &lt;span class="c1"&gt;# Create metadata&lt;/span&gt;
            &lt;span class="n"&gt;metadata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_create_metadata&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;file_path&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;file_content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

            &lt;span class="c1"&gt;# Update state&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;file_content&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;file_content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;file_metadata&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;stage&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;ingestion&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;status&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;completed&amp;quot;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="ne"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Ingestion failed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;stage&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;ingestion&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;status&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;failed&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;&amp;quot;errors&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;errors&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Ingestion error: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_read_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="sd"&gt;        Read file with automatic encoding detection&lt;/span&gt;

&lt;span class="sd"&gt;        Args:&lt;/span&gt;
&lt;span class="sd"&gt;            file_path: Path to file&lt;/span&gt;

&lt;span class="sd"&gt;        Returns:&lt;/span&gt;
&lt;span class="sd"&gt;            File content as string&lt;/span&gt;
&lt;span class="sd"&gt;        &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class="c1"&gt;# Try UTF-8 first&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="ne"&gt;UnicodeDecodeError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Detect encoding&lt;/span&gt;
            &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;rb&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;raw_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chardet&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;detect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw_data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;encoding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;encoding&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;
            &lt;span class="c1"&gt;# Read with detected encoding&lt;/span&gt;
            &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ignore&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_create_metadata&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Any&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="sd"&gt;        Create file metadata&lt;/span&gt;

&lt;span class="sd"&gt;        Args:&lt;/span&gt;
&lt;span class="sd"&gt;            file_path: Path to file&lt;/span&gt;
&lt;span class="sd"&gt;            content: File content&lt;/span&gt;

&lt;span class="sd"&gt;        Returns:&lt;/span&gt;
&lt;span class="sd"&gt;            Metadata dictionary&lt;/span&gt;
&lt;span class="sd"&gt;        &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;filename&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;basename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;directory&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;size_bytes&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;line_count&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;char_count&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;extension&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;splitext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;is_cobol_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="sd"&gt;        Check if file is a COBOL file by extension&lt;/span&gt;

&lt;span class="sd"&gt;        Args:&lt;/span&gt;
&lt;span class="sd"&gt;            file_path: Path to file&lt;/span&gt;

&lt;span class="sd"&gt;        Returns:&lt;/span&gt;
&lt;span class="sd"&gt;            True if COBOL file, False otherwise&lt;/span&gt;
&lt;span class="sd"&gt;        &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class="n"&gt;ext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;splitext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;ext&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;supported_extensions&lt;/span&gt;


&lt;span class="c1"&gt;# Create singleton instance&lt;/span&gt;
&lt;span class="n"&gt;ingestion_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;IngestionAgent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;


&lt;span class="c1"&gt;# Wrapper function for LangGraph&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;ingestion_agent_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CobolProcessingState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;CobolProcessingState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;LangGraph node wrapper&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;ingestion_agent&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Validation Agent&lt;/strong&gt;
Filters out invalid or unsupported COBOL syntax early — saving time and tokens. (GitHub repo link at the bottom for full code.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Parsing Agent&lt;/strong&gt;
Extracts programs, data files, COPYBOOKS, CALL relationships, and READ / WRITE / UPDATE operations. This is where structure is born.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enrichment Agent (The Intelligence Layer)&lt;/strong&gt;
Using LLMs, this agent explains what a program does, infers business intent, tags batch vs online behavior, and adds semantic labels to graph nodes. Now your graph isn't just connected — it's understandable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Graph Builder Agent&lt;/strong&gt;
Transforms raw entities into a Neo4j knowledge graph. The result is queryable system intelligence.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;CobolProgram&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;READS&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;DataFile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;Program&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;CALLS&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;Program&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;Program&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;USES&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;Copybook&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Cypher Generation Agent&lt;/strong&gt;
Ask "Which programs read customer master files?" and the agent converts it to Cypher — accurately and safely.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Retrieval Agent&lt;/strong&gt;
Executes the query, validates results, and returns grounded answers. No hallucinations, no guesswork — only graph-backed truth.&lt;/p&gt;
&lt;h2&gt;Natural Language → Graph Insights&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;cypher_chain&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="s2"&gt;&amp;quot;query&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Which programs read from a file?&amp;quot;&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Generated Cypher:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;CobolProgram&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;READS&lt;/span&gt;&lt;span class="o"&gt;]-&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(:&lt;/span&gt;&lt;span class="n"&gt;DataFile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;RETURN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;DISTINCT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;program_id&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Query:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;List all programs in the Finance domain
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Generated Cypher:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;CobolProgram&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;toLower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;toLower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;finance&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;RETURN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Response from LLM:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;In&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Finance&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;we&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;have&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;identified&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;programs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;various&lt;/span&gt;
&lt;span class="n"&gt;financial&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;operations&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Notable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;programs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;include&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CBACT01C&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;processes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;account&lt;/span&gt;
&lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CBSTM03A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;generates&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;account&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;statements&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Programs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;like&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;COBIL00C&lt;/span&gt;
&lt;span class="n"&gt;facilitate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bill&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;payments&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;COPAUA0C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;its&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;related&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;programs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;manage&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;card&lt;/span&gt;
&lt;span class="n"&gt;authorization&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;processes&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;

&lt;span class="n"&gt;These&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;programs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;crucial&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maintaining&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;financial&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;transactions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;customer&lt;/span&gt;
&lt;span class="n"&gt;account&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;management&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;meaning&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;any&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;changes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;maintenance&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;directly&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;impact&lt;/span&gt;
&lt;span class="n"&gt;financial&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;reporting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;customer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;service&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;It&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;s important to ensure that updates&lt;/span&gt;
&lt;span class="n"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;carefully&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;managed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;avoid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;disruptions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;these&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;critical&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;functions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This is GraphRAG done right: deterministic, explainable, and auditable.&lt;/p&gt;
&lt;h2&gt;The UI: Making the System Observable&lt;/h2&gt;
&lt;p&gt;A Streamlit dashboard lets you upload repositories, monitor agent progress, inspect graph growth, and query the knowledge graph interactively. This makes the system usable not just for engineers but for architects, modernization teams, product owners, and risk &amp;amp; compliance teams.&lt;/p&gt;
&lt;h2&gt;Tested, Scalable, Production-Ready&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Proven at scale&lt;/strong&gt;
5,000+ files processed, ~4–5 minutes end-to-end, with parallel workers. This is not a PoC — it's a foundation.&lt;/p&gt;
&lt;h2&gt;Why This Is the Future of RAG&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;A clear progression&lt;/strong&gt;
Classic RAG answers questions. GraphRAG explains systems. Agentic GraphRAG understands them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A breakthrough for modernization&lt;/strong&gt;
It delivers faster impact analysis, safer refactoring, knowledge retention, and AI-assisted decision-making.&lt;/p&gt;
&lt;p&gt;GitHub Repo: https://github.com/rajacsp/legacy-cobol-insights&lt;/p&gt;</content><category term="Knowledge Graphs"/><category term="GraphRAG"/><category term="COBOL"/><category term="LangGraph"/><category term="Neo4j"/><category term="Agentic AI"/><category term="Legacy Modernization"/></entry><entry><title>Graph Databases and Libraries: A Practical Comparison</title><link href="https://blogs.rajacsp.com/graph-databases-comparison.html" rel="alternate"/><published>2026-06-13T00:00:00-03:00</published><updated>2026-06-13T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-13:/graph-databases-comparison.html</id><summary type="html">&lt;p&gt;Choosing a graph backend is less about finding the "best" tool and more about matching the tool to your scale, query style, and deployment constraints. This is a survey of the main options across three tiers: in-process libraries, embedded file-based engines, and full graph database servers. Each entry below gives …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Choosing a graph backend is less about finding the "best" tool and more about matching the tool to your scale, query style, and deployment constraints. This is a survey of the main options across three tiers: in-process libraries, embedded file-based engines, and full graph database servers. Each entry below gives the trade-offs that actually matter when you sit down to build.&lt;/p&gt;
&lt;h2&gt;Python Libraries (In-Process)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;NetworkX&lt;/strong&gt;
Pure-Python graph library, no server, ideal for analysis and prototyping on smaller graphs. Rich algorithm coverage (centrality, shortest paths, community detection) but everything lives in memory and single-threaded Python limits it past a few hundred thousand edges.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RDFLib&lt;/strong&gt;
The choice when you want RDF triples and SPARQL queries rather than a property-graph model. Pure Python, file-based or in-memory, and integrates with the semantic-web stack. Slower and more verbose than property-graph tools, but unbeatable if interoperability and standards (OWL, Turtle, JSON-LD) matter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;igraph&lt;/strong&gt;
A C core with bindings for Python, R, and C, so it is markedly faster than NetworkX for heavy analytics. Excellent for large static graphs and statistical workflows, though its API is less Pythonic and mutation-heavy workloads feel awkward.&lt;/p&gt;
&lt;h2&gt;Embedded / File-Based Databases&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;SQLite + graph queries&lt;/strong&gt;
Model a graph as nodes and edges tables and traverse with recursive CTEs. Zero new infrastructure, perfect for small embedded datasets, but recursive SQL gets painful for deep or variable-length traversals and there is no native graph query language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DuckDB&lt;/strong&gt;
Same relational-modeling idea as SQLite but columnar and built for analytics, so aggregate and scan-heavy graph queries fly. Still not a native graph engine, so multi-hop traversal remains hand-written SQL rather than Cypher.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Kuzu&lt;/strong&gt;
An embedded graph database — think "SQLite for graphs." Speaks Cypher, needs no server, and is engineered for fast analytical traversal on a single machine. The standout pick when you want real graph semantics locally without standing up a server; ecosystem is younger than Neo4j's.&lt;/p&gt;
&lt;h2&gt;Alternative Graph Database Servers&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;ArangoDB&lt;/strong&gt;
Multi-model: documents, key-value, and graphs in one open-source engine, queried with AQL. Flexible if your data is partly document-shaped, but the jack-of-all-trades design means graph-specific tuning is less deep than dedicated engines.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;JanusGraph&lt;/strong&gt;
Distributed and open source, layered over storage backends like Cassandra or HBase for horizontal scale. Built for very large graphs, but operationally heavy — you are running a whole backend stack, not a single binary.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Amazon Neptune&lt;/strong&gt;
A fully managed graph DB on AWS supporting both property-graph (Gremlin/openCypher) and RDF/SPARQL. Removes ops burden if you live in AWS, at the cost of lock-in and per-hour pricing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Memgraph&lt;/strong&gt;
Cypher-compatible and in-memory, tuned for speed and real-time/streaming graph workloads. Drop-in familiar for Neo4j users who need lower latency, though memory-resident storage shapes your cost and capacity planning.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TigerGraph&lt;/strong&gt;
Enterprise-scale, built for deep-link analytics and parallel traversal across massive graphs, queried with GSQL. Powerful at scale, but heavier to learn and license — overkill for small or mid-size projects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Neo4j&lt;/strong&gt;
The most mature and widely adopted property-graph database, the reference implementation for Cypher, with a deep ecosystem (Bloom, GDS library, APOC, drivers everywhere). The safe default for serious property-graph work; the trade-offs are JVM resource appetite and licensing tiers for the enterprise features.&lt;/p&gt;
&lt;h2&gt;Comparison Table&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Query Language&lt;/th&gt;
&lt;th&gt;Server?&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;NetworkX&lt;/td&gt;
&lt;td&gt;Python library&lt;/td&gt;
&lt;td&gt;Python API&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Prototyping, analysis on small graphs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RDFLib&lt;/td&gt;
&lt;td&gt;Python library&lt;/td&gt;
&lt;td&gt;SPARQL&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;RDF / semantic-web graphs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;igraph&lt;/td&gt;
&lt;td&gt;Library (C core)&lt;/td&gt;
&lt;td&gt;Native API&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Fast analytics, large static graphs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQLite&lt;/td&gt;
&lt;td&gt;Embedded relational&lt;/td&gt;
&lt;td&gt;SQL (CTEs)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Tiny embedded graphs, zero infra&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DuckDB&lt;/td&gt;
&lt;td&gt;Embedded columnar&lt;/td&gt;
&lt;td&gt;SQL (CTEs)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Analytical graph queries on local data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kuzu&lt;/td&gt;
&lt;td&gt;Embedded graph&lt;/td&gt;
&lt;td&gt;Cypher&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Local property graphs, fast traversal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ArangoDB&lt;/td&gt;
&lt;td&gt;Multi-model&lt;/td&gt;
&lt;td&gt;AQL&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Mixed document + graph workloads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JanusGraph&lt;/td&gt;
&lt;td&gt;Distributed graph&lt;/td&gt;
&lt;td&gt;Gremlin&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Massive distributed graphs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon Neptune&lt;/td&gt;
&lt;td&gt;Managed graph&lt;/td&gt;
&lt;td&gt;Gremlin / SPARQL&lt;/td&gt;
&lt;td&gt;Managed&lt;/td&gt;
&lt;td&gt;AWS-native, ops-free deployment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memgraph&lt;/td&gt;
&lt;td&gt;In-memory graph&lt;/td&gt;
&lt;td&gt;Cypher&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Real-time / streaming, low latency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TigerGraph&lt;/td&gt;
&lt;td&gt;Enterprise graph&lt;/td&gt;
&lt;td&gt;GSQL&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Deep-link analytics at scale&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Neo4j&lt;/td&gt;
&lt;td&gt;Property graph&lt;/td&gt;
&lt;td&gt;Cypher&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Mature, general-purpose property graphs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;How to Choose&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prototyping and analysis&lt;/strong&gt;
Start with NetworkX or igraph. No infrastructure, immediate iteration, and you can swap to a real database once the model stabilizes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Local app, no server&lt;/strong&gt;
Reach for Kuzu when you want Cypher and graph semantics embedded, or SQLite/DuckDB when relational tooling is good enough and you want to avoid a new dependency.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Production property graph&lt;/strong&gt;
Neo4j is the default; pick Memgraph if latency or streaming dominates, ArangoDB if your data is partly document-shaped.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Massive or distributed scale&lt;/strong&gt;
JanusGraph or TigerGraph for horizontal scale, Amazon Neptune if you would rather pay AWS to run it for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Semantic web / RDF&lt;/strong&gt;
RDFLib for in-process work, Neptune for managed RDF at scale.&lt;/p&gt;
&lt;p&gt;The cheapest mistake is reaching for a distributed server when a library or an embedded engine would do. Scale up the tier only when your data size or concurrency genuinely forces it.&lt;/p&gt;</content><category term="Knowledge Graphs"/><category term="graph-databases"/><category term="neo4j"/><category term="kuzu"/><category term="networkx"/><category term="rdflib"/><category term="cypher"/><category term="sparql"/></entry><entry><title>GraphRAG for Mainframe Abend Troubleshooting with AgentScope</title><link href="https://blogs.rajacsp.com/graphrag-mainframe-abend-troubleshooting-agentscope.html" rel="alternate"/><published>2026-06-12T00:00:00-03:00</published><updated>2026-06-12T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-12:/graphrag-mainframe-abend-troubleshooting-agentscope.html</id><summary type="html">&lt;p&gt;Most mainframe troubleshooting RAGs fail at the same place: retrieval. An abend code like S0C7 is a near-exact lookup, not a fuzzy semantic match — but vector search happily returns the S0C4 chunk because the embeddings sit close together. And job dependencies are graph-shaped: an abend in step 3 cascades to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Most mainframe troubleshooting RAGs fail at the same place: retrieval. An abend code like S0C7 is a near-exact lookup, not a fuzzy semantic match — but vector search happily returns the S0C4 chunk because the embeddings sit close together. And job dependencies are graph-shaped: an abend in step 3 cascades to downstream jobs, and plain RAG flattens that structure into disconnected paragraphs. The fix is a knowledge graph that traverses real relationships instead of guessing with cosine similarity.&lt;/p&gt;
&lt;h2&gt;The Core Idea&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Structure over similarity&lt;/strong&gt; — Mainframe docs encode jobs, steps, abend codes, and fixes with strict relationships. Model those as typed nodes and edges so the agent traverses known paths instead of hoping a vector match lands on the right text.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Schema is the boundary&lt;/strong&gt; — Every md file gets parsed into one fixed node/edge structure. The LLM never reasons over raw document shape; it queries known types. This is where accuracy comes from.&lt;/p&gt;
&lt;h2&gt;Step 1 — Define the Schema&lt;/h2&gt;
&lt;p&gt;Five node types and a handful of edge types cover most batch environments:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Node&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;types&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;JOB&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;STEP&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ABEND&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DATASET&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;REMEDIATION&lt;/span&gt;

&lt;span class="n"&gt;Edge&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;types&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;JOB&lt;/span&gt;&lt;span class="o"&gt; &lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;HAS_STEP-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="n"&gt;STEP&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="n"&gt;STEP&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;RAISES-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="n"&gt;ABEND&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="n"&gt;ABEND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;RESOLVED_BY-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;REMEDIATION&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="kd"&gt;JOB&lt;/span&gt;&lt;span class="o"&gt; &lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;TRIGGERS-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="kd"&gt;JOB&lt;/span&gt;&lt;span class="o"&gt; &lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;downstream&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;dependency&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;&lt;span class="n"&gt;STEP&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;READS/WRITES-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DATASET&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Step 2 — Parse the MD Files into the Graph&lt;/h2&gt;
&lt;p&gt;Codes follow strict formats, so regex handles the deterministic bits. Prose remediation text may need an LLM extraction pass for messier docs.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# build_graph.py&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;re&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;networkx&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;nx&lt;/span&gt;

&lt;span class="n"&gt;ABEND_RE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;\b([SU]\d{3,4}|U\d&lt;/span&gt;&lt;span class="si"&gt;{4}&lt;/span&gt;&lt;span class="s1"&gt;)\b&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# S0C7, U4038&lt;/span&gt;
&lt;span class="n"&gt;JOB_RE&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;\bJOB[_A-Z0-9]+\b&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;parse_md_to_graph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;md_text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;nx&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DiGraph&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nx&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DiGraph&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;current_job&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current_step&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;md_text&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;splitlines&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;## &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;                       &lt;span class="c1"&gt;# ## JOB_PAYROLL&lt;/span&gt;
            &lt;span class="n"&gt;jobs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;JOB_RE&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;current_job&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
                &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current_job&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;JOB&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;### &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;current_job&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="c1"&gt;# ### STEP04&lt;/span&gt;
            &lt;span class="n"&gt;current_step&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;###&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current_step&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;STEP&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current_job&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;current_step&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;HAS_STEP&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;current_step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;ab&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;ABEND_RE&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ab&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;ABEND&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current_step&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ab&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;RAISES&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;rem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ab&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; :-&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;rem_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;FIX::&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;ab&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;::&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;0xffff&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
                    &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rem_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;REMEDIATION&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;rem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ab&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rem_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;RESOLVED_BY&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;current_job&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;trigger&amp;quot;&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;dep&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;JOB_RE&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;dep&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;current_job&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current_job&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dep&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;TRIGGERS&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Tune the section markers and regex to your actual md conventions — the principle holds regardless.&lt;/p&gt;
&lt;h2&gt;Step 3 — Query Functions (the Agent's Tools)&lt;/h2&gt;
&lt;p&gt;Deterministic traversals. No embeddings, no LLM, no similarity error on the code lookup.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# graph_tools.py&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;networkx&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;nx&lt;/span&gt;

&lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nx&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_gml&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;abend_graph.gml&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;query_abend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abend_code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;Remediations + which steps/jobs raise a given abend code.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;abend_code&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;found&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;abend&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;abend_code&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="n"&gt;remediations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;text&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;successors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abend_code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;edges&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;abend_code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;rel&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;RESOLVED_BY&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="n"&gt;raised_by&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;predecessors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abend_code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                 &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;edges&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;abend_code&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;rel&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;RAISES&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="n"&gt;jobs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;raised_by&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;jobs&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;predecessors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                 &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;edges&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;rel&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;HAS_STEP&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;found&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;abend&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;abend_code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;remediations&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;remediations&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;raised_by_steps&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;raised_by&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;jobs&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;downstream_impact&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;job&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;Jobs that fail or delay if this job abends — the cascade.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;job&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;found&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;job&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;job&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="n"&gt;affected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;nx&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;edge_dfs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;job&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;edges&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;rel&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;TRIGGERS&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;job&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;job&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;downstream_jobs&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;affected&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Step 4 — Wire into AgentScope&lt;/h2&gt;
&lt;p&gt;The graph handles structure; vector RAG stays as the fallback for open-ended prose questions. The agent picks the right tool.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# agent.py&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;asyncio&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;agentscope.agent&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ReActAgent&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;agentscope.tool&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Toolkit&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;agentscope.message&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Msg&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;graph_tools&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;query_abend&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;downstream_impact&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;rag_tools&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;retrieve_docs&lt;/span&gt;   &lt;span class="c1"&gt;# your existing vector RAG&lt;/span&gt;

&lt;span class="n"&gt;toolkit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Toolkit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register_tool_function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query_abend&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;        &lt;span class="c1"&gt;# exact structured lookup&lt;/span&gt;
&lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register_tool_function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;downstream_impact&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# dependency cascade&lt;/span&gt;
&lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;register_tool_function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;retrieve_docs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;# semantic fallback&lt;/span&gt;

&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ReActAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;mainframe_ops&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;sys_prompt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;You troubleshoot mainframe batch jobs. For a specific abend code, &amp;quot;&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;ALWAYS call query_abend first. To assess the blast radius of a failed &amp;quot;&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;job, call downstream_impact. Use retrieve_docs only for open-ended &amp;quot;&lt;/span&gt;
        &lt;span class="s2"&gt;&amp;quot;questions the graph cannot answer. Never invent abend semantics.&amp;quot;&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=...&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;# your model wrapper&lt;/span&gt;
    &lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;toolkit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;q&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Msg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;user&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;&amp;quot;JOB_PAYROLL step 4 hit S0C7. What do I do, and what breaks downstream?&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;user&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Why This Lifts Accuracy&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;No similarity error on codes&lt;/strong&gt; — &lt;code&gt;query_abend("S0C7")&lt;/code&gt; walks ABEND -&amp;gt; RESOLVED_BY directly. S0C7 and S0C4 can no longer be confused because there is no embedding step in the lookup path.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Real cascade reasoning&lt;/strong&gt; — &lt;code&gt;downstream_impact&lt;/code&gt; traverses TRIGGERS edges to return the actual blast radius — something flat vector RAG structurally cannot do.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Graceful fallback&lt;/strong&gt; — Vector retrieval stays for "how do I..." prose questions, so you lose nothing and gain structured precision.&lt;/p&gt;
&lt;h2&gt;The Honest Order of Operations&lt;/h2&gt;
&lt;p&gt;Build hybrid retrieval (exact code match + vector) first, then this graph layer. Most mainframe abend RAGs become good enough right here at Step 4 — the probabilistic layer (PKG + MCMC) is worth adding only if you have genuine multi-cause, cross-job causal uncertainty left to resolve after the graph is in place.&lt;/p&gt;
&lt;p&gt;One thing to confirm: verify the AgentScope import paths against your installed version — the &lt;code&gt;agentscope.agent&lt;/code&gt; and &lt;code&gt;agentscope.tool&lt;/code&gt; namespaces have moved across releases.&lt;/p&gt;</content><category term="GenAI"/><category term="GenAI"/><category term="RAG"/><category term="KnowledgeGraph"/><category term="AgentScope"/><category term="Mainframe"/><category term="GraphRAG"/><category term="Python"/><category term="COBOL"/></entry><entry><title>Understanding Startup Equity Cliffs and Vesting</title><link href="https://blogs.rajacsp.com/startup-equity-cliff-vesting.html" rel="alternate"/><published>2026-06-11T00:00:00-03:00</published><updated>2026-06-11T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-11:/startup-equity-cliff-vesting.html</id><summary type="html">&lt;p&gt;A startup employee equity cliff period is the minimum amount of time an employee must stay with the company before earning any ownership rights to their stock options or equity grants.&lt;/p&gt;
&lt;h2&gt;Typical Structure&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;4-Year Vesting with 1-Year Cliff&lt;/strong&gt;
The most common arrangement: equity vests over four years, with nothing earned …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A startup employee equity cliff period is the minimum amount of time an employee must stay with the company before earning any ownership rights to their stock options or equity grants.&lt;/p&gt;
&lt;h2&gt;Typical Structure&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;4-Year Vesting with 1-Year Cliff&lt;/strong&gt;
The most common arrangement: equity vests over four years, with nothing earned in the first twelve months.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Worked Example&lt;/strong&gt;
An employee receives 10,000 stock options. During the first 12 months, 0 options vest. On the 1-year anniversary, 25% (2,500 options) vest at once. The remaining 75% vest monthly or quarterly over the next 3 years.&lt;/p&gt;
&lt;h2&gt;What Happens if the Employee Leaves&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Before 1 year — 0%&lt;/strong&gt;
No equity is earned; the cliff has not been cleared.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After 1 year — 25%&lt;/strong&gt;
The cliff is met and the first quarter of the grant vests in a single lump.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After 2 years — 50%&lt;/strong&gt;
Half the grant is vested through ongoing monthly or quarterly accrual.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After 3 years — 75%&lt;/strong&gt;
Three-quarters of the grant is vested.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After 4 years — 100%&lt;/strong&gt;
The full grant is vested and the schedule is complete.&lt;/p&gt;
&lt;h2&gt;Why Startups Use a Cliff&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Prevents Quick-Exit Equity&lt;/strong&gt;
Stops ownership from going to employees who leave shortly after joining.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Encourages Commitment&lt;/strong&gt;
Rewards staying through the long-term build.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Protects Founders and Investors&lt;/strong&gt;
Limits excessive dilution from short tenures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Aligns Incentives&lt;/strong&gt;
Ties employee upside to company growth.&lt;/p&gt;
&lt;h2&gt;Common Cliff Periods&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1 Year&lt;/strong&gt;
The industry standard for most employees.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6 Months&lt;/strong&gt;
Occasionally used for advisors or very early hires.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2 Years&lt;/strong&gt;
Rare, and generally viewed as too restrictive.&lt;/p&gt;
&lt;h2&gt;Founder Equity vs Employee Equity&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Employee Stock Options&lt;/strong&gt;
Usually 4 years with a 1-year cliff.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Founder Vesting&lt;/strong&gt;
Often 4 years with a 1-year cliff, especially when investors are involved.&lt;/p&gt;
&lt;p&gt;For an early-stage startup, a 4-year vesting schedule with a 1-year cliff is generally considered the market-standard arrangement for employees.&lt;/p&gt;</content><category term="Startup"/><category term="equity"/><category term="vesting"/><category term="stock-options"/><category term="startups"/><category term="founders"/></entry><entry><title>Why self-learning courses are failures</title><link href="https://blogs.rajacsp.com/why-self-learning-courses-are-failures.html" rel="alternate"/><published>2026-06-10T00:00:00-03:00</published><updated>2026-06-10T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-10:/why-self-learning-courses-are-failures.html</id><summary type="html">&lt;p&gt;Self-learning courses promise freedom — learn anytime, anywhere, at your own pace. But that same freedom is what kills most of them. The completion numbers tell the story: median completion rates for online courses sit around 12.6%, with the worst performers near 0.7% and even the best topping out …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Self-learning courses promise freedom — learn anytime, anywhere, at your own pace. But that same freedom is what kills most of them. The completion numbers tell the story: median completion rates for online courses sit around 12.6%, with the worst performers near 0.7% and even the best topping out around 52%. The platforms stripped away the friction of the classroom and accidentally removed the human scaffolding that made learning stick.&lt;/p&gt;
&lt;p&gt;Here is what actually goes wrong.&lt;/p&gt;
&lt;h2&gt;Structural Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Low Completion Rates&lt;/strong&gt;
Without deadlines, peer pressure, or a classroom, most learners enroll, watch a few videos, then abandon. The motivation problem goes unsolved.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Immediate Feedback Loop&lt;/strong&gt;
In a classroom you get an answer in seconds. Online you wait days for a forum reply, or never get one. Misconceptions solidify and motivation drops.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Real-World Application&lt;/strong&gt;
Watching a video on Python isn't writing Python. Passive consumption feels like learning but produces no skill without hands-on projects or sandbox environments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Accountability Partner&lt;/strong&gt;
A single person checking your progress weekly dramatically lifts completion. Most platforms have no study-buddy system, no mentor matching, no progress sharing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Consequence for Quitting&lt;/strong&gt;
Drop a university course and you lose tuition, time, and GPA. Drop an online course and nothing happens. Zero cost to quit means people quit at the first friction point.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Cohort Synchronization&lt;/strong&gt;
"Start anytime" means "no shared journey." Cohort-based courses see 3–10x higher completion because humans match pace with peers.&lt;/p&gt;
&lt;h2&gt;Content &amp;amp; Credential Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Shallow Content &amp;amp; Depth Issues&lt;/strong&gt;
Many courses are common sense in video form for anyone with a few years of experience. Quizzes are too easy, checkpoints are skippable, and free YouTube often teaches the same skill better.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Certificate Trap&lt;/strong&gt;
Easy-to-earn certificates signal weak skill. They function as profile badges, not credible credentials — which undermines the whole incentive to finish.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Skill Validation&lt;/strong&gt;
Finishing a course doesn't prove you can do the job. Without assessments mirroring real work, learners can't trust their competence and employers can't trust the credential.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Path Integration&lt;/strong&gt;
A single course is an island. Without a roadmap connecting it to a job, promotion, or project, learners lose the "why" and drift away.&lt;/p&gt;
&lt;h2&gt;Engagement &amp;amp; Design Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Zero Social / Community Layer&lt;/strong&gt;
A solitary experience with almost no learner-to-learner interaction. No accountability, no networking, no peer motivation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Personalization or Adaptive Learning&lt;/strong&gt;
The same static videos for everyone, regardless of skill level, pace, or prior knowledge. In an era of AI-driven personalized roadmaps, one-size-fits-all is a major gap.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Spaced Repetition&lt;/strong&gt;
Watch-once, test-once, forget-forever. Without spaced recall, knowledge decays within weeks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Instructor Presence&lt;/strong&gt;
Pre-recorded content feels dead — a vending machine. Even occasional live Q&amp;amp;A creates the sense that someone notices whether you show up.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Emotional Hook&lt;/strong&gt;
Great teachers inspire curiosity or ambition. Video rarely replicates the live instructor who calls you out, celebrates your win, or tells the story that makes a lesson stick.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Identity Shift&lt;/strong&gt;
A classroom makes you &lt;em&gt;a student&lt;/em&gt; — an identity with norms and expectations. Online, you're just a person watching a screen, so the behavior commitment stays weak.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No Friction Reduction&lt;/strong&gt;
Life interrupts. The course doesn't pause for your sick week or family emergency. One missed week becomes two, then abandonment.&lt;/p&gt;
&lt;h2&gt;US-Centric Blind Spot&lt;/h2&gt;
&lt;p&gt;Most content assumes an American workplace — case studies, communication styles, business contexts. For learners in Southeast Asia, Europe, or elsewhere, lessons don't translate to their real-world application, despite platforms having global reach.&lt;/p&gt;
&lt;h2&gt;The Pattern&lt;/h2&gt;
&lt;p&gt;Every missing factor is something traditional education evolved over centuries to solve the motivation problem. The failure isn't a bug — it's a design choice that treats learning as content consumption rather than behavior change. The distribution exists; the engagement mechanics, community depth, and adaptive intelligence don't.&lt;/p&gt;</content><category term="Learning"/><category term="edtech"/><category term="online-learning"/><category term="course-design"/><category term="kactii-academy"/><category term="learning-philosophy"/></entry><entry><title>How Pepper Failed — SoftBank's $100M Emotional Robot That a Tablet Could Replace</title><link href="https://blogs.rajacsp.com/how-pepper-failed.html" rel="alternate"/><published>2026-06-09T00:00:00-03:00</published><updated>2026-06-09T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-09:/how-pepper-failed.html</id><summary type="html">&lt;p&gt;In 2014, Masayoshi Son stood on a Tokyo stage and unveiled Pepper — a wide-eyed white humanoid he called the world's first robot that could read human emotions. He was not pitching a gadget. He was pitching a new era, one where SoftBank would lead the way as robots moved from …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In 2014, Masayoshi Son stood on a Tokyo stage and unveiled Pepper — a wide-eyed white humanoid he called the world's first robot that could read human emotions. He was not pitching a gadget. He was pitching a new era, one where SoftBank would lead the way as robots moved from the factory floor into the home, the way computers had moved from offices into pockets.&lt;/p&gt;
&lt;p&gt;Seven years later, Pepper was discontinued. This is how the most famous social robot of its generation, backed by a billionaire, built by world-class engineers, and manufactured by Foxconn, still couldn't find a reason to exist.&lt;/p&gt;
&lt;h2&gt;The Setup&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The vision&lt;/strong&gt; — Son's pitch was a personal robot in every home and shop — an emotional companion, not a tool. Pepper was meant to be the iPhone moment for consumer robotics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The maker&lt;/strong&gt; — Pepper was built by Aldebaran, the French robotics firm behind the acclaimed research robot NAO, which SoftBank had acquired in 2012 for around $100M.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The hype peak&lt;/strong&gt; — Pepper went on sale to Japanese consumers in June 2015 at roughly $1,650. The first batch of 1,000 units sold out in about 60 seconds.&lt;/p&gt;
&lt;h2&gt;What Pepper Actually Did&lt;/h2&gt;
&lt;p&gt;Strip away the staging and Pepper's real capabilities were thin: rudimentary conversation, simple interactions through a chest-mounted tablet, face recognition, and the ability to sing while gesturing. The emotional-intelligence promise never materialized — even with IBM's help in 2016, true emotional understanding wasn't possible, so SoftBank quietly rebranded Pepper as a basic assistance robot and leaned on its charm.&lt;/p&gt;
&lt;p&gt;A CLSA analyst delivered the verdict that haunts the whole product: there was very little Pepper could do that you couldn't do with an iPad.&lt;/p&gt;
&lt;h2&gt;What Went Wrong&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The capability gap between the demo and the unit&lt;/strong&gt; — Pepper was sold as emotionally intelligent and shipped as a chest tablet on wheels. When the headline feature doesn't exist, the novelty wears off faster than the sales cycle closes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A tablet could do most of it&lt;/strong&gt; — If the differentiated value over a $400 iPad is "it has a face," buyers do the math quickly. There was no recurring task Pepper performed better than cheaper, more reliable alternatives.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The economics didn't work for consumers&lt;/strong&gt; — At ~$1,650 plus a monthly fee, the true cost ran toward $10,000 over the mandatory subscription. Too expensive for households, so SoftBank was forced to pivot to businesses — and the enterprise edition ran far higher still.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Demand had to be manufactured&lt;/strong&gt; — SoftBank propped up early sales by deploying Pepper in its own mobile phone stores. When a company has to buy its own product to show traction, the market is speaking.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reliability problems&lt;/strong&gt; — Pepper frequently broke down. Heavy batteries decayed, and the chest tablets ran an out-of-date Android without current security updates. A flaky robot in a customer-facing role is worse than no robot.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Organizational friction&lt;/strong&gt; — After the 2016 merger into SoftBank Robotics, culture clashes between Tokyo management and the French team hurt Pepper's development. Hardware lives or dies on execution, and the two halves never fully meshed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thin, decaying volume&lt;/strong&gt; — Roughly 27,000 units were produced between 2014 and 2020. By the end, sales slumped to fewer than 100 units in some months, unsold inventory piled up, and units were being cobbled together from out-of-date components.&lt;/p&gt;
&lt;h2&gt;The End&lt;/h2&gt;
&lt;p&gt;SoftBank halted Pepper production in 2021, citing weak demand, high operational cost, and limited scalability beyond controlled environments, and cut 165 jobs in France. The timing was pointed — it came just after SoftBank sold Boston Dynamics to Hyundai for $1.1B, a clear retreat from its robotics ambitions.&lt;/p&gt;
&lt;p&gt;Aldebaran, the original developer, had already entered receivership, and by 2026 its assets had been acquired by a Chinese tech company. The orphaned units were left with dying batteries and obsolete software — a long tail of stranded hardware.&lt;/p&gt;
&lt;h2&gt;The Counter-Example In The Same Building&lt;/h2&gt;
&lt;p&gt;The tragedy is that the same company knew how to win. NAO — Aldebaran's earlier, smaller research robot — sold 19,000+ units and became the default platform in 600+ universities and labs. It succeeded by being narrow and genuinely useful for a recurring need: teaching and research.&lt;/p&gt;
&lt;p&gt;Pepper chased the flashy, general-purpose companion dream and bled money. NAO served a boring vertical and thrived for over a decade. Pepper's failure wasn't a lack of money, talent, or manufacturing — it was aiming at the wrong target.&lt;/p&gt;
&lt;h2&gt;The Takeaways&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Capital and scale don't fix a thin value proposition&lt;/strong&gt; — Pepper had a billionaire backer, Foxconn manufacturing, and a global brand, and still died. Money buys a longer, more expensive version of the same failure when the core need isn't real.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If a tablet can do it, you don't have a product&lt;/strong&gt; — The differentiated, must-have capability has to be obvious and durable. "It has a face" is not a moat.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Manufacturing demand is a warning sign, not traction&lt;/strong&gt; — Propping up sales through your own stores hides the absence of organic demand instead of solving it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The boring vertical beats the flashy general case&lt;/strong&gt; — NAO in classrooms beat Pepper in living rooms. Find the narrow recurring need before chasing the universal companion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hardware strands its customers&lt;/strong&gt; — Every unit is a long-tail support obligation. When the company retreats, owners are left with dead objects — plan for the afterlife, or don't ship the unit.&lt;/p&gt;</content><category term="AI Practice"/><category term="robotics"/><category term="pepper"/><category term="softbank"/><category term="aldebaran"/><category term="hardware-startups"/><category term="failure-analysis"/><category term="product-market-fit"/></entry><entry><title>Rise and Fall of the Great Indian Mitra Robot</title><link href="https://blogs.rajacsp.com/rise-and-fall-of-mitra.html" rel="alternate"/><published>2026-06-09T00:00:00-03:00</published><updated>2026-06-09T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-09:/rise-and-fall-of-mitra.html</id><summary type="html">&lt;p&gt;In November 2017, a five-foot robot named Mitra greeted Ivanka Trump and chatted with Narendra Modi at the Global Entrepreneurship Summit in Hyderabad. It was the kind of moment a founder cannot buy — national press, a viral clip, India's own humanoid robot sharing a stage with world leaders.&lt;/p&gt;
&lt;p&gt;Nine years …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In November 2017, a five-foot robot named Mitra greeted Ivanka Trump and chatted with Narendra Modi at the Global Entrepreneurship Summit in Hyderabad. It was the kind of moment a founder cannot buy — national press, a viral clip, India's own humanoid robot sharing a stage with world leaders.&lt;/p&gt;
&lt;p&gt;Nine years later, the company behind it is listed as defunct, down to three employees. This is the story of how Mitra won the spotlight and lost the business, and why that gap is the most important thing a hardware founder can understand.&lt;/p&gt;
&lt;h2&gt;The Company&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Invento Robotics&lt;/strong&gt; — A Bengaluru startup founded in 2016 by Balaji Viswanathan, a former Microsoft engineer and one of the most-followed writers on Quora. Its flagship was Mitra, billed as India's first humanoid robot of its kind.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Mitra robot&lt;/strong&gt; — A roughly five-foot wheeled humanoid with a chest-mounted screen, face recognition, and scripted conversational ability, pitched for hospitality, customer engagement, and workplace productivity.&lt;/p&gt;
&lt;h2&gt;The High Point&lt;/h2&gt;
&lt;p&gt;The GES 2017 moment was genuine PR gold. Mitra became the friendly face of "India can build humanoids too," and the clip of it greeting visiting dignitaries traveled far beyond the tech press. For a brief window, Invento had something most hardware startups never get: mass attention and a story the public actually remembered.&lt;/p&gt;
&lt;p&gt;The trouble is that attention is not the same as a customer. And the list of places Mitra eventually showed up tells you exactly what kind of product it became.&lt;/p&gt;
&lt;h2&gt;Where It Actually Ended Up&lt;/h2&gt;
&lt;p&gt;Mitra found its way into banks, weddings, birthday parties, hotels, malls, and hospitals. Read that list again — those are novelty appearances and one-off rentals, not recurring mission-critical deployments. The robot became an attention-grabbing event prop, the thing you hire to make guests smile, rather than infrastructure a business pays for month after month.&lt;/p&gt;
&lt;p&gt;This is the classic greeter-robot trap, and it is where the money quietly stops.&lt;/p&gt;
&lt;h2&gt;What Went Wrong&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The product was a demo, not a business&lt;/strong&gt; — A robot that does scripted speech and face recognition wows people once. It does not create the repeat, painful, must-solve need that builds a durable revenue line.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hardware economics are brutal at low volume&lt;/strong&gt; — Building humanoids in small batches in India meant high unit cost, thin margins, long sales cycles, and expensive per-unit support. Last reported revenue was about ₹1.01 crore (~$120K) for the year ending March 2022 — tiny.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Chronically undercapitalized&lt;/strong&gt; — Invento raised only ~$1.3M total across its rounds. For a humanoid hardware company that is almost nothing; you cannot out-engineer a hard physical problem on a shoestring while the category demands serious R&amp;amp;D and manufacturing spend.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Operational and export friction&lt;/strong&gt; — In 2020, US-bound Mitra units sat stuck in Bengaluru customs for four weeks, prompting a public complaint about red tape. The supporting ecosystem — supply chain, logistics, export pipeline — simply wasn't there.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Substance questions&lt;/strong&gt; — From the GES debut onward, critics argued the robot was thin on real robotics and AI relative to the hype. Once the novelty faded, there wasn't enough underlying capability to justify a premium or lock in repeat buyers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Serial pivots&lt;/strong&gt; — COVID hospital robots, then an eldercare joint venture, then LLM-based customer engagement, and finally AI bootcamps. Repeatedly reaching for new markets is the classic signature of a company that never found product-market fit for its flagship.&lt;/p&gt;
&lt;h2&gt;The Founder Outlasted The Robot&lt;/h2&gt;
&lt;p&gt;The hardware business is effectively dead — Mitra Robot is listed as deadpooled, with three employees as of late 2024. But Balaji Viswanathan himself remains active and well-regarded in India's AI scene, having converted his robotics reputation into AI and multi-agent-systems bootcamps under the Mitra AI / Modern AI Pro banner.&lt;/p&gt;
&lt;p&gt;The robot became a museum curiosity; the founder became the next venture. That is the recurring pattern in this space — the hardware dies, the expertise compounds forward.&lt;/p&gt;
&lt;h2&gt;This Is Not Just A Mitra Problem&lt;/h2&gt;
&lt;p&gt;Lest anyone think Mitra failed for lack of money or scale, the same story plays out at every budget.&lt;/p&gt;
&lt;p&gt;SoftBank's Pepper — a far better-funded "emotional robot" backed by a billionaire and built by France's Aldebaran — sold its first 1,000 units in 60 seconds in 2015, produced roughly 27,000 in total, and was discontinued in 2021 for the identical reasons: a thin value proposition, brutal hardware economics, and frequent breakdowns. Aldebaran, which built both Pepper and the genuinely successful research robot NAO, was placed in receivership in 2025.&lt;/p&gt;
&lt;p&gt;The difference between Mitra and Pepper was scale and capital, not outcome. When the underlying value proposition is thin, more money just buys a longer, more expensive version of the same failure.&lt;/p&gt;
&lt;h2&gt;The Takeaways&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Virality is not traction&lt;/strong&gt; — A viral demo measures attention, not willingness to pay repeatedly. Confusing the two is the original sin of the social robot.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The boring recurring need beats the flashy moment&lt;/strong&gt; — Mitra's appearances were memorable and unprofitable. Find the narrow, unglamorous problem someone will pay for every month before chasing the universal companion.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Hardware strands people&lt;/strong&gt; — Every unit sold is a long-tail support obligation. When the company retreats, the customer is left holding a dead object. Plan for the afterlife, or don't ship the unit.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Capital buys time, not product-market fit&lt;/strong&gt; — Mitra died on a shoestring; Pepper died on a fortune. Money cannot manufacture a real customer need.&lt;/p&gt;</content><category term="AI Practice"/><category term="robotics"/><category term="mitra"/><category term="invento-robotics"/><category term="hardware-startups"/><category term="failure-analysis"/><category term="product-market-fit"/></entry><entry><title>Sashiko — The AI That Catches Kernel Bugs Humans Already Missed</title><link href="https://blogs.rajacsp.com/sashiko-agentic-kernel-review.html" rel="alternate"/><published>2026-06-08T00:00:00-03:00</published><updated>2026-06-08T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-08:/sashiko-agentic-kernel-review.html</id><summary type="html">&lt;p&gt;Sashiko (刺し子, "little stabs") borrows its name from a Japanese reinforcement-stitching technique — fabric repaired and strengthened at its points of wear. The metaphor is the whole pitch: an agentic system that stitches over the weak spots in proposed Linux kernel patches before they land. It's written in Rust …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Sashiko (刺し子, "little stabs") borrows its name from a Japanese reinforcement-stitching technique — fabric repaired and strengthened at its points of wear. The metaphor is the whole pitch: an agentic system that stitches over the weak spots in proposed Linux kernel patches before they land. It's written in Rust (~85% of the repo), Apache-2.0 licensed under the Linux Foundation, and self-contained — no external agentic CLI tools, just patches in and structured reviews out.&lt;/p&gt;
&lt;p&gt;What makes it interesting isn't "LLM reviews code" — that's commodity now. It's that someone built a vertical, domain-locked review agent for the hardest possible target and then published numbers.&lt;/p&gt;
&lt;h2&gt;The Numbers Worth Pausing On&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;53.6% bug-catch rate&lt;/strong&gt; — Against the last 1000 upstream commits carrying &lt;code&gt;Fixes:&lt;/code&gt; tags (using Gemini 3.1 Pro), Sashiko surfaced more than half the bugs. The kicker: 100% of those bugs already passed human review and made it into the mainline tree. So on this sample, the tool is operating &lt;em&gt;above&lt;/em&gt; the human bar that already failed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;~20% false positive ceiling&lt;/strong&gt; — Measured loosely via manual review, with the maintainers candidly noting most of it lives in a "gray zone" rather than being flatly wrong. Honest framing — they also flag that output is probabilistic, so the same patch can yield different findings run to run.&lt;/p&gt;
&lt;h2&gt;The Nine-Stage Protocol&lt;/h2&gt;
&lt;p&gt;This is the part I'd steal for my own agent work. Sashiko doesn't do one monolithic "review this" prompt — it runs a multi-stage protocol mimicking a team of specialists, each with a narrow mandate:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 1 — Main goal analysis&lt;/strong&gt; — Big-picture architectural flaws, UAPI breakages, conceptual correctness.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 2 — Implementation verification&lt;/strong&gt; — Does the code actually do what the commit message claims? Missing pieces, undocumented side-effects, API contract violations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 3 — Execution flow&lt;/strong&gt; — Traces C execution paths for logic errors, unchecked returns, unhandled error paths, off-by-ones.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 4 — Resource management&lt;/strong&gt; — Memory leaks, use-after-free, double frees, object lifecycles across queues, timers, workqueues.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 5 — Locking and synchronization&lt;/strong&gt; — Concurrency bugs, deadlocks, RCU rule violations, thread-safety.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 6 — Security audit&lt;/strong&gt; — Buffer overflows, OOB reads/writes, TOCTOU races, uninitialized-memory leaks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 7 — Hardware engineer's review&lt;/strong&gt; — Driver-specific: register accesses, DMA mapping, memory barriers, state machine constraints.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 8 — Verification and severity&lt;/strong&gt; — Consolidates stages 1–7, deduplicates, and tries to logically prove/disprove findings to kill false positives.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stage 9 — Report generation&lt;/strong&gt; — Converts confirmed findings into a polite, inline-commented LKML email reply.&lt;/p&gt;
&lt;p&gt;The architecture lesson here maps directly onto what I keep arguing with AgentLegatus — agents fail at boundaries, and schemas are boundaries. Sashiko draws hard boundaries between review concerns instead of asking one prompt to hold the entire kernel's failure surface in its head at once. Stage 8 as an adversarial consolidation layer is the move: separate finding from confirmation.&lt;/p&gt;
&lt;h2&gt;How It Actually Runs&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Ingestion&lt;/strong&gt; — Two paths: automated monitoring of mailing lists via &lt;code&gt;lore.kernel.org&lt;/code&gt;, or manual ingestion from a local git repo.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Providers&lt;/strong&gt; — Gemini and Claude both supported. Claude setup uses &lt;code&gt;claude-sonnet-4-5&lt;/code&gt; with a 200K context window, prompt caching (5-min TTL) to cut repeated-context cost, and full tool calling for git operations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Interfaces&lt;/strong&gt; — Web UI and a CLI today; email support is on the roadmap.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prompts&lt;/strong&gt; — Per-subsystem and generic prompts, building on the review-prompts work originally developed by Chris Mason.&lt;/p&gt;
&lt;h2&gt;The Disclaimers Are the Honest Part&lt;/h2&gt;
&lt;p&gt;Two warnings the README doesn't bury, and shouldn't:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data privacy&lt;/strong&gt; — Sashiko ships patches &lt;em&gt;and&lt;/em&gt; potentially large slices of kernel git history to your configured LLM provider to give it enough context. For kernel work that's all public, but the pattern — "we send way more than the diff" — is the thing to internalize before you point a tool like this at anything proprietary.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cost&lt;/strong&gt; — Reviewing at volume against a 200K-context model is not cheap, and the authors explicitly disclaim responsibility for surprise API bills. Token monitoring is on you.&lt;/p&gt;
&lt;h2&gt;Why This Matters for Practitioners&lt;/h2&gt;
&lt;p&gt;The hype read is "AI beats human kernel reviewers." The useful read is narrower and more durable: a focused agent, a staged protocol with explicit separation of concerns, a self-disproving verification stage, and published metrics with stated error bars beats a general-purpose "review my code" wrapper every time. The 53.6% figure is impressive precisely &lt;em&gt;because&lt;/em&gt; the bar was bugs humans already missed — not a synthetic benchmark.&lt;/p&gt;
&lt;p&gt;For anyone building agentic review systems: the takeaway isn't the kernel domain, it's the decomposition. Nine bounded reviewers and a skeptic at the end will outperform one omniscient prompt, and the cost/privacy footprint is a first-class design constraint, not a footnote.&lt;/p&gt;
&lt;h2&gt;Repos&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/sashiko-dev/sashiko"&gt;https://github.com/sashiko-dev/sashiko&lt;/a&gt; (upstream)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rajacsp/sashiko"&gt;https://github.com/rajacsp/sashiko&lt;/a&gt; (fork)&lt;/li&gt;
&lt;/ul&gt;</content><category term="GenAI Engineering"/><category term="agentic-ai"/><category term="linux-kernel"/><category term="code-review"/><category term="rust"/><category term="llm"/><category term="sashiko"/></entry><entry><title>100 Real GenAI Engineer Interview Questions</title><link href="https://blogs.rajacsp.com/100-real-genai-engineer-interview-questions.html" rel="alternate"/><published>2026-06-03T00:00:00-03:00</published><updated>2026-06-03T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-03:/100-real-genai-engineer-interview-questions.html</id><summary type="html">&lt;h2&gt;Training &amp;amp; Adaptation Strategy&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What approaches exist for training or adapting an LLM?&lt;/strong&gt; — Pretraining, fine-tuning, instruction tuning, prompt engineering, RAG.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Base model vs instruction-tuned model?&lt;/strong&gt; — Pure next-token predictor vs one aligned to follow instructions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When would you choose fine-tuning over RAG?&lt;/strong&gt; — Stable domain knowledge, style/format control, latency sensitivity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When would …&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;</summary><content type="html">&lt;h2&gt;Training &amp;amp; Adaptation Strategy&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What approaches exist for training or adapting an LLM?&lt;/strong&gt; — Pretraining, fine-tuning, instruction tuning, prompt engineering, RAG.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Base model vs instruction-tuned model?&lt;/strong&gt; — Pure next-token predictor vs one aligned to follow instructions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When would you choose fine-tuning over RAG?&lt;/strong&gt; — Stable domain knowledge, style/format control, latency sensitivity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When would you choose RAG over fine-tuning?&lt;/strong&gt; — Fresh, changing, or large knowledge that shouldn't be baked into weights.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When is prompt engineering alone sufficient?&lt;/strong&gt; — Low-stakes tasks where the base model already has the capability.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What decisions must be made before training an LLM?&lt;/strong&gt; — Objective, data, budget, eval strategy, base model choice.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What trade-offs do you evaluate when picking a training strategy?&lt;/strong&gt; — Cost, accuracy, latency, maintainability, compliance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you ensure business requirements are met during adaptation?&lt;/strong&gt; — Define success metrics tied to outcomes, not just loss.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Can prompt engineering be considered a form of training?&lt;/strong&gt; — No weight updates; it conditions behavior at inference.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When does prompt engineering stop being sufficient?&lt;/strong&gt; — When accuracy, grounding, or consistency demands retrieval or tuning.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;LLM Internals &amp;amp; Behavior&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is tokenization and why does it drive cost and latency?&lt;/strong&gt; — Text becomes tokens; everything is billed and limited in tokens.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is the context window?&lt;/strong&gt; — All tokens the model sees at once: prompt, history, tools, retrieved docs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What are embeddings and where do you use them?&lt;/strong&gt; — Dense meaning vectors for search, clustering, retrieval.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What causes hallucinations?&lt;/strong&gt; — Over-generalization, insufficient context, ungrounded generation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do temperature and top-p affect output?&lt;/strong&gt; — Control randomness and the sampling distribution.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is the difference between greedy decoding and sampling?&lt;/strong&gt; — Deterministic top token vs probabilistic selection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What are emergent abilities and why do they matter for model selection?&lt;/strong&gt; — Capabilities appearing at scale that affect which model you pick.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Proprietary vs open-weight models — how do you decide?&lt;/strong&gt; — Performance/turnkey safety vs control, cost, data sovereignty.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is a distilled model and when do you use one?&lt;/strong&gt; — A smaller model mimicking a larger one for cost/latency.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you select the right LLM for a given business use case?&lt;/strong&gt; — Match capability, cost, latency, compliance to requirements.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Prompt Engineering in Practice&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How does prompt engineering control output behavior?&lt;/strong&gt; — Constraints, role, examples, and format instructions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you use prompting to reduce hallucinations?&lt;/strong&gt; — Grounding instructions, "say I don't know," retrieved context.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you enforce structured outputs?&lt;/strong&gt; — Schema/JSON constraints, function calling, validation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you design prompts aligned with business logic?&lt;/strong&gt; — Encode rules and constraints explicitly and test them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you design prompts that respect compliance requirements?&lt;/strong&gt; — Bake in PII/policy guardrails and refusal conditions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is chain-of-thought and when do you avoid it?&lt;/strong&gt; — Eliciting reasoning; avoid when latency/cost or leakage matters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is few-shot vs zero-shot prompting?&lt;/strong&gt; — In-context examples vs none.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is self-consistency?&lt;/strong&gt; — Sampling multiple reasoning paths and voting.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you defend against prompt injection?&lt;/strong&gt; — Input separation, sanitization, instruction hierarchy, allowlists.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What are stop sequences and prompt templates used for?&lt;/strong&gt; — Halting generation and standardizing reusable prompts.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;RAG&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is RAG and why use it?&lt;/strong&gt; — Grounding generation in retrieved documents for freshness and accuracy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you evaluate a RAG pipeline?&lt;/strong&gt; — Assess retrieval and generation separately and jointly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Beyond accuracy, what RAG metrics matter?&lt;/strong&gt; — Faithfulness, relevance, retrieval quality.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you reduce hallucinations in a RAG system?&lt;/strong&gt; — Better retriever, reranking, filtering, constrained decoding.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Why do dense retrievers like ColBERT or Contriever help?&lt;/strong&gt; — Stronger semantic matching, especially fine-tuned on domain data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is reranking and where does it sit?&lt;/strong&gt; — Second-stage scoring to weed out low-quality retrieved content.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you choose chunk size and overlap?&lt;/strong&gt; — Balance context completeness against retrieval precision and truncation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is hybrid search?&lt;/strong&gt; — Combining keyword (sparse) and vector (dense) retrieval.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is the "lost in the middle" problem?&lt;/strong&gt; — Models underuse information in the middle of long contexts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you handle multi-hop questions?&lt;/strong&gt; — Chained or iterative retrieval across documents.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is metadata filtering and why use it?&lt;/strong&gt; — Narrowing retrieval using structured attributes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do hard negatives improve retrieval?&lt;/strong&gt; — Similar-but-wrong docs sharpen contrastive training.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What indexing structures power vector search?&lt;/strong&gt; — ANN methods like HNSW for scalable similarity search.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How does RAG inference differ from a training pipeline?&lt;/strong&gt; — Real-time retrieval and prompt assembly vs batch weight updates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you keep a RAG knowledge base fresh and traceable?&lt;/strong&gt; — Versioned ingestion, recency handling, source citation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Fine-tuning &amp;amp; Data&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Full fine-tuning vs parameter-efficient fine-tuning?&lt;/strong&gt; — All weights vs a small trainable subset.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is LoRA / QLoRA?&lt;/strong&gt; — Low-rank adapters, optionally on a quantized base model.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is quantization and what does it cost you?&lt;/strong&gt; — Lower precision for speed/memory at some accuracy risk.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is RLHF and what is DPO?&lt;/strong&gt; — Preference alignment via a reward model vs direct preference optimization.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is catastrophic forgetting and how do you avoid it?&lt;/strong&gt; — Loss of prior skills; mitigate with mixed data, adapters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What data do you need to fine-tune effectively?&lt;/strong&gt; — Sufficient, clean, representative, correctly formatted examples.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you ensure sensitive data is excluded from fine-tuning sets?&lt;/strong&gt; — Filtering, masking, provenance checks before training.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you verify what data actually went into a model?&lt;/strong&gt; — Dataset versioning, lineage, and audit records.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What are the risks of synthetic training data?&lt;/strong&gt; — Distribution drift, bias amplification, model collapse.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When do you use continual or domain-adaptive pretraining?&lt;/strong&gt; — Large domain corpus that prompting/RAG can't cover.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Agents &amp;amp; Orchestration&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What distinguishes an agent from a single LLM call?&lt;/strong&gt; — Multi-step, tool-using, stateful behavior vs one shot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is function/tool calling?&lt;/strong&gt; — Letting the model invoke external capabilities.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;LangChain vs LlamaIndex vs LangGraph — when each?&lt;/strong&gt; — General app framework vs data/RAG focus vs stateful graph control.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is the ReAct pattern?&lt;/strong&gt; — Interleaving reasoning and actions/tool calls.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Plan-and-execute vs reactive agents?&lt;/strong&gt; — Upfront decomposition vs step-by-step reaction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you manage agent memory?&lt;/strong&gt; — Short-term context vs persistent long-term stores.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you prevent agents from deadlocking or looping?&lt;/strong&gt; — Termination conditions, step limits, loop detection.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you constrain agent tool access?&lt;/strong&gt; — Scoped permissions, allowlists, validation before execution.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is MCP (Model Context Protocol)?&lt;/strong&gt; — A standard for connecting models to tools and context.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you evaluate an agentic system?&lt;/strong&gt; — Task success plus trajectory and tool-use quality.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Evaluation&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What automated and human methods evaluate LLM outputs?&lt;/strong&gt; — Benchmarks, LLM-as-judge, human review, regression suites.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you measure hallucination, coherence, and factual accuracy?&lt;/strong&gt; — Faithfulness checks, grounding scores, human/judge ratings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Which metrics suit summarization vs QA vs generation?&lt;/strong&gt; — BLEU, ROUGE, BERTScore, METEOR with task-aware caveats.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is LLM-as-a-judge and what are its biases?&lt;/strong&gt; — Model scoring outputs; prone to position/verbosity bias.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is an evaluation harness?&lt;/strong&gt; — A framework for systematic, reproducible benchmarking.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Offline vs online evaluation?&lt;/strong&gt; — Fixed benchmark before deploy vs sampled production traffic.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you scale evaluation for A/B tests?&lt;/strong&gt; — Sampling, automated scoring, statistical comparison.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you build a regression suite that catches issues before prod?&lt;/strong&gt; — Curated cases run on every change.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you define "good output" for a GenAI system?&lt;/strong&gt; — Tie to business/compliance constraints, not vibes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you detect policy violations and data leakage in outputs?&lt;/strong&gt; — Classifiers, pattern checks, validation layers.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Security, Privacy &amp;amp; Compliance&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How would you ensure HIPAA compliance in a healthcare GenAI system?&lt;/strong&gt; — De-identification, access control, audit, output validation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How and at what stages do you anonymize/de-identify data?&lt;/strong&gt; — Before ingestion and before any model exposure.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you verify input data is anonymized?&lt;/strong&gt; — Automated PII detection and validation gates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you ensure outputs don't reintroduce sensitive information?&lt;/strong&gt; — Output filtering, leakage detection, redaction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you adapt an LLM without exposing financial data?&lt;/strong&gt; — Masking/tokenization, data separation, exclusion from training.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you mask or tokenize confidential information?&lt;/strong&gt; — Replace PII with tokens/placeholders before processing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you separate training data from inference-time data?&lt;/strong&gt; — Distinct pipelines and storage with strict boundaries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you implement authorization for data extraction?&lt;/strong&gt; — RBAC/ABAC enforced through the data layer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How does access control integrate with RAG and prompts?&lt;/strong&gt; — Filter retrievable docs by user entitlement before assembly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you prevent unauthorized data entering the model?&lt;/strong&gt; — Pre-prompt access checks and pipeline allowlists.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you audit and log access to sensitive data?&lt;/strong&gt; — Immutable logs of who accessed what, when.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What guardrails do you put on inputs and outputs?&lt;/strong&gt; — Validation, refusal logic, policy classifiers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What are the main safety/ethical risks of deploying GenAI?&lt;/strong&gt; — Bias, misuse, privacy, misinformation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you handle PII in prompts and logs?&lt;/strong&gt; — Redaction, retention limits, encryption (relevant under PIPEDA in Canada).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you handle data and model versioning for governance?&lt;/strong&gt; — Track dataset, model, and config provenance.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;System Design, Scale &amp;amp; Cost&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you design a scalable, secure, fast GenAI application?&lt;/strong&gt; — Layered architecture with caching, routing, guardrails.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you handle high concurrency and low-latency inference?&lt;/strong&gt; — Batching, streaming, autoscaling, caching.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you scale embedding generation?&lt;/strong&gt; — Batch jobs, async pipelines, precomputation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What pipeline types do GenAI systems use?&lt;/strong&gt; — Batch, streaming, and hybrid.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do training, fine-tuning, and RAG pipelines differ?&lt;/strong&gt; — Offline weight updates vs real-time retrieval/assembly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you monitor system health and model degradation?&lt;/strong&gt; — Drift detection, quality metrics, alerting.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What factors drive cost in a GenAI application?&lt;/strong&gt; — Tokens, model choice, retrieval, infra, traffic.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you reduce latency without losing quality?&lt;/strong&gt; — Smaller/distilled models, caching, top-k context only.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;When do you use smaller/distilled models or hybrid architectures?&lt;/strong&gt; — Cost/latency-sensitive paths with model routing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;How do you balance cost, accuracy, performance, and compliance?&lt;/strong&gt; — Explicit trade-off decisions mapped to business priorities.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</content><category term="GenAI"/><category term="genai"/><category term="interview"/><category term="llm"/><category term="rag"/><category term="agents"/><category term="mlops"/><category term="compliance"/></entry><entry><title>50 Basic GenAI Engineer Interview Questions</title><link href="https://blogs.rajacsp.com/50-basic-genai-engineer-interview-questions.html" rel="alternate"/><published>2026-06-02T00:00:00-03:00</published><updated>2026-06-02T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-06-02:/50-basic-genai-engineer-interview-questions.html</id><summary type="html">&lt;p&gt;A starter question bank for screening entry-level GenAI engineers. Grouped by theme, covering fundamentals through production concerns.&lt;/p&gt;
&lt;h2&gt;Fundamentals&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is generative AI vs discriminative AI?&lt;/strong&gt; — Generative models learn to produce new data; discriminative models learn decision boundaries to classify or predict.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is a large language model (LLM)?&lt;/strong&gt; — A neural …&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;</summary><content type="html">&lt;p&gt;A starter question bank for screening entry-level GenAI engineers. Grouped by theme, covering fundamentals through production concerns.&lt;/p&gt;
&lt;h2&gt;Fundamentals&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is generative AI vs discriminative AI?&lt;/strong&gt; — Generative models learn to produce new data; discriminative models learn decision boundaries to classify or predict.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is a large language model (LLM)?&lt;/strong&gt; — A neural network trained on large text corpora to predict tokens, capable of broad language tasks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Transformer architecture&lt;/strong&gt; — Asks for a high-level grasp of attention-based sequence modeling without recurrence.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Attention mechanism&lt;/strong&gt; — How a model weighs the relevance of different tokens when producing a representation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Self-attention vs cross-attention&lt;/strong&gt; — Self-attention relates tokens within one sequence; cross-attention relates one sequence to another.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Tokens and tokenization&lt;/strong&gt; — How raw text is split into model-readable units and why the scheme matters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Context window&lt;/strong&gt; — The maximum number of tokens a model can attend to at once.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Embeddings&lt;/strong&gt; — Dense vector representations of meaning, used for search, clustering, and retrieval.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Encoder vs decoder vs encoder-decoder&lt;/strong&gt; — Architectural families and the task types each suits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pretraining vs fine-tuning&lt;/strong&gt; — Broad foundational training vs targeted adaptation to a task or domain.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Prompting &amp;amp; Inference&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Prompt engineering&lt;/strong&gt; — Designing inputs to reliably steer model behavior.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Zero-shot vs few-shot prompting&lt;/strong&gt; — No examples vs in-context examples to guide the output.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Chain-of-thought prompting&lt;/strong&gt; — Eliciting intermediate reasoning steps to improve answers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Temperature and top-p&lt;/strong&gt; — Controls over randomness and the sampling distribution of generated tokens.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Greedy decoding vs sampling&lt;/strong&gt; — Always taking the top token vs probabilistic selection for diversity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;System prompt&lt;/strong&gt; — Instructions that set persistent behavior and role for the model.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hallucinations&lt;/strong&gt; — Why models invent plausible-but-false content and how to mitigate it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Max tokens parameter&lt;/strong&gt; — Caps output length and affects cost and truncation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;In-context learning&lt;/strong&gt; — Learning a task purely from examples in the prompt, no weight updates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Prompt injection&lt;/strong&gt; — Adversarial inputs that hijack instructions and defenses against them.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;RAG (Retrieval-Augmented Generation)&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;What is RAG and why use it?&lt;/strong&gt; — Grounding generation in retrieved documents to reduce hallucination and add fresh knowledge.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Vector database&lt;/strong&gt; — Storage and similarity search over embeddings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Semantic vs keyword search&lt;/strong&gt; — Meaning-based retrieval vs literal term matching.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Chunking and chunk size&lt;/strong&gt; — Splitting documents for retrieval and the tradeoffs of granularity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cosine similarity&lt;/strong&gt; — A measure of vector closeness used to rank retrieved items.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Embedding model in RAG&lt;/strong&gt; — Converts queries and documents into the shared vector space.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Re-ranking&lt;/strong&gt; — A second-stage scoring pass to refine retrieved candidates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Evaluating a RAG system&lt;/strong&gt; — Measuring retrieval relevance and answer faithfulness.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Hybrid search&lt;/strong&gt; — Combining sparse (keyword) and dense (vector) retrieval.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Handling context overflow&lt;/strong&gt; — Strategies when retrieved content exceeds the window.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Fine-tuning &amp;amp; Training&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Full vs parameter-efficient fine-tuning&lt;/strong&gt; — Updating all weights vs a small subset for cost savings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;LoRA&lt;/strong&gt; — Low-rank adapters that fine-tune efficiently with few trainable parameters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Quantization&lt;/strong&gt; — Reducing numerical precision to shrink models and speed inference.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RLHF&lt;/strong&gt; — Aligning models to human preferences via a reward signal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Instruction tuning&lt;/strong&gt; — Training on instruction-response pairs to improve task following.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Catastrophic forgetting&lt;/strong&gt; — Loss of prior capabilities after further training.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;SFT vs RLHF&lt;/strong&gt; — Supervised fine-tuning vs preference-based reinforcement.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Fine-tune vs RAG vs prompting&lt;/strong&gt; — When each approach is the right tool.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data needed to fine-tune&lt;/strong&gt; — Quantity, quality, and format requirements.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Overfitting&lt;/strong&gt; — Memorizing training data and how to detect it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Evaluation &amp;amp; Production&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Evaluating LLM output quality&lt;/strong&gt; — Approaches to judging open-ended generation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Generative text metrics&lt;/strong&gt; — BLEU, ROUGE, perplexity and their limits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;LLM-as-a-judge&lt;/strong&gt; — Using a model to score outputs and its biases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reducing latency&lt;/strong&gt; — Techniques like streaming, caching, and smaller models.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Controlling inference cost&lt;/strong&gt; — Token budgeting, model selection, and caching.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Model distillation&lt;/strong&gt; — Training a smaller model to mimic a larger one.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Guardrails&lt;/strong&gt; — Constraints on inputs and outputs for safety and compliance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Monitoring in production&lt;/strong&gt; — Tracking quality, drift, cost, and failures.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Safety and ethical risks&lt;/strong&gt; — Bias, misuse, privacy, and misinformation concerns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Agent vs simple LLM call&lt;/strong&gt; — Multi-step tool-using systems vs single-shot generation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</content><category term="GenAI"/><category term="genai"/><category term="interview"/><category term="llm"/><category term="rag"/><category term="fine-tuning"/><category term="mlops"/></entry><entry><title>How Tamil Nadu Government Paved My Computer Dream</title><link href="https://blogs.rajacsp.com/2026-05-02-how-tamilnadu-govt-paved-my-computer-dream.html" rel="alternate"/><published>2026-05-02T00:00:00-03:00</published><updated>2026-05-02T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-05-02:/2026-05-02-how-tamilnadu-govt-paved-my-computer-dream.html</id><summary type="html">&lt;p&gt;When I was in 11th grade, my school — a Government Higher Secondary School — got its first color computer.&lt;/p&gt;
&lt;p&gt;Even though I was a Bio-Maths student, the school management made a great call: one mandatory computer session every Friday for all 11th and 12th graders.&lt;/p&gt;
&lt;p&gt;Our computer teacher had a tradition …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When I was in 11th grade, my school — a Government Higher Secondary School — got its first color computer.&lt;/p&gt;
&lt;p&gt;Even though I was a Bio-Maths student, the school management made a great call: one mandatory computer session every Friday for all 11th and 12th graders.&lt;/p&gt;
&lt;p&gt;Our computer teacher had a tradition. He'd give us a puzzle each Friday, and whoever cracked it first earned the privilege of touching the keyboard — typing a few lines, drawing something on MS Paint.&lt;/p&gt;
&lt;p&gt;I got lucky on a Friday the 13th. I solved the puzzle and finally got to touch the keyboard.&lt;/p&gt;
&lt;p&gt;The moment my fingers hit the keys, I swear I could hear Illayaraja's music playing in the background. That's when the excitement began.&lt;/p&gt;
&lt;p&gt;Fast forward almost 26 years — I still hear Illayaraja's songs every time I sit down at a keyboard. Of course, the fact that it's a MacBook now is the icing on the cake.&lt;/p&gt;
&lt;p&gt;Education is the greatest weapon of all time, and I got mine with the help of Kalaignar.&lt;/p&gt;
&lt;p&gt;Thanks to Kalaignar and his education policies — they changed everything.&lt;/p&gt;
&lt;p&gt;&lt;img alt="1777688401426" src="https://blogs.rajacsp.com/image/2026-05-02-how-tamilnadu-govt-paved-my-computer-dream/1777688401426.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="1777688427427" src="https://blogs.rajacsp.com/image/2026-05-02-how-tamilnadu-govt-paved-my-computer-dream/1777688427427.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="1777688438422" src="https://blogs.rajacsp.com/image/2026-05-02-how-tamilnadu-govt-paved-my-computer-dream/1777688438422.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="1777688454849" src="https://blogs.rajacsp.com/image/2026-05-02-how-tamilnadu-govt-paved-my-computer-dream/1777688454849.png"&gt;&lt;/p&gt;</content><category term="Life"/><category term="life"/><category term="education"/><category term="tamilnadu"/><category term="personal"/></entry><entry><title>Exploring NemoClaw — NVIDIA's Local AI Agent Sandbox</title><link href="https://blogs.rajacsp.com/exploring-nemoclaw.html" rel="alternate"/><published>2026-05-01T00:00:00-03:00</published><updated>2026-05-01T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-05-01:/exploring-nemoclaw.html</id><summary type="html">&lt;p&gt;NemoClaw is NVIDIA's agent sandbox that lets you run AI assistants locally using your own inference backend — Ollama, llama.cpp, or cloud providers. It bundles OpenShell as a gateway and OpenClaw as the agent runtime, all orchestrated through Docker containers.&lt;/p&gt;
&lt;p&gt;Here's a walkthrough of setting it up from scratch.&lt;/p&gt;
&lt;h3&gt;Setup …&lt;/h3&gt;</summary><content type="html">&lt;p&gt;NemoClaw is NVIDIA's agent sandbox that lets you run AI assistants locally using your own inference backend — Ollama, llama.cpp, or cloud providers. It bundles OpenShell as a gateway and OpenClaw as the agent runtime, all orchestrated through Docker containers.&lt;/p&gt;
&lt;p&gt;Here's a walkthrough of setting it up from scratch.&lt;/p&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Install the NemoClaw CLI with a single command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl -fsSL https://nvidia.com/nemoclaw.sh | bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Onboard&lt;/h3&gt;
&lt;p&gt;Run the interactive onboarding wizard. It walks you through preflight checks, gateway startup, inference configuration, and sandbox creation.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;nemoclaw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;onboard&lt;/span&gt;


&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;NemoClaw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Onboarding&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;===================&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;8&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Preflight&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;checks&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;running&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Container&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;DNS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;resolution&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;works&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Container&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;docker-desktop&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;openshell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;CLI&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;openshell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;36&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Port&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;8080&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;available&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;OpenShell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Apple&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;GPU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;detected&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Apple&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;M4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Max&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;32&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cores&lt;/span&gt;&lt;span class="o"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;36864&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;MB&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;unified&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;memory&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;ⓘ&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NIM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;unavailable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;—&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;requires&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NVIDIA&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;GPU&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;8&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OpenShell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Using&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;pinned&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OpenShell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ghcr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;io&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;nvidia&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;openshell&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;36&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Still&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;5s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;elapsed&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Still&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;10s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;elapsed&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Still&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;20s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;elapsed&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Still&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;30s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;elapsed&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Still&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cluster&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;40s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;elapsed&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Installing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OpenShell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;components&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OpenShell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;pod&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Still&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OpenShell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;pod&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;50s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;elapsed&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Waiting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;health&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Waiting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;health&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;container&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;still&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;running&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;healthy&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;allowing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;up&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;300s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;first-time&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;startup&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;healthy&lt;/span&gt;
&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Active&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;nemoclaw&amp;#39;&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;8&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Configuring&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;inference&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;NIM&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Detected&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;inference&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;option&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Ollama&lt;/span&gt;


&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Inference&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;options&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NVIDIA&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Endpoints&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;2&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OpenAI&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;3&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Other&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OpenAI-compatible&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;endpoint&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;4&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Anthropic&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;5&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Other&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Anthropic-compatible&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;endpoint&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;6&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Google&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Gemini&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;7&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Ollama&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;11434&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;—&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;running&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;suggested&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Choose&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;7&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Using&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Ollama&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;localhost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;11434&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;proxy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;11435&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Ollama&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;models&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;qwen3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;35b&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;2&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;granite3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;latest&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;7&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;mistral&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;7b&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;29&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gemma3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;270m&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;30&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;smollm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;135m&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;31&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;qwen3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;6b&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;32&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Other&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Choose&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;model&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Loading&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Ollama&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;qwen3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;35b&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Chat&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Completions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;API&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;available&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;—&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OpenClaw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;openai-completions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Sandbox&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;lowercase&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;starts&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;letter&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;hyphens&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ok&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;my&lt;/span&gt;&lt;span class="na"&gt;-assistant&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cspox&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Review&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;configuration&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Provider&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nt"&gt;ollama-local&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;         &lt;/span&gt;&lt;span class="nt"&gt;qwen3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;35b&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;API&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;required&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ollama-local&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;search&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;disabled&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Messaging&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;none&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Sandbox&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;cspox&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Note&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;Sandbox&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;build&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;takes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="nt"&gt;6&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;minutes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;host&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;search&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;messaging&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;channels&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;prompted&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;next&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Apply&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;configuration&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;Y&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Y&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;8&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Setting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;up&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;inference&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;provider&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;
&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Active&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;nemoclaw&amp;#39;&lt;/span&gt;
&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Created&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ollama-local&lt;/span&gt;
&lt;span class="nt"&gt;Gateway&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;inference&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;configured&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;inference&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;local&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Provider&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ollama-local&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;qwen3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;35b&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Version&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Timeout&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;180s&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Priming&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Ollama&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;qwen3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;35b&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Inference&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;route&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;set&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;ollama-local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;qwen3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;35b&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Enable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Brave&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Search&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;N&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;y&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Get&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;your&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Brave&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Search&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;API&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;from&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;https&lt;/span&gt;&lt;span class="o"&gt;://&lt;/span&gt;&lt;span class="nt"&gt;brave&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;search&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;api&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Brave&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Search&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;API&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*******************************&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Enabled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Brave&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Web&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Search&lt;/span&gt;


&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;8&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Messaging&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;channels&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Available&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;messaging&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;channels&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;○&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;telegram&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;—&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Telegram&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;bot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;messaging&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;○&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;discord&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;—&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Discord&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;bot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;messaging&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;●&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;slack&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;—&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Slack&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;bot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;messaging&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Press&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;1-3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;toggle&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Enter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;when&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;done&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Slack&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;API&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;→&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Your&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Apps&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;→&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OAuth&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Permissions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;→&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Bot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;User&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;OAuth&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Token&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;xoxb-&lt;/span&gt;&lt;span class="o"&gt;...).&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Slack&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Bot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Token&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;**********************************************************&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;slack&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;token&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;saved&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Slack&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;API&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;→&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Your&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Apps&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;→&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Basic&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Information&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;→&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;App-Level&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Tokens&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;xapp-&lt;/span&gt;&lt;span class="o"&gt;...).&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Slack&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;App&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Token&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;Socket&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Mode&lt;/span&gt;&lt;span class="o"&gt;):&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;**************************************************************************************************&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;slack&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;app&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;token&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;saved&lt;/span&gt;



&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;8&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Creating&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sandbox&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;──────────────────────────────────────────────────&lt;/span&gt;
&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Created&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cspox-slack-bridge&lt;/span&gt;
&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Created&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cspox-slack-app&lt;/span&gt;
&lt;span class="err"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Created&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;provider&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cspox-brave-search&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Creating&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sandbox&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cspox&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;takes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;few&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;minutes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;first&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="o"&gt;)...&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Pinning&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;base&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sha256&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;6b4542516064&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;Building&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sandbox&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;image&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Connect to the Sandbox&lt;/h3&gt;
&lt;p&gt;Once the sandbox is built, connect to it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;nemoclaw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;cspox&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;

&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;✓&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Connecting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sandbox&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cspox&amp;#39;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;Inside&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;sandbox&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n n-Quoted"&gt;`openclaw tui`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;start&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;chatting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;Type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n n-Quoted"&gt;`/exit`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;leave&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n n-Quoted"&gt;`exit`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;host&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="n"&gt;sandbox&lt;/span&gt;&lt;span class="nv"&gt;@cspox&lt;/span&gt;&lt;span class="o"&gt;:~&lt;/span&gt;&lt;span class="n"&gt;$&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Launch the TUI&lt;/h3&gt;
&lt;p&gt;Inside the sandbox, start the OpenClaw terminal UI to chat with the agent:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;openclaw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tui&lt;/span&gt;

&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;OpenClaw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m m-Double"&gt;2026.4.24&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cbcfdf6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;—&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;I&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;caffeine&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;JSON5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;audacity&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;it worked on my machine.&amp;quot;&lt;/span&gt;

&lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;◇&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;Config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;warnings&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;───────────────────────────────────────────────────────────────────────╮&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;&lt;span class="w"&gt;                                                                                         &lt;/span&gt;&lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;acpx&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;plugin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;disabled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bundled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;disabled&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;by&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;but&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;present&lt;/span&gt;&lt;span class="w"&gt;                                                                              &lt;/span&gt;&lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;&lt;span class="w"&gt;                                                                                         &lt;/span&gt;&lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;├─────────────────────────────────────────────────────────────────────────────────────────╯&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;openclaw&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tui&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//127.0.0.1:18789 - agent main - session main&lt;/span&gt;

&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt;


&lt;span class="nx"&gt;Write&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;simple&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;loop&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prints&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;


&lt;span class="nx"&gt;Here&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;simple&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;loop&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;prints&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

&lt;span class="err"&gt;```&lt;/span&gt;&lt;span class="nx"&gt;python&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This will output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;  1
  2
  3
  4
  5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;![1777681581272](image/2026-05-01-exploring-nemoclaw/1777681581272.png)




### Using llama.cpp with NemoClaw

You can also point NemoClaw at a llama.cpp server running on your host instead of Ollama.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;1. Start llama-server on host (outside sandbox)&lt;/h1&gt;
&lt;p&gt;./build/bin/llama-server \
  -m ./models/your-model.gguf \
  --ctx-size 16384 \
  --host 0.0.0.0 \
  --port 9090 \
  --jinja&lt;/p&gt;
&lt;h1&gt;2. Register it as a provider inside NemoClaw&lt;/h1&gt;
&lt;p&gt;openshell provider create \
  --name llama-local \
  --type openai \
  --credential OPENAI_API_KEY=none \
  --config OPENAI_BASE_URL=http://&lt;YOUR_HOST_IP&gt;:9090/v1&lt;/p&gt;
&lt;h1&gt;3. Set it as active inference&lt;/h1&gt;
&lt;p&gt;openshell inference set \
  --provider llama-local \
  --model your-model.gguf \
  --no-verify&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;</content><category term="GenAI"/><category term="GenAI"/><category term="LLM"/><category term="NVIDIA"/><category term="NemoClaw"/><category term="Ollama"/><category term="Docker"/></entry><entry><title>macOS System Info Commands You Should Know</title><link href="https://blogs.rajacsp.com/macos-system-info-commands.html" rel="alternate"/><published>2026-05-01T00:00:00-03:00</published><updated>2026-05-01T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-05-01:/macos-system-info-commands.html</id><summary type="html">&lt;p&gt;Getting your macOS system and disk information from the terminal is straightforward once you know the right commands. Here's a quick reference.&lt;/p&gt;
&lt;h2&gt;System Info&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;system_profiler SPSoftwareDataType&lt;/code&gt;&lt;/strong&gt; — Displays macOS version, build number, kernel version, boot volume, and uptime. Good for confirming your OS details quickly.&lt;/p&gt;
&lt;p&gt;Use like this in your terminal …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Getting your macOS system and disk information from the terminal is straightforward once you know the right commands. Here's a quick reference.&lt;/p&gt;
&lt;h2&gt;System Info&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;system_profiler SPSoftwareDataType&lt;/code&gt;&lt;/strong&gt; — Displays macOS version, build number, kernel version, boot volume, and uptime. Good for confirming your OS details quickly.&lt;/p&gt;
&lt;p&gt;Use like this in your terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;system_profiler&lt;span class="w"&gt; &lt;/span&gt;SPSoftwareDataType
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Hardware Overview&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;system_profiler SPHardwareDataType&lt;/code&gt;&lt;/strong&gt; — Shows CPU model, core count, memory (RAM), serial number, and hardware UUID. Essential when you need machine specs.&lt;/p&gt;
&lt;p&gt;Use like this in your terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;system_profiler&lt;span class="w"&gt; &lt;/span&gt;SPHardwareDataType
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Disk Info&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;diskutil list&lt;/code&gt;&lt;/strong&gt; — Lists all disks and partitions with their identifiers (e.g., disk0, disk1). Useful for understanding your disk layout before any partition or format work.&lt;/p&gt;
&lt;p&gt;Use like this in your terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;diskutil&lt;span class="w"&gt; &lt;/span&gt;list
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Disk Usage&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;df -h&lt;/code&gt;&lt;/strong&gt; — Prints human-readable disk usage per mounted volume. The &lt;code&gt;-h&lt;/code&gt; flag converts bytes into KB/MB/GB for easy reading.&lt;/p&gt;
&lt;p&gt;Use like this in your terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;df&lt;span class="w"&gt; &lt;/span&gt;-h
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Storage Deep Dive&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;system_profiler SPStorageDataType&lt;/code&gt;&lt;/strong&gt; — Goes beyond &lt;code&gt;df -h&lt;/code&gt; by showing volume type, file system format, SMART status, and physical disk details.&lt;/p&gt;
&lt;p&gt;Use like this in your terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;system_profiler&lt;span class="w"&gt; &lt;/span&gt;SPStorageDataType
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;All-in-One Summary&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;system_profiler SPSoftwareDataType SPHardwareDataType SPStorageDataType&lt;/code&gt;&lt;/strong&gt; — Runs all three profiler modules in one shot. Best when you need a full snapshot for documentation or bug reports.&lt;/p&gt;
&lt;p&gt;Use like this in your terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;system_profiler&lt;span class="w"&gt; &lt;/span&gt;SPSoftwareDataType&lt;span class="w"&gt; &lt;/span&gt;SPHardwareDataType&lt;span class="w"&gt; &lt;/span&gt;SPStorageDataType
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Quick One-Liner&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;sw_vers &amp;amp;&amp;amp; system_profiler SPHardwareDataType &amp;amp;&amp;amp; df -h&lt;/code&gt;&lt;/strong&gt; — The most popular combo. &lt;code&gt;sw_vers&lt;/code&gt; gives a compact OS version block, followed by hardware and disk usage. Fast and readable.&lt;/p&gt;
&lt;p&gt;Use like this in your terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sw_vers&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;system_profiler&lt;span class="w"&gt; &lt;/span&gt;SPHardwareDataType&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;df&lt;span class="w"&gt; &lt;/span&gt;-h
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;hr&gt;
&lt;p&gt;Running &lt;code&gt;system_profiler&lt;/code&gt; without any flags dumps everything, but expect it to take a minute or two. For daily use, the one-liner or individual flags are the way to go.&lt;/p&gt;</content><category term="DevTools"/><category term="macos"/><category term="terminal"/><category term="cli"/><category term="sysadmin"/><category term="commands"/></entry><entry><title>You Have Been Using Claude Wrong — Here Is What It Can Actually Do</title><link href="https://blogs.rajacsp.com/claude-features-beginners-guide.html" rel="alternate"/><published>2026-04-23T00:00:00-03:00</published><updated>2026-04-23T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-23:/claude-features-beginners-guide.html</id><summary type="html">&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;When most beginners open Claude for the first time, they type a question and wait for an answer. That is a perfectly valid starting point. But if that is all you have been doing, you are using a fraction of what is actually there.&lt;/p&gt;
&lt;p&gt;Claude is not just a …&lt;/p&gt;</summary><content type="html">&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;When most beginners open Claude for the first time, they type a question and wait for an answer. That is a perfectly valid starting point. But if that is all you have been doing, you are using a fraction of what is actually there.&lt;/p&gt;
&lt;p&gt;Claude is not just a smarter search engine. It is a platform with layers — tools, memory, automation, file creation, and integrations — that take it from a chatbot into something closer to a working assistant. The gap between a beginner and a power user is not intelligence. It is knowing what to look for.&lt;/p&gt;
&lt;p&gt;This guide covers 12 real capabilities, explained plainly, without the hype.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;1. It can write and ship code — even if you have never coded&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Claude Code&lt;/strong&gt; — Claude Code is a separate tool (not the chat window) that connects to your GitHub repository.
You describe what you want to build in plain language. Claude writes every file, every function, and every configuration. Beginners do not need to understand the code — they need to understand the goal. That is a meaningful shift.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;2. It can control your computer&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Computer Use&lt;/strong&gt; — this is an opt-in feature found in Settings under Browser Use and Computer Use.
Once enabled, Claude can open tabs, click buttons, fill forms, and complete multi-step tasks on your Mac while you are doing something else. It is not perfect, and it works best on well-defined, repetitive tasks. Think of it as a junior assistant you supervise, not a robot you trust blindly.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;3. You can build reusable shortcuts called skills&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Skills and /commands&lt;/strong&gt; — a skill is a saved set of instructions Claude follows every time you call it.
You build one by prompting: "Use the skill-creator to build a skill for [your task]." Claude interviews you about what you need, generates the skill file, and you upload it. From that point, typing /skillname triggers it instantly. No rewriting the same prompt every time.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;4. It can research a topic and turn it into a presentation&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Research to slides&lt;/strong&gt; — Claude can run multiple web searches on a topic, synthesise the findings, and produce a structured brief.
That brief is then sent to a tool like Gamma, which renders it as a finished slide deck. For beginners who dread building presentations from scratch, this is the most practical shortcut in this list.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;5. You can schedule it to work without you&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Scheduled tasks&lt;/strong&gt; — under Scheduled in the sidebar, you can create a prompt and set a recurring time.
Every Monday at 7am, Claude runs it. Every Friday afternoon, it sends you a summary. You define the task once. Claude repeats it on a schedule without you reopening the app. This is the feature most beginners overlook entirely.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;6. It can build Excel files with working formulas&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Claude in Excel&lt;/strong&gt; — this is a plugin for Microsoft Excel, not the chat window.
Describe what you need — a three-year budget, a sales tracker, a project timeline — and Claude builds it with actual spreadsheet formulas, not just numbers pasted in. Blue cells for inputs you change, black cells for calculated outputs. Useful for beginners who know what a spreadsheet should do but not how to build it.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;7. It can read and act inside your other apps&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Connectors&lt;/strong&gt; — go to Settings, then Connectors, then Browse.
You will find Slack, Gmail, Google Drive, Notion, and over fifty other integrations. Once connected, Claude can read emails, search documents, post to channels, and draft replies — inside those platforms, not just as a copy-paste exercise. For beginners, start with one connector. Gmail or Google Drive is usually the most immediately useful.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;8. It can act as a document worker across your files&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Cowork&lt;/strong&gt; — Cowork is a Claude product designed for file-heavy work.
You point it at a folder. It reads the contents, asks clarifying questions if it needs to, and then produces finished files — Word documents, spreadsheets, presentations. The important beginner insight here: one well-written context file does more than fifty randomly uploaded documents. Quality of input determines quality of output.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;9. It can remember your ongoing projects&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Projects with memory&lt;/strong&gt; — inside Cowork, you can create a named Project.
Claude keeps context scoped to that project across sessions. You can prompt it to "build on last week's report" and it knows what that means. For beginners, this is the first real taste of Claude behaving like a collaborator rather than a fresh session every time.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;10. You can install plugins tuned to your job&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Role plugins&lt;/strong&gt; — go to Cowork, then Customize, then Browse Plugins.
There are plugins for marketing, legal, HR, finance, and more. Each one comes pre-loaded with relevant commands and workflows. A marketing plugin gives you /draft-content. A legal plugin gives you contract review templates. You install it, optionally configure it for your company context, and it changes how Claude responds to you in that domain.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;11. Claude can ask you the right questions before it starts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;AskUserQuestion&lt;/strong&gt; — add the phrase "use AskUserQuestion" to any prompt.
Instead of guessing what you mean, Claude generates a structured form with clickable options. You click your answers. It uses those answers to do the actual task. For beginners who struggle to write detailed prompts, this is a legitimate workaround. Let Claude surface the questions it needs answered rather than trying to anticipate them yourself.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;12. It has a built-in design tool&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Claude Design&lt;/strong&gt; — look for the palette icon in the toolbar inside the chat interface.
Click it, describe what you want to create — a logo concept, a social post layout, a simple infographic — and Claude builds it live in the canvas. You can refine it with comments, adjust with sliders, or export it as a PDF, PPTX, or image. For beginners, it removes the need to open a separate design tool for simple visual tasks.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Claude is not magic. It is a set of tools that reward the people who take the time to understand what each one actually does. Start with one feature this week. Not twelve. One. That is how the gap closes.&lt;/em&gt;&lt;/p&gt;</content><category term="AI Fundamentals"/><category term="claude"/><category term="anthropic"/><category term="genai-beginners"/><category term="ai-tools"/><category term="llm-workflows"/><category term="productivity"/></entry><entry><title>Run Lubuntu Desktop on Docker Using Webtop</title><link href="https://blogs.rajacsp.com/lubuntu-on-docker.html" rel="alternate"/><published>2026-04-19T00:00:00-03:00</published><updated>2026-04-19T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-19:/lubuntu-on-docker.html</id><summary type="html">&lt;h3&gt;TLDR;&lt;/h3&gt;
&lt;h3&gt;GitHub Token&lt;/h3&gt;
&lt;p&gt;To pull container images from GitHub's registry, you need a Personal Access Token (PAT).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://github.com/settings/tokens"&gt;GitHub Token Settings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Generate new token (classic)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Give it a descriptive name and set an expiry&lt;/li&gt;
&lt;li&gt;Under scopes, check &lt;strong&gt;read:packages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Generate token&lt;/strong&gt; and copy it right away — you …&lt;/li&gt;&lt;/ol&gt;</summary><content type="html">&lt;h3&gt;TLDR;&lt;/h3&gt;
&lt;h3&gt;GitHub Token&lt;/h3&gt;
&lt;p&gt;To pull container images from GitHub's registry, you need a Personal Access Token (PAT).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://github.com/settings/tokens"&gt;GitHub Token Settings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Generate new token (classic)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Give it a descriptive name and set an expiry&lt;/li&gt;
&lt;li&gt;Under scopes, check &lt;strong&gt;read:packages&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Generate token&lt;/strong&gt; and copy it right away — you won't see it again&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;echo &amp;lt;ghp_token&amp;gt; | docker login ghcr.io -u rajacsp --password-stdin

docker pull linuxserver/webtop:ubuntu-lxqt

docker run -d \
  --name=lubuntu \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=America/Toronto \
  -p 3000:3000 \
  -p 3001:3001 \
  -v ~/webtop-config:/config \
  --shm-size=&amp;quot;1gb&amp;quot; \
  --restart unless-stopped \
  linuxserver/webtop:ubuntu-lxqt

&lt;span class="gh"&gt;#&lt;/span&gt; Access desktop in browser → http://localhost:3000
&lt;span class="gh"&gt;#&lt;/span&gt; Or via HTTPS → https://localhost:3001
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Screenshots&lt;/h3&gt;
&lt;p&gt;&lt;img alt="1777678368835" src="image/2026-04-19-lubuntu-on-docker/1777678368835.png"&gt;&lt;/p&gt;</content><category term="Docker"/><category term="Docker"/><category term="Lubuntu"/><category term="Linux"/><category term="Webtop"/><category term="Container"/></entry><entry><title>Using Free Cloud-Based LLMs via Ollama on Ubuntu</title><link href="https://blogs.rajacsp.com/using-free-cloud-llms-via-ollama-ubuntu.html" rel="alternate"/><published>2026-04-19T00:00:00-03:00</published><updated>2026-04-19T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-19:/using-free-cloud-llms-via-ollama-ubuntu.html</id><summary type="html">&lt;hr&gt;
&lt;p&gt;Ollama is a lightweight, open-source LLM runner. Its &lt;code&gt;:cloud&lt;/code&gt; model suffix lets you route prompts to free-tier hosted models — no GPU, no paid API key required. Useful for learning, prototyping, and small projects on modest hardware.&lt;/p&gt;
&lt;p&gt;This post covers the full Ubuntu setup: manual install, service startup, chatting with Kimi …&lt;/p&gt;</summary><content type="html">&lt;hr&gt;
&lt;p&gt;Ollama is a lightweight, open-source LLM runner. Its &lt;code&gt;:cloud&lt;/code&gt; model suffix lets you route prompts to free-tier hosted models — no GPU, no paid API key required. Useful for learning, prototyping, and small projects on modest hardware.&lt;/p&gt;
&lt;p&gt;This post covers the full Ubuntu setup: manual install, service startup, chatting with Kimi K2.5, fixing a common CLI error, and exposing the API to your local network.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Why Manual Install?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Official one-liner risk&lt;/strong&gt; — The &lt;code&gt;curl ... | sh&lt;/code&gt; script fetches assets from GitHub at runtime. Unstable GitHub connectivity breaks it mid-install.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Offline alternative&lt;/strong&gt; — Download &lt;code&gt;ollama-linux-amd64.tar.zst&lt;/code&gt; (~1.9 GB) from the GitHub Releases page separately, transfer via USB or SCP, install without runtime dependency.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Step 1 — Download and Transfer&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;From a stable machine&lt;/strong&gt; — Visit &lt;code&gt;https://github.com/ollama/ollama/releases&lt;/code&gt;, grab &lt;code&gt;ollama-linux-amd64.tar.zst&lt;/code&gt; from the latest release, copy to USB or SCP to Ubuntu.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;VMware USB tip&lt;/strong&gt; — If Ubuntu inside VMware doesn't detect the USB drive, go to VM Settings → USB Controller → set compatibility to USB 3.2.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Step 2 — Extract and Organize&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Create a local bin&lt;/strong&gt; — In your home directory, create &lt;code&gt;~/bin/ollama-install/&lt;/code&gt; and paste the archive there.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Extract&lt;/strong&gt; — Run &lt;code&gt;tar -xf ollama-linux-amd64.tar.zst&lt;/code&gt;. You'll get &lt;code&gt;bin/&lt;/code&gt; and &lt;code&gt;lib/&lt;/code&gt; subfolders. The &lt;code&gt;ollama&lt;/code&gt; executable lives inside &lt;code&gt;bin/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No system install needed&lt;/strong&gt; — Run Ollama directly from this path. No &lt;code&gt;sudo&lt;/code&gt;, no &lt;code&gt;/usr/local/bin&lt;/code&gt; required.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Step 3 — Start the Service&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;~/bin/ollama-install/bin
./ollama&lt;span class="w"&gt; &lt;/span&gt;serve
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Verify in browser&lt;/strong&gt; — Open &lt;code&gt;http://127.0.0.1:11434&lt;/code&gt;. You should see &lt;code&gt;Ollama is running&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verify in terminal&lt;/strong&gt; — Run &lt;code&gt;ps -ef | grep ollama&lt;/code&gt; and confirm &lt;code&gt;./ollama serve&lt;/code&gt; is listed.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Step 4 — Chat With a Free Cloud Model&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Launch the interactive menu&lt;/strong&gt; — In a second terminal:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;./ollama&lt;span class="w"&gt; &lt;/span&gt;launch
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Select a cloud model&lt;/strong&gt; — Choose &lt;code&gt;chat with a model&lt;/code&gt;, then pick any model with a &lt;code&gt;:cloud&lt;/code&gt; suffix, e.g., &lt;code&gt;kimi-k2.5:cloud&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Authenticate&lt;/strong&gt; — Ollama opens a browser tab for login. If it doesn't open, copy the URL from terminal manually (remove any stray spaces).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example session:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;You&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;What&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LLM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;you&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;using&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;am&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Kimi&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;developed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;by&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Dark&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Side&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Moon&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Technology&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Co&lt;/span&gt;&lt;span class="o"&gt;.,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Ltd&lt;/span&gt;&lt;span class="o"&gt;.,&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="n"&gt;part&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Kimi&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;K2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;series&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The model runs on Kimi's distributed cloud servers — not your local machine.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Step 5 — Fix the &lt;code&gt;launch&lt;/code&gt; Error&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Error you may see&lt;/strong&gt; — &lt;code&gt;error running model flag accessed but not defined verbose&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Root cause&lt;/strong&gt; — The &lt;code&gt;launch&lt;/code&gt; subcommand has parameter compatibility issues with certain cloud models.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt; — Use &lt;code&gt;run&lt;/code&gt; directly:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;./ollama&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;kimi-k2.5:cloud
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Best practice&lt;/strong&gt; — Always prefer &lt;code&gt;ollama run &amp;lt;model&amp;gt;&lt;/code&gt; for scripted or production use. Use &lt;code&gt;launch&lt;/code&gt; for exploration only.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Step 6 — Expose Ollama to Other Machines&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Find your Ubuntu IP:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;net-tools&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;# if ifconfig is missing&lt;/span&gt;
ifconfig
&lt;span class="c1"&gt;# e.g. 192.168.204.129&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Bind to all interfaces:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nb"&gt;export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;OLLAMA_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.0.0.0:11434
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Restart the service:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pkill&lt;span class="w"&gt; &lt;/span&gt;-9&lt;span class="w"&gt; &lt;/span&gt;ollama
./ollama&lt;span class="w"&gt; &lt;/span&gt;serve
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Test locally first&lt;/strong&gt; — Hit &lt;code&gt;http://192.168.204.129:11434&lt;/code&gt; from Ubuntu's browser. Then point any Ollama-compatible client (OpenClaw, Open WebUI, Continue) on another machine to the same URL.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Security note&lt;/strong&gt; — This binds to your local network only. For internet-facing access, add firewall rules and authentication.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;What's Next&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Pull local models&lt;/strong&gt; — &lt;code&gt;ollama run llama3&lt;/code&gt; runs fully offline once downloaded.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Python integration&lt;/strong&gt; — Use the &lt;code&gt;requests&lt;/code&gt; library against &lt;code&gt;http://localhost:11434/api/generate&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Connect AI clients&lt;/strong&gt; — Continue, OpenClaw, and Open WebUI all support Ollama as a backend out of the box.&lt;/p&gt;</content><category term="GenAI Engineering"/><category term="ollama"/><category term="llm"/><category term="ubuntu"/><category term="cloud-llm"/><category term="local-ai"/><category term="kactii"/><category term="linux"/></entry><entry><title>Claude Code Project Structure — Every File and Folder Explained</title><link href="https://blogs.rajacsp.com/claude-code-project-structure-explained.html" rel="alternate"/><published>2026-04-18T00:00:00-03:00</published><updated>2026-04-18T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-18:/claude-code-project-structure-explained.html</id><summary type="html">&lt;p&gt;Most Claude Code projects start with a &lt;code&gt;CLAUDE.md&lt;/code&gt; and nothing else. Here is the full structure that turns Claude from a coding assistant into an engineering partner.&lt;/p&gt;
&lt;h2&gt;The complete directory&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;your-project/
├── CLAUDE.md
├── CLAUDE.local.md
├── mcp.json
└── claude/
    ├── settings.json
    ├── rules/
    │   ├── code-style.md
    │   ├── testing.md
    │   └── api-conventions.md
    ├── commands …&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</summary><content type="html">&lt;p&gt;Most Claude Code projects start with a &lt;code&gt;CLAUDE.md&lt;/code&gt; and nothing else. Here is the full structure that turns Claude from a coding assistant into an engineering partner.&lt;/p&gt;
&lt;h2&gt;The complete directory&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;your-project/
├── CLAUDE.md
├── CLAUDE.local.md
├── mcp.json
└── claude/
    ├── settings.json
    ├── rules/
    │   ├── code-style.md
    │   ├── testing.md
    │   └── api-conventions.md
    ├── commands/
    │   ├── review.md
    │   └── fix-issue.md
    ├── skills/
    │   └── deploy/
    │       ├── SKILL.md
    │       └── deploy-config.md
    ├── agents/
    │   ├── code-reviewer.md
    │   └── security-auditor.md
    └── hooks/
        └── validate-bash.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;File and folder breakdown&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt;&lt;/strong&gt; — Loaded at session start. Defines project overview, tech stack, and run commands. Contains coding conventions and architecture decisions. This is the onboarding doc for the agent — invest in it once, benefit every session.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;CLAUDE.local.md&lt;/code&gt;&lt;/strong&gt; — Personal overrides that stay out of git. Keeps individual preferences (editor, aliases, local flags) separate from shared project context.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;mcp.json&lt;/code&gt;&lt;/strong&gt; — MCP integration manifest committed to the repo. Connects Claude to GitHub, JIRA, Slack, and databases. One file controls every external tool the agent can reach — shared so the whole team gets the same integrations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;claude/settings.json&lt;/code&gt;&lt;/strong&gt; — Controls permissions, tool access, model selection, and hook configuration. Override per-developer with &lt;code&gt;settings.local.json&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;claude/rules/&lt;/code&gt;&lt;/strong&gt; — Modular &lt;code&gt;.md&lt;/code&gt; files organized by concern. Claude loads them contextually: &lt;code&gt;code-style.md&lt;/code&gt; when writing code, &lt;code&gt;testing.md&lt;/code&gt; when generating tests, &lt;code&gt;api-conventions.md&lt;/code&gt; for API work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;claude/commands/&lt;/code&gt;&lt;/strong&gt; — Custom slash commands (&lt;code&gt;/project:name&lt;/code&gt;) for repeatable workflows. Type &lt;code&gt;/project:review&lt;/code&gt; and Claude runs your entire review process end-to-end. Supports shell execution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;claude/skills/&lt;/code&gt;&lt;/strong&gt; — Auto-triggered context folders. Load only when Claude detects a relevant task type. Keeps the context window lean between unrelated tasks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;claude/agents/&lt;/code&gt;&lt;/strong&gt; — Specialized sub-agents with defined roles, isolated context windows, and custom model preferences. A security audit runs in its own context — no pollution of the main conversation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;claude/hooks/&lt;/code&gt;&lt;/strong&gt; — Event-driven scripts that run before or after tool use. Automates validation, linting, and formatting. Blocks unsafe operations without any prompting needed.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;The quality of Claude Code output is directly proportional to the quality of your project structure. Structure it once — every session compounds.&lt;/p&gt;</content><category term="Engineering"/><category term="claude-code"/><category term="agentic-engineering"/><category term="llm-tooling"/><category term="project-structure"/></entry><entry><title>LLM Inference Optimization: What Actually Makes Your Model Fast</title><link href="https://blogs.rajacsp.com/llm-inference-optimization-techniques.html" rel="alternate"/><published>2026-04-18T00:00:00-03:00</published><updated>2026-04-18T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-18:/llm-inference-optimization-techniques.html</id><summary type="html">&lt;p&gt;When you send a prompt to an LLM, three layers shape how fast you get a response: the hardware (GPUs, TPUs, LPUs), the model size and architecture, and the inference engine strategies sitting on top. Most of the latency battle is fought at that third layer — and the core problem …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When you send a prompt to an LLM, three layers shape how fast you get a response: the hardware (GPUs, TPUs, LPUs), the model size and architecture, and the inference engine strategies sitting on top. Most of the latency battle is fought at that third layer — and the core problem is this: token generation is memory-bound. Loading model weights to produce a single token is expensive. Once those weights are loaded, the compute itself costs almost nothing. Every technique below attacks that bottleneck from a different angle.&lt;/p&gt;
&lt;h2&gt;The Optimization Techniques&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Quantization&lt;/strong&gt;
Store model weights in lower precision — 4-bit or 8-bit instead of 32-bit floats. Smaller weights mean less memory to load per token. Result: 4–8× memory reduction, 2–4× faster token generation. This is the lowest-effort, highest-leverage starting point for local inference (yes, this is exactly why llama.cpp runs well on consumer hardware).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Speculative Decoding&lt;/strong&gt;
A small, fast draft model predicts the next K tokens. The large model then evaluates those predictions in parallel and accepts or rejects them based on probability alignment. Accepted tokens are kept; rejected ones fall back to the large model for correction. Result: 2–3× faster generation because the large model validates in bulk rather than generating token-by-token.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;KV Cache&lt;/strong&gt;
Transformer decoders are autoregressive — they recompute key-value pairs for every input token at every step. KV Cache stores those computed values and reuses them across steps instead of recalculating. Result: 10–100× faster generation for long contexts, since you stop paying for redundant math.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PagedAttention (KV Cache Memory Management)&lt;/strong&gt;
Standard KV Cache reserves a fixed memory block upfront — leading to fragmentation and waste. PagedAttention breaks the cache into small pages and allocates new ones only as needed, borrowing the idea from OS virtual memory management. Result: 2–4× higher throughput across concurrent users because memory is used dynamically, not hoarded.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flash Attention&lt;/strong&gt;
Attention computation is dominated by matrix multiplications, but the actual bottleneck is data movement between HBM and compute units — not the math itself. Flash Attention tiles the attention matrix into chunks that fit inside the chip's fast SRAM, minimizing round trips to slower memory. Result: 2–4× faster attention compute and headroom for much longer context windows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Continuous Batching&lt;/strong&gt;
Traditional batching pads sequences to a fixed length and waits for a full batch. Continuous batching packs sequences back-to-back without padding, slots new requests in the moment a slot opens, and handles long prompts via chunked prefill — breaking them into smaller pieces processed incrementally. Result: 10–20× higher throughput under real-world load because the GPU is never idling on padding tokens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Model Pruning&lt;/strong&gt;
Removes weights and entire layers that contribute little to output quality — essentially trimming the network down to its load-bearing structure. Result: ~25% size reduction, 1.3–3× faster generation depending on pruning aggressiveness and task type.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Smaller Models&lt;/strong&gt;
The obvious one, but worth saying plainly: if a smaller model is good enough for your task, use it. No engineering trick beats the latency win of simply loading fewer parameters. Task-model fit is an inference strategy.&lt;/p&gt;
&lt;h2&gt;The Mental Model&lt;/h2&gt;
&lt;p&gt;Think of inference optimization as a stack. Quantization shrinks what you load. KV Cache and PagedAttention cut what you recompute and how you manage that memory. Flash Attention speeds up the compute path itself. Speculative Decoding parallelizes the generation loop. Continuous Batching maximizes GPU utilization across the request queue. Pruning and model selection reduce the problem size before any of the above even kicks in.&lt;/p&gt;
&lt;p&gt;Stack them right, and you go from a sluggish 70B model on shared hardware to a production-grade inference pipeline that feels fast for every user in the queue.&lt;/p&gt;</content><category term="GenAI"/><category term="LLM"/><category term="Inference"/><category term="Optimization"/><category term="Quantization"/><category term="KV Cache"/><category term="Speculative Decoding"/><category term="Flash Attention"/></entry><entry><title>PromptTemplate Explained for 10 year old</title><link href="https://blogs.rajacsp.com/prompttemplate-explained-for-10-year-old.html" rel="alternate"/><published>2026-04-17T00:00:00-03:00</published><updated>2026-04-17T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-17:/prompttemplate-explained-for-10-year-old.html</id><summary type="html">&lt;p&gt;PromptTemplate is one of those ideas that sounds technical but is actually something you already understand from everyday life. Here are three ways to see it clearly.&lt;/p&gt;
&lt;h2&gt;Cookie Cutter 🍪&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Shape&lt;/strong&gt; — A star-shaped cookie cutter that never changes. You press it into any dough and get the same star, every …&lt;/p&gt;</summary><content type="html">&lt;p&gt;PromptTemplate is one of those ideas that sounds technical but is actually something you already understand from everyday life. Here are three ways to see it clearly.&lt;/p&gt;
&lt;h2&gt;Cookie Cutter 🍪&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Shape&lt;/strong&gt; — A star-shaped cookie cutter that never changes. You press it into any dough and get the same star, every time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Dough&lt;/strong&gt; — Chocolate today, vanilla tomorrow, strawberry next week. The filling is what you swap out each time you use the cutter.&lt;/p&gt;
&lt;h2&gt;Teacher's Board 📝&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Sentence on the Board&lt;/strong&gt; — "Today we will learn about ___ and it matters because ___." The teacher wrote it once and never rewrites it from scratch.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Daily Swap&lt;/strong&gt; — Every morning she just fills in the two blanks with whatever today's topic is. Same structure, new content.&lt;/p&gt;
&lt;h2&gt;McDonald's Script 🍔&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Greeting&lt;/strong&gt; — "Hi! Can I take your order? Would you like ___ with that?" Every cashier at every counter says this same line.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Your Order&lt;/strong&gt; — The only thing that changes is what goes into the blank. The script stays untouched.&lt;/p&gt;
&lt;h2&gt;The Big Idea 💡&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;PromptTemplate is a reusable sentence with blanks&lt;/strong&gt; — You write the shape of your question once, and then just swap the blanks as many times as you need. One template, infinite questions, zero repetition.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Now Let's See It in Code 🧑‍💻&lt;/h2&gt;
&lt;p&gt;If you're curious what this looks like when a developer actually writes it, here it is — still simple, still just blanks.&lt;/p&gt;
&lt;h3&gt;Step 1 — Create the Cookie Cutter&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;langchain_core.prompts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;PromptTemplate&lt;/span&gt;

&lt;span class="n"&gt;template&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;PromptTemplate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;input_variables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;animal&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;color&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;template&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Tell me a fun fact about a &lt;/span&gt;&lt;span class="si"&gt;{color}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="si"&gt;{animal}&lt;/span&gt;&lt;span class="s2"&gt;!&amp;quot;&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;{color}&lt;/code&gt; and &lt;code&gt;{animal}&lt;/code&gt; are the blanks. That's it.&lt;/p&gt;
&lt;h3&gt;Step 2 — Fill in the Blanks&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;template&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;animal&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;elephant&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;pink&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# → &amp;quot;Tell me a fun fact about a pink elephant!&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You hand this finished sentence to the AI and it answers.&lt;/p&gt;
&lt;h3&gt;Step 3 — Reuse It Forever&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;template&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;animal&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;dog&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;blue&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# → blue dog&lt;/span&gt;
&lt;span class="n"&gt;template&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;animal&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;cat&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;green&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# → green cat&lt;/span&gt;
&lt;span class="n"&gt;template&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;animal&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;parrot&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;red&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;# → red parrot&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;One cutter. Infinite cookies. No copy-pasting.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Everything Side by Side&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Everyday Life&lt;/th&gt;
&lt;th&gt;Code Version&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🍪 The cookie cutter shape&lt;/td&gt;
&lt;td&gt;&lt;code&gt;template="Tell me about {topic}"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;✏️ The blanks to fill&lt;/td&gt;
&lt;td&gt;&lt;code&gt;input_variables=["topic"]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🖊️ Filling in the blanks&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.format(topic="elephants")&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🍪 The finished cookie&lt;/td&gt;
&lt;td&gt;The prompt sent to the AI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;One reusable shape. Infinite possibilities. That's PromptTemplate.&lt;/strong&gt;&lt;/p&gt;</content><category term="GenAI Basics"/><category term="langchain"/><category term="prompt-engineering"/><category term="beginner"/><category term="kactii"/></entry><entry><title>Six Terms You Must Know Before Building Agentic AI Systems</title><link href="https://blogs.rajacsp.com/six-agentic-ai-terms-you-must-know.html" rel="alternate"/><published>2026-04-17T00:00:00-03:00</published><updated>2026-04-17T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-17:/six-agentic-ai-terms-you-must-know.html</id><summary type="html">&lt;p&gt;If you are shipping agentic systems in 2026 and these six terms are fuzzy, you are building on sand. This is the foundational vocabulary — not hype, not vendor marketing, just the concepts that actually show up when you are designing, debugging, or scaling an agent pipeline.&lt;/p&gt;
&lt;h2&gt;The Six Terms&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Model …&lt;/strong&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you are shipping agentic systems in 2026 and these six terms are fuzzy, you are building on sand. This is the foundational vocabulary — not hype, not vendor marketing, just the concepts that actually show up when you are designing, debugging, or scaling an agent pipeline.&lt;/p&gt;
&lt;h2&gt;The Six Terms&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;
A standardized protocol that lets AI systems connect to external data sources and tools in a consistent, interoperable way. The right mental model: it is a universal adapter for agents. Instead of writing custom integration code for every tool your agent touches, MCP gives you a single interface that works across services. This is why it matters for production — you stop reinventing the plumbing every time you add a new capability.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Agent Skills&lt;/strong&gt;
Pre-packaged capabilities that give coding agents the right context to operate on specific infrastructure. Weaviate's Agent Skills repository is a live example — it bridges agents like Claude Code, Cursor, and GitHub Copilot with Weaviate's cluster management, data import, and search operations. The insight here is that raw LLM capability is not enough; agents perform better when they are given structured, domain-specific knowledge about the tools they are operating on. Skills are that delivery mechanism.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Agentic RAG&lt;/strong&gt;
RAG pipelines where agents are embedded inside the retrieval process itself — not bolted on after. Vanilla RAG is a linear flow: query in, retrieve, generate. Agentic RAG breaks that linearity. Agents route queries to specialized knowledge sources, validate whether retrieved context is actually relevant, and reformulate queries when the first retrieval attempt falls short. The result is a retrieval process that reasons, not just fetches.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Single Agent Architecture&lt;/strong&gt;
The simplest agentic pattern: one agent, multiple knowledge sources, one decision-maker. The agent acts as a router — it receives a user request, decides which database, API, or tool to query, and returns a result. No orchestration overhead, no inter-agent coordination. For well-scoped tasks with clear routing logic, this is often the right call. Complexity should be earned, not assumed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Multi-Agent Architecture&lt;/strong&gt;
Multiple specialized agents working in parallel or sequence, each owning a specific slice of the task. Orchestration frameworks like CrewAI manage the handoffs and coordination layer. The tradeoff is real: you gain specialization and parallelism, but you introduce failure surfaces at every boundary between agents. This is the architecture where schemas and contracts between agents stop being optional — they become the thing that determines whether the system holds together or collapses mid-task.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Memory&lt;/strong&gt;
The component that gives an agent continuity. It splits into two types: short-term memory lives in the context window and is available immediately but is bounded by token limits; long-term memory is stored externally and retrieved on demand, giving the agent access to prior interactions and accumulated state across sessions. Memory quality is one of the sharpest differentiators in multi-agent systems — an agent with poor memory loses the thread; an agent with good memory compounds its understanding across tasks. Most production failures in agentic pipelines can be traced back to a memory design decision that did not hold up under load.&lt;/p&gt;
&lt;h2&gt;Why This Vocabulary Matters&lt;/h2&gt;
&lt;p&gt;These six terms are not independent. MCP is the transport layer. Skills are what rides on that transport. Agentic RAG is what happens when you let agents control retrieval. Single and multi-agent architectures are the structural choices that determine how many agents are in the loop. Memory is what makes any of those structures useful beyond a single interaction.&lt;/p&gt;
&lt;p&gt;Get the vocabulary right and you get the architecture right. Get the architecture right and you have something worth shipping.&lt;/p&gt;</content><category term="GenAI"/><category term="Agentic AI"/><category term="MCP"/><category term="RAG"/><category term="Multi-Agent"/><category term="Memory"/><category term="Agent Architecture"/></entry><entry><title>The Great Password Dilemma</title><link href="https://blogs.rajacsp.com/the-great-password-dilemma.html" rel="alternate"/><published>2026-04-17T00:00:00-03:00</published><updated>2026-04-17T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-17:/the-great-password-dilemma.html</id><summary type="html">&lt;p&gt;We encode information every single day — and we almost never think about it.&lt;/p&gt;
&lt;p&gt;A student called me to get her account unlocked. She dictated her password over the phone: &lt;em&gt;apple1234&lt;/em&gt;. I typed it in. Login failed. We went back and forth, both confused. Then she clarified: she meant &lt;em&gt;appleOne2Three4&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Same …&lt;/p&gt;</summary><content type="html">&lt;p&gt;We encode information every single day — and we almost never think about it.&lt;/p&gt;
&lt;p&gt;A student called me to get her account unlocked. She dictated her password over the phone: &lt;em&gt;apple1234&lt;/em&gt;. I typed it in. Login failed. We went back and forth, both confused. Then she clarified: she meant &lt;em&gt;appleOne2Three4&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Same characters. Completely different encodings.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The gap nobody talks about&lt;/h2&gt;
&lt;p&gt;What happened here is not a user error story. It is an encoding ambiguity story. The student had a mental model of her password that mixed two symbol systems — lowercase letters for the word part, and written-out numerals for the number part. When she verbalized it, she collapsed both into one spoken stream. What I heard was the numeric encoding. What she meant was the literal encoding.&lt;/p&gt;
&lt;p&gt;This is exactly what happens at system boundaries.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Schema mismatch at the human layer&lt;/strong&gt; — Two humans, same language, same phone call, different deserialization of the same input string. One person emitted &lt;code&gt;apple1234&lt;/code&gt;. The other received &lt;code&gt;appleOne2Three4&lt;/code&gt;. No error was thrown. No validation failed. The bug was invisible until the downstream system — the login form — rejected it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The cost of ambiguous contracts&lt;/strong&gt; — In distributed systems, we obsess over typed schemas and versioned APIs so that producers and consumers agree on what a field &lt;em&gt;means&lt;/em&gt;, not just what it &lt;em&gt;contains&lt;/em&gt;. &lt;code&gt;"1234"&lt;/code&gt; and &lt;code&gt;"One2Three4"&lt;/code&gt; are both valid strings. But only one of them is the correct password. Without a shared schema — a contract — both parties can be confident and both can be wrong.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verbal protocols are lossy channels&lt;/strong&gt; — Telephone, Slack voice notes, recorded instructions: these are all channels where encoding fidelity degrades. NATO phonetic alphabet exists precisely because &lt;code&gt;B&lt;/code&gt; and &lt;code&gt;D&lt;/code&gt; and &lt;code&gt;E&lt;/code&gt; collapse into each other over a noisy line. Passwords, API keys, config values — anything that must survive a verbal channel needs a disambiguation protocol baked in.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Human memory stores intent, not bytes&lt;/strong&gt; — The student was not wrong. She remembered her password perfectly. She stored the &lt;em&gt;intent&lt;/em&gt; — a fruit word followed by the numbers one through four, spelled out. The login form stored the &lt;em&gt;bytes&lt;/em&gt;. These are two different things, and neither party was broken. The interface between them was.&lt;/p&gt;
&lt;p&gt;&lt;img alt="1776471381417" src="https://blogs.rajacsp.com/image/2026-12-31-password-dilemma/1776471381417.png"&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This tiny incident is a clean illustration of something I keep coming back to in agent and system design: &lt;strong&gt;reliability lives at the boundary, not inside the component&lt;/strong&gt;. The student's memory was reliable. The login system was reliable. The boundary between human verbal output and system string input had no schema. That is where the failure lived.&lt;/p&gt;
&lt;p&gt;Next time a system rejects your input, ask not &lt;em&gt;what did I type wrong&lt;/em&gt;, but &lt;em&gt;what contract did I violate, and where was that contract defined?&lt;/em&gt;&lt;/p&gt;</content><category term="Engineering Stories"/><category term="passwords"/><category term="encoding"/><category term="human-computer gap"/><category term="security"/><category term="UX"/></entry><entry><title>AgentLegatus — Terraform for AI Agents</title><link href="https://blogs.rajacsp.com/agentlegatus-terraform-for-ai-agents.html" rel="alternate"/><published>2026-04-15T00:00:00-03:00</published><updated>2026-04-15T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-15:/agentlegatus-terraform-for-ai-agents.html</id><summary type="html">&lt;p&gt;The multi-agent space is fracturing fast. Teams pick LangGraph one quarter, switch to CrewAI the next, then discover Google ADK or AWS Strands and wonder if they should migrate again. Every switch costs weeks — ripping out abstractions, rewriting orchestration logic, re-testing state management. This is the exact problem Terraform solved …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The multi-agent space is fracturing fast. Teams pick LangGraph one quarter, switch to CrewAI the next, then discover Google ADK or AWS Strands and wonder if they should migrate again. Every switch costs weeks — ripping out abstractions, rewriting orchestration logic, re-testing state management. This is the exact problem Terraform solved for infrastructure: you shouldn't be locked into a provider. You should declare &lt;em&gt;what&lt;/em&gt; you want, and swap &lt;em&gt;where&lt;/em&gt; it runs.&lt;/p&gt;
&lt;p&gt;AgentLegatus applies that same philosophy to AI agents. It is a vendor-agnostic agent framework abstraction layer — a unified API that sits above LangGraph, AutoGen, CrewAI, Google ADK, AWS Strands, and Microsoft Agent Framework, letting you switch providers with a config change rather than a codebase rewrite.&lt;/p&gt;
&lt;h2&gt;What Makes It Different&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Provider Abstraction via BaseProvider&lt;/strong&gt; — Every backend (LangGraph, AutoGen, mock) implements a single &lt;code&gt;BaseProvider&lt;/code&gt; interface. Your workflow code never calls a provider SDK directly. Swap the backend, keep the logic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Roman Military Hierarchy&lt;/strong&gt; — The orchestration model maps to four command tiers: &lt;code&gt;Legatus&lt;/code&gt; (top-level orchestrator managing the workflow lifecycle), &lt;code&gt;Centurion&lt;/code&gt; (workflow controller handling topological sorting and execution strategies), &lt;code&gt;Cohort&lt;/code&gt; (agent group coordinator), and &lt;code&gt;Agent&lt;/code&gt; (the atomic task execution unit with tools and memory). This hierarchy makes large multi-agent systems readable and governable by design.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Portable Execution Graph (PEG)&lt;/strong&gt; — The PEG is the core mechanism for provider switching at runtime. It serialises the current workflow state and execution graph, then reconstitutes it on a new provider without losing progress. Switching mid-workflow from mock to LangGraph — or back — is a first-class operation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EventBus&lt;/strong&gt; — A unified event system with subscription, history, correlation IDs, and trace propagation. Every state transition, tool call, and step completion emits an event. This makes observability a built-in concern, not an afterthought bolted on later.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;State Management&lt;/strong&gt; — State is scoped at four levels: workflow, step, agent, and global. Backends include in-memory (zero dependencies), Redis, and Postgres. Snapshots and restore are supported natively, enabling checkpoint-and-resume after failures or timeouts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ToolRegistry&lt;/strong&gt; — Define a tool once. The registry auto-converts it to OpenAI or Anthropic format, with per-provider caching. No more writing the same tool schema twice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Memory Abstraction&lt;/strong&gt; — Four memory types are supported out of the box: short-term (TTL-based), long-term, episodic, and semantic. Backends cover Redis and vector stores (ChromaDB). The MemoryManager handles routing between types transparently.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benchmark Engine&lt;/strong&gt; — Run the same workflow across multiple providers and get back a side-by-side comparison of latency (p50/p95/p99), cost, token usage, and success rate. For teams that need to justify a framework choice with data, this is significant.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Security Layer&lt;/strong&gt; — Input sanitization, path traversal prevention, PII detection and redaction, rate limiting, audit logging, and HTTPS with certificate validation are included in core. Security is not an optional plugin.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Retry and Resilience&lt;/strong&gt; — Configurable exponential backoff with max delay capping is built into the executor. Workflows recover from transient failures without custom retry scaffolding.&lt;/p&gt;
&lt;h2&gt;The CLI&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;legatus&lt;/code&gt; CLI brings Terraform-like commands to agent workflows.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;legatus init --provider mock
legatus apply workflow.yaml
legatus apply workflow.yaml --dry-run
legatus plan workflow.yaml
legatus benchmark workflow.yaml --providers mock,langgraph --iterations 5
legatus switch langgraph
legatus providers
legatus status &amp;lt;workflow-id&amp;gt;
legatus cancel &amp;lt;workflow-id&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;legatus plan&lt;/code&gt; shows what &lt;em&gt;would&lt;/em&gt; happen before execution. &lt;code&gt;legatus benchmark&lt;/code&gt; is the comparison engine. &lt;code&gt;legatus switch&lt;/code&gt; migrates a running workflow to a different provider. These aren't experimental — they're in the 0.1.0 release.&lt;/p&gt;
&lt;h2&gt;Architecture at a Glance&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;CLI (legatus)
    └── Legatus (Orchestrator)
            ├── EventBus ──► Observability (OpenTelemetry, Prometheus)
            ├── StateManager (in-memory / Redis / Postgres)
            └── Centurion (Workflow Controller)
                    ├── Sequential / Parallel / Conditional execution
                    └── Cohort (Agent Group)
                            └── Agent (Worker)
                                    ├── ToolRegistry
                                    └── MemoryManager
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The layering is intentional. Each tier has a single responsibility. EventBus threads through the entire stack, connecting observability to every component without coupling them.&lt;/p&gt;
&lt;h2&gt;Test Coverage&lt;/h2&gt;
&lt;p&gt;936 tests. 88% coverage. The test suite spans unit, integration, and property-based tests (via Hypothesis). For a 0.1.0 release, that is a serious signal about engineering intent.&lt;/p&gt;
&lt;h2&gt;Why This Matters Now&lt;/h2&gt;
&lt;p&gt;The agentic AI ecosystem is still sorting itself out. LangGraph and CrewAI are not going to be the last frameworks. New ones will emerge. Teams building production systems today cannot afford to be structurally coupled to any single provider's API surface. AgentLegatus treats that coupling as the core problem and attacks it directly — not with a thin wrapper, but with a full abstraction stack including state migration, event-driven observability, benchmarking, and a CLI that mirrors how infrastructure engineers already think.&lt;/p&gt;
&lt;p&gt;If you are building multi-agent systems in Python and you want optionality as the ecosystem evolves, this is worth watching closely.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt; — &lt;code&gt;pip install agentlegatus&lt;/code&gt; or explore at &lt;a href="https://github.com/rajacsp/agentlegatus"&gt;github.com/rajacsp/agentlegatus&lt;/a&gt;&lt;/p&gt;</content><category term="Agents"/><category term="agentlegatus"/><category term="multi-agent"/><category term="llm"/><category term="open-source"/><category term="orchestration"/><category term="python"/><category term="langgraph"/><category term="vendor-agnostic"/></entry><entry><title>Git Upstream Demystified — --set-upstream, Aliases, and Shell Functions</title><link href="https://blogs.rajacsp.com/git-upstream-demystified-set-upstream-aliases-shell-functions.html" rel="alternate"/><published>2026-04-15T00:00:00-03:00</published><updated>2026-04-15T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-15:/git-upstream-demystified-set-upstream-aliases-shell-functions.html</id><summary type="html">&lt;p&gt;If you've ever wondered what &lt;code&gt;--set-upstream&lt;/code&gt; really means in Git — or why it isn't just called &lt;code&gt;--set-remote&lt;/code&gt; — this post breaks it down, along with practical tricks to explore Git options faster.&lt;/p&gt;
&lt;h2&gt;Core Concepts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;--set-upstream vs --set-remote&lt;/strong&gt; — "remote" in Git already refers to the server (like &lt;code&gt;origin&lt;/code&gt;), so naming it &lt;code&gt;--set-remote …&lt;/code&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you've ever wondered what &lt;code&gt;--set-upstream&lt;/code&gt; really means in Git — or why it isn't just called &lt;code&gt;--set-remote&lt;/code&gt; — this post breaks it down, along with practical tricks to explore Git options faster.&lt;/p&gt;
&lt;h2&gt;Core Concepts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;--set-upstream vs --set-remote&lt;/strong&gt; — "remote" in Git already refers to the server (like &lt;code&gt;origin&lt;/code&gt;), so naming it &lt;code&gt;--set-remote&lt;/code&gt; would be ambiguous. "Upstream" captures the full branch-to-branch relationship: your local branch tracking a specific branch on a specific remote.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The stream metaphor&lt;/strong&gt; — Git borrows upstream/downstream from rivers and Unix pipelines. Your local branch sits downstream; &lt;code&gt;origin/main&lt;/code&gt; is upstream — the source of truth that changes flow down from. You pull from upstream, push back up.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One-time setup&lt;/strong&gt; — You only need &lt;code&gt;git push -u origin main&lt;/code&gt; once per branch. After that, Git remembers the link in &lt;code&gt;.git/config&lt;/code&gt; and bare &lt;code&gt;git push&lt;/code&gt; or &lt;code&gt;git pull&lt;/code&gt; just works. You also get ahead/behind counts in &lt;code&gt;git status&lt;/code&gt; for free.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why -u is the shorthand&lt;/strong&gt; — &lt;code&gt;--set-upstream&lt;/code&gt; is aliased to &lt;code&gt;-u&lt;/code&gt; because it's used often enough (every new branch) that typing the full flag every time would be painful. Same philosophy as &lt;code&gt;-v&lt;/code&gt; for &lt;code&gt;--verbose&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Productivity Tricks&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Extracting Git options cleanly&lt;/strong&gt; — Pipe &lt;code&gt;git push --help&lt;/code&gt; through grep with &lt;code&gt;'^\s+(-[a-zA-Z]|--[a-zA-Z])'&lt;/code&gt; to isolate option lines, then extract just the flags with a second grep. Add &lt;code&gt;sort -u&lt;/code&gt; to deduplicate. You get a clean list: &lt;code&gt;--all&lt;/code&gt;, &lt;code&gt;--dry-run&lt;/code&gt;, &lt;code&gt;--force&lt;/code&gt;, etc.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Shell function for any command&lt;/strong&gt; — Wrap the grep pipeline in a zsh function &lt;code&gt;git-opts()&lt;/code&gt; that takes a Git subcommand as argument. Call &lt;code&gt;git-opts push&lt;/code&gt;, &lt;code&gt;git-opts commit&lt;/code&gt;, or &lt;code&gt;git-opts pull&lt;/code&gt; to inspect options for any command on the fly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Git alias approach&lt;/strong&gt; — Add an &lt;code&gt;opts&lt;/code&gt; alias inside &lt;code&gt;~/.gitconfig&lt;/code&gt; under &lt;code&gt;[alias]&lt;/code&gt; using the &lt;code&gt;!f()&lt;/code&gt; shell function trick. Then &lt;code&gt;git opts push&lt;/code&gt; works natively inside Git's own alias system — no separate shell config needed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alias vs function tradeoff&lt;/strong&gt; — Plain shell aliases can't take arguments easily, so they're only useful for hardcoded single-command shortcuts. Shell functions are the right tool when you need flexibility. For Git-specific tricks, Git aliases with &lt;code&gt;!f()&lt;/code&gt; keep everything in one config file.&lt;/p&gt;
&lt;h2&gt;Setting Up &lt;code&gt;git-opts&lt;/code&gt; in Your Shell&lt;/h2&gt;
&lt;p&gt;Add this function to your &lt;code&gt;~/.zshrc&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git-opts&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--help&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;-E&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;^\s+(-[a-zA-Z]|--[a-zA-Z])&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;-oE&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;(-[a-zA-Z]|--[a-zA-Z][a-zA-Z-]*)&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sort&lt;span class="w"&gt; &lt;/span&gt;-u
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then use it like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git-opts&lt;span class="w"&gt; &lt;/span&gt;push
git-opts&lt;span class="w"&gt; &lt;/span&gt;pull
git-opts&lt;span class="w"&gt; &lt;/span&gt;commit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;For example, &lt;code&gt;git-opts push&lt;/code&gt; gives you something like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;all&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;delete&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;dry&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;run&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="k"&gt;exec&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;follow&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;tags&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;force&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;force&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;with&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;lease&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;mirror&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;recurse&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;submodules&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;no&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;verify&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;porcelain&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;progress&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;prune&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;push&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;option&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;quiet&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;receive&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;pack&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;recurse&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;submodules&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;repo&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;set&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;upstream&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;tags&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;verbose&lt;/span&gt;
&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nv"&gt;verify&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;d&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;f&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;n&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;o&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;p&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;q&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;r&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;u&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="DevTools"/><category term="git"/><category term="terminal"/><category term="shell"/><category term="zsh"/><category term="productivity"/></entry><entry><title>GitHub Spec Kit: A Practical Introduction to Spec-Driven Development</title><link href="https://blogs.rajacsp.com/github-spec-kit-intro-spec-driven-development.html" rel="alternate"/><published>2026-04-14T00:00:00-03:00</published><updated>2026-04-14T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-14:/github-spec-kit-intro-spec-driven-development.html</id><summary type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The issue isn't the coding agent's coding ability, but our approach.&lt;br&gt;
We treat coding agents like search engines when we should be treating them&lt;br&gt;
more like literal-minded pair programmers."&lt;/em&gt;&lt;br&gt;
— Den Delimarsky, GitHub Principal Product Manager&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;The Problem With Vibe Coding&lt;/h2&gt;
&lt;p&gt;If you've used an AI coding assistant, you've experienced &lt;strong&gt;vibe …&lt;/strong&gt;&lt;/p&gt;</summary><content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The issue isn't the coding agent's coding ability, but our approach.&lt;br&gt;
We treat coding agents like search engines when we should be treating them&lt;br&gt;
more like literal-minded pair programmers."&lt;/em&gt;&lt;br&gt;
— Den Delimarsky, GitHub Principal Product Manager&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;The Problem With Vibe Coding&lt;/h2&gt;
&lt;p&gt;If you've used an AI coding assistant, you've experienced &lt;strong&gt;vibe coding&lt;/strong&gt; — you throw a high-level prompt at the AI, wait for output, then spend an hour tweaking because the result isn't what you had in mind.&lt;/p&gt;
&lt;p&gt;The AI isn't bad at coding. The problem is how we talk to it.&lt;/p&gt;
&lt;p&gt;Without context, AI coding agents fill the gaps with assumptions. Those assumptions compound across a session. By the time you're implementing feature three, the agent has forgotten the constraints you mentioned in prompt one. You end up with code that works for the demo but drifts away from your actual architecture.&lt;/p&gt;
&lt;p&gt;Spec-Driven Development (SDD) is the fix.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;What Is Spec-Driven Development?&lt;/h2&gt;
&lt;p&gt;SDD asks you to &lt;strong&gt;define your project's goals, architecture, and constraints upfront&lt;/strong&gt; — in structured documents called &lt;em&gt;specs&lt;/em&gt; — before a single line of code is generated. The AI coding assistant then references these specs as a persistent source of truth throughout the entire development process.&lt;/p&gt;
&lt;p&gt;Think of it like handing a contractor blueprints instead of saying &lt;em&gt;"build me something nice."&lt;/em&gt; The blueprints don't limit creativity — they eliminate misinterpretation.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;What Is GitHub Spec Kit?&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/github/spec-kit"&gt;GitHub Spec Kit&lt;/a&gt; is an &lt;strong&gt;open-source toolkit&lt;/strong&gt; released by GitHub that operationalizes SDD. It works with AI coding assistants including GitHub Copilot, Claude, Cursor, Gemini, and others.&lt;/p&gt;
&lt;p&gt;At its core, Spec Kit gives your AI assistant a &lt;strong&gt;single source of truth&lt;/strong&gt; about your project — a set of structured documents that define the what, the how, and the rules of your build.&lt;/p&gt;
&lt;p&gt;That source of truth has four components:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Document&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;constitution.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Non-negotiable rules — tech stack, coding standards, architectural choices&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;spec.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What you are building — features, pages, user flows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;plan.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How you will build it — components, architecture, dependencies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tasks.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Atomic work items broken down for the AI to execute&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;These files live inside your repository under &lt;code&gt;.github/&lt;/code&gt;, making your specs &lt;strong&gt;version-controlled and shareable&lt;/strong&gt; — just like your code.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Project Structure&lt;/h2&gt;
&lt;p&gt;When you initialize a Spec Kit project, it scaffolds the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;copilot&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="err"&gt;←&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Agent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;behaviour&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;constitution&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="err"&gt;←&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Project&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;level&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;rules&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;specs&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="err"&gt;←&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;What&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;you&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;re building&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;plan&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="err"&gt;←&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;How&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;you&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;re building it&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="err"&gt;←&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Work&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;breakdown&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;hr&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Spec Kit is installed via &lt;code&gt;uvx&lt;/code&gt;, from the &lt;code&gt;uv&lt;/code&gt; Python package ecosystem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;macOS / Linux:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;curl&lt;span class="w"&gt; &lt;/span&gt;-LsSf&lt;span class="w"&gt; &lt;/span&gt;https://astral.sh/uv/install.sh&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sh
uv&lt;span class="w"&gt; &lt;/span&gt;tool&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;specify-cli&lt;span class="w"&gt; &lt;/span&gt;--from&lt;span class="w"&gt; &lt;/span&gt;git+https://github.com/github/spec-kit.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Windows (PowerShell):&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;powershell&lt;/span&gt; &lt;span class="n"&gt;-ExecutionPolicy&lt;/span&gt; &lt;span class="n"&gt;ByPass&lt;/span&gt; &lt;span class="n"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;irm https://astral.sh/uv/install.ps1 | iex&amp;quot;&lt;/span&gt;
&lt;span class="n"&gt;uv&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;specify-cli&lt;/span&gt; &lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="n"&gt;-from&lt;/span&gt; &lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="p"&gt;+&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;://&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="n"&gt;spec-kit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Initialize a new project:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;specify&lt;span class="w"&gt; &lt;/span&gt;init&lt;span class="w"&gt; &lt;/span&gt;my-project
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The CLI walks you through agent selection (Copilot, Claude, Gemini, Cursor, etc.) and preferred shell type (Bash or PowerShell).&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Seven Slash Commands&lt;/h2&gt;
&lt;p&gt;Spec Kit's entire workflow is driven by seven slash commands. Each maps to a stage in the development lifecycle.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;/constitution&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Sets the non-negotiable project rules — stack, standards, architecture. Every other command refers back to this file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;constitution&lt;/span&gt;
&lt;span class="n"&gt;This&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;React&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Vite&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SPA&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;using&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TypeScript&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;Styling&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;via&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Tailwind&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CSS&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;API&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;calls&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;via&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Axios&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;State&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;management&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;via&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;useState&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Context&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;API&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;&lt;code&gt;/specify&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Describes &lt;em&gt;what&lt;/em&gt; you are building — features, pages, user interactions.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/specify
Build a bookstore frontend with three pages:
- Product Listing (grid of books fetched from mock API)
- Product Detail (book info + Add to Cart button)
- Shopping Cart (item list, quantity control, running total, remove option)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;&lt;code&gt;/clarify&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Optional but valuable — surfaces ambiguities in the spec before planning begins. Ensures you and the AI share the same understanding of scope before any architecture decisions are made.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;/plan&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Translates the spec into a concrete technical plan — components, file structure, dependencies.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;plan&lt;/span&gt;
&lt;span class="nv"&gt;Use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;ProductListPage&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;fetch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;data&lt;/span&gt;.
&lt;span class="nv"&gt;Use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;ProductCard&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;component&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;individual&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;book&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;display&lt;/span&gt;.
&lt;span class="nv"&gt;Use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CartContext&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;shared&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;cart&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;state&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;across&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;pages&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;&lt;code&gt;/tasks&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Breaks the plan into atomic, executable chunks of work. The AI agent works through these one at a time.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;/analyze&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Validates your specs and plans for logical consistency before implementation. A pre-flight check — catches contradictions or gaps before they become bugs.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;/implement&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Triggers the actual build. The AI agent generates code, scaffolds files, and wires components together — using all the accumulated context from the previous steps.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Greenfield vs. Brownfield&lt;/h2&gt;
&lt;p&gt;Spec Kit works for both new and existing projects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Greenfield:&lt;/strong&gt; Start with the constitution, build out the spec, then plan, then implement. The AI has full context from day one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Brownfield:&lt;/strong&gt; Document what already exists into the spec files first. This gives the AI a map of your current codebase before making any changes — preventing it from overwriting decisions that already exist.&lt;/p&gt;
&lt;p&gt;This is the important distinction: Spec Kit is not just a scaffolding tool. It is a &lt;strong&gt;communication protocol&lt;/strong&gt; between you and the AI agent, applicable at any stage of a project's life.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Supported AI Agents&lt;/h2&gt;
&lt;p&gt;At the time of writing, Spec Kit officially supports:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHub Copilot&lt;/li&gt;
&lt;li&gt;Claude (Anthropic)&lt;/li&gt;
&lt;li&gt;Google Gemini&lt;/li&gt;
&lt;li&gt;Cursor&lt;/li&gt;
&lt;li&gt;Windsurf&lt;/li&gt;
&lt;li&gt;Qwen&lt;/li&gt;
&lt;li&gt;Codex&lt;/li&gt;
&lt;li&gt;Opencode&lt;/li&gt;
&lt;li&gt;Kilocode&lt;/li&gt;
&lt;li&gt;Auggie&lt;/li&gt;
&lt;li&gt;Root&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Strengths and Limitations&lt;/h2&gt;
&lt;h3&gt;Where It Shines&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Complex, multi-feature projects&lt;/strong&gt; with intricate dependencies benefit most. Detailed upfront specs reduce the compounding drift that kills large AI-assisted builds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Team environments&lt;/strong&gt; where multiple people (or agents) need to stay aligned on architecture and constraints.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Consistency across sessions&lt;/strong&gt; — because specs are files in your repo, a new session picks up exactly where the last one left off.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Where It May Be Overkill&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simple, single-purpose scripts or tools&lt;/strong&gt; — the setup and documentation overhead outweighs the benefit for quick tasks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Early-stage exploration&lt;/strong&gt; — if you're still figuring out what you're building, writing a constitution first can feel premature. Spec Kit rewards projects where the problem is understood before the building starts.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Why This Matters for Serious Engineers&lt;/h2&gt;
&lt;p&gt;Vibe coding is a liability in production. It produces:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code that works in the demo but breaks under edge cases&lt;/li&gt;
&lt;li&gt;Inconsistent patterns across the codebase&lt;/li&gt;
&lt;li&gt;No clear architectural ownership&lt;/li&gt;
&lt;li&gt;AI that loses context halfway through a session&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Spec Kit enforces a discipline most good engineers already know: &lt;strong&gt;specify before you build&lt;/strong&gt;. It wraps that discipline in a format that AI agents can consume reliably — and that your team can version, review, and update like any other project artifact.&lt;/p&gt;
&lt;p&gt;For bootcamp instructors, team leads, and solo builders shipping real products, this is the difference between using AI as a toy and using it as a production-grade engineering tool.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Quick Reference&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;What It Means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Spec-Driven Development&lt;/td&gt;
&lt;td&gt;Define before you build — goals, architecture, constraints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Constitution&lt;/td&gt;
&lt;td&gt;Project-level non-negotiables (stack, standards)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spec&lt;/td&gt;
&lt;td&gt;Feature-level description of what to build&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plan&lt;/td&gt;
&lt;td&gt;Technical blueprint of how to build it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tasks&lt;/td&gt;
&lt;td&gt;Atomic work items for the AI agent to execute&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spec Kit&lt;/td&gt;
&lt;td&gt;GitHub's open-source CLI + methodology that ties it all together&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h2&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GitHub Repo:&lt;/strong&gt; https://github.com/github/spec-kit&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Official Announcement:&lt;/strong&gt; https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit/&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microsoft Learn Module:&lt;/strong&gt; https://learn.microsoft.com/en-us/training/modules/spec-driven-development-github-spec-kit-enterprise-developers/&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LogRocket Deep Dive:&lt;/strong&gt; https://blog.logrocket.com/github-spec-kit/&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;InfoWorld Analysis:&lt;/strong&gt; https://www.infoworld.com/article/4062524/spec-driven-ai-coding-with-githubs-spec-kit.html&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Published on Kactii Academy Blog | #genaiexploring #kactii #learninggenai #genai&lt;/em&gt;&lt;/p&gt;</content><category term="GenAI"/><category term="GenAI"/><category term="LLM"/><category term="SpecKit"/><category term="GitHub"/><category term="SDD"/><category term="AIcoding"/><category term="Copilot"/><category term="AgentDev"/></entry><entry><title>Agentic System Design Concepts - Patterns Every AI Engineer Should Know</title><link href="https://blogs.rajacsp.com/agentic-system-design-concepts-patterns-every-ai-engineer-should-know.html" rel="alternate"/><published>2026-04-11T00:00:00-03:00</published><updated>2026-04-11T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-11:/agentic-system-design-concepts-patterns-every-ai-engineer-should-know.html</id><summary type="html">&lt;p&gt;Building reliable AI agents isn't just about picking the right model — it's about the patterns you wire around it. Here's a concise reference of 15 agentic system design concepts worth knowing. Two lines each — just enough to understand what they do and why they matter.&lt;/p&gt;
&lt;h2&gt;Resilience &amp;amp; Failure Isolation&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Agent Circuit …&lt;/strong&gt;&lt;/p&gt;</summary><content type="html">&lt;p&gt;Building reliable AI agents isn't just about picking the right model — it's about the patterns you wire around it. Here's a concise reference of 15 agentic system design concepts worth knowing. Two lines each — just enough to understand what they do and why they matter.&lt;/p&gt;
&lt;h2&gt;Resilience &amp;amp; Failure Isolation&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Agent Circuit Breaker&lt;/strong&gt; — Prevents cascading failures by halting agent execution when downstream services or tools are repeatedly failing. Borrowed from distributed systems engineering, it stops a single broken tool from dragging the entire agent pipeline down.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Blast Radius Limiter&lt;/strong&gt; — Restricts the impact of an agent failure to a defined scope so it can't propagate across the system. Think of it as a blast door: when something goes wrong, the damage stays local.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dead Letter Queue for Agents&lt;/strong&gt; — A holding area where failed or unprocessable agent tasks are parked for later inspection instead of silently dropped. It gives you a recoverable audit trail when tasks fall through the cracks at runtime.&lt;/p&gt;
&lt;h2&gt;Control Flow &amp;amp; Decision Quality&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Orchestrator vs Choreography&lt;/strong&gt; — Defines whether agent interactions are centrally directed (orchestrator controls all moves) or emergent (agents react to events and coordinate peer-to-peer). The choice shapes coupling, debuggability, and how gracefully the system degrades.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Confidence Threshold Gate&lt;/strong&gt; — Ensures an agent only takes action when its internal confidence in a decision clears a defined threshold. A simple but powerful reliability lever: low-confidence branches pause for human review rather than guessing forward.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Replanning Loop&lt;/strong&gt; — Allows agents to re-evaluate their plan mid-execution when context changes or a step fails, rather than continuing blindly on a stale plan. Essential for long-horizon tasks where the environment isn't static.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Human Escalation Protocol&lt;/strong&gt; — Provides a structured mechanism for agents to hand off to a human when they're stuck, uncertain, or handling high-stakes decisions. It's not a failure mode — it's a designed off-ramp.&lt;/p&gt;
&lt;h2&gt;Tool Invocation Reliability&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Idempotent Tool Calls&lt;/strong&gt; — Ensures that a tool can be called multiple times with the same inputs without producing unintended side effects. Critical in agentic pipelines where retries happen frequently due to timeouts or partial failures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tool Invocation Timeout&lt;/strong&gt; — Prevents agents from blocking indefinitely on a tool that is slow or unresponsive, forcing a graceful fallback or retry. Without this, a single flaky API can freeze an entire agent run.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context Window Checkpointing&lt;/strong&gt; — Periodically saves the agent's progress so it can resume from a known-good state rather than restarting from scratch after a context overflow or crash. Especially important for long-running, multi-step tasks.&lt;/p&gt;
&lt;h2&gt;Infrastructure &amp;amp; Routing&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;LLM Gateway Pattern&lt;/strong&gt; — A single abstraction layer that manages all LLM API calls, handling routing, rate limiting, retries, and observability in one place. It decouples agent logic from model-specific SDKs, making provider swaps painless.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Semantic Caching&lt;/strong&gt; — Stores LLM responses keyed on semantic meaning rather than exact input strings, so similar queries hit the cache even when phrased differently. Reduces latency and cost without sacrificing answer quality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Multi-Agent State Sync&lt;/strong&gt; — Maintains a consistent shared state across multiple agents working in parallel or in sequence. Without it, agents operating on stale or divergent state produce contradictory or redundant outputs.&lt;/p&gt;
&lt;h2&gt;Observability &amp;amp; Deployment&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Agentic Observability Tracing&lt;/strong&gt; — Tracks every decision, tool call, handoff, and LLM interaction across an agent run, producing a full execution trace for debugging and performance analysis. The difference between guessing why something failed and knowing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Canary Agent Deployment&lt;/strong&gt; — Rolls out a new agent version to a small slice of production traffic before full release, allowing you to compare behavior and catch regressions with limited blast radius. Applies standard software deployment discipline to the agent layer.&lt;/p&gt;</content><category term="GenAI"/><category term="GenAI"/><category term="AI-agents"/><category term="LLM"/><category term="agentic-systems"/><category term="design-patterns"/><category term="reliability"/></entry><entry><title>Every Claude Code Concept You Need to Know</title><link href="https://blogs.rajacsp.com/every-claude-code-concept-you-need-to-know.html" rel="alternate"/><published>2026-04-11T00:00:00-03:00</published><updated>2026-04-11T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-11:/every-claude-code-concept-you-need-to-know.html</id><summary type="html">&lt;p&gt;Claude Code is not a chatbot. It lives in your terminal, reads your actual files, writes code, runs commands, and executes multi-step workflows — all with your permission. Here are 30 concepts you need to understand it properly. No fluff, no hand-holding.&lt;/p&gt;
&lt;h2&gt;The 30 Concepts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1. The Terminal&lt;/strong&gt; — Claude Code doesn't …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Claude Code is not a chatbot. It lives in your terminal, reads your actual files, writes code, runs commands, and executes multi-step workflows — all with your permission. Here are 30 concepts you need to understand it properly. No fluff, no hand-holding.&lt;/p&gt;
&lt;h2&gt;The 30 Concepts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1. The Terminal&lt;/strong&gt; — Claude Code doesn't run in a browser. It runs in the terminal, the same text-based interface developers use daily. If you've never opened a terminal before, that's your first homework assignment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Installation + Pricing&lt;/strong&gt; — Install with a single command via npm. Pricing is token-based through your Anthropic account. There's no flat monthly fee tied to a UI — you pay for what you use, which means costs scale with how hard you push it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. File Access&lt;/strong&gt; — Claude Code reads and edits files directly on your machine, with your permission. Not "paste your doc into a chat window." It opens the actual file, modifies it in-place, and saves it. This is the concept that makes it useful.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Image + PDF Reading&lt;/strong&gt; — Claude Code can ingest images and PDFs as inputs. Point it at a PDF proposal or a screenshot and it processes the content directly — no manual copy-paste required.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Tool Use&lt;/strong&gt; — Claude Code has built-in tools: file reading, file writing, shell execution, and more. These are the primitives it uses to act on your computer. You see each tool call as it happens in real time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Prompting Techniques&lt;/strong&gt; — Vague prompts produce garbage results. "Help me with my marketing" is useless. "Write a 3-email welcome sequence for my dog walking business targeting first-time pet owners, 150 words each" is not. Specificity is the skill.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7. CLAUDE.md&lt;/strong&gt; — A markdown file you create in your project directory that tells Claude Code the rules, context, and conventions for that project. Think of it as a standing system prompt that persists across sessions. Every serious Claude Code user has one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8. Plan Mode&lt;/strong&gt; — Before Claude Code executes anything, you can ask it to plan first. It outputs what it intends to do, step by step, and waits for your approval. Run in plan mode for anything non-trivial. Review before you let it touch anything.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;9. Context Window&lt;/strong&gt; — The amount of text Claude can "hold in mind" at once during a session. Long conversations, large files, and extensive histories eat into it. When context fills up, older information gets dropped. This affects result quality.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;10. Tokens + Costs&lt;/strong&gt; — Everything processed by Claude Code — your prompts, the files it reads, its responses — is measured in tokens. Tokens drive cost. Reading a 50-page PDF burns tokens. Keep context lean and targeted to control spend.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;11. Model Selection&lt;/strong&gt; — You can choose which Claude model backs your session. Faster, cheaper models work for routine tasks. Heavier models are worth it for complex reasoning or production-grade code. Pick the right tool for the job.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;12. /compact&lt;/strong&gt; — A slash command that compresses your current conversation history into a shorter summary, freeing up context window space without wiping the session. Use it mid-task when context gets bloated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;13. /clear&lt;/strong&gt; — Wipes the entire conversation and starts fresh. Every new task should start with a clean context. Don't carry leftover noise from a previous task into the next one. Use this more than you think you need to.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;14. Session Management&lt;/strong&gt; — Claude Code has no persistent memory between sessions by default. Start each session with your CLAUDE.md re-read to restore project context. Design your workflow around this statelessness rather than fighting it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;15. Permission Modes&lt;/strong&gt; — By default, Claude Code asks for approval before running any shell command. This gets tedious fast. You can pre-approve safe, non-destructive commands (ls, cat, grep, mkdir, git status) in your settings.local.json. Destructive operations should always require explicit confirmation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;16. Effort Levels&lt;/strong&gt; — You can signal how much effort you want Claude to apply. Quick answers for exploration, thorough analysis for production decisions. Matching effort level to task type saves time and tokens.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;17. Interrupt + Redirect&lt;/strong&gt; — While Claude Code is running a task, you can interrupt it mid-execution and redirect it. If it starts going down the wrong path, stop it early. Don't let it burn tokens on a wrong approach when you can see it happening.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;18. Visual Studio Code&lt;/strong&gt; — Claude Code integrates directly with VS Code. You can run it inside the VS Code terminal and see file changes reflected in your editor in real time. If you're not a terminal-native developer, this is the recommended setup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;19. Memory&lt;/strong&gt; — Claude Code supports memory files that persist across sessions. Unlike CLAUDE.md (project-specific), memory files can store user-level preferences and context. Useful for encoding your personal conventions once and never repeating them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;20. Project vs Global&lt;/strong&gt; — Configuration can be scoped at the project level (CLAUDE.md, settings.local.json) or at the global level (applies to all Claude Code sessions on your machine). Know which scope a setting lives in before you modify it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;21. Slash Commands&lt;/strong&gt; — Built-in commands prefixed with &lt;code&gt;/&lt;/code&gt; that control Claude Code's behavior: /clear, /compact, /help, and more. You can also define custom slash commands (skills) that map to your own workflows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;22. Skills&lt;/strong&gt; — Custom slash commands you define once and reuse indefinitely. A skill is a markdown file that describes a reusable workflow. You build it once, invoke it with &lt;code&gt;/skill-name&lt;/code&gt;, and Claude follows the instructions every time. Hundreds of community-built skills already exist on GitHub in repos like &lt;code&gt;anthropics/skills&lt;/code&gt; and &lt;code&gt;hesreallyhim/awesome-claude-code&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;23. Hooks&lt;/strong&gt; — Scripts that run automatically before or after Claude Code actions. Quality gate hooks, for example, can intercept Claude's output before it's committed and check it against defined standards. Hooks are how you enforce consistency without relying on Claude to self-police.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;24. Web Browsing&lt;/strong&gt; — Claude Code can browse the web when given the appropriate tool access. It can fetch pages, read documentation, and pull in live information as part of a task — not just work from static local files.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;25. MCP Servers&lt;/strong&gt; — Model Context Protocol servers extend Claude Code's tool access to external services: Airtable, Google Drive, Slack, GitHub, and more. Tools handle what Claude does on your computer. MCP extends that to the internet and third-party APIs. This is the integration layer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;26. Perplexity MCP&lt;/strong&gt; — A specific MCP integration that gives Claude Code access to Perplexity's search capabilities. Useful when a task requires real-time research as part of a larger automated workflow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;27. Subagents&lt;/strong&gt; — Multiple Claude Code instances running simultaneously, each handling a distinct subtask. Instead of processing platforms one at a time, you spin up parallel agents and run them concurrently. Subagents are how you turn Claude Code from a sequential tool into a parallel workflow engine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;28. Remote Control&lt;/strong&gt; — Claude Code can be configured for remote access, meaning you can trigger and manage sessions from another machine or interface. Relevant for server automation and scheduled background tasks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;29. Scheduled Tasks&lt;/strong&gt; — Claude Code workflows can be scheduled to run automatically at defined intervals. Combine this with skills and hooks and you have a self-operating workflow system that runs without manual invocation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;30. Git Version Control&lt;/strong&gt; — Claude Code integrates with git. Every change it makes can be committed, branched, and rolled back through standard git workflows. This is your undo button. Always have Claude Code working inside a git-tracked project. Before: changes happen and you hope nothing breaks. After: every change is versioned, documented, and reversible.&lt;/p&gt;
&lt;h2&gt;The One Rule That Matters&lt;/h2&gt;
&lt;p&gt;Master five concepts before you touch the next five. The shiny object trap — jumping from MCP to subagents to hooks before understanding CLAUDE.md and context windows — is the single biggest waste of time. The gap between people getting real results and people falling behind is not talent. It is reps. Start with file access, prompting, CLAUDE.md, plan mode, and /clear. Everything else builds on those five.&lt;/p&gt;</content><category term="GenAI"/><category term="GenAI"/><category term="Claude-Code"/><category term="LLM"/><category term="agents"/><category term="developer-tools"/><category term="local-AI"/></entry><entry><title>Missing ZIP Option in Windows Right-Click Menu — Here's How to Fix It</title><link href="https://blogs.rajacsp.com/missing-zip-option-windows-right-click-menu.html" rel="alternate"/><published>2026-04-11T00:00:00-03:00</published><updated>2026-04-11T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-11:/missing-zip-option-windows-right-click-menu.html</id><summary type="html">&lt;p&gt;The classic "Send to → Compressed (zipped) folder" option sometimes disappears from the Windows right-click context menu. Here's what causes it and how to get it back in under two minutes.&lt;/p&gt;
&lt;h2&gt;What Happened&lt;/h2&gt;
&lt;p&gt;Windows ships with a built-in ZIP shell extension handled by &lt;code&gt;zipfldr.dll&lt;/code&gt;. When third-party tools like Git, VLC …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The classic "Send to → Compressed (zipped) folder" option sometimes disappears from the Windows right-click context menu. Here's what causes it and how to get it back in under two minutes.&lt;/p&gt;
&lt;h2&gt;What Happened&lt;/h2&gt;
&lt;p&gt;Windows ships with a built-in ZIP shell extension handled by &lt;code&gt;zipfldr.dll&lt;/code&gt;. When third-party tools like Git, VLC, or OneDrive add their own context menu entries, they can displace or corrupt the ZIP handler registration — leaving you with a bloated menu but no ZIP option.&lt;/p&gt;
&lt;h2&gt;Fix 1 — Check the Send to Submenu&lt;/h2&gt;
&lt;p&gt;Before anything else, right-click your folder or file and hover over &lt;strong&gt;Send to →&lt;/strong&gt;. The "Compressed (zipped) folder" option is sometimes hiding in the submenu even when it's not visible at the top level.&lt;/p&gt;
&lt;h2&gt;Fix 2 — Re-register the ZIP Shell Extension&lt;/h2&gt;
&lt;p&gt;Open Command Prompt as Administrator and run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;regsvr32&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;zipfldr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dll&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This re-registers the native ZIP handler with Windows Shell. Restart Explorer or reboot after running it.&lt;/p&gt;
&lt;h2&gt;Fix 3 — Restart Windows Explorer&lt;/h2&gt;
&lt;p&gt;Sometimes a stale shell session is all that's causing the issue. Run this in CMD:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;taskkill /f /im explorer.exe
start explorer.exe
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;Fix 4 — Verify the Registry Key&lt;/h2&gt;
&lt;p&gt;Press &lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;regedit&lt;/code&gt;, and navigate to:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;HKEY_CLASSES_ROOT\CompressedFolder
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If this key is missing or corrupted, the ZIP option will not appear anywhere in the context menu. You may need to restore it from another machine or via a &lt;code&gt;.reg&lt;/code&gt; export.&lt;/p&gt;
&lt;h2&gt;Root Cause&lt;/h2&gt;
&lt;p&gt;Heavy context menu contributors — Git Bash, Git GUI, VLC, SkyDrive Pro — are visible in the screenshot. Any one of them can push a bad shell extension that breaks ZIP registration as a side effect. Fix 2 resolves this in most cases.&lt;/p&gt;</content><category term="Windows"/><category term="Windows"/><category term="tips"/><category term="context-menu"/><category term="troubleshooting"/><category term="productivity"/></entry><entry><title>AI Agent Directory - Few Shots LLM Models</title><link href="https://blogs.rajacsp.com/ai-agent-directory-few-shots-llm-models.html" rel="alternate"/><published>2026-04-10T00:00:00-03:00</published><updated>2026-04-10T00:00:00-03:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-04-10:/ai-agent-directory-few-shots-llm-models.html</id><summary type="html">&lt;p&gt;The AI agent ecosystem is growing fast. Here's a quick directory of notable AI startups and a couple of few-shot LLM models worth knowing about. Two lines each — just enough to know what they do and why they matter.&lt;/p&gt;
&lt;h2&gt;AI Agent Directory&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Can of Soup&lt;/strong&gt; — An AI-powered app that lets …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The AI agent ecosystem is growing fast. Here's a quick directory of notable AI startups and a couple of few-shot LLM models worth knowing about. Two lines each — just enough to know what they do and why they matter.&lt;/p&gt;
&lt;h2&gt;AI Agent Directory&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Can of Soup&lt;/strong&gt; — An AI-powered app that lets you create fictional photos of you and your friends in imaginary scenarios. Built during Y Combinator, it uses generative AI to place people into any meme, outfit, or movie scene.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deepgram&lt;/strong&gt; — A foundational voice AI platform offering speech-to-text, text-to-speech, and voice agent APIs. Their Nova models deliver high accuracy and low latency, supporting 30+ languages for real-time transcription.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Diffuse Bio&lt;/strong&gt; — Building generative AI for protein design, using diffusion models to engineer new proteins with control and accuracy. Their foundation model DSG-1 can generate 3D protein structures and design binders from user prompts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Draftaid&lt;/strong&gt; — An AI-powered CAD tool that converts 3D models into precise 2D manufacturing drawings automatically. It reduces manual drafting time by up to 90%, acting like a copilot for mechanical engineers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edgetrace&lt;/strong&gt; — A YC-backed AI video analytics platform that lets users search camera networks using natural language. Primarily used by law enforcement and transportation for real-time threat detection and suspect identification.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EzDubz&lt;/strong&gt; — A real-time AI dubbing tool that translates videos, livestreams, and phone calls while preserving the original speaker's voice. Their proprietary models clone voices on the fly and even replicate emotions across 20+ languages.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exa&lt;/strong&gt; — An AI-powered search engine and API built for developers and AI agents. Unlike traditional keyword search, Exa uses neural embeddings for semantic understanding, powering tools like Cursor and Lovable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Guide Labs&lt;/strong&gt; — Building interpretable AI foundation models that can explain their reasoning and are easy to audit. Their open-source Steerling-8B is an 8-billion-parameter LLM designed for transparency and debuggability.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Infinity AI&lt;/strong&gt; — Now known as Lemon Slice, they build a video foundation model for human motion and emotion. Their tech generates expressive, talking characters across styles from photorealistic to cartoon.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;K-Scale&lt;/strong&gt; — Building open-source humanoid robots for developers, with models starting at $999. Their integrated software, hardware, and ML stack lets developers focus on building applications for embodied AI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sevn&lt;/strong&gt; — A generative design startup using AI to automate and optimize the creative design process. Users define parameters and constraints, and Sevn generates a range of design options to explore.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Linux Inc&lt;/strong&gt; — An AI startup focused on bringing intelligent tooling to the Linux ecosystem. They aim to simplify Linux administration and development workflows through AI-powered automation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Metalware&lt;/strong&gt; — A copilot for firmware engineers that automates low-level programming for embedded systems. Their binary analysis tool fuzzes ARM-based software to detect defects earlier in the development lifecycle.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Naiver AI&lt;/strong&gt; — Navier AI provides a web-based platform for running CFD (computational fluid dynamics) simulations at scale. Their AI agents handle geometry cleanup, meshing, solver configuration, and cloud resource management autonomously.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Osium AI&lt;/strong&gt; — An AI-powered platform that accelerates materials and chemicals R&amp;amp;D for industry leaders. Their software helps engineers design new materials faster, spanning alloys, polymers, textiles, and bio-based materials.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phind&lt;/strong&gt; — An AI search engine purpose-built for developers that generates direct, code-inclusive answers to technical questions. It combines real-time web search with specialized models trained on programming languages and frameworks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Piramidal&lt;/strong&gt; — Building a foundation model for the brain, trained on a massive corpus of EEG brainwave data. Their AI interprets neural signals for neurological diagnostics, already being deployed in ICU settings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Playground&lt;/strong&gt; — A browser-based AI image generation and design platform used by over 9 million users. It combines text-to-image generation with a full graphic design suite for logos, social media posts, and more.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PlayHT&lt;/strong&gt; — An AI voice generation platform that offered ultra-realistic text-to-speech with 900+ voices in 142 languages. Known for voice cloning and custom voice creation through deep learning algorithms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sonauto&lt;/strong&gt; — An AI music editor that turns prompts, lyrics, or melodies into full songs in any style. It supports thousands of styles with full-length songs up to 4.5 minutes, complete with vocals and instrumentation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tavus&lt;/strong&gt; — An AI video personalization platform that creates hyper-personalized videos at scale from a single recording. It uses deep learning for voice synthesis and face cloning to generate thousands of unique video variations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;YonduAI&lt;/strong&gt; — Building the robotic workforce of the future, starting with logistics automation in warehouses. They deploy humanoid robots with remote teleoperation that gradually transitions to full AI-driven automation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Yoneda Labs&lt;/strong&gt; — Building a foundation model for chemical reactions to help chemists optimize drug discovery. Their AI defines parameters like temperature, concentration, and catalyst to make synthesis faster and cheaper.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SyncLabs&lt;/strong&gt; — An AI lip-sync video generator that creates perfectly synchronized mouth movements from any audio track. Their zero-shot model handles any face in any video context without prior training on specific individuals.&lt;/p&gt;
&lt;h2&gt;Few-Shot LLM Models&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Llama 3.1&lt;/strong&gt; — Meta's open-source large language model available in 8B, 70B, and 405B parameter sizes. It supports 128K context length and multilingual capabilities, making it one of the most versatile open-weight models for fine-tuning and deployment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mixtral&lt;/strong&gt; — Mistral AI's open-source mixture-of-experts (MoE) model that activates only a subset of parameters per token for efficient inference. It delivers performance comparable to much larger dense models while being significantly faster and more cost-effective to run.&lt;/p&gt;</content><category term="GenAI"/><category term="GenAI"/><category term="AI-agents"/><category term="LLM"/><category term="startups"/><category term="directory"/></entry><entry><title>My GenAI Blogs</title><link href="https://blogs.rajacsp.com/my-genai-blogs.html" rel="alternate"/><published>2026-01-10T00:00:00-04:00</published><updated>2026-01-10T00:00:00-04:00</updated><author><name>Raja CSP Raman</name></author><id>tag:blogs.rajacsp.com,2026-01-10:/my-genai-blogs.html</id><summary type="html">&lt;h2&gt;Why GenAI?&lt;/h2&gt;
&lt;p&gt;Generative AI has completely changed how I think about software, creativity, and problem-solving. Over the past year, I've gone deep into the world of large language models, prompt engineering, retrieval-augmented generation, fine-tuning, and AI agents. The pace of change is incredible, and I wanted a place to document …&lt;/p&gt;</summary><content type="html">&lt;h2&gt;Why GenAI?&lt;/h2&gt;
&lt;p&gt;Generative AI has completely changed how I think about software, creativity, and problem-solving. Over the past year, I've gone deep into the world of large language models, prompt engineering, retrieval-augmented generation, fine-tuning, and AI agents. The pace of change is incredible, and I wanted a place to document what I'm learning as I go.&lt;/p&gt;
&lt;p&gt;This blog is that place. I'll be writing about my hands-on experiences with GenAI, the tools I'm experimenting with, things that worked, things that didn't, and the lessons I've picked up along the way.&lt;/p&gt;
&lt;h2&gt;What I've Been Exploring&lt;/h2&gt;
&lt;p&gt;My GenAI journey started with using ChatGPT and Claude for day-to-day coding tasks. That quickly evolved into deeper exploration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prompt engineering&lt;/strong&gt; — learning how to get consistent, high-quality outputs from LLMs by structuring prompts effectively.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RAG (Retrieval-Augmented Generation)&lt;/strong&gt; — building pipelines that ground LLM responses in real data using vector databases and embeddings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fine-tuning&lt;/strong&gt; — adapting pre-trained models for specific tasks and domains.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI agents&lt;/strong&gt; — creating autonomous workflows where LLMs can use tools, reason through multi-step problems, and take actions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local models&lt;/strong&gt; — running open-source models like LLaMA and Mistral locally to understand how they work under the hood.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'm not just reading about these topics. I'm building with them, breaking things, and learning from the results.&lt;/p&gt;
&lt;h2&gt;What to Expect&lt;/h2&gt;
&lt;p&gt;I plan to post at least one article a week covering topics like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Practical tutorials on building GenAI applications&lt;/li&gt;
&lt;li&gt;Comparisons of different models and frameworks&lt;/li&gt;
&lt;li&gt;Deep dives into concepts like embeddings, tokenization, and attention mechanisms&lt;/li&gt;
&lt;li&gt;Real-world use cases and project walkthroughs&lt;/li&gt;
&lt;li&gt;Opinions on where GenAI is heading and what matters for developers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some posts will be short and focused, others will be longer walkthroughs. The goal is to share useful, honest content from a developer's perspective.&lt;/p&gt;
&lt;h2&gt;Let's Go&lt;/h2&gt;
&lt;p&gt;I'm excited to start writing and sharing. GenAI is moving fast, and the best way to keep up is to build, experiment, and document. That's exactly what this blog is for.&lt;/p&gt;</content><category term="Announcement"/><category term="GenAI"/><category term="LLM"/><category term="machine-learning"/><category term="deep-learning"/><category term="announcement"/></entry></feed>