<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Adithya Bandara on Medium]]></title>
        <description><![CDATA[Stories by Adithya Bandara on Medium]]></description>
        <link>https://medium.com/@adithyabandara?source=rss-720399682122------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*f27jkAmCmoCanlVNz_5u-g.jpeg</url>
            <title>Stories by Adithya Bandara on Medium</title>
            <link>https://medium.com/@adithyabandara?source=rss-720399682122------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:25:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adithyabandara/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Same Bugs, Three Laravels: Where PHP, Rust and Go Catch My Favorite Mistakes]]></title>
            <link>https://adithyabandara.medium.com/same-bugs-three-laravels-where-php-rust-and-go-catch-my-favorite-mistakes-9648c736c4cd?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/9648c736c4cd</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Thu, 03 Dec 2026 06:22:15 GMT</pubDate>
            <atom:updated>2026-12-03T06:22:15.203Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I wrote the classic Laravel bugs on purpose in the brand-new Laravel Rust and Laravel Go. Here’s exactly where each one got caught, and the one that got through all three.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kRCBKp1jWV1hkR821b3ZDA.png" /></figure><p>In the same week, Laravel shipped two new frameworks. Laravel Rust went into beta on 1 December. A day later, Laravel Go followed.</p><p>Most of what I’ve read since then is feature tours and benchmark charts. Useful, but I wanted to answer a more practical question:</p><p><strong>If I make the same mistakes I’ve made in Laravel PHP for years, which of these frameworks actually stops me?</strong></p><p>That matters more than raw speed for most of us. Very few of my client projects were ever slow because of PHP. Many of them had at least one bug that a stricter tool would have caught before a user did.</p><p>So I built the same tiny app twice, once in Laravel Rust and once in Laravel Go. Then I broke both on purpose, one classic bug at a time, and wrote down what happened. Every error message in this article is copied from my terminal. For the PHP column, I describe Laravel PHP’s documented behavior, and I checked the framework source where it mattered.</p><h3>The setup</h3><p>Here’s what I used:</p><ul><li><strong>Laravel Rust:</strong> the laravel-rust crate 0.1.5 (released the morning I wrote this; I ran everything on 0.1.4 first and got identical results), rustc 1.100.1, and the official skeleton from github.com/laravel/rust.</li><li><strong>Laravel Go:</strong> the go.laravel.com module v0.1.1, Go 1.27.3, and the official skeleton from github.com/laravel/go.</li><li><strong>SQLite in both</strong>, so I didn’t need a database server.</li></ul><p>In Rust, switching to SQLite is a Cargo feature (database-sqlite). In Go, you swap the driver in bootstrap/app.go:</p><pre>Drivers: []db.Driver{sqlite.Driver},</pre><p>and point .env at a file:</p><pre>DATABASE_URL=sqlite:storage/database.sqlite</pre><p>I didn’t install the global laravel CLI. Both skeletons say you can run app commands directly, with cargo run -- migrate in Rust and go run . migrate in Go, so that&#39;s what I did.</p><h3>The tiny app, twice</h3><p>Users write posts, and there’s a JSON list of posts with author names. That’s all.</p><p>Here’s the Rust model. Every column is a typed field, and the relationship is a typed field too:</p><pre>#[model]<br>pub struct Post {<br>    pub id: i64,<br>    pub user_id: i64,<br>    pub title: String,<br>    pub body: String,<br>    pub created_at: Timestamp,<br>    pub updated_at: Timestamp,<br>    #[belongs_to]<br>    pub user: BelongsTo&lt;User&gt;,<br>}</pre><p>And the Go model. It’s a plain struct, and the relationship is just a pointer with a tag:</p><pre>type Post struct {<br>    ID        int64     `json:&quot;id&quot;`<br>    UserID    int64     `json:&quot;user_id&quot;`<br>    Title     string    `json:&quot;title&quot;`<br>    Body      string    `json:&quot;body&quot;`<br>    CreatedAt time.Time `json:&quot;created_at&quot;`<br>    UpdatedAt time.Time `json:&quot;updated_at&quot;`<br>    User *User `json:&quot;user,omitzero&quot; model:&quot;belongs_to&quot;`<br>}</pre><p>The biggest difference shows up in the “create a post” handler. In Rust, the input struct declares who may submit it, and ..input copies only the fields it declares:</p><pre>#[laravel::input(fills = Post)]<br>#[validate(authenticated)]<br>pub struct StorePost {<br>    #[validate(required, max_length(120))]<br>    pub title: String,<br>    #[validate(required)]<br>    pub body: String,<br>}<br>pub async fn store(<br>    Authenticated(user): Authenticated&lt;User&gt;,<br>    Valid(input): Valid&lt;StorePost&gt;,<br>) -&gt; laravel::Result&lt;Json&lt;Post&gt;&gt; {<br>    let post = create!(Post { user: &amp;user, ..input }).await?;<br>    Ok(Json(post))<br>}</pre><p>In Go, it’s ordinary code. You validate into a form struct, then copy each field yourself. The login check sits on the route (auth.Authenticate middleware), not on the form:</p><pre>type StorePost struct {<br>    Title string `json:&quot;title&quot;`<br>    Body  string `json:&quot;body&quot;`<br>}<br><br>func (f *StorePost) Rules() validation.Rules {<br>    return validation.For(f,<br>        rule.Field(&amp;f.Title, rule.Required, rule.Max(120)),<br>        rule.Field(&amp;f.Body, rule.Required),<br>    )<br>}<br>func Store(r *web.Request) *web.Response {<br>    form, err := r.Validate[StorePost]()<br>    if err != nil {<br>        return web.Fail(err)<br>    }<br>    user := r.User[models.User]()<br>    post := models.Post{UserID: user.ID, Title: form.Title, Body: form.Body}<br>    if err := model.Create(r, &amp;post); err != nil {<br>        return web.Fail(err)<br>    }<br>    return web.JSON(post)<br>}</pre><p>Both apps have the same four feature tests: posts are listed with authors, guests get a 401, a 121-character title gets a 422, and this one, which matters later:</p><pre>func TestExtraFieldsCannotChangeTheOwner(t *testing.T) {<br>    client := tests.New(t)<br>    me := client.Create(factories.User)<br>    someoneElse := client.Create(factories.User)<br>    client.ActingAs(&amp;me).PostJSON(&quot;/posts&quot;, map[string]any{<br>        &quot;title&quot;:   &quot;Sneaky&quot;,<br>        &quot;body&quot;:    &quot;Trying to post as someone else&quot;,<br>        &quot;user_id&quot;: someoneElse.ID,<br>    }).AssertOK()<br>    post, err := model.Query[models.Post]().First(client.Context())<br>    if err != nil {<br>        t.Fatal(err)<br>    }<br>    if post.UserID != me.ID {<br>        t.Fatalf(&quot;post belongs to user %d, want %d&quot;, post.UserID, me.ID)<br>    }<br>}</pre><p>All green in both. Time to break things.</p><p>My method was simple. For each bug, I started from the clean, passing app, made one small change, ran the build and the tests, saved the full output, and then reverted the change. One bug at a time, so no result depends on another. In Rust, I ran cargo test. In Go, I ran go vet ./... and then go test. I kept the diffs and logs for every experiment, so you can check any line I quote.</p><h3>Friction notes from building it twice</h3><p>Before the bugs, a few honest notes from setting up both apps, because these are the moments that decide whether you keep going on a Saturday afternoon.</p><p><strong>Rust:</strong> the first build is the slow part. On my machine, compiling the skeleton and its tests from cold took about 40 seconds. After that, re-running tests after a small edit took a couple of seconds. My first real friction was a habit from PHP: I put my JSON routes in src/routes/api.rs and protected them with the normal session login. A logged-out request got a 500 instead of a 401:</p><pre>can&#39;t authenticate the user: this route has no request guard and no session; add `Authenticate::via::&lt;G&gt;()` to the route, or move it to the `web` group</pre><p>The api group is stateless, so there&#39;s no session there. The error told me both fixes, and I moved my routes to the web group.</p><p><strong>Go:</strong> after swapping the Postgres driver for SQLite, the first go vet stopped with &quot;updates to go.mod needed&quot;, and go mod tidy fixed it. After that, my four tests passed on the first try. Go&#39;s toolchain felt very familiar: go test ./..., go vet ./..., done.</p><p>One thing PHP developers should know before reading the Go results: in Go, a struct field you don’t set isn’t “missing”. It gets a zero value (an empty string, 0, false, or nil for pointers). That rule explains several of the results below.</p><h3>Bug 1: the column typo</h3><p>In PHP, orderBy(&#39;titel&#39;) fails when someone opens the page and the database complains.</p><p><strong>Rust</strong> refuses to build, because columns are constants on the model:</p><pre>error[E0599]: no associated function or constant named `titel` found for struct `Post` in the current scope</pre><p><strong>Go</strong> builds fine, because the column is a string, OrderBy(&quot;titel&quot;). But my test caught it right away, and the error is lovely:</p><pre>panic: model: Post has no column &quot;titel&quot;: its columns are id, user_id, title, body, created_at, updated_at</pre><p>That’s what the Laravel Go announcement promises: names are checked against the model “when you build the query”, so they fail loudly in tests. Rust catches it at compile time. Go catches it at runtime, but loudly.</p><h3>Bug 2: comparing the wrong type</h3><p>I filtered user_id (an integer) against the string &quot;1&quot;.</p><p><strong>Rust:</strong></p><pre>error[E0277]: a `i64` column can&#39;t be compared with `&amp;str`</pre><p><strong>Go:</strong> WhereEq(&quot;user_id&quot;, &quot;1&quot;) compiled, go vet was happy, and all tests passed. SQLite quietly compared them and returned the right rows. That&#39;s the same as PHP, where the database does the type juggling for you. It&#39;s usually harmless, but nothing will warn you.</p><h3>Bug 3: forgetting the “who may submit this?” rule</h3><p>In PHP, if a FormRequest has no authorize() method at all, Laravel lets the request through. I checked the source: passesAuthorization() returns true when the method doesn&#39;t exist.</p><p><strong>Rust</strong> makes it impossible to forget. I removed #[validate(authenticated)]:</p><pre>error[E0277]: `StorePost` doesn&#39;t say who may submit it<br>  = note: ... add `#[validate(authorize(PostPolicy::update))]` to check a policy, or `#[validate(authenticated)]` to let any logged-in user submit it, or `#[validate(anyone)]` to let anyone submit it</pre><p><strong>Go</strong> takes a different approach. A form struct may have an Authorize method, but it doesn&#39;t have to. Login is usually enforced by middleware on the route, so I removed the auth.Authenticate group instead. It compiled. A guest&#39;s request then crashed with a 500:</p><pre>panic: runtime error: invalid memory address or nil pointer dereference</pre><p>It only crashed because my handler reads user.ID. A handler that never touched the user would have quietly let the guest through. So in Go, the safety net here is the route file plus your tests.</p><h3>Bug 4: the missing required field</h3><p>I “forgot” to set body when creating a post.</p><p><strong>Rust</strong>, at compile time:</p><pre>error[E0080]: evaluation panicked: can&#39;t create a `Post` without `body`</pre><p><strong>Go:</strong> no error anywhere. Go gives every missing struct field its zero value, so the post was saved with an empty string as its body, and every test passed. That one surprised me the most. In PHP, you’d at least get a NOT NULL error from the database. In Go, an empty string isn’t NULL, so the database is happy too.</p><h3>Bug 5: leaking the password hash</h3><p><strong>Rust:</strong> the password field is a PasswordHash type, and removing #[serde(skip)] gives:</p><pre>error: `password` holds a `PasswordHash`, which never leaves the server: mark the field `#[serde(skip)]`</pre><p><strong>Go:</strong> the skeleton’s User stores the hash as a plain string with a json:&quot;-&quot; tag. I changed that tag to json:&quot;password&quot; and printed a user as JSON in a test. The bcrypt hash came out right there in the output (&quot;password&quot;:&quot;$2y$04$...&quot;). That&#39;s exactly like forgetting $hidden in PHP. One tag is all that protects you.</p><h3>Bug 6: forgetting to eager load (the N+1 trap)</h3><p>Laravel PHP will happily lazy-load $post-&gt;user inside a loop and run one query per post, unless you turned on Model::preventLazyLoading().</p><p>Neither new framework lazy-loads. But neither one catches this at compile time either.</p><p><strong>Rust</strong>, at runtime, with a message that tells you the fix:</p><pre>Post::user isn&#39;t loaded; add `.with(Post::user)` to the query</pre><p><strong>Go</strong>, at runtime, with a plain nil pointer, because post.User is simply nil:</p><pre>panic: runtime error: invalid memory address or nil pointer dereference</pre><p>Both are loud, which beats PHP’s silent extra queries. Rust’s message is kinder, though.</p><h3>Bug 7: the one that got through everywhere</h3><p>Now the honest part. I made a bad decision on purpose in both apps: I added user_id to the input struct and used the client&#39;s value as the owner.</p><p>Both compiled. Both frameworks did exactly what I told them. Only my own test stopped it:</p><pre>Rust:  assertion `left == right` failed<br>         left: 2<br>        right: 1<br>Go:    post belongs to user 2, want 1</pre><p>Neither compiler can know who <em>should</em> own a post. That’s a business decision, not a type. This is the most important lesson of the experiment, in every language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ILyooySSN8xydH6uV5GUg.png" /><figcaption>Where each bug gets caught</figcaption></figure><h3>What the matrix taught me</h3><p>Put the results side by side and a clear pattern appears. A quick note on the PHP column: I didn’t run a PHP app for this article. It shows how Laravel PHP behaves by default, based on its documentation and source code, and assumes you haven’t added extra safety nets like preventLazyLoading() or a static analyser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d1ZBQlcStL5i56NSV-6EVQ.png" /><figcaption>When does the bug get caught?</figcaption></figure><ol><li><strong>Laravel Rust turns “remember to” into “you must declare”.</strong> Authorization, allowed columns, required fields and secret fields are all part of the types. Five of my seven bugs never compiled.</li><li><strong>Laravel Go keeps things plain and pushes checks to runtime, and they’re loud when they live in the framework.</strong> The column typo got a perfect error message in tests. But wherever Go’s own rules apply (zero values, string tags, optional methods), the framework can’t help. That’s where my “silent” results came from.</li><li><strong>Laravel PHP relies the most on your memory.</strong> $fillable, $hidden, authorize() and preventLazyLoading() all work well, as long as you remember them.</li><li><strong>Business logic is your job in all three.</strong> Keep writing feature tests, and test the sneaky cases on purpose.</li></ol><p>Mass assignment is a nice example of the three philosophies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMqAbPEtPQDgMJhm4UaHnA.png" /><figcaption>Three ways to keep extra fields out</figcaption></figure><h3>So which one should a PHP developer try?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pgrnr4t0h3lC9dT4fjG5NQ.png" /><figcaption>Pick your flavour</figcaption></figure><p>Taylor Otwell’s own framing is “choose your flavor”, and after this experiment I agree it really is a flavor choice:</p><ul><li><strong>Pick Laravel Rust</strong> if you want the compiler to do as much checking as possible and you’re happy to learn Rust’s syntax and its macro-heavy style.</li><li><strong>Pick Laravel Go</strong> if you want simple, readable code and fast feedback. On my 8-core machine, a full Go rebuild took about 20 seconds and a re-run of the tests after a small edit took about a second. Those are rough single runs, not benchmarks. Just write good tests, because they’re your safety net for more of the bug list.</li></ul><p>Both are 0.1.x betas, both docs warn that APIs can change before 1.0, and neither can use your Composer packages. I’d still keep client projects on Laravel PHP for now. As a weekend learning project, though, building the same small app in both and breaking it on purpose taught me more than any feature tour.</p><p>That’s how I like to learn: go from IDEA to EXECUTION quickly, then break it and see what it teaches you. #BuildInPublic</p><p><strong>So, over to you: if you had to pick one of the new Laravels today, Rust or Go, which would you choose, and which Laravel bug would you most like a compiler to catch for you? Tell me in the comments, and I’ll test it in both.</strong></p><p><em>Adithya Bandara (@adithyabandara)</em></p><h3>Sources</h3><ul><li>Taylor Otwell, “Introducing Laravel Rust”, Laravel blog, 1 Dec 2026: <a href="https://laravel.com/blog/introducing-laravel-for-rust">https://laravel.com/blog/introducing-laravel-for-rust</a></li><li>Taylor Otwell, “Introducing Laravel Go”, Laravel blog, 2 Dec 2026: <a href="https://laravel.com/blog/introducing-laravel-for-go">https://laravel.com/blog/introducing-laravel-for-go</a></li><li>Laravel Rust documentation: <a href="https://laravel.com/rust/docs">https://laravel.com/rust/docs</a></li><li>Laravel Go documentation: <a href="https://laravel.com/go/docs">https://laravel.com/go/docs</a></li><li>laravel-rust crate (0.1.5): <a href="https://crates.io/crates/laravel-rust">https://crates.io/crates/laravel-rust</a></li><li>go.laravel.com module (v0.1.1), source: <a href="https://github.com/laravel/go-framework">https://github.com/laravel/go-framework</a></li><li>Application skeletons: <a href="https://github.com/laravel/rust">https://github.com/laravel/rust</a> and <a href="https://github.com/laravel/go">https://github.com/laravel/go</a></li><li>Laravel PHP FormRequest::passesAuthorization(): <a href="https://github.com/laravel/framework/blob/13.x/src/Illuminate/Foundation/Http/FormRequest.php">https://github.com/laravel/framework/blob/13.x/src/Illuminate/Foundation/Http/FormRequest.php</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9648c736c4cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Ship, Explained Over Tea]]></title>
            <link>https://adithyabandara.medium.com/claude-ship-explained-over-tea-1f3cd411c782?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f3cd411c782</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 15:48:04 GMT</pubDate>
            <atom:updated>2026-11-28T15:48:04.015Z</atom:updated>
            <content:encoded><![CDATA[<h3>What happens after you open a pull request, in plain words.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X_vxzq61PZYWvE3Tz66P-w.png" /></figure><p>You push your code. You open a pull request. You feel done.</p><p>Then the real work starts. A test fails. A reviewer leaves six comments. Someone else merges to main and now your code has a conflict. And you were already thinking about the next task.</p><p>On November 23, 2026, Anthropic launched something for exactly this moment: <strong>Claude Ship</strong>. It’s in beta, and I think it’s worth understanding even if you never use it, because it shows where software teams are heading.</p><p>So pour a cup of tea. I’ll use plain words and explain every strange term the first time it shows up. Everything below comes from Anthropic’s launch post, their docs and TechCrunch. Code examples are copied from the docs.</p><p>Let’s go.</p><h3>First, the words you need</h3><p>Four small terms. Then the rest is easy.</p><ul><li><strong>Repository (repo):</strong> the folder where a project’s code lives, with its full history.</li><li><strong>Pull request (PR):</strong> a request that says, “Here are my changes. Please check them and add them to the main code.” People discuss the change there.</li><li><strong>CI check:</strong> CI means “continuous integration”. A robot runs your tests and other checks every time you push code. A “failing check” is a red cross on your PR.</li><li><strong>Merge:</strong> adding your changes into the main branch. Once merged, the change is part of the project.</li></ul><p>Now the problem.</p><h3>The problem: life after you open a PR</h3><p>Anthropic’s launch post says it well. You open a PR and start on the next thing. Then the review comes back. So you stop, dig back into the old code, push a fix, and wait for the review to run again. Then you go find someone to approve it.</p><p>Addy Osmani lists the same follow-up jobs: CI fails, a review comes back with six comments, a merge into main creates a conflict. Each one is tiny. Each one pulls you out of your focus work.</p><p>There’s a second reason. Most teams want a person to approve every change, and that’s easy when people write every line. But many developers now build with agents (AI that writes code for you). On the Claude Code team, Claude writes most of the code. So the waiting after the PR becomes the slow part.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HRnep_D5y6MsqwDqGHxikg.png" /><figcaption>Life after you open a PR, before vs. after Claude Ship</figcaption></figure><p>Anthropic’s goal: ship code as fast as teams write it.</p><h3>What Claude Ship actually is</h3><p>Claude Ship is not one tool. It’s <strong>three agents</strong> that work after your PR opens:</p><ol><li><strong>Code Review</strong> finds problems.</li><li><strong>PR Steward</strong> fixes problems.</li><li><strong>Claude Approvals</strong> decides who must sign off.</li></ol><p>An “agent” here just means an AI worker that can take steps on its own, like reading code or pushing a fix, not only chat.</p><p>Code Review was already generally available. PR Steward and Claude Approvals are new, and in beta (still being tested).</p><p>Claude Ship is different from Claude Code. Claude Code helps you <em>write</em> code. Claude Ship works <em>after</em> the PR opens, and you can use it without Claude Code. You also don’t have to adopt all three agents. Teams add them one at a time, repo by repo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eynD3yO0wDhA2NDNBFUKOQ.png" /><figcaption>The three agents, and what stays with you</figcaption></figure><h3>Agent 1: Code Review</h3><p>Think of Code Review as a team of careful readers who check your change <em>and</em> the code around it. The real mechanism, from the docs: a review runs on Anthropic’s servers in four steps.</p><ol><li><strong>Find.</strong> Several agents read the diff (the lines you changed) and the code around it, in parallel.</li><li><strong>Verify.</strong> A check-the-checkers step tests each possible bug against the code and throws out false alarms (a <em>false positive</em> is a “bug” that isn’t real). The launch post says findings are “adversarially verified”. As I read it, that means the check tries to knock each finding down before you ever see it.</li><li><strong>Rank.</strong> The remaining findings are de-duplicated and ranked by how serious they are.</li><li><strong>Post.</strong> The results land on your PR as comments on the exact lines, plus a summary and a check.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMH9I1eAQOFYftn4pLWM0Q.png" /><figcaption>Inside a Code Review: find, verify, rank, post</figcaption></figure><p>Each finding gets one of three labels:</p><ul><li>🔴 <strong>Important:</strong> a bug that should be fixed before merging.</li><li>🟡 <strong>Nit:</strong> a small issue, worth fixing but not blocking. (“Nit” is short for nitpick.)</li><li>🟣 <strong>Pre-existing:</strong> a bug that was already in the code and wasn’t introduced by your PR.</li></ul><p>Each finding states the problem, the trigger and the fix in a few sentences. By default, Code Review looks for bugs that would break production, not formatting taste.</p><p><strong>Quick, Standard or Deep?</strong> You choose how thorough reviews are. Quick is lighter, faster and cheaper. Standard is the balanced default. Deep is the most thorough, slowest and most expensive. You can set it per repo, such as Quick for a routine codebase and Deep for a critical one.</p><p><strong>Teaching it your rules with REVIEW.md.</strong> This is a plain Markdown file at the top of your repo, with instructions only for reviews. The docs show examples like “Report at most five Nits per review”. One detail I like: Code Review reads REVIEW.md from your main branch, never from the PR’s own changes. So a PR can’t quietly rewrite the rules that judge it.</p><p>Two things it does <em>not</em> do. It doesn’t approve or block your PR on its own. And it reads the code without building or running it. The docs say a review with no findings doesn’t mean your code is error-free or secure.</p><h3>Agent 2: PR Steward</h3><p>If Code Review is the inspector, PR Steward is the helper who fixes small things while you’re away.</p><p>PR Steward watches your open PR. It works in a cloud session (a computer Anthropic runs for it) and handles three kinds of trouble:</p><ul><li><strong>A failing CI check.</strong> It tries a fix when the cause is in code your PR touches.</li><li><strong>A merge conflict.</strong> This happens when two people change the same lines, and Git can’t decide which version wins. Steward merges the main branch into yours and tries to resolve the clash.</li><li><strong>Review feedback.</strong> From people, or from review bots like Code Review. For small, clear requests it pushes a change. For big or design-level ones, it replies instead.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tBdY_I_ugjeUmLUNDZ1rUA.png" /><figcaption>The PR Steward fix loop</figcaption></figure><p>Here’s the part I like most: it doesn’t work in secret. After every push, it comments with what it changed and how to undo it. The docs show a sample (wording varies):</p><blockquote><em>“Pushed a1b2c3d: parse_date now accepts a date with no time zone… To undo it, revert a1b2c3d, or remove the claude-pr-steward-watching label to stop me entirely.”</em></blockquote><p>You stay in charge with two comments:</p><ul><li>@claude plus an instruction steers it. For example, &quot;only fix the lint failures.&quot;</li><li>@claude stop makes it step back.</li></ul><p><strong>Manual or on by default?</strong> In <em>Manual</em> mode, nothing happens until someone with write access comments @claude steward. In <em>On</em> mode, it starts by itself when a PR opens. The product page suggests starting Manual, then switching to On once your team trusts it. It skips drafts, PRs from forks, PRs opened by bots, and authors without write access.</p><p><strong>What it doesn’t do.</strong> Steward is designed not to approve or merge. The docs say Anthropic’s service refuses requests to approve a PR or change branch protection. Merging is left to GitHub’s rules. So use <em>branch protection</em>: a GitHub setting like “this branch needs two approvals and passing checks before anything merges”.</p><p>One caution from Osmani: Steward reads comments, so it can be fooled by what people write. Use it where you trust your collaborators.</p><h3>Agent 3: Claude Approvals</h3><p>This one is the most interesting. TechCrunch thinks so too, because it’s the agent that can approve code changes on its own.</p><p>Start with an old idea. GitHub has a file called <strong>CODEOWNERS</strong>. It lists who owns which files, so the right people must review changes to them. Anthropic says Claude Approvals works like “a smarter CODEOWNERS file”.</p><p>You write a <strong>policy file</strong> in your repo: .claude/approvals.yml. For each set of files, it says how many people must approve and whether Claude may approve too. (YAML is a simple text format for settings.)</p><p>Here’s the example from Anthropic’s docs. I’ve copied it exactly:</p><pre># .claude/approvals.yml<br>version: 1<br>mode: observe<br>rules:<br>  - purpose: &quot;A change takes two people. When Claude&#39;s review passes, one is enough and Claude approves.&quot;<br>    paths: [&quot;**&quot;]<br>    verdict: { claude: comments, seats: 2 }<br>    override:<br>      - { if: &quot;claude/code_review = pass&quot;, verdict: { claude: approves, seats: 1 } }<br>  - purpose: &quot;A change to the review rules takes two people.&quot;<br>    paths: [&quot;**/.claude/**&quot;]<br>    nested: inherit<br>    verdict: { claude: comments, seats: 2 }</pre><p>Let me translate it:</p><ul><li>paths says which files a rule covers. [&quot;**&quot;] means every file.</li><li>seats: 2 means two people must approve. The author can fill one seat.</li><li>claude: comments means Claude comments but doesn&#39;t approve.</li><li>override is the &quot;unless&quot; part. If Code Review passes, one person is enough and Claude can approve.</li><li>The second rule says changes to the review rules themselves take two people.</li></ul><p>If two rules match one file, Approvals takes the strictest verdict. So a change under .claude/ needs two people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iGGkPKQhJOQSRkgmmp6rOQ.png" /><figcaption>How Claude Approvals decides, observe vs. enforce</figcaption></figure><p><strong>Classifiers: your own questions.</strong> A <em>classifier</em> is a small question that a Claude model answers about a change. It has a name, a question and a fixed list of answers. One comes built in: claude/code_review answers pass or fail (pass means no Important finding is still open). You can also write your own. The docs show one called change_risk, which asks &quot;How risky is this change to ship?&quot; and answers low, medium or high. A rule can then say, for instance, &quot;if change_risk is low, one person is enough.&quot;</p><p><strong>Observe mode vs. enforce mode.</strong> This is the safety net.</p><ul><li>In <strong>observe mode</strong>, the Claude Approvals check shows what the policy <em>would</em> decide. Claude approves nothing, and the check normally doesn’t block anything. It’s a rehearsal.</li><li>In <strong>enforce mode</strong>, the check can block a merge, and Claude can approve where your policy allows. This is the default if there’s no mode line.</li></ul><p>Anthropic recommends observe mode first. Osmani’s tip: after a week or two, compare what the policy said with what your reviewers did. If it “would approve” but they asked for changes, add a rule that needs a person.</p><p>To enforce, delete the mode: observe line and merge. Then make &quot;Claude Approvals&quot; a <em>required status check</em> in GitHub, so a merge can&#39;t happen until it passes.</p><h3>The two commands for developers: /ship and /steward</h3><p>Not an admin? Try it on your own PRs today. Type /ship in Claude Code, in a terminal, in your repo. From the docs, it:</p><ol><li>Commits your work, pushes your branch and opens the PR as you.</li><li>Reviews your change.</li><li>Starts a <strong>watch</strong>: it keeps checking your PR and fixes failing checks, conflicts and comments.</li><li>You merge it yourself.</li></ol><p>/steward is the shorter version for a PR that&#39;s already open: it skips the review and starts the watch.</p><p>Two cautions. First, /ship can commit all your uncommitted files, so run git status first. (It skips files whose names look like secrets, such as .env.) Second, the watch runs on <em>your</em> machine, in <em>your</em> session, on <em>your</em> usage. Close your laptop and it stops. On GitHub it ends when the PR is merged or closed, or after seven days.</p><h3>For admins: the rollout ladder</h3><p>If you run a team, the advice is simple: one repo, one agent at a time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1rQAIRZs82b2uiTCabvXQ.png" /><figcaption>The admin rollout ladder</figcaption></figure><ol><li><strong>Code Review</strong> on one repo, with a monthly spend limit. Watch your average cost per review.</li><li>Add <strong>PR Steward</strong> in Manual mode.</li><li>Switch Steward to On once the team trusts it.</li><li>Add an <strong>approval policy in observe mode</strong>.</li><li>When it matches your human reviewers, <strong>enforce it</strong> and require the check in GitHub.</li><li>Add more repos.</li></ol><p>It works with the branch protection and required checks you already have.</p><h3>Who can use it, what it costs, and the limits</h3><p><strong>Who:</strong> Claude Team and Enterprise plans, with repositories on GitHub. Not available to organizations using Zero Data Retention (the AI company keeps no data after processing), the HIPAA configuration (setup for US health-data rules), or customer-managed encryption keys (keys you control yourself).</p><p><strong>Price:</strong> it’s usage-based. Each agent is billed on tokens (the small chunks of text AI models read and write) through your organization’s usage credits. Cost depends on PR count and size, review level, how often reviews run, and how much Steward does. Admins can set spend limits for Code Review and PR Steward. Claude Approvals has no base charge, but classifiers are billed, and a policy that uses Claude’s review triggers a billed Code Review, even in observe mode. /ship counts as normal Claude Code usage. Eligible Enterprise organizations can claim at least $10,000 in credits by January 15, 2027 (terms apply).</p><h3>The results Anthropic reports</h3><p>I won’t make up numbers. Here is exactly what the launch post says. On the Claude Code team, where Claude’s review is one layer of a broader process, merged PRs more than doubled from June to September, while the share reverted fell by more than 40%. (“Reverted” means a change was rolled back after merging.)</p><p>Notice the wording: Claude’s review is <em>one layer</em>. The post doesn’t say Claude Ship alone caused this, and gives no raw counts, so I won’t chart it.</p><p>They also share a small story: a docs fix went from a customer’s confusion to merged the same evening. Claude opened the PR, Code Review found nothing blocking, a docs reviewer signed off, and Claude Approvals passed.</p><h3>The honest risks</h3><p>I trust tools more when someone tells me where they break. So:</p><ul><li><strong>It can miss bugs.</strong> Anthropic says Claude Ship may miss bugs, security vulnerabilities and other issues. Keep your tests, scanners and human reviewers.</li><li><strong>Approvals can open a door.</strong> Claude’s approval can count as a real approval on GitHub, so one required approval may be satisfied by Claude alone. The author can fill a seat, so seats: 1 can mean nobody else looks. With auto-merge and a loose policy, a change can merge with nobody acting. The docs also warn that text inside a PR can sway Claude&#39;s review. So guard sensitive paths, like auth and billing, with a rule that always needs a person.</li><li><strong>The watch needs trust.</strong> Run /ship only where you trust everyone who can merge to your base branch.</li><li><strong>Humans stay responsible.</strong> Osmani: whoever called the agent is responsible for the change, as if they typed it themselves.</li></ul><h3>Who does what, at a glance</h3><ul><li><strong>Find bugs.</strong> Claude Ship: Code Review. Still a human: decide what matters, tune REVIEW.md.</li><li><strong>Fix CI, conflicts, comments.</strong> Claude Ship: PR Steward (small, clear fixes). Still a human: design decisions, big changes.</li><li><strong>Decide who approves.</strong> Claude Ship: Claude Approvals follows your policy. Still a human: write the policy and branch rules.</li><li><strong>Merge.</strong> Claude Ship: not Steward; depends on your rules. Still a human: usually you.</li></ul><h3>Recap</h3><ul><li>After you open a PR, small jobs pull you away from real work.</li><li>Claude Ship is three agents: Code Review finds, PR Steward fixes, Claude Approvals applies your policy.</li><li>Code Review verifies its findings and ranks them Important, Nit or Pre-existing. REVIEW.md tunes it.</li><li>PR Steward fixes CI, conflicts and feedback, says how to undo its work, and isn’t designed to approve or merge.</li><li>Claude Approvals is a smarter CODEOWNERS. Start in observe mode, then enforce.</li><li>/ship lets any developer try it today. Admins roll it out one repo at a time.</li><li>It’s beta, usage-based, for Team and Enterprise on GitHub, and it can miss bugs.</li></ul><p>That’s the IDEA. The EXECUTION is the interesting part.</p><p><strong>Question for you:</strong> if an AI could approve some of your team’s PRs, which kind of change would you let it approve on its own, and which would you always keep for a human? Tell me in the comments.</p><h3>Sources</h3><ul><li><a href="https://claude.com/resources/articles/introducing-claude-ship">Anthropic, “Introducing Claude Ship”</a></li><li><a href="https://claude.com/product/claude-ship">Anthropic, Claude Ship product page</a></li><li><a href="https://techcrunch.com/2026/11/23/anthropic-launches-claude-ship-letting-ai-agents-review-fix-and-approve-code-changes/">TechCrunch (Sarah Perez), “Anthropic launches Claude Ship, letting AI agents review, fix, and approve code changes”, Nov 23, 2026</a></li><li><a href="https://claude.dev/blog/the-work-after-you-open-a-pr/">Addy Osmani, “A practical guide to shipping with Claude Code”, Nov 24, 2026</a></li><li><a href="https://code.claude.com/docs/en/claude-ship">Claude Code docs: Claude Ship</a></li><li><a href="https://code.claude.com/docs/en/code-review">Claude Code docs: Code Review</a></li><li><a href="https://code.claude.com/docs/en/code-review-customize">Claude Code docs: Customize Code Review (REVIEW.md)</a></li><li><a href="https://code.claude.com/docs/en/code-review-pull-requests">Claude Code docs: Read and request reviews (severity levels)</a></li><li><a href="https://code.claude.com/docs/en/pr-steward">Claude Code docs: PR Steward</a></li><li><a href="https://code.claude.com/docs/en/pr-steward-pull-requests">Claude Code docs: Work with PR Steward on a pull request</a></li><li><a href="https://code.claude.com/docs/en/pr-steward-security">Claude Code docs: What PR Steward can access</a></li><li><a href="https://code.claude.com/docs/en/approvals">Claude Code docs: Claude Approvals</a></li><li><a href="https://code.claude.com/docs/en/approvals-policy">Claude Code docs: Approvals policy file reference</a></li><li><a href="https://code.claude.com/docs/en/approvals-classifiers">Claude Code docs: Approvals classifiers</a></li><li><a href="https://code.claude.com/docs/en/approvals-setup">Claude Code docs: Set up Claude Approvals</a></li><li><a href="https://code.claude.com/docs/en/approvals-github-rules">Claude Code docs: Approvals and your GitHub rules</a></li><li><a href="https://code.claude.com/docs/en/ship-command">Claude Code docs: /ship and /steward</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f3cd411c782" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Harness Is Half the Agent: A Practical Guide to AI Agent Harnesses]]></title>
            <link>https://adithyabandara.medium.com/the-harness-is-half-the-agent-a-practical-guide-to-ai-agent-harnesses-baa74b20ca3f?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/baa74b20ca3f</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[future-of-work]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 18:43:12 GMT</pubDate>
            <atom:updated>2026-10-24T18:43:12.232Z</atom:updated>
            <content:encoded><![CDATA[<h3>What a harness is, how the agent loop works, which harnesses matter right now, and how to pick or build one without guessing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNQeP5ToTlyqKwME9sj5VQ.png" /></figure><p>Every few weeks someone asks me which model they should use for their agent. Lately I’ve started asking a different question back: which harness?</p><p>A model on its own doesn’t do much. It reads text and predicts more text, sometimes including a request to use a tool. Everything that turns that into something that can read your files, run commands, plan a task and stop at the right time is the harness. In 2026, the harness is where a lot of the real engineering happens.</p><p>This guide starts from the basics and works up to a small harness you can read in a few minutes. I’ve kept every number tied to a source, and I’ve flagged the places where the evidence disagrees.</p><h3>Part 1: The basics</h3><h3>What is an agent harness?</h3><p>LangChain puts it in one line: “Agent = Model + Harness. If you’re not the model, you’re the harness.” (<a href="https://www.langchain.com/blog/the-anatomy-of-an-agent-harness">LangChain, S1</a>)</p><p>Their longer definition is worth reading too: “A harness is every piece of code, configuration, and execution logic that isn’t the model itself. A raw model is not an agent. But it becomes one when a harness gives it things like state, tool execution, feedback loops, and enforceable constraints.” (<a href="https://www.langchain.com/blog/the-anatomy-of-an-agent-harness">S1</a>)</p><p>In practice, a harness usually includes:</p><ul><li>The loop, which calls the model, runs the tools it asks for, and feeds the results back.</li><li>Context and memory. Context is everything the model sees on each call, such as instructions, history and tool results. Memory is what survives between calls or sessions.</li><li>Planning, often a simple todo list the agent keeps for itself.</li><li>Subagents, which are smaller agents the main one hands work to, each with its own separate context.</li><li>Safety controls: a sandbox (an isolated environment where commands can’t touch the rest of your machine), permissions and approvals, and hooks (your own code that runs at fixed points, such as before a tool runs).</li><li>Tracing and evaluations: a record of every model and tool call, and tests you use to measure and improve the agent.</li></ul><p>Harrison Chase, LangChain’s CEO, sums up the purpose: “The main job of a harness is to bring context to the model at the right point in time.” (<a href="https://sequoiacap.com/podcast/owning-your-intelligence-starts-with-the-harness">Sequoia podcast, S11</a>)</p><p>The word isn’t new, either. Anthropic used to call it “scaffolding”: “the software scaffolding around it. This scaffolding is responsible for generating the prompts that go into the model, parsing the model’s output to take action, and managing the interaction loop” (<a href="https://www.anthropic.com/engineering/swe-bench-sonnet">Anthropic, S7</a>). Today Anthropic calls its Claude Agent SDK “a powerful, general-purpose agent harness” (<a href="https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents">S4</a>) and “the agent harness that powers Claude Code” (<a href="https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk">S5</a>). OpenAI uses the phrase “harness engineering” for designing the environment, intent and feedback loops around Codex (<a href="https://openai.com/index/harness-engineering/">OpenAI, S9</a>, read via search excerpt).</p><h3>Harness vs framework vs runtime</h3><p>These three words get mixed up all the time. Harrison Chase draws the line like this (<a href="https://www.langchain.com/blog/agent-frameworks-runtimes-and-harnesses-oh-my">S2</a>):</p><ul><li>A framework gives you building blocks for making agents, such as model wrappers and tool interfaces. LangChain is his example.</li><li>A runtime handles durable execution, meaning work that can pause, save its state, resume after a crash, stream output and wait for a human. LangGraph is his example.</li><li>A harness comes with “batteries included”: default prompts, a loop, planning tools, a filesystem and subagents. Deep Agents is his example.</li></ul><p>He’s honest that the lines blur: “I don’t think there is a clear definition of framework vs runtime vs harness,” and “LangGraph is probably best described as both a runtime and a framework” (<a href="https://www.langchain.com/blog/agent-frameworks-runtimes-and-harnesses-oh-my">S2</a>). I find it most useful as a spectrum, from “build it yourself” to “it works out of the box”.</p><p>One more point that surprised me: even features that feel like part of the model often aren’t. Chase writes that built-in web search in the OpenAI and Anthropic APIs is “not ‘part of the model’. Rather … a lightweight harness that sits behind their APIs” (<a href="https://www.langchain.com/blog/your-harness-your-memory">S8</a>).</p><h3>Part 2: How an agent actually runs</h3><h3>The agent loop</h3><p>At its simplest, an agent is “an LLM running in a loop calling tools,” which Chase calls “the core architecture behind pretty much every agent out there today” (<a href="https://sequoiacap.com/podcast/owning-your-intelligence-starts-with-the-harness">S11</a>). Anthropic describes the loop as “gather context -&gt; take action -&gt; verify work -&gt; repeat” (<a href="https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk">S5</a>).</p><p>Here is that loop step by step:</p><ol><li>A task comes in from the user.</li><li>The harness builds the context: the system prompt, instruction files such as AGENTS.md or CLAUDE.md, memory, the list of available tools, and the history so far.</li><li>The model is called.</li><li>Did the model ask for a tool? If not, the harness checks whether it should stop.</li><li>Permission check. A policy, a hook or a human decides whether the tool call is allowed.</li><li>If it’s denied, the denial goes back to the model as the tool’s result, so the model can try something else.</li><li>If it’s allowed, the tool runs inside the sandbox.</li><li>The result is added to the history.</li><li>Memory and todos are updated, and the history is compacted (summarized to save space) if it’s getting close to the model’s context limit.</li><li>Stop or continue? The loop stops when there are no more tool calls, a step or budget limit is hit, or a guardrail (a safety rule) is triggered. Otherwise it goes back to step 2.</li></ol><p>Running alongside all of this, tracing records every model and tool call.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kupv8NtTg9bKVcNLufJpsw.png" /></figure><p>This flow is my own summary of what Anthropic (<a href="https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk">S5</a>), LangChain (<a href="https://sequoiacap.com/podcast/owning-your-intelligence-starts-with-the-harness">S11</a>), the OpenAI Agents SDK docs (<a href="https://openai.github.io/openai-agents-python/">S12</a>) and Claude Code’s hooks documentation (<a href="https://code.claude.com/docs/en/hooks">S18</a>) describe.</p><h3>Why a plain loop isn’t enough</h3><p>LangChain points out that a basic loop “can yield agents that are ‘shallow’.” Tools like Deep Research, Manus and Claude Code go further with four additions: a planning tool, subagents, a filesystem and a detailed system prompt (<a href="https://blog.langchain.com/deep-agents/">LangChain, S10</a>).</p><p>Long tasks add another problem. Anthropic’s SDK compacts history automatically, so that it “summarizes previous messages when the context limit approaches” (<a href="https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk">S5</a>). But Anthropic also says “compaction isn’t sufficient” for long-running work. Their pattern uses an initializer agent that sets up a startup script, a progress log, a feature list and a first git commit. A coding agent then makes steady progress in each new session (<a href="https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents">S4</a>).</p><h3>The architecture in layers</h3><p>I find it easiest to picture a harness-based agent as five layers:</p><ol><li>Model: the LLM itself, its reasoning-effort setting, and its tool-calling API.</li><li>Harness: the loop, system prompt and instruction files, context management and compaction, planning, subagents, permissions, hooks, guardrails, sessions and memory, and skills.</li><li>Tools: built-in tools for files, shell and the web; your own custom functions; MCP servers (MCP, the Model Context Protocol, is a standard way to plug outside tools into an agent); and other agents used as tools.</li><li>Environment and sandbox: the workspace filesystem, an OS-level sandbox, containers or remote sandboxes, network isolation, and a browser.</li><li>Observability and evaluation, which spans all the layers: tracing, benchmark harnesses, and cost and token tracking.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrY1xteWNLbhJqXrAVKgXg.png" /></figure><p>This layering is my synthesis of the harness docs listed in the sources (S1, S12, S14 to S19).</p><h3>Part 3: The harnesses that matter in 2026</h3><p>All versions and GitHub star counts below were checked on 24 October 2026. Versions change almost daily, so treat them as a snapshot.</p><p>Vendor coding agents (run in your terminal or IDE):</p><ul><li>Claude Code (Anthropic), version 2.1.310 on npm. It’s proprietary: its license file says use “is subject to Anthropic’s Commercial Terms.” It has a sandboxed shell with filesystem and network isolation (Seatbelt on macOS, bubblewrap on Linux) and lifecycle hooks such as PreToolUse and PostToolUse (<a href="https://code.claude.com/docs/en/sandboxing">Claude Code docs, S18</a>).</li><li>Codex CLI (OpenAI), version 0.164.0, Apache-2.0 licensed and written in Rust. Its OS sandbox uses Seatbelt on macOS and bubblewrap on Linux and WSL2 (<a href="https://developers.openai.com/codex/concepts/sandboxing">Codex docs, S17</a>).</li><li>Gemini CLI (Google), version 0.65.0, Apache-2.0, TypeScript. It sandboxes with Seatbelt on macOS or a Docker/Podman container (<a href="https://www.geminicli.com/docs/cli/sandbox">Gemini CLI docs, S19</a>).</li></ul><p>Open-source coding agents:</p><ul><li>OpenHands, MIT, can run each conversation in its own Docker sandbox or on VMs.</li><li>Cline, Apache-2.0, runs one engine across the CLI, desktop, VS Code and JetBrains.</li><li>Goose, Apache-2.0, works with 15+ model providers and 70+ MCP extensions.</li><li>Aider, Apache-2.0, works with cloud and local models.</li></ul><p>These descriptions come from each project’s README.</p><p>General-purpose harnesses and SDKs (an SDK is a library you use to build your own agent):</p><ul><li>Claude Agent SDK gives you “the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript” (<a href="https://docs.claude.com/en/docs/agent-sdk/overview">S13</a>). GitHub labels the code MIT, but the README says commercial terms govern its use.</li><li>OpenAI Agents SDK (0.24.0, still pre-1.0) offers handoffs, guardrails, sessions, human-in-the-loop, tracing and now Sandbox agents (<a href="https://openai.github.io/openai-agents-python/">S12</a>).</li><li>Google ADK (2.13.0) supports Python, TypeScript, Go, Java and Kotlin, and summarizes older conversation turns to manage context (<a href="https://google.github.io/adk-docs/">S14</a>).</li><li>LangChain Deep Agents (0.7.32) is model-agnostic and built on LangGraph.</li><li>Microsoft Agent Framework (1.23.0) is “the direct successor” to AutoGen and Semantic Kernel, and includes a batteries-included agent with planning, compaction and tool approval (<a href="https://learn.microsoft.com/en-us/agent-framework/overview/agent-framework-overview">S15</a>).</li><li>Pydantic AI Harness adds memory, guardrails, subagents, planning, durable execution and a Docker sandbox to Pydantic AI (<a href="https://pydantic.dev/docs/ai/harness/overview/">S16</a>).</li><li>smolagents (Hugging Face) and CrewAI are lighter frameworks with agent features.</li></ul><h3>Comparison table</h3><p>I’ve included only the features I could confirm from each project’s docs or README. “Not confirmed” means I didn’t find it in what I read, not that the feature is missing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iWmseTkDHHqK5nfjh6h9_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dXtYhLMBImbEoipM8oAPYg.png" /></figure><h3>How popular are they?</h3><p>GitHub stars on 24 October 2026: Claude Code 153,264, Codex 130,787, Gemini CLI 107,805, OpenHands 91,730, Cline 70,812 and CrewAI 60,063 (<a href="https://api.github.com/repos/anthropics/claude-code">GitHub API</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c8-JngP_80ea_ps8o9sdnw.png" /></figure><p>Downloads tell a slightly different story. Over the last month, @openai/codex had 84.3M npm downloads, @anthropic-ai/claude-code 45.6M, LangGraph 44.8M on PyPI and claude-agent-sdk 29.8M on PyPI (<a href="https://api.npmjs.org/downloads/point/last-month/@openai/codex">npm</a>, <a href="https://pypistats.org/api/packages/langgraph/recent">pypistats</a>). Keep in mind that downloads include automated installs, stars aren&#39;t usage, and Claude Code&#39;s npm number undercounts because installing it through npm is now deprecated.</p><p>On real usage, OpenAI says Codex has more than 5 million weekly active users as of 2 June 2026 (<a href="https://openai.com/index/codex-for-knowledge-work/">OpenAI, S27</a>, via search excerpt). Anthropic reported Claude Code passing $2.5B in run-rate revenue in February 2026 (<a href="https://www.cnbc.com/2026/04/09/openai-chatgpt-pro-subscription-anthropic-claude-code.html">CNBC, S28</a>), but it hasn’t published a user count.</p><h3>Part 4: Does the harness really matter?</h3><h3>The case that it matters a lot</h3><p>Terminal-Bench 2.0 is a benchmark of 89 command-line tasks. On it, the same model can score very differently depending on the harness. These scores were computed from the official leaderboard dataset (<a href="https://huggingface.co/datasets/harborframework/terminal-bench-2-leaderboard">Terminal-Bench 2.0 dataset, S20</a>):</p><ul><li>Claude Opus 4.6: 60.4% in Copilot CLI vs 82.0% in Pilot, a spread of 21.6 points</li><li>Gemini 3.1 Pro: 59.8% in Google’s own Gemini CLI vs 80.2% in TongAgents, 20.5 points</li><li>GPT-5.5: 66.1% in clnkr vs 88.1% in Wecode, 22.0 points</li><li>GPT-5.3-Codex: 64.7% in Terminus 2 vs 81.4% in CodeBrain-1.5, 16.6 points</li></ul><p>LangChain also showed this directly. With GPT-5.2-Codex held fixed, it raised Deep Agents from 52.8% to 66.5% by changing only the harness. The changes were self-verification loops, context injection, loop detection, time-budget warnings and reasoning-budget scheduling (<a href="https://www.langchain.com/blog/improving-deep-agents-with-harness-engineering">LangChain, S3</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AfLdko-lQ-00l_DviDBymw.png" /></figure><h3>The counter-evidence</h3><p>The evidence isn’t one-sided, though. The SWE-Bench Pro V2 paper ran three open-weight models (GLM-5.3, Kimi K3 and Inkling) in three harnesses (mini-swe-agent, Pi and OpenCode) across 642 tasks. The harness, which the paper calls the scaffold, explained only 0.29% of the variation in results, compared with 2.65% for the model and 31.7% for the task itself (<a href="https://arxiv.org/html/2610.24206">SWE-Bench Pro V2, S22</a>). There, the harness mostly changed cost. Kimi K3 used 1.3M tokens per solved task under Pi, versus 2.6M under mini-swe-agent.</p><p>A separate community test pulls the other way again. It found one model ranging from 23.2% to 52.4% across 10 harnesses, but it used a single run per task and hasn’t been peer-reviewed (<a href="https://huggingface.co/buckets/joelniklaus/CodingBenchmarkResults">community benchmark, S23</a>).</p><p>My honest read is that this is still disputed. How much the harness matters seems to depend on the benchmark, the time limits and the model. Terminal-Bench tasks are long and hit timeouts often, so harness efficiency may count for more there.</p><p>One more warning: benchmark versions aren’t comparable. The tbench.ai leaderboard address for 2.0 now shows Terminal-Bench 4.0 (<a href="https://www.tbench.ai/leaderboard/terminal-bench/2.0">S21</a>), and those entries are mostly each vendor’s own harness paired with its own model. Don’t compare a 2.0 score with a 4.0 score.</p><h3>What this means for builders</h3><p>The model and harness are trained together more than people realize. LangChain notes that “Today’s agent products like Claude Code and Codex are post-trained with models and harnesses in the loop” (<a href="https://www.langchain.com/blog/the-anatomy-of-an-agent-harness">S1</a>). Yet on Terminal-Bench 2.0, third-party harnesses often beat the vendor’s own. Gemini CLI, for example, scored lowest of the Gemini 3.1 Pro entries (<a href="https://huggingface.co/datasets/harborframework/terminal-bench-2-leaderboard">S20</a>).</p><p>For me, this is the future-of-work part. Getting from IDEA to EXECUTION used to be mostly about writing code. Now a growing share of it is designing the environment that an agent works in. OpenAI said its early progress with Codex was slow “not because Codex was incapable, but because the environment was underspecified” (<a href="https://openai.com/index/harness-engineering/">S9</a>, via search excerpt). That’s a skill builders can learn, and it doesn’t depend on waiting for the next model.</p><h3>Part 5: Build a minimal harness (intermediate)</h3><p>Here’s a small harness loop in Python. It’s pseudocode: llm and sandbox stand in for your model client and your sandbox, so it won&#39;t run as-is. But it shows every core piece.</p><pre># Minimal agent harness: tools registry, history, max steps, permissions, trimming.<br>import json<br><br>TOOLS = {}                                   # name -&gt; (fn, schema, needs_approval)<br>def tool(name, schema, needs_approval=False):<br>    def wrap(fn):<br>        TOOLS[name] = (fn, schema, needs_approval); return fn<br>    return wrap<br><br>@tool(&quot;read_file&quot;, {&quot;path&quot;: &quot;string&quot;})<br>def read_file(path): return open(path).read()[:4000]<br><br>@tool(&quot;run_shell&quot;, {&quot;cmd&quot;: &quot;string&quot;}, needs_approval=True)<br>def run_shell(cmd): return sandbox.run(cmd, timeout=30)     # isolated env<br><br>def permitted(name, args):<br>    _, _, needs_approval = TOOLS[name]<br>    if not needs_approval: return True<br>    return input(f&quot;Allow {name}({args})? [y/N] &quot;).lower() == &quot;y&quot;   # human-in-the-loop<br><br>def trim(history, max_chars=60_000):<br>    &quot;&quot;&quot;Keep system + first user msg; drop/summarize oldest turns when too long.&quot;&quot;&quot;<br>    while sum(len(json.dumps(m)) for m in history) &gt; max_chars and len(history) &gt; 4:<br>        dropped = history.pop(2)                          # oldest non-pinned message<br>        history[1][&quot;content&quot;] += f&quot;\n[trimmed: {dropped[&#39;role&#39;]} msg]&quot;<br>    return history<br><br>def run_agent(task, llm, max_steps=20):<br>    history = [{&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;You are a careful agent. Use tools.&quot;},<br>               {&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: task}]<br>    schemas = [{&quot;name&quot;: n, &quot;parameters&quot;: s} for n, (_, s, _) in TOOLS.items()]<br>    for step in range(max_steps):<br>        history = trim(history)<br>        reply = llm(messages=history, tools=schemas)    # one model call<br>        history.append(reply.as_message())<br>        if not reply.tool_calls:                         # stop: no tool calls<br>            return reply.text<br>        for call in reply.tool_calls:<br>            name, args = call.name, call.arguments<br>            if name not in TOOLS:<br>                result = f&quot;error: unknown tool {name}&quot;<br>            elif not permitted(name, args):<br>                result = &quot;denied by user&quot;<br>            else:<br>                try:<br>                    result = TOOLS[name][0](**args)<br>                except Exception as e:<br>                    result = f&quot;error: {e}&quot;               # errors are observations too<br>            history.append({&quot;role&quot;: &quot;tool&quot;, &quot;tool_call_id&quot;: call.id,<br>                            &quot;content&quot;: str(result)[:8000]})<br>    return &quot;Stopped: max_steps reached.&quot;</pre><h3>Step by step</h3><ol><li>The tool registry. The @tool decorator records each function in TOOLS along with its schema (a description of the arguments it takes, which the model sees) and whether it needs approval. Reading a file is safe, so it runs freely. Running a shell command is risky, so run_shell is marked needs_approval=True.</li><li>Output limits. read_file returns at most 4,000 characters, and every tool result is cut to 8,000. This keeps one huge file from flooding the context.</li><li>The sandbox. run_shell calls sandbox.run(...) with a 30-second timeout instead of running the command directly on your machine. In a real harness, that would be an OS sandbox or a container.</li><li>Permissions. permitted() asks a human before any risky tool runs. This is the human-in-the-loop step from the loop diagram.</li><li>Trimming context. trim() keeps the system prompt and the original task pinned, and removes the oldest messages once the history gets too long. It leaves a note so the model knows something was removed. This is the simplest form of context management.</li><li>The loop. run_agent() sends the history and tool list to the model, appends the reply, and stops when the model asks for no more tools.</li><li>Handling tool calls. For each requested tool, the harness checks that the tool exists, checks permission, then runs it. Unknown tools, denials and errors all go back to the model as results. That’s important, because errors are information the model can use to recover.</li><li>A hard stop. max_steps=20 makes sure the agent can&#39;t loop forever.</li></ol><h3>Where real harnesses go further</h3><p>Each production harness extends this same skeleton (<a href="https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk">S5</a>, <a href="https://blog.langchain.com/deep-agents/">S10</a>, <a href="https://openai.github.io/openai-agents-python/">S12</a>, <a href="https://code.claude.com/docs/en/hooks">S18</a>):</p><ul><li>Replace trim with summarization or compaction.</li><li>Add a todo_write tool so the agent can plan.</li><li>Add a spawn_subagent tool that starts a new agent with its own fresh history.</li><li>Add hooks before and after permitted and tool execution.</li><li>Wrap the model and tool calls in tracing spans.</li></ul><h3>Part 6: Practical tips for choosing or building one</h3><p>1. Trace cost per run, not just accuracy. The clearest finding in the SWE-Bench Pro V2 paper was about cost: the same model used about 1.3M tokens per solved task in one harness and 2.6M in another (<a href="https://arxiv.org/html/2610.24206">S22</a>). Turn on tracing from day one. Many of these harnesses support it natively: OpenTelemetry in the Claude Agent SDK, which also tracks cost (<a href="https://docs.claude.com/en/docs/agent-sdk/overview">S13</a>), built-in tracing in the OpenAI Agents SDK (<a href="https://openai.github.io/openai-agents-python/">S12</a>), and LangSmith for Deep Agents.</p><p>2. Get permissions right before you add power. Decide which tools run freely, which need approval, and which are never allowed. The OpenAI Agents SDK and Microsoft Agent Framework both build in human-in-the-loop approval (<a href="https://openai.github.io/openai-agents-python/">S12</a>, <a href="https://learn.microsoft.com/en-us/agent-framework/overview/agent-framework-overview">S15</a>). Claude Code’s PreToolUse hooks let your own code block a tool call before it runs (<a href="https://code.claude.com/docs/en/hooks">S18</a>).</p><p>3. Sandbox anything that runs commands. Claude Code and Codex CLI use OS-level sandboxes (Seatbelt on macOS, bubblewrap on Linux) (<a href="https://developers.openai.com/codex/concepts/sandboxing">S17</a>, <a href="https://code.claude.com/docs/en/sandboxing">S18</a>). Gemini CLI can also use containers (<a href="https://www.geminicli.com/docs/cli/sandbox">S19</a>), and OpenHands can give each conversation its own Docker sandbox.</p><p>4. Start simple. Anthropic found that the most successful teams “weren’t using complex frameworks or specialized libraries. Instead, they were building with simple, composable patterns” (<a href="https://www.anthropic.com/engineering/building-effective-agents">S6</a>). If you’d rather control the loop, tool dispatch and state yourself, the OpenAI Agents SDK docs say plainly that it may not be the right fit (<a href="https://openai.github.io/openai-agents-python/">S12</a>).</p><p>5. Think about who owns your agent’s memory. Chase argues that “If you used a closed harness … you are choosing to yield control of your agent’s memory to a third party” (<a href="https://www.langchain.com/blog/your-harness-your-memory">S8</a>). That’s an opinion from a company that sells an open harness, but it’s a fair question to ask before you commit.</p><p>6. Test on your own tasks. Since the benchmark evidence conflicts, the only result that really counts is how a harness performs, and what it costs, on the work you actually need done.</p><h3>Conclusion</h3><p>The model gets the headlines, but the harness decides what the model sees, what it’s allowed to do, how it recovers from mistakes, and how much each run costs. On some benchmarks, swapping the harness moves scores by 20 points. On others, it barely changes accuracy and mostly changes cost. Either way, it’s the part of the stack that builders control.</p><p>For anyone building with AI, the work is shifting from writing every step yourself to designing a loop, a set of tools and a safe environment, and then measuring what happens.</p><p>So I’m curious: when your agent fails, how often is it really the model, and how often is it the harness around it?</p><h3>Sources</h3><ul><li>S1: LangChain, “The Anatomy of an Agent Harness”: <a href="https://www.langchain.com/blog/the-anatomy-of-an-agent-harness">https://www.langchain.com/blog/the-anatomy-of-an-agent-harness</a></li><li>S2: Harrison Chase, “Agent Frameworks, Runtimes, and Harnesses — oh my!” (25 Oct 2025): <a href="https://www.langchain.com/blog/agent-frameworks-runtimes-and-harnesses-oh-my">https://www.langchain.com/blog/agent-frameworks-runtimes-and-harnesses-oh-my</a></li><li>S3: LangChain, “Improving Deep Agents with harness engineering” (17 Feb 2026): <a href="https://www.langchain.com/blog/improving-deep-agents-with-harness-engineering">https://www.langchain.com/blog/improving-deep-agents-with-harness-engineering</a></li><li>S4: Anthropic, “Effective harnesses for long-running agents”: <a href="https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents">https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents</a></li><li>S5: Anthropic, “Building agents with the Claude Agent SDK”: <a href="https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk">https://www.anthropic.com/engineering/building-agents-with-the-claude-agent-sdk</a></li><li>S6: Anthropic, “Building effective agents”: <a href="https://www.anthropic.com/engineering/building-effective-agents">https://www.anthropic.com/engineering/building-effective-agents</a></li><li>S7: Anthropic, “Raising the bar on SWE-bench Verified”: <a href="https://www.anthropic.com/engineering/swe-bench-sonnet">https://www.anthropic.com/engineering/swe-bench-sonnet</a></li><li>S8: Harrison Chase, “Your harness, your memory” (11 Apr 2026): <a href="https://www.langchain.com/blog/your-harness-your-memory">https://www.langchain.com/blog/your-harness-your-memory</a></li><li>S9: OpenAI, “Harness engineering: leveraging Codex in an agent-first world” (11 Feb 2026; read via search excerpt): <a href="https://openai.com/index/harness-engineering/">https://openai.com/index/harness-engineering/</a></li><li>S10: LangChain, “Deep Agents”: <a href="https://blog.langchain.com/deep-agents/">https://blog.langchain.com/deep-agents/</a></li><li>S11: Sequoia, “Owning your intelligence starts with the harness”: <a href="https://sequoiacap.com/podcast/owning-your-intelligence-starts-with-the-harness">https://sequoiacap.com/podcast/owning-your-intelligence-starts-with-the-harness</a></li><li>S12: OpenAI Agents SDK documentation: <a href="https://openai.github.io/openai-agents-python/">https://openai.github.io/openai-agents-python/</a></li><li>S13: Claude Agent SDK overview: <a href="https://docs.claude.com/en/docs/agent-sdk/overview">https://docs.claude.com/en/docs/agent-sdk/overview</a></li><li>S14: Google ADK documentation: <a href="https://google.github.io/adk-docs/">https://google.github.io/adk-docs/</a></li><li>S15: Microsoft Agent Framework overview: <a href="https://learn.microsoft.com/en-us/agent-framework/overview/agent-framework-overview">https://learn.microsoft.com/en-us/agent-framework/overview/agent-framework-overview</a></li><li>S16: Pydantic AI Harness documentation: <a href="https://pydantic.dev/docs/ai/harness/overview/">https://pydantic.dev/docs/ai/harness/overview/</a></li><li>S17: Codex sandboxing documentation: <a href="https://developers.openai.com/codex/concepts/sandboxing">https://developers.openai.com/codex/concepts/sandboxing</a></li><li>S18: Claude Code sandboxing and hooks documentation: <a href="https://code.claude.com/docs/en/sandboxing">https://code.claude.com/docs/en/sandboxing</a> and <a href="https://code.claude.com/docs/en/hooks">https://code.claude.com/docs/en/hooks</a></li><li>S19: Gemini CLI sandbox documentation: <a href="https://www.geminicli.com/docs/cli/sandbox">https://www.geminicli.com/docs/cli/sandbox</a></li><li>S20: Terminal-Bench 2.0 leaderboard dataset (Harbor, Hugging Face): <a href="https://huggingface.co/datasets/harborframework/terminal-bench-2-leaderboard">https://huggingface.co/datasets/harborframework/terminal-bench-2-leaderboard</a></li><li>S21: tbench.ai leaderboard (now serving Terminal-Bench 4.0): <a href="https://www.tbench.ai/leaderboard/terminal-bench/2.0">https://www.tbench.ai/leaderboard/terminal-bench/2.0</a></li><li>S22: SWE-Bench Pro V2 paper (arXiv 2610.24206): <a href="https://arxiv.org/html/2610.24206">https://arxiv.org/html/2610.24206</a></li><li>S23: joelniklaus, SWE-bench Pro, 10 harnesses x 2 models (community data): <a href="https://huggingface.co/buckets/joelniklaus/CodingBenchmarkResults">https://huggingface.co/buckets/joelniklaus/CodingBenchmarkResults</a></li><li>S27: OpenAI, “Codex is becoming a productivity tool for everyone” (2 Jun 2026; read via search excerpt): <a href="https://openai.com/index/codex-for-knowledge-work/">https://openai.com/index/codex-for-knowledge-work/</a></li><li>S28: CNBC, 9 Apr 2026: <a href="https://www.cnbc.com/2026/04/09/openai-chatgpt-pro-subscription-anthropic-claude-code.html">https://www.cnbc.com/2026/04/09/openai-chatgpt-pro-subscription-anthropic-claude-code.html</a></li><li>GitHub REST API (stars and licenses, 24 Oct 2026): <a href="https://api.github.com/repos/%7Bowner%7D/%7Brepo%7D">https://api.github.com/repos/{owner}/{repo}</a></li><li>npm downloads API (23 Sep to 22 Oct 2026): <a href="https://api.npmjs.org/downloads/point/last-month/%7Bpackage%7D">https://api.npmjs.org/downloads/point/last-month/{package}</a></li><li>pypistats (last-month downloads, 24 Oct 2026): <a href="https://pypistats.org/api/packages/%7Bpackage%7D/recent">https://pypistats.org/api/packages/{package}/recent</a></li><li>Project READMEs on GitHub: OpenHands, Cline, Goose, Aider, Deep Agents, LangGraph, smolagents, CrewAI, Pydantic AI</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baa74b20ca3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Same Tools, Opposite Results]]></title>
            <link>https://adithyabandara.medium.com/same-tools-opposite-results-cd633dc48f24?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd633dc48f24</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[enterprise]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Thu, 22 Oct 2026 06:01:00 GMT</pubDate>
            <atom:updated>2026-10-22T09:20:37.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>Anthropic says AI agents are transforming its work. Half the industry is quietly pulling back. Here’s why I think both stories are true, and what that means for the next few years.</h3><p>Two stories about AI at work landed on my screen in the same week, and at first they looked like they couldn’t both be right.</p><p>In the first, Anthropic published a detailed report on how employment is changing inside its own company. Agents now log several times the hours of the people directing them, and output per person is up sharply.</p><p>In the second, the Guardian reported that companies that rushed into AI are pulling back. Meta scaled back plans to replace staff with agents, and a court case went wrong partly because of a ChatGPT-assembled expert report. Executives at a large share of companies say they haven’t seen productivity gains at all.</p><p>I’ve spent a few days with both, and I don’t think either one is wrong. The difference between them is the most useful thing I’ve learned about AI at work this year.</p><h3>What Anthropic found</h3><p>The report, “How employment is changing at Anthropic”, was published on 16 October 2026 by the company’s economics team. It draws on internal data on employment, AI use, output, surveys, Slack, calendars and hiring records, plus 17 employee interviews.</p><p>The headline number is about time. Agent hours first passed human hours in March 2026. By August, interactive agents directed by employees were logging about six times as many hours as the humans running them. In research teams, the chart puts it at 19 times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gNYMCwTJYahOO8Ecr20BLQ.png" /><figcaption>Chart: fig2-agent-hours-vs-human-hours.png — Agent hours per human work-hour crossed parity in spring 2026 and reached about 6x for all employees and 19x in research orgs by August.</figcaption></figure><p>Output moved too. Indexed against December 2025, commits per engineer reached about 5.1x. Queries per data scientist and contracts per legal employee both reached 3.1x, deals per salesperson 1.7x, and hires per recruiter 1.4x. This wasn’t only engineers either: non-technical staff went from about 2 coding-agent sessions a month in August 2025 to 90 in May 2026.</p><p>The part I found most interesting is that they followed the same people over time. When an engineer adopted coding agents, that person’s output went up. On quality, they compared code the agent wrote against code the same person wrote directly, in the same month and the same directory, and found “no difference in rates of lines of code subsequently removed or reverted.”</p><figure><img alt="[Chart: fig3-output-per-person-by-function.png — Output per person since December 2025, from 5.1x commits per engineer down to 1.4x hires per recruiter.]" src="https://cdn-images-1.medium.com/max/1024/1*Xl9K7dyzjP8qf5vs8H7KQg.png" /><figcaption><em>Chart:output-per-person-by-function.png — Output per person since December 2025, from 5.1x commits per engineer down to 1.4x hires per recruiter.</em></figcaption></figure><p>Taken at face value, that’s AI working at scale.</p><h3>What’s going wrong everywhere else</h3><p>Now the other side.</p><p>Meta scaled back plans to cut staff and lean on AI agents after employees were spending more and more time cleaning up technical and security errors, according to Reuters. Meta still cut about 10% of its staff in May, but it called off a planned second wave.</p><p>Microsoft and McKinsey have started limiting or monitoring how much staff use AI tools, mainly because the costs are piling up.</p><p>Then there’s the 3M case. An expert witness billed 3M $90,000 for a report. Timestamps showed 14,500 pages were assembled in a matter of hours, and his ChatGPT logs included the prompt “What am I looking at?” about the gas detector at the centre of the case. The jury ordered 3M to pay $61.5 million. His lawyer says ChatGPT only helped with formatting, structuring and drafting.</p><p>The wider numbers aren’t encouraging. In an Atlanta Fed working paper from early 2026, 89% of executives said AI hadn’t moved their company’s productivity over the past three years. A newer survey from mid-2026 has that at 83%, which is better but still most companies. And in an EY survey, 36% of senior AI leaders at US public companies with $1B+ in revenue said they’d had an AI incident that caused real harm, such as data loss or financial or brand damage.</p><p>There’s a name for a lot of what’s going wrong. Researchers from BetterUp and Stanford, writing in Harvard Business Review, called it “workslop”: AI work that looks polished and complete but is actually low quality, so someone else ends up fixing it.</p><h3>Why both are true</h3><p>Kathleen Hogan, Microsoft’s chief strategy and transformation officer, wrote the sentence I keep coming back to: “Adding agents to a broken process still leaves a broken process — speeding up one step just creates a longer queue at the next.”</p><p>That’s the difference. Anthropic didn’t just give people a tool. It changed who it hires, what managers look for, how people spend their day and how teams are organised around agents. Thousands of standing agent instructions now exist where there were a few hundred a year earlier. Hiring scorecards changed too, with interviewers increasingly emphasising autonomy and judgment over raw implementation skill.</p><p>Most companies took the opposite approach. They bought licences, announced an AI strategy and hoped the output would improve. The output did increase. The checking didn’t. So what was “almost right” moved downstream, to a colleague, a client or, in one case, a jury.</p><p>I wrote back in June that “almost right” is the most expensive mistake, because it looks finished and nobody stops to question it. Workslop is that mistake at company scale.</p><p>I should be honest about the Anthropic side, though. This is one firm’s internal data, which nobody outside can verify, and the firm also sells the tool being measured. The authors flag several problems themselves. Adoption wasn’t random, and people about to start big projects may have picked up the tools first. A strong product makes deals easier to close. And in their words, “more code does not necessarily mean better code or business impact… AI errors may be harder to identify than human ones.” They also say plainly that much of how Anthropic works “cannot be replicated across the economy.” I take the direction of the findings seriously, but I wouldn’t take the exact multipliers as a forecast for anyone else.</p><h3>The hidden costs inside Anthropic’s own data</h3><p>The parts of the report that stayed with me most aren’t the productivity numbers. They’re the costs.</p><p>Juniors. The junior share of Anthropic’s technical hires fell from 27% to 9%. The junior share of technical headcount fell from 21% to 14% since early 2025. About a third of ML managers and a fifth of software engineering managers said they hire less because of AI. Across jobs, the more complex a team’s Claude use, the slower its junior headcount grew, although the authors are clear that this is descriptive, not causal. They also admit that none of the company’s responses “directly address the slowdown in junior hires.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7ZkUCmrIyxQDSvfRQ1mAAw.png" /><figcaption>Chart: fig1-junior-technical-share-and-hiring-decline.png — The junior share of technical hires fell from 27% to 9%, and of technical headcount from 21% to 14%.</figcaption></figure><p>Idle time. Claude sessions are around 80% idle, waiting for human input. The agents aren’t the slow part. We are. The report estimates that just reading everything their agents produce would take even non-technical employees more than half their work week. That figure is an upper bound, since nobody reads every token, but the point stands.</p><p>Meta-work. As a result, people have become managers of agents. “Meta-work”, meaning time spent instructing, coordinating and checking agents, rose from 10% of the average employee’s interactive sessions in fall 2025 to 22% in spring 2026. In infrastructure it’s 29%. Median meeting time is also up 20% on a year earlier. One employee put it this way: “that 20% that was strategic becomes 90% of the job.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5TK-o8u_JMVUAEVC3FoMRA.png" /><figcaption>Chart: fig7-meta-work-share-of-sessions.png — Meta-work rose from 10% to 22% of a typical employee’s agent sessions, and higher in infrastructure and security.</figcaption></figure><p>So even in the best case, the work doesn’t disappear. It moves. Less of it is doing and more is directing and checking, and fewer people get hired at the bottom to learn how.</p><h3>Where I think this is heading (2027 to 2030)</h3><p>This part is my own view, not a prediction anyone published. I’ve tried to keep it tied to trends that are already visible.</p><p>Layoffs will keep citing AI, and some of those decisions will be walked back. Challenger, Gray &amp; Christmas counted more than 112,000 US job-cut announcements in 2026 that mentioned AI. Meta’s reversal shows what happens when the cut comes before the process works. I expect more quiet rehiring under different job titles.</p><p>Productivity gains will show up, but slowly and unevenly. Executives estimate AI added about 0.2% a year to productivity growth over the past three years. That’s double the 0.1% they reported six months earlier, and they expect 0.6% a year over the next three. That’s real but small. My guess is that by 2030 the gap between companies that redesigned their work and companies that only bought tools will matter more than the average.</p><p>Governance will become the bottleneck people talk about. In EY’s survey, 26% of organisations using agentic AI admitted they couldn’t detect unauthorised agents running internally, and 47% had skipped their governance process for urgent deployments. With more agents and more hours, that gap gets wider before it gets fixed.</p><p>Managers and training will decide who wins. Microsoft’s research found that when managers actively model AI use, reported value from agentic AI rises 17 points and trust in it rises 30 points. Meanwhile, more than half of employees in an Indeed survey said they aren’t getting the AI training they need. Anthropic’s own staff expect AI to do 75% of their work by 2030, against 28% for other Americans. That gap in expectations is also a gap in preparation.</p><p>The junior problem is the one I worry about most. If entry-level hiring keeps shrinking while the job shifts toward judgment and review, we’ll have a generation of reviewers who were never reviewed themselves. Judgment comes from making mistakes that someone senior caught. If we remove that step, I don’t know where the next senior people come from.</p><h3>What to do about it</h3><p>I don’t think the answer is to stop using AI. I use it every day. But a few things seem clear to me:</p><ol><li>Fix the process before adding agents. Map how the work actually flows, who checks it and what “done” means. If that’s broken, agents just make the broken part faster.</li><li>Treat review as real work. Budget time for it, name who owns it and don’t let “looks finished” count as finished. The 3M report presumably looked finished too.</li><li>Pair juniors with seniors on purpose. Microsoft says its PRAISE program, which pairs new engineers with experienced mentors and AI-assisted learning, helps them contribute to complex work sooner. That’s the opposite of not hiring juniors at all.</li><li>Have managers lead by using it. The 17-point and 30-point jumps in reported value and trust came from managers modelling AI use, not from memos.</li><li>Count the hidden costs. Idle time, meta-work and meetings are part of what AI costs. If you only measure output, you’ll miss them.</li></ol><h3>A note from Sri Lanka</h3><p>I see the small version of this every week here. Office reports, university assignments and client proposals get written with ChatGPT, formatted nicely and sent out without anyone properly reading them. They look finished, and the problems only surface later, at the client, in front of a lecturer or, in the worst cases, somewhere far more serious. We don’t have Anthropic’s budget or tooling, but the lesson costs nothing: whoever puts their name on the work has to have actually checked it. For a country where many young people are trying to build careers in tech and services, the skill that will matter isn’t knowing how to prompt. It’s knowing how to tell when the answer is almost right.</p><p>I like the phrase IDEA to EXECUTION. AI really has shortened the distance between the two. But someone still has to check the execution, and for now, that someone is us.</p><h3>Sources</h3><ul><li>Anthropic, “How employment is changing at Anthropic” (Oct 2026): <a href="https://www.anthropic.com/research/employment-at-anthropic">https://www.anthropic.com/research/employment-at-anthropic</a></li><li>The Guardian, “Companies rushed in on AI. Now some are pulling back” (Oct 2026): <a href="https://www.theguardian.com/technology/2026/oct/13/ai-companies-rushed-workers-fallout">https://www.theguardian.com/technology/2026/oct/13/ai-companies-rushed-workers-fallout</a></li><li>Reuters investigation on Meta (Aug 2026): <a href="https://www.reuters.com/investigations/mark-zuckerberg-had-bold-plan-replace-meta-staff-with-ai-heres-how-it-imploded-2026-08-26/">https://www.reuters.com/investigations/mark-zuckerberg-had-bold-plan-replace-meta-staff-with-ai-heres-how-it-imploded-2026-08-26/</a></li><li>Reuters, how Meta’s AI workforce plans went kaput: <a href="https://www.reuters.com/technology/artificial-intelligence/how-metas-ai-workforce-transformation-plans-went-kaput-2026-08-26/">https://www.reuters.com/technology/artificial-intelligence/how-metas-ai-workforce-transformation-plans-went-kaput-2026-08-26/</a></li><li>Harvard Business Review, “AI-Generated ‘Workslop’ Is Destroying Productivity” (Sept 2025): <a href="https://hbr.org/2025/09/ai-generated-workslop-is-destroying-productivity">https://hbr.org/2025/09/ai-generated-workslop-is-destroying-productivity</a></li><li>BetterUp, the hidden costs of workslop: <a href="https://www.betterup.com/blog/hidden-costs-workslop">https://www.betterup.com/blog/hidden-costs-workslop</a></li><li>The Expert Record, on the 3M trial: <a href="https://www.theexpertrecord.com/ai-in-court/watson-grinding-3m-expert-chatgpt/">https://www.theexpertrecord.com/ai-in-court/watson-grinding-3m-expert-chatgpt/</a></li><li>Federal Reserve Bank of Atlanta, “Firm Data on AI” (WP 2026–3): <a href="https://www.atlantafed.org/research-and-data/publications/working-papers/2026/03/24/03-firm-data-on-ai">https://www.atlantafed.org/research-and-data/publications/working-papers/2026/03/24/03-firm-data-on-ai</a></li><li>NBER Working Paper w34836 (updated survey): <a href="https://www.nber.org/system/files/working_papers/w34836/w34836.pdf">https://www.nber.org/system/files/working_papers/w34836/w34836.pdf</a></li><li>EY, AI governance gap survey (Sept 2026): <a href="https://www.ey.com/en_us/newsroom/2026/09/ey-survey-finds-that-autonomous-ai-implementation-outpaces-oversight-yielding-an-ai-governance-gap">https://www.ey.com/en_us/newsroom/2026/09/ey-survey-finds-that-autonomous-ai-implementation-outpaces-oversight-yielding-an-ai-governance-gap</a></li><li>Microsoft, Kathleen Hogan, “What we’ve learned from Microsoft’s own AI transformation” (Sept 2026): <a href="https://blogs.microsoft.com/blog/2026/09/17/what-weve-learned-from-microsofts-own-ai-transformation/">https://blogs.microsoft.com/blog/2026/09/17/what-weve-learned-from-microsofts-own-ai-transformation/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd633dc48f24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Building Naive RAG: A 2025 Guide to Retrieval Architectures]]></title>
            <link>https://adithyabandara.medium.com/stop-building-naive-rag-a-2025-guide-to-retrieval-architectures-7ba1c7c10317?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ba1c7c10317</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[agentic-rag]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Fri, 26 Dec 2025 18:06:12 GMT</pubDate>
            <atom:updated>2025-12-26T18:06:12.534Z</atom:updated>
            <content:encoded><![CDATA[<p>​Look, we need to talk. If you’re still splitting your documents into 512-token chunks, shoving them into a vector database, and calling it a day, you’re building tech that was obsolete eighteen months ago.</p><p>​It’s late 2025. The Chat with your PDF tutorials are dead. We are in the era of <strong>Cognitive Retrieval.</strong></p><p>​Retrieval-Augmented Generation (RAG) isn’t just about finding matching words anymore; it’s about reasoning, structure, and knowing what to look for before you even start searching. This is the no-nonsense guide to the actual state of RAG right now what works, what’s hype, and what will get your production app laughed out of the code review.</p><h3>​Introduction: What’s the deal with RAG?</h3><p>​RAG is just giving your LLM an open-book test instead of forcing it to memorize the textbook. You store your data (company wikis, codebases, logs) in a searchable format. When a user asks a question, you fetch the relevant cheat sheets and paste them into the prompt so the model doesn’t hallucinate. That’s it. But how you fetch that data is the difference between a genius assistant and a confused intern.</p><h4><strong>The Menu (Retrieval Options)</strong></h4><p>Here is the current landscape. Pick your fighter.</p><ul><li>Vector RAG → The Vanilla Default [ Simple Q&amp;A, searching specific facts. ]</li><li>GraphRAG →The Relationship Expert [ Complex reasoning, connecting dots between entities. ]</li><li>Hybrid Search → The Pragmatist [ Mixing keywords (BM25) with vectors. Standard for production. ]</li><li>Agentic RAG → The Smart Planner [ Multi-step research tasks that require tools. ]</li><li>Speculative RAG → The Speedster [ High-speed, high-accuracy verification. ]</li></ul><h4>The Deep Dive</h4><p>​Let’s break down the techniques that actually matter in production environments right now.</p><h3>1. GraphRAG: The Structure-Aware Heavyweight</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TRDtCSwzrTetCwOCsBskOg.png" /><figcaption>GRAPRAG ARCHITECTURE</figcaption></figure><p>Vectors are great at finding similar words, but terrible at understanding structure. GraphRAG extracts entities (people, places, concepts) and their relationships to build a Knowledge Graph. When you ask a question, it traverses the graph to find answers.</p><ul><li>​<strong>How it works:</strong> It uses an LLM to read your data during indexing and map out connections (nodes and edges). It then clusters these nodes to create summaries at different levels of granularity.</li><li>​<strong>Pros</strong>: It solves the Global Query problem. If you ask, What are the major themes in these 1,000 contracts?, Vector RAG fails. GraphRAG walks the graph and gives you a synthesized answer.</li><li>​<strong>Cons</strong>: It is expensive. Indexing requires massive LLM usage to extract entities. It’s also slower at query time than a simple vector lookup.</li></ul><h3>2. Speculative RAG: The Draft-and-Verify Paradigm</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3t3wbBH8-JeVoyZzpq4ScA.png" /><figcaption>Speculative Arch from Google AI Labs</figcaption></figure><p>This is for when you need speed and accuracy. It splits the job into two models: a fast Drafter and a smart Verifier.</p><ul><li>​<strong>How it works:</strong> A small, cheap model (the Drafter) quickly generates multiple potential answers based on different retrieved documents in parallel. A massive, smart model (the Verifier) then looks at these drafts, grades them, and picks the best one (or combines them).</li><li>​<strong>Pros</strong>: It cuts latency effectively (up to 50% faster) because the big model isn’t doing the heavy lifting of drafting from scratch. It also reduces hallucinations by verifying multiple angles.</li><li>​<strong>Cons:</strong> You have to manage two models. It adds architectural complexity to your pipeline.</li></ul><h3>3. LightRAG: The Efficient Alternative</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*5AfjHatSbtBE224X0flW3g.webp" /><figcaption>LightRAG GeeksforGeeks</figcaption></figure><p>GraphRAG is great, but it costs a fortune. LightRAG arrived in late 2025 to fix that.</p><ul><li>​<strong>How it works:</strong> It uses a dual-level retrieval system. It indexes data into a low-level entity graph (for specific details) and high-level thematic clusters (for big concepts). Crucially, it supports incremental updates you don’t have to rebuild the whole graph when you add one document.</li><li>​<strong>Pros:</strong> drastically cheaper indexing (think $0.15 vs $4.00 per doc) and faster retrieval. It balances the depth of graphs with the speed of vectors.</li><li>​<strong>Cons:</strong> Still more complex to set up than a basic vector store.</li></ul><h3>The Hidden Gem: Association Rule Mining (ARM)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*u72gmuPkFhsboC7hz0Y7TQ.jpeg" /><figcaption>ARM PROCESS</figcaption></figure><p>Everyone is obsessed with neural networks, but sometimes 1990s data mining kicks their butt. Association Rule Mining (algorithms like Apriori or FP-Growth) is making a comeback in RAG.</p><p>​<strong>Why it matters:</strong><br>Vectors are probabilistic they guess relationships. ARM is deterministic it knows relationships. It finds rules like If Inflation appears in a document, Interest Rates appears 85% of the time.<br><strong>​Use it for:</strong></p><ul><li>​Context Pruning: If your retrieval pulls a document that statistically never appears with the others, ARM can flag it as noise and toss it out.</li><li>​Query Expansion: If a user searches for Diapers, ARM knows to also look for Beer (classic example) or Baby Wipes without needing a semantic model to guess.</li></ul><h3>​The Cutting Edge: CoRAG (Chain-of-Retrieval)</h3><p>This is the o1 moment for RAG. CoRAG moves away from the retrieve-then-generate flow to an iterative retrieve-reason-retrieve loop.</p><p>​<strong>How it works:</strong><br>Instead of one shot, the model retrieves some data, reads it, realizes it’s missing something, generates a new query, retrieves more data, and repeats until it’s satisfied. It is trained using rejection sampling to learn the optimal research path.</p><p>​It basically teaches the model to use a search engine like a human would: tentatively, then refining based on what it finds. It dominates benchmarks on complex, multi-hop questions.</p><h4>Troubleshooting the Mess</h4><p>​Your RAG system is probably failing in one of these three ways. Here is how to</p><p>fix it:</p><ul><li>​The model is hallucinating answers.</li></ul><p>​<em>Fix: Implement Corrective RAG (CRAG). Add a lightweight evaluator step that grades the retrieved documents before sending them to the LLM. If the grade is low, trigger a web search or fallback response. Don’t let the LLM see garbage.</em></p><ul><li>​It can’t answer big picture questions.</li></ul><p>​<em>Fix: Stop using flat chunking. Implement Hierarchical Indexing (parent-child chunks) or RAPTOR (recursive summarization trees). You need summaries of the whole document, not just isolated paragraphs.</em></p><ul><li>​It retrieves irrelevant data because keywords match.</li></ul><p>​<em>Fix: Use Hybrid Search with a Reranker. Combine keyword search (BM25) with vector search, then use a Cross-Encoder (like BGE-Reranker) to score the top 50 results and only keep the top 5. This is the single highest-ROI change you can make.</em></p><h3><em>The Trap Technique: Naive Vector Search</em></h3><p><em>​</em><strong><em>Stop doing Naive RAG.</em></strong></p><p><em>​What is it?<br>You take a PDF, chop it into 500-word blocks, embed them, and put them in a vector DB. You query it using cosine similarity.</em></p><p><em>​</em><strong><em>Why everyone does it:</em></strong><em><br>It takes 10 minutes to code in LangChain.<br>​</em><strong><em>Why you should stop:</em></strong><em><br>It fails the moment a user asks a question that requires information from two different parts of the document (Multi-hop). It fails on specific numbers/IDs (which vectors are bad at). It fails on summary questions.<br>​It is a demo technique, not a production architecture. If you are building for enterprise, you must use Hybrid Search or Graph-based approaches. Reliance on simple semantic similarity is a one-way ticket to customer complaints about dumb AI.</em></p><p>​<strong>Outro</strong></p><p>​RAG in late 2025 isn’t about the vector database anymore; it’s about the reasoning loop. The database is just storage. The magic is in how your system plans the search, verifies the results, and structures the data before the LLM ever sees it.</p><p>​Stop building chat-with-your-pdf. Start building systems that research, reason, and report.</p><p>​Cheers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*O-hk3I_Ti3HfLPhPs17NeQ.jpeg" /><figcaption>QORD</figcaption></figure><h3><a href="https://qordiv.com/">QORD</a> : READMORE 😇</h3><p>​</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ba1c7c10317" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ML DEVELOPMENT LIFE CYCLE FROM SCRATCH]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://adithyabandara.medium.com/ml-development-life-cycle-from-scratch-165d2ebc913d?source=rss-720399682122------2"><img src="https://cdn-images-1.medium.com/max/1024/1*TNNDAx-B-DtoWxQ_i5o9dQ.png" width="1024"></a></p><p class="medium-feed-snippet">So, you want to build something with machine learning.</p><p class="medium-feed-link"><a href="https://adithyabandara.medium.com/ml-development-life-cycle-from-scratch-165d2ebc913d?source=rss-720399682122------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://adithyabandara.medium.com/ml-development-life-cycle-from-scratch-165d2ebc913d?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/165d2ebc913d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai-ml-development]]></category>
            <category><![CDATA[machine-learning-python]]></category>
            <category><![CDATA[development-life-cycle]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Tue, 16 Sep 2025 10:12:43 GMT</pubDate>
            <atom:updated>2025-09-16T10:12:43.864Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[DevOps from A to Z: A Beginner’s Guide to Becoming an Expert]]></title>
            <link>https://adithyabandara.medium.com/devops-from-a-to-z-a-beginners-guide-to-becoming-an-expert-743e089bb1a9?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/743e089bb1a9</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[roadmaps]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 05:15:41 GMT</pubDate>
            <atom:updated>2025-08-07T05:15:41.681Z</atom:updated>
            <content:encoded><![CDATA[<p>For many people currently in or aspiring to join the IT field, a common question arises: “What exactly is DevOps?” We see it discussed everywhere on Facebook and LinkedIn, with numerous job postings, yet many still lack a clear understanding of the concept. That’s why I decided to explain DevOps from the very beginning in simple terms.</p><p>As a disclaimer, I am not a field expert myself. However, my passion for learning some of these concepts in-depth has given me a solid understanding of the field. This article is a bit long, but I encourage you to read it all the way through. ❤️✅</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MbtIvXtNWBE0LMUOpJcAuA.jpeg" /></figure><h4>What is DevOps? What Does It Actually Involve?</h4><p>Simply put, DevOps is more of a culture or a philosophy than a specific job title. Traditionally, software development involved two separate teams: the Development (Dev) team, which builds the software, and the Operations (Ops) team, which runs and maintains it. The Dev team would code the software and hand it over to the Ops team, saying, “Here, run this.” Their involvement often ended there.</p><p>This separation created problems. When issues arose, the teams would often pass the blame back and forth instead of quickly providing a solution to the user. DevOps addresses this by breaking down these “silos” and fostering a culture where Dev and Ops work together as a single team with a unified goal. This approach places a strong emphasis on <strong>collaboration, communication, and automation</strong>.</p><p>The ultimate objective is to deliver high-quality software to the end-user quickly and with minimal errors. DevOps achieves this by automating and streamlining the entire process, from the moment code is written until it is released to the user.</p><h4>Common Misconceptions: DevOps vs. Agile</h4><p>Many people confuse DevOps with Agile, and some even believe DevOps is an alternative to Agile. This is incorrect.</p><p><strong>Agile</strong> is a methodology that improves the software development process by breaking it down into small, iterative parts with quick feedback loops. It primarily optimizes the developer’s workflow. However, Agile doesn’t extensively cover what happens <em>after</em> the code is written — the deployment and operational aspects.</p><p>This is where DevOps comes in. <strong>DevOps fills that gap by taking Agile principles and extending them to include the operations side.</strong></p><p>In simple terms:</p><ul><li><strong>Agile</strong> optimizes the way software is <strong>written</strong>.</li><li><strong>DevOps</strong> optimizes the entire lifecycle of <strong>delivering and operating</strong> that software.</li></ul><p>Therefore, DevOps is an extension of Agile, not a replacement for it.</p><h3>Where Do I Start? A Recommended Learning Path</h3><p>While there’s no single, rigid roadmap to becoming a DevOps professional, there are core concepts you must master to succeed. Following this order can make the learning process much smoother.</p><ol><li>✅ <strong>Master Linux and the Command Line:</strong> This is non-negotiable. About 99% of DevOps tools run in a Linux environment. You must be proficient in using the command line to manage the file system, permissions, networking, and processes.</li><li>✅ <strong>Learn Scripting:</strong> Automation is the heart of DevOps. <strong>Bash scripting</strong> is essential for system-level tasks and simple automations. Additionally, learning a high-level programming language like <strong>Python</strong> or <strong>Go</strong> is incredibly valuable for handling complex logic and API integrations.</li><li>✅ <strong>Learn Git:</strong> Once your foundation is solid, master Git. Version control is another backbone of DevOps. Everything from application code to infrastructure configuration is managed using Git.</li><li>✅ <strong>Understand CI/CD Concepts:</strong> Next, learn about Continuous Integration and Continuous Delivery (CI/CD). This is the engine of DevOps. Gain practical knowledge with a tool like <strong>Jenkins</strong>, <strong>GitLab CI</strong>, or <strong>GitHub Actions</strong>.</li><li>✅ <strong>Embrace Modern Technologies:<br>- </strong>Containerization with Docker: Learn how to package an application with all its dependencies into a container, allowing it to run consistently anywhere. <br>- Container Orchestration with Kubernetes: When you have many containers to manage, you need a container orchestration tool. Kubernetes is an essential, albeit large, topic in the DevOps world.</li></ol><p>6. ✅ <strong>Learn Infrastructure as Code (IaC):</strong> Understand how to manage your infrastructure programmatically. The two most popular tools for this are <strong>Terraform</strong> (for provisioning infrastructure) and <strong>Ansible</strong> (for configuration management).</p><ol><li>✅ <strong>Gain Cloud Proficiency:</strong> Since most systems run on the cloud, having a strong understanding of at least one major cloud provider — <strong>AWS, Azure, or GCP</strong> — is mandatory.</li><li>✅ <strong>Master Monitoring and Observability:</strong> Finally, you need to know what’s happening within your systems. Learn about monitoring and observability using tools like <strong>Prometheus</strong>, <strong>Grafana</strong>, and the <strong>ELK Stack</strong>.</li></ol><h3>DevOps Tools Explained Simply</h3><p>Let’s briefly look at what the tools mentioned in the roadmap do.</p><ul><li>✅ <strong>Git:</strong> A version control system. It tracks every change made to your project’s code, acting like a history book. It’s an indispensable tool for team collaboration.<br>🖤 <strong>Example:</strong> Imagine you change the color of a button on a webpage. After the change, you run the command git commit -m &quot;Changed button color to blue&quot;. Git saves this change, noting who made it, when, and why. You can even revert to the previous version if needed.</li><li>✅ <strong>CI/CD Tools (Jenkins, GitLab CI, GitHub Actions):</strong> These are the engines of DevOps. They automate the process of building, testing, and deploying code as soon as a developer commits a change. Jenkins is a highly flexible and long-standing tool, while GitLab CI and GitHub Actions are modern alternatives tightly integrated with their respective platforms.<br>🖤 <strong>Example:</strong> The moment you git push your button color change, a tool like Jenkins detects it. It automatically builds the code, runs a series of tests, and if everything passes, deploys it to a staging server—all without any manual intervention from you.</li><li>✅ <strong>Docker:</strong> This tool packages an application along with all its necessary libraries and dependencies into a “container.” This eliminates the “it works on my machine, but not on yours” problem by ensuring the application runs identically in any environment.<br>🖤 <strong>Example:</strong> For your Python web app, you create a text file called a Dockerfile. In it, you write instructions like &quot;Use Python version 3.8, copy the app files, install the required libraries, and open port 5000.&quot; When you run the docker build command, it creates an image that can run your app flawlessly on any machine with Docker installed.</li><li>✅ <strong>Kubernetes (K8s):</strong> When you have a large number of Docker containers, managing them all becomes difficult. Kubernetes is an “orchestration tool” designed to manage these container fleets. It automates tasks like deploying containers, scaling them (increasing the number of containers when traffic is high), and restarting them if they fail.<br>🖤 <strong>Example:</strong> What if your web app container crashes due to high user traffic? In a Kubernetes YAML file, you can declare, “I always want three containers of this app running.” If one container fails, Kubernetes detects it and automatically launches a new one to replace it, ensuring users experience no downtime.</li><li>✅ <strong>Terraform &amp; Ansible (Infrastructure as Code):</strong> These tools allow you to manage your infrastructure (servers, networks, databases) as code, instead of setting it up manually.<br>1️⃣ <strong>Terraform (Provisioning):</strong> Think of this as the blueprint for a house. You declare the resources you need (e.g., 5 servers, 1 database) in a code file, and Terraform builds them for you on your chosen cloud platform.<br>🖤 <strong>Example:</strong> To create a server (EC2 instance) on AWS, you write a code file specifying, “I need a t2.micro server with the Ubuntu OS.” Then, you run terraform apply, and Terraform creates the server for you.<br>2️⃣ <strong>Ansible (Configuration Management):</strong> This tool configures the servers that Terraform created. It can install software, create users, copy files, and perform other setup tasks.<br>🖤 <strong>Example:</strong> To install the Nginx web server on the server created by Terraform, you write an Ansible “playbook” with the instruction “Connect to this server and install Nginx.” When you run it, Ansible connects to the server via SSH and handles the installation and configuration.</li><li>✅ <strong>Monitoring Tools (Prometheus, Grafana, ELK Stack):</strong> These are like the security cameras for your system.<br>1️⃣ <strong>Prometheus:</strong> Collects metrics (data like CPU usage, memory usage, etc.) from your systems.<br>2️⃣ <strong>Grafana:</strong> Takes the data collected by Prometheus and displays it in beautiful graphs and dashboards.<br>3️⃣ <strong>ELK Stack:</strong> Used for log management. It collects all the logs generated by your system into one place, allowing you to search and analyze them. This is crucial for finding the root cause of problems.<br>🖤 <strong>Example:</strong> Prometheus continuously monitors your server’s CPU usage. You can create a rule in a Grafana dashboard that says, “If CPU usage stays above 90% for 5 minutes, send me a Slack alert.” This allows you to learn about potential issues before your system goes down.</li></ul><h3>What are some good resources for learning?</h3><p>For those who want to learn using free resources, the internet is a goldmine.</p><ul><li><strong>Books:</strong> To understand the DevOps culture, <em>The Phoenix Project</em> (a novel) and <em>The DevOps Handbook</em> are must-reads. They are considered the bibles of DevOps.</li><li><strong>Online Courses:</strong> For theory, you can find courses like IBM’s “Introduction to DevOps” on Coursera. However, theory alone is not enough; you need hands-on practice. <strong>KodeKloud</strong> is an excellent platform for this, with learning paths and in-browser labs.</li><li><strong>YouTube:</strong> For those who prefer video content, there are great channels.</li><li><strong>TechWorld with Nana:</strong> Explains complex concepts very simply with diagrams.</li><li><strong>KodeKloud:</strong> Their YouTube channel is also packed with free content.</li><li>Other great channels include <strong>Abhishek Veeramalla</strong>, <strong>DevOps Directive</strong>, and <strong>Praveen Singampalli</strong>.</li><li><strong>Community &amp; Blogs:</strong> Staying connected with the community is very important. The <strong>r/devops</strong> subreddit on Reddit is very active and a great place to ask questions and learn new things. Blogs like <strong>DevOpsCube</strong> and <strong>DZone</strong> have many practical tutorials.</li></ul><h4>Get a Free One-Year KodeKloud Subscription</h4><p>In case you missed this, you can join the lucky draw now. Please help us spread the word. (<a href="https://www.linkedin.com/posts/yongkanghe_kubecon-kubernetes-cloud-activity-7357953228065394688-4puJ">https://www.linkedin.com/posts/yongkanghe_kubecon-kubernetes-cloud-activity-7357953228065394688-4puJ</a>)</p><p>Join this giveaway on LinkedIn. They give away three subscriptions every month.</p><h3>A Final Piece of Advice</h3><p>In any technology field, the most important thing isn’t just learning a lot of tools. It’s about learning the <strong>mindset</strong>. It’s about understanding that when a problem occurs, blaming others is pointless. The crucial skill is to find the root cause and engineer a solution.</p><p>Tools can become obsolete what’s popular today might be gone tomorrow. But the core concepts you learn will always be valuable. Therefore, don’t get stuck on a single tool and commit to continuous learning. Do as many hands-on projects as you can. True knowledge comes from practice, not just from studying theory.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=743e089bb1a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DeepSeek Janus-Pro 7B: A Comprehensive Technical Analysis of the Multimodal Powerhouse]]></title>
            <link>https://adithyabandara.medium.com/deepseek-janus-pro-7b-a-comprehensive-technical-analysis-of-the-multimodal-powerhouse-eb6243d4bc83?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb6243d4bc83</guid>
            <category><![CDATA[image-generation]]></category>
            <category><![CDATA[deepseek]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[opensource-ai]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Thu, 30 Jan 2025 05:08:31 GMT</pubDate>
            <atom:updated>2025-01-30T05:11:50.919Z</atom:updated>
            <content:encoded><![CDATA[<p>The AI landscape is witnessing a paradigm shift with the advent of <strong>DeepSeek Janus-Pro 7B</strong>, an open-source multimodal model that challenges proprietary giants like DALL-E 3, Stable Diffusion, and YOLOv8. Combining <strong>visual understanding</strong>, <strong>text-to-image generation</strong>, and <strong>object detection</strong> in a unified architecture, Janus-Pro redefines efficiency and versatility in AI applications. This article delves into its architecture, training methodology, performance benchmarks, and implications for the future of AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yC4ye9L6vCOq4FMlsTcCkQ.png" /><figcaption>(a) Average performance on four multimodal understand — (b) Performance on instruction-following benchmarks for text-to-image generation.</figcaption></figure><h3>Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kyI_F9D4yUhZE_ddFwRmgQ.png" /><figcaption>Architecture of Janus-Pro. They decouple visual encoding for multimodal under-<br>standing and visual generation. “Und. Encoder” and “Gen. Encoder” are abbreviations for<br>“Understanding Encoder” and “Generation Encoder”, respectively. Best viewed on screen.</figcaption></figure><h4>Core Components</h4><p>Janus-Pro 7B integrates three specialized modules to handle multimodal tasks:</p><ol><li><strong>Understanding Encoder (SigLIP-Large-Patch16–384)</strong></li></ol><p><strong>Role</strong>: Extracts high-dimensional semantic features from images for tasks like object detection, QA, and captioning.</p><p><strong>Process</strong>:</p><ul><li>Splits images into <strong>16×16 patches</strong>.</li><li>Processes patches using a <strong>Sigmoid Language-Image Pretraining (SigLIP)</strong> encoder.</li><li>Flattens features into a 1D sequence and maps them to the language model via a <strong>2-layer MLP adaptor</strong>.</li></ul><p><strong>2. Generation Encoder (VQ Tokenizer)</strong></p><p><strong>Role</strong>: Converts images into discrete tokens for autoregressive synthesis.</p><p><strong>Process</strong>:</p><ul><li>Tokenizes images using a <strong>VQ-VAE</strong> (Vector Quantized Variational Autoencoder) with a codebook size of <strong>16,384</strong>.</li><li>Projects tokens into the LLM’s input space via another <strong>2-layer MLP adaptor</strong>.</li></ul><p><strong>3. Language Model Backbone (DeepSeek-LLM 7B)</strong></p><p><strong>Role</strong>: A 7B-parameter transformer that processes multimodal inputs.</p><p><strong>Input</strong>: Hybrid sequences of text tokens, understanding embeddings, and generation tokens.</p><p><strong>Output</strong>:</p><ul><li><strong>Understanding</strong>: Textual answers via the default LLM head.</li><li><strong>Generation</strong>: Image tokens via a dedicated prediction head.</li></ul><h3>Decoupled Visual Encoding: Why It Matters</h3><p>By separating feature extraction for understanding (semantic analysis) and generation (token synthesis), Janus-Pro eliminates task interference. This design allows specialized optimization:</p><ul><li><strong>Understanding Encoder</strong>: Focuses on accuracy for tasks like object recognition.</li><li><strong>Generation Encoder</strong>: Prioritizes stability and detail in image synthesis.</li></ul><h3>Training Strategy: Efficiency Through Stages</h3><p>Janus-Pro employs a <strong>three-stage pipeline</strong> to balance performance across tasks:</p><ol><li><strong>Stage I: Adaptor Pretraining</strong></li></ol><ul><li><strong>Objective</strong>: Learn pixel dependencies using fixed LLM weights.</li><li><strong>Data</strong>: ImageNet with category names as prompts.</li><li><strong>Outcome</strong>: Adaptors and generation head trained for 20K steps.</li></ul><p><strong>2. Stage II: Unified Pretraining</strong></p><p><strong>Data Mix</strong>:</p><ul><li><strong>Multimodal Understanding</strong>: 90M image-text pairs (e.g., YFCC, Docmatix).</li><li><strong>Text-Only</strong>: Language modeling corpora.</li><li><strong>Text-to-Image</strong>: 72M synthetic + real images (1:1 ratio).</li></ul><p><strong>Batch Ratio</strong>: 2:3:5 (understanding:text:generation ).</p><p><strong>Key Innovation</strong>: Synthetic data enhances aesthetic quality and training stability.</p><p><strong>3. Stage III: Supervised Fine-Tuning</strong></p><p><strong>Adjustments</strong>:</p><ul><li>Unlocks the understanding encoder.</li><li>Balances data ratios to 5:1:4 (understanding:text:generation ).</li></ul><p><strong>Result</strong>: Optimized for both generation quality and understanding accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SAP9lg57QMEORp_G4iX4EA.png" /></figure><h3>Performance Benchmarks: Setting New Standards</h3><h4>Multimodal Understanding</h4><ul><li><strong>MMBench</strong>: 79.2 (vs. MetaMorph’s 75.2, TokenFlow-XL’s 68.9).</li><li><strong>MMMU</strong>: 41.0 (expert-level reasoning in specialized domains).</li><li><strong>Object Detection</strong>: Matches YOLOv8’s accuracy in real-time inference tasks.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CcaGwmMqH5KZGlBPl7Pw2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eGcTquK9KMU5giUiPz6qFA.png" /></figure><h4>Text-to-Image Generation</h4><ul><li><strong>GenEval</strong>: 0.80 overall score (vs. DALL-E 3’s 0.67, SD3-Medium’s 0.74).</li><li><strong>DPG-Bench</strong>: 84.19 (superior adherence to dense prompts).</li><li><strong>Text Rendering</strong>: Accurately generates embedded text (e.g., signs, labels).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*9PlT1ZP2XgdZq76JEq7wOA.png" /><figcaption>Qualitative results of multimodal understanding and visual generation capability.<br>The model is Janus-Pro-7B and the image output resolution of visual generation is 384 × 384.<br>Best viewed on screen.</figcaption></figure><h4>Efficiency</h4><ul><li><strong>Training Time</strong>: 14 days on 32 nodes (8× NVIDIA A100 40GB GPUs per node).</li><li><strong>Throughput</strong>: Sequence packing optimizes batch processing for 384×384 images.</li></ul><h3>Competitive Advantages</h3><ol><li><strong>Unified Multimodal Framework</strong></li></ol><ul><li>Combines understanding, generation, and detection in one model, reducing deployment complexity.</li></ul><p><strong>2. Open-Source Flexibility</strong></p><ul><li>Full access to weights and training code (via HAI-LLM) enables customization for niche use cases.</li></ul><p><strong>3. Cost Efficiency</strong></p><ul><li>Eliminates per-inference costs tied to closed-source APIs (e.g., DALL-E, Midjourney).</li></ul><h3>Limitations and Future Directions</h3><ul><li><strong>Resolution Constraints</strong>: Limited to 384×384 pixels, affecting fine details (e.g., OCR, facial features).</li><li><strong>Reconstruction Artifacts</strong>: VQ tokenizer introduces minor pixel-level losses.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*MPCMYGuvLKNotM6a4FSgwA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*atekR_erB36XaHp1xF5LLw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*7PXsY5LbZMLzDtc1y7Ae7A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*3mbE0S6zHz6-ZeRme9dXTA.jpeg" /><figcaption>sample images from janus</figcaption></figure><p><strong>Scalability Plans</strong>:</p><ul><li><strong>4K Resolution Support</strong>: For cinematic-quality generation.</li><li><strong>Video Synthesis</strong>: Expanding into temporal reasoning.</li></ul><h3>Code Samples</h3><p>This code demonstrates how to create a <strong>Gradio interface</strong> for DeepSeek Janus-Pro, enabling both <strong>multimodal understanding</strong> (image QA) and <strong>text-to-image generation</strong>. Below is a breakdown of key components:</p><h4>1. Model Initialization</h4><pre># Load model and processor<br>model_path = &quot;deepseek-ai/Janus-1.3B&quot;<br>config = AutoConfig.from_pretrained(model_path)<br>vl_gpt = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)<br>vl_gpt = vl_gpt.to(torch.bfloat16).cuda()  # GPU optimization<br><br>vl_chat_processor = VLChatProcessor.from_pretrained(model_path)<br>tokenizer = vl_chat_processor.tokenizer</pre><ul><li>Loads the Janus-Pro 1.3B model (replace with Janus-Pro-7B for larger version).</li><li>Uses VLChatProcessor to handle multimodal inputs (text + images).</li><li>Converts weights to bfloat16 for GPU memory efficiency.</li></ul><h4>2. Multimodal Understanding Pipeline</h4><pre>@torch.inference_mode()<br>def multimodal_understanding(image, question, seed, top_p, temperature):<br>    # Preprocess inputs<br>    conversation = [{&quot;role&quot;: &quot;User&quot;, &quot;content&quot;: f&quot;&lt;image_placeholder&gt;\n{question}&quot;, &quot;images&quot;: [image]}]<br>    prepare_inputs = vl_chat_processor(conversation, images=pil_images).to(&quot;cuda&quot;)<br><br>    # Generate answer<br>    inputs_embeds = vl_gpt.prepare_inputs_embeds(**prepare_inputs)<br>    outputs = vl_gpt.language_model.generate(<br>        inputs_embeds=inputs_embeds,<br>        temperature=temperature,  # Controls randomness (0 = deterministic)<br>        top_p=top_p,              # Nucleus sampling threshold<br>        max_new_tokens=512<br>    )<br>    return tokenizer.decode(outputs[0], skip_special_tokens=True)</pre><ul><li>Accepts an image + question (e.g., “Explain this meme”).</li><li>Processes images using SigLIP encoder via vl_chat_processor.</li><li>Generates text responses using DeepSeek-LLM with configurable sampling.</li></ul><h4>3. Text-to-Image Generation Pipeline</h4><pre>@torch.inference_mode()<br>def generate_image(prompt, seed, guidance=5):<br>    # Prepare text prompt<br>    messages = [{&#39;role&#39;: &#39;User&#39;, &#39;content&#39;: prompt}]<br>    text = vl_chat_processor.apply_sft_template_for_multi_turn_prompts(messages)<br>    input_ids = torch.LongTensor(tokenizer.encode(text + vl_chat_processor.image_start_tag))<br>    # Generate image tokens<br>    output, patches = generate(input_ids, cfg_weight=guidance)  # CFG weight controls prompt adherence<br>    images = unpack(patches, width=384, height=384)<br>    return [Image.fromarray(images[i]) for i in range(5)]  # Returns 5 candidate images</pre><ul><li>Converts text prompts to token sequences (e.g., “A futuristic cityscape”).</li><li>Uses the VQ tokenizer and generation encoder to predict image tokens autoregressively.</li><li>Applies <strong>Classifier-Free Guidance (CFG)</strong> with adjustable weight for prompt alignment.</li></ul><h4>4. Gradio Interface</h4><pre>with gr.Blocks() as demo:<br>    # Multimodal Understanding Section<br>    with gr.Row():<br>        image_input = gr.Image()<br>        question_input = gr.Textbox(label=&quot;Question&quot;)<br>    understanding_button = gr.Button(&quot;Chat&quot;)<br>    # Text-to-Image Section<br>    prompt_input = gr.Textbox(label=&quot;Prompt&quot;)<br>    generation_button = gr.Button(&quot;Generate Images&quot;)<br>    image_output = gr.Gallery(label=&quot;Generated Images&quot;, columns=2)<br>    # Event Bindings<br>    understanding_button.click(multimodal_understanding, ...)<br>    generation_button.click(generate_image, ...)<br>demo.launch(share=True)  # Launch web UI</pre><ul><li>Creates two interactive sections:</li><li><strong>Understanding</strong>: Upload image + ask questions → Get answers.</li><li><strong>Generation</strong>: Enter text prompt → Generate 5 candidate images.</li><li>Includes example prompts/images for quick testing.</li></ul><h3>Key Parameters</h3><p>temperatureControls response randomness (0 = precise, 1 = creative).</p><p>top_pFilters low-probability tokens for focused outputs.</p><p>cfg_weightBalances prompt adherence vs. creativity in image generation (1-10).</p><p>seedEnsures reproducibility of results.</p><h3>How to Run</h3><ol><li>Install dependencies:</li></ol><pre>pip install gradio torch transformers Pillow</pre><p>2. Execute the script. A web interface will launch at localhost:7860.</p><p>3. Test with provided examples or custom inputs.</p><p>This code exemplifies Janus-Pro’s unified capabilities, combining visual understanding and generation in a single deployable interface. For advanced use cases, modify the sampling logic or integrate additional post-processing modules.</p><p><strong>GitHub Reference</strong>: <a href="https://github.com/deepseek-ai/Janus">DeepSeek-Janus-Pro</a></p><h3>Conclusion</h3><p>The provided code sample illustrates how to harness <strong>DeepSeek Janus-Pro</strong>’s multimodal capabilities through a user-friendly Gradio interface. By integrating both <strong>visual understanding</strong> (e.g., image QA, object detection) and <strong>text-to-image generation</strong>, this example showcases the model’s versatility in real-world applications. Key takeaways include:</p><ol><li><strong>Unified Workflow</strong>: Janus-Pro’s architecture enables seamless switching between understanding and generation tasks within a single framework.</li><li><strong>Customizability</strong>: Adjustable parameters like temperature, top_p, and CFG weight allow fine-tuning outputs for precision or creativity.</li><li><strong>Accessibility</strong>: The Gradio interface democratizes access to advanced AI capabilities, enabling developers and non-experts to experiment with cutting-edge multimodal AI.</li></ol><p>While the current implementation focuses on 384×384 resolution, future iterations could integrate higher-resolution support or video synthesis. Developers are encouraged to extend this template for niche use cases, such as automated report generation, interactive storytelling, or real-time creative tools.</p><h3>Final Thoughts</h3><p>DeepSeek Janus-Pro represents a leap forward in <strong>open-source multimodal AI</strong>, challenging proprietary models by offering comparable performance with full transparency and adaptability. As the AI community builds upon this foundation, Janus-Pro could become a cornerstone for democratizing advanced vision-language applications — from education and healthcare to entertainment and enterprise.</p><p><strong>Next Steps</strong>:</p><ul><li>Explore the <a href="https://github.com/deepseek-ai/Janus">GitHub repository</a> for model weights and advanced configurations.</li><li>Experiment with hybrid tasks (e.g., generating images <em>and</em> captions simultaneously).</li><li>Join the community to contribute to Janus-Pro’s evolution.</li></ul><p><em>The future of AI isn’t just intelligent — it’s collaborative. Start building yours today.</em> 🛠️🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb6243d4bc83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DeepSeek-R1]]></title>
            <link>https://adithyabandara.medium.com/deepseek-r1-7db6e8bb09ad?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/7db6e8bb09ad</guid>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 06:06:19 GMT</pubDate>
            <atom:updated>2025-01-21T06:06:19.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*zW69swro1QIzeEX_gKuF_w.png" /><figcaption>Benchmark performance of DeepSeek-R1</figcaption></figure><p><a href="https://chat.deepseek.com/">“DeepSeek-R1</a>: How This New AI Model is Solving Problems Like a Champ (Even Better Than OpenAI?)” <br>By <a href="https://www.linkedin.com/in/adithya-bandara/"><strong><em>Adithya Bandara</em></strong></a></p><p>Ah, you know how these days, everyone’s talking about AI models like ChatGPT, right? But here’s the thing — getting them to <strong>reason</strong> properly, like solving a tricky maths problem or writing bug-free code, is still a big headache. Well, hold your sarongs, because a team called DeepSeek-AI just dropped something spicy: <strong>DeepSeek-R1</strong>. And let me tell you, this thing is giving OpenAI’s top models a run for their rupees!</p><h4>What’s the Big Deal?</h4><p>So, these researchers wanted to teach AI to think smarter, not harder. They tried something called <strong>reinforcement learning (RL)</strong> — you know, like training a kid to ride a bicycle by letting them pedal, fall, and learn, instead of just reading a manual. Their first model, <strong><em>DeepSeek-R1-Zero</em></strong>, learned <strong>purely</strong> through RL — no hand-holding with pre-made examples. And guess what? It started solving maths Olympiad questions and coding problems like a pro! But… it had some <strong>C</strong>huti Chuti issues: sometimes its answers were messy, mixed languages, or hard to read. Like that cousin who speaks “Singlish” at family functions.</p><h4>Enter DeepSeek-R1: The Upgrade</h4><p>To fix the mess, they made <strong>DeepSeek-R1</strong>. This time, they gave the AI a little “cold-start” data — like showing it a few solved examples first — before letting it loose with RL. Think of it as giving the kid a helmet and training wheels <strong>before</strong> the bicycle. The result? Cleaner answers, no language mix-up, and performance matching <strong>OpenAI’s o1–1217</strong> (you know, the fancy model that costs $$$).</p><p>Here’s the kicker: <br>- <strong>Maths Skills</strong>: Scored <strong>97.3%</strong> on tough problems (MATH-500) — same as OpenAI’s best! <br>- <strong>Coding</strong>: Beat <strong>96.3%</strong> of humans on Codeforces. <br>- <strong>Knowledge Tests</strong>: Nailed <strong>90.8%</strong> on MMLU (a general knowledge exam).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*Shv_G87ZmBKdkAmmU3bWdQ.png" /><figcaption>Comparison between DeepSeek-R1 and other representative models.</figcaption></figure><h4>Small Models, Big Power</h4><p>But wait — DeepSeek didn’t stop there. They “distilled” their giant model into smaller ones (like 7B or 32B parameters) so even folks without supercomputers can use them. Imagine bottling a whole kadala curry into a sachet! These mini-models beat older giants like <strong>GPT-4o</strong> and even OpenAI’s “<strong>mini</strong>” versions. For example: <br>- <strong>DeepSeek-R1–7B</strong> scored <strong>55.5%</strong> on maths Olympiad questions — higher than GPT-4o! <br>- The <strong>32B model</strong> outperformed <strong>Qwen’s 32B</strong> preview. <strong>that’s impressive!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*htaSE_N8Kg21KPgklkJhKw.png" /><figcaption>Comparison of DeepSeek-R1 distilled models and other comparable models on<br>reasoning-related benchmarks.</figcaption></figure><p><strong>Why Should Care?</strong></p><p>1. Open-Source Goodness: DeepSeek released <strong>all</strong> their models for free. Local developers and uni students can now build apps or research without begging for API access. <br>2. Education Boost: Imagine an AI tutor that solves Advanced Level maths problems <strong>and</strong> explains its steps clearly. No more “බලන්න මං මේක කරනවා” confusion! <br>3.Cost-Effective: Smaller models mean lower costs for startups. Even a Raspberry Pi could run some of these!</p><blockquote>But… It’s Not Perfect <br>The model still struggles with: <br>Language Mixing: If you ask it in Sinhala, it might reply in English. Typical Colombo auntie vibes. <br>Prompt Sensitivity: Works best with simple, clear questions. Don’t try to ගොඩක් අමාරු කරන්න!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*fTU1OL2uNsDw0tOelQMuYw.png" /><figcaption>Limitation, and Future Work</figcaption></figure><h3>The Future</h3><p>DeepSeek plans to fix these quirks and tackle software engineering tasks next. Imagine an AI that can debug your code while you sip <strong><em>coffee</em></strong>. *Ado, that’s the dream!*</p><p>So, there you have it — DeepSeek-R1 is like the new කොල්ලා in town, ready to shake up the AI world. And the best part? It’s <strong>free for all</strong>. Time to ditch those expensive APIs and start experimenting, no?</p><p>මචන්, let’s <strong>get coding</strong>!</p><p>P.S. If you’re curious, check out their open-source models <a href="https://github.com/deepseek-ai">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7db6e8bb09ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unveiling the Morris II AI Worm]]></title>
            <link>https://adithyabandara.medium.com/unveiling-the-morris-ii-ai-worm-3c19020ec70d?source=rss-720399682122------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c19020ec70d</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[google-llm]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[google-gemini-ai]]></category>
            <category><![CDATA[cyebrsecurity]]></category>
            <dc:creator><![CDATA[Adithya Bandara]]></dc:creator>
            <pubDate>Mon, 18 Mar 2024 14:21:40 GMT</pubDate>
            <atom:updated>2024-03-18T14:21:40.830Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="introduction image to article consist with morris II AI WITH SECRITY?" src="https://cdn-images-1.medium.com/max/1024/1*ENbPn58jgyzBVCqRxz-bEg.png" /></figure><p>Hello, everyone! Welcome to my blog, where today we’ll be delving into a groundbreaking discovery in the realm of artificial intelligence: the <strong>Morris II AI worm</strong>. This sophisticated digital threat has been making waves in the tech world, <strong>targeting generative AI-powered applications</strong> and posing significant <strong>security concerns</strong>.</p><h3>Introduction to Morris II AI Worm</h3><p>Imagine an AI-enabled virus capable of stealing confidential data and spreading malware seamlessly through email clients. That’s precisely what the Morris II AI worm represents — a new breed of malware designed to exploit <strong>prompt injection vulnerabilities in generative AI systems</strong> like Gemini Pro and Chat GPT 4.0. Discovered by researchers Ben Nassie, Stav Cohen, and Ron Bitten, this AI worm raises serious questions about the security of AI-powered technologies.</p><figure><img alt="Is AI a problem for cybersecurity?" src="https://cdn-images-1.medium.com/max/1024/1*-cs7Z-MOITOt4aT2FOzgKg.png" /></figure><h3>How the Morris II AI Worm Works</h3><p>The Morris II AI worm operates by exploiting <strong>prompt injection</strong> vulnerabilities within AI systems. These vulnerabilities act as loopholes, allowing the worm to inject malicious prompts into the system’s operations. Once inside, the worm can command the AI system to perform tasks that compromise user privacy and security.</p><blockquote>What exactly is this prompt injection is it like SQL injection?</blockquote><blockquote>Yes!! but <strong>Prompt injection</strong> and <strong>SQL injection</strong> are both ways of <strong>inserting malicious code</strong>, but they target <strong>different systems</strong>. Prompt injection is about putting bad commands into AI systems, while SQL injection is about messing with databases used by websites. They work differently and cause different kinds of problems. Prompt injection shows how cyber threats are changing, especially in advanced tech like AI.</blockquote><blockquote>Prompt injection is the act of inserting harmful commands or prompts into AI systems to manipulate their behavior or output.</blockquote><figure><img alt="Prompt injection is the act of inserting harmful commands or prompts into AI systems to manipulate their behavior or output." src="https://cdn-images-1.medium.com/max/512/1*r7bxtosb-sK3by9ANORSYQ.png" /></figure><p>One of the most concerning capabilities of the Morris II worm is its ability to<strong> extract sensitive information such as credit card details and Social Security numbers</strong> without the user’s knowledge or consent. This stealthy operation highlights the potent nature of the digital threat posed by Morris II, as it can continue compromising user security without immediate detection.</p><p>For a detailed technical understanding of Morris II’s workings, I highly recommend referring to the research paper titled “AI Unleashing Zero-Click Worms that Target Generative AI Powered Applications” (<a href="https://arxiv.org/pdf/2403.02817.pdf">Link to the research paper</a>). The paper provides comprehensive insights into Morris II’s mechanisms, propagation methods, and the potential impact on AI-powered systems.</p><h3>The Response from Tech Giants</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jmfpd4JxhIKoJOiN5AYJvA.png" /></figure><p>Upon discovering Morris II, researchers shared their findings with tech giants like Google and OpenAI. These companies swiftly responded by enhancing the resilience of their AI systems, underlining the importance of proactive security measures in combating AI-based threats. OpenAI’s rapid response demonstrates their commitment to safeguarding user security and preventing future attacks on AI-based products.</p><h3><strong><em>But we can&#39;t be sure!!</em></strong></h3><p>The emergence of Morris II underscores the critical need for robust AI security measures. While tech giants play a significant role in enhancing system resilience, individual users must also prioritize digital safety. Being vigilant, staying informed about potential threats, and understanding the tools we use daily are essential steps in maintaining AI security.</p><p>As we navigate the age of AI, continuous innovation in AI security becomes imperative. Let’s prioritize security measures to ensure a safe and secure digital environment for all users.</p><p>Thank you for reading, and stay tuned for more insights into the fascinating world of technology and cybersecurity. Remember, your digital safety is paramount. Stay safe, stay informed, and keep exploring!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c19020ec70d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>