What I write about

Friday, 6 March 2026

The Mental Model for Agentic AI Frameworks

The Mental Model for Agentic AI Frameworks

Why People Get Confused — and How to Think About Them Clearly

The explosion of “agentic AI frameworks” has created a lot of confusion. Names like LangChain, LangGraph, AutoGen, CrewAI, LlamaIndex, and Semantic Kernel are often presented as if they compete with each other. Beginners naturally ask: Which one should I choose?

That question is actually the wrong starting point.

The truth is that most of these tools operate at different layers of an AI system, which means they are often used together rather than instead of each other. Once you see this layering clearly, the confusion disappears.

The Core Mental Model

Every modern AI system that goes beyond a simple chatbot usually contains three conceptual layers.

1. Intelligence Layer — the model itself

This is the raw LLM:

  • OpenAI
  • Anthropic
  • Groq
  • Azure OpenAI

These provide intelligence but nothing else. They generate text. They do not manage workflows, memory, or tools.

2. Capability Layer — giving the model tools and knowledge

This layer equips the model with the ability to interact with the world.

Typical capabilities include:

  • Tool calling (APIs, databases, search)
  • Retrieval from documents (RAG)
  • Memory and context management

Frameworks operating here include:

  • LangChain – connects LLMs to tools and pipelines
  • LlamaIndex – specializes in knowledge indexing and retrieval
  • Semantic Kernel – organizes reusable AI “skills” and planners

A helpful analogy is to think of this layer as giving the AI hands and a library.

3. Orchestration Layer — coordinating complex behavior

Once systems grow beyond one step, coordination becomes the real challenge. This layer manages:

  • task ordering
  • multi-agent collaboration
  • retries and error handling
  • workflow branching

Frameworks here include:

  • LangGraph – graph-based workflow orchestration
  • CrewAI – role-based AI teams
  • AutoGen – agents communicating through conversation

This layer acts like management inside an AI organization.

A Simple Way to Remember the Ecosystem

Framework Mental Model
LangChain Connector between AI and tools
LlamaIndex Librarian managing knowledge
Semantic Kernel Planner organizing tasks
CrewAI Company with defined employee roles
AutoGen Group chat where agents collaborate
LangGraph Workflow engine controlling processes

Why Multiple Frameworks Often Appear in the Same System

Many beginners assume you must choose only one framework. In reality, serious systems often combine several.

For example, a production AI workflow might look like this:

  • LlamaIndex retrieves relevant documents
  • LangChain calls tools and APIs
  • LangGraph orchestrates the overall workflow

Each framework solves a different problem.

Trying to force one framework to do everything usually leads to unnecessary complexity.

Where Most People Get Confused

1. Confusing capability frameworks with orchestration frameworks

LangChain and LlamaIndex primarily provide capabilities. LangGraph, CrewAI, and AutoGen primarily provide coordination.

They solve different problems.

2. Thinking agent frameworks are interchangeable

They are not.

  • Some focus on structured workflows
  • Others focus on collaborative agents
  • Others focus on knowledge retrieval

3. Over-engineering too early

Many beginners jump immediately into complex multi-agent architectures.

In practice, most successful systems start with a simple pipeline and only introduce orchestration when necessary.

A Practical Decision Guide

  • Simple RAG chatbot → LangChain or LlamaIndex
  • Knowledge-heavy assistant → LlamaIndex
  • Structured workflows → LangGraph
  • Role-based AI teams → CrewAI
  • Agents collaborating via conversation → AutoGen
  • Microsoft enterprise copilots → Semantic Kernel

Control vs Flexibility

Another useful mental model is the spectrum of structure.

From least structured to most controlled:

AutoGen → CrewAI → LangChain → Semantic Kernel → LangGraph

More control usually means:

  • easier debugging
  • predictable behavior
  • production readiness

Less control usually means:

  • more experimentation
  • emergent behavior
  • faster prototyping

The Most Practical Advice

  • Start simple. Build a working pipeline before designing multi-agent systems.
  • Choose frameworks based on architecture layers.
  • Do not over-index on agents.
  • Treat orchestration as an engineering problem, not a prompt problem.

A Final Rule of Thumb

When evaluating an AI system architecture, ask three questions:

  1. What model provides intelligence?
  2. What framework gives the model tools and knowledge?
  3. What component orchestrates the workflow?

Once you can answer these clearly, the agentic AI ecosystem stops looking chaotic and starts looking like a structured stack.

And that clarity is the real advantage.

Wednesday, 4 March 2026

The Technological Ascent: From Data to Wisdom

The Technological Ascent: From Data to Wisdom

For most of human history, we have misunderstood progress.

We framed it as machines becoming smarter, when in reality progress has always been about humans being freed from lower layers of thinking.

What looks like an AI revolution is actually the final stretch of a very long ascent—one that began over ten thousand years ago.

This is the story of how technology systematically lifted humans from data to wisdom, layer by layer, exactly as it was always meant to.


The Core Thesis

Technology does not replace humans from the top.
It replaces humans from the bottom.

Every major technological shift removes human effort from a lower cognitive layer and pushes us upward. What remains—after automation has done its work—is not intelligence, but judgment.

That is where humans belong.


The Six Layers of the Ascent

1. Data (≈10,000 BCE – 1900s)

Humans as recorders

At the base lies raw data: facts without meaning.

  • Crop yields
  • Inventory counts
  • Births, deaths, taxes
  • Weather observations

For millennia, humans acted as living storage systems. We wrote, copied, preserved, and remembered because there was no alternative.

Data had:

  • No context
  • No interpretation
  • No abstraction

This was not a failure of intelligence. It was a failure of tooling.


2. Computation (1900s – 1970s)

Machines learn to calculate, not understand

The early 20th century introduced a critical but often misunderstood layer: computation.

  • Mechanical calculators
  • Mainframes
  • Punch cards
  • Batch processing
  • Fixed programs

Machines could now:

  • Perform arithmetic flawlessly
  • Repeat instructions endlessly
  • Process records faster than humans

But they could not:

  • Understand meaning
  • Adapt questions
  • Interpret results

This era automated math, not semantics.

Humans were still responsible for understanding what the outputs meant.


3. Information (1980s – 2000s)

Machines organize meaning

With personal computers, relational databases, and the internet, a fundamental shift occurred.

Data became structured.

  • Schemas
  • Queries
  • Dashboards
  • Reports
  • KPIs

Machines now organized data into information.

You could ask new questions without rewriting programs. Meaning became explicit.

This is where most organizations still live today—surrounded by dashboards, mistaking visibility for insight.


4. Knowledge (2000s – 2020s)

Machines discover patterns

Machine learning and analytics moved us into the knowledge layer.

Machines learned to:

  • Detect patterns
  • Identify correlations
  • Predict outcomes
  • Optimize decisions

Knowledge stopped being handcrafted. It became computed.

At this point, humans ceased to be the best pattern recognizers in the room. That role belongs to machines now—and permanently.

The human bottleneck shifted from knowing facts to deciding what to do with them.


5. Action (2022 – Present)

Machines execute decisions

This is the agentic era.

AI systems now:

  • Take actions
  • Use tools
  • Operate in closed loops
  • Learn from outcomes
  • Execute within constraints

This is not intelligence inflation—it is execution automation.

Humans are exiting the loop not because they are obsolete, but because execution is no longer the right layer for them.


6. Wisdom (Emerging / Future)

The irreducible human layer

Wisdom is not faster thinking.
It is not better prediction.
It is not more data.

Wisdom is:

  • Choosing what matters
  • Defining goals
  • Balancing trade-offs
  • Setting ethical boundaries
  • Taking responsibility for consequences
  • Knowing when not to act

No dataset tells you:

  • What is acceptable risk
  • What kind of future you want
  • When efficiency becomes harm

This layer has never been automatable—not because it is complex, but because it is normative.

Technology ends here.


The Pattern Is Unmistakable

Layer Who used to do it Who does it now
Data collection Humans Sensors & logs
Computation Humans Machines
Information processing Humans Software
Knowledge discovery Humans ML systems
Action execution Humans AI agents
Wisdom Humans Still humans

Why This Feels Uncomfortable

Many people resist this framing because their identity lives between layers.

  • Knowledge workers fear losing relevance
  • Managers confuse control with wisdom
  • Organizations reward activity over judgment

But wisdom is not comfortable.

It demands accountability.

There are fewer tasks, but the consequences are larger.


The Final Insight

Progress is not machines becoming human.
Progress is humans being freed to become wise.

We didn’t lose purpose.

We outsourced the noise.

And for the first time in history, that leaves us face to face with the layer that was always ours.

Saturday, 19 July 2025

A deep technical breakdown of how ChatGPT works

How ChatGPT Works – A Deep Technical Dive

🌟 INTRODUCTION: The Magic Behind the Curtain

Have you ever asked ChatGPT something — like “Summarize this news article” or “Explain AI like I’m 10” — and wondered how this is even possible? Let’s walk through how ChatGPT actually works.


🧠 PART 1: ChatGPT Is a Probability Machine

ChatGPT doesn’t understand language like humans. It generates text by predicting what comes next — one token at a time.

Example:

You type: “The Eiffel Tower is in”

  • Paris → 85%
  • France → 10%
  • Europe → 4%
  • a movie → 1%

The highest-probability token wins — so it outputs “Paris.” This continues token by token. This is called auto-regressive generation.


🔡 PART 2: What’s a Token?

Tokens are chunks of text — not full words or characters.

  • “ChatGPT is amazing” → ["Chat", "GPT", " is", " amazing"]

GPT processes and generates text one token at a time within a fixed context window.

  • GPT-3.5 → ~4,096 tokens
  • GPT-4 → ~8k–32k tokens

🧰 PART 3: What Powers It Underneath

ChatGPT is built on a Transformer — a deep neural network architecture introduced in 2017.

1. Embeddings

Tokens are converted into high-dimensional vectors that capture meaning. Similar words end up close together in vector space.

2. Self-Attention

Self-attention lets the model decide which previous tokens matter most for the current prediction.

“The cat that chased the mouse was fast” → “was” refers to “cat”

3. Feed-Forward Layers

These layers refine meaning after attention using non-linear transformations.

4. Residuals + Layer Normalization

These stabilize training and allow very deep networks to work reliably.


⚙️ PART 4: How It Was Trained
  1. Pre-training — learns language by predicting the next token
  2. Supervised Fine-Tuning — trained on human-written examples
  3. RLHF — optimized using human feedback and PPO

⚠️ PART 5: Where It Goes Wrong
  • Hallucinations
  • Stale knowledge
  • Context window limits
  • Bias inherited from data

🎓 CONCLUSION: It’s Just Math — But Really Good Math

ChatGPT is a probability engine trained on massive data and refined by human feedback. It doesn’t think — but it predicts extremely well.

Sunday, 1 June 2025

Value Proposition vs Positioning Statement

🧭 Value Proposition vs. Positioning Statement: What’s the Difference (and How to Write Both)

If you’ve ever struggled to explain what your company does or why anyone should care, you’re not alone. Two of the most important tools for defining your brand are:

  • The Value Proposition
  • The Positioning Statement

They’re often confused, but each serves a different purpose — both externally for customers and internally for teams.

🎯 What’s the Difference?

Aspect Value Proposition Positioning Statement
Purpose Convince customers to choose you Align internal teams on brand strategy
Audience External (customers, clients) Internal (employees, partners)
Focus Benefits, problems solved, uniqueness Market, audience, problem, differentiator
Length Short (1–2 sentences) Longer but focused
Usage Websites, ads, product pages Brand decks, internal strategy
Core Message “Why choose us?” “How we’re positioned and who we serve”

✅ Positioning Statement Template

Use this to define your place in the market — especially useful for brand workshops and internal alignment.

[Company Name] helps [Target Customer] [Verb] [Positive Outcome] through [Unique Solution] so they can [Transformation] instead of [Villain / Roadblock / Negative Outcome].

🧪 Example: Airtable

Airtable helps fast-moving teams organize work efficiently through a flexible, no-code database so they can launch projects faster instead of juggling spreadsheets and tools.

✅ Value Proposition Template

Use this when you need a customer-facing hook — simple, clear, and direct.

We help [Target Customer] solve [Problem] by [Key Benefit / Solution], so they can [Achieve Desired Outcome].

🧪 Example: Grammarly

We help professionals and students improve their writing by offering real-time grammar and clarity suggestions, so they can communicate confidently.

📄 Copy-Paste Templates

Positioning Statement

[Company Name] helps [Target Customer] [Verb] [Positive Outcome] through [Unique Solution] so they can [Transformation] instead of [Villain / Roadblock / Negative Outcome].

Value Proposition

We help [Target Customer] solve [Problem] by [Key Benefit / Solution], so they can [Achieve Desired Outcome].

🧠 TL;DR

  • Value Proposition → Why customers choose you
  • Positioning Statement → How your team frames you
  • Both are essential — one sells, one guides

✍️ Want to Fill These Out Easily?

Want a ready-made Google Doc, Notion page, or Miro board version of these templates?

Leave a comment or drop a message — we’ll share it with you.

Thursday, 15 May 2025

Intelligent Proctoring System Using OpenCV, Mediapipe, Dlib & Speech Recognition

ProctorAI: Intelligent Proctoring System Using OpenCV, Mediapipe, Dlib & Speech Recognition

ProctorAI is a real-time AI-based proctoring solution that uses computer vision and audio analysis to detect suspicious activities during exams or assessments.

👉 View GitHub Repository

🔍 Key Features

  • Face detection and tracking using Mediapipe and Dlib
  • Eye and pupil movement monitoring for head and gaze tracking
  • Audio detection for identifying background conversation
  • Multi-screen detection via active window tracking
  • Real-time alert overlays on camera feed
  • Interactive quit button on the camera feed

⚙️ How It Works

  1. Webcam feed is captured using OpenCV
  2. Face and eye landmarks detected using Mediapipe
  3. Dlib tracks pupil movement from eye regions
  4. System checks head movement, gaze, and face presence
  5. Running applications scanned using PyGetWindow
  6. Background audio analyzed using SpeechRecognition
  7. Alerts displayed in real time on suspicious activity

🧠 Tech Stack

  • OpenCV – Video capture and rendering
  • Mediapipe – Face and landmark detection
  • Dlib – Pupil detection and geometry
  • SpeechRecognition – Audio analysis
  • PyGetWindow – Application window tracking
  • Threading – Parallel detection modules

🚨 Alerts Triggered By

  • Missing face (student leaves or covers webcam)
  • Sudden or excessive head movement
  • Unusual pupil movement
  • Multiple open windows
  • Background voice detection

📦 Installation

git clone https://github.com/anirbanduttaRM/ProctorAI
cd ProctorAI
pip install -r requirements.txt

Download shape_predictor_68_face_landmarks.dat from dlib.net and place it in the root directory.

▶️ Running the App

python main.py

🖼️ Screenshots

🎥 Demo Video

📌 Future Improvements

  • Face recognition for identity verification
  • Web-based remote monitoring
  • Data logging and analytics
  • Improved NLP for audio context

🤝 Contributing

Pull requests are welcome. For major changes, open an issue first.

📄 License

Licensed under the MIT License — see the LICENSE file.


Made with ❤️ by Anirban Dutta

Thursday, 17 April 2025

MCPs Explained: How AI Assistants Actually Get Stuff Done

MCPs Explained: How AI Assistants Actually Get Stuff Done

The Hard Truth About LLMs

You’ve heard the hype around large language models like ChatGPT, Claude, and Gemini.

They write essays. They generate code. They explain quantum physics.

But here’s the uncomfortable reality:
LLMs alone cannot actually do anything.

They cannot:

  • Send emails
  • Book flights
  • Query your database
  • Access live systems
  • Execute business workflows
LLMs by themselves are incapable of doing anything meaningful. The only thing an LLM is good at is predicting the next text.

Enter MCP — Model Context Protocol

MCP stands for Model Context Protocol.

MCP is a universal translator between AI models and external tools.

Instead of building custom integrations for every API, database, or service, MCP provides a standardized way for AI models to interact with them.

The Evolution of LLMs

Stage 1: Text Prediction

  • Chatting
  • Writing content
  • Summarizing documents
  • Generating code

But no real-world execution.

Stage 2: LLM + Tools

  • Search APIs
  • Calculators
  • Databases
  • Email systems

The problem? Every tool has its own API and format. Integration becomes complex and unscalable.

The Big Idea Behind MCP

Instead of teaching the LLM ten different tool languages, MCP creates one common language between models and services.

Think of MCP as USB-C for AI tools.

This enables:

  • Faster integration
  • Lower engineering effort
  • Plug-and-play AI services
  • Cleaner architecture

The MCP Ecosystem

Component Role
Client Where users interact
Protocol The shared language
MCP Server The middle layer
Service The actual tool (database, calendar, email, etc.)

Why MCPs Matter

For Developers

  • Build once, plug everywhere
  • Create reusable AI toolchains
  • Reduce integration complexity

For Entrepreneurs

  • AI-native SaaS becomes easier to build
  • Lower plumbing costs
  • New ecosystem marketplaces will emerge

Final Take

MCP turns language prediction into real-world execution.

If you’re building in AI, this is foundational infrastructure. Ignore it, and you’ll be rebuilding plumbing others have already standardized.

Because soon… AI won’t just talk. It will execute.

Saturday, 12 April 2025

Emergence of adaptive, agentic collaboration

Emergence of Adaptive, Agentic Collaboration

A playful game that reveals the future of multi-agent AI systems

🎮 A Simple Game? Look Again

At first glance, it seems straightforward: move the rabbit, avoid the wolves, and survive. But beneath the playful design lies something deeper — a simulation of intelligent, agent-based collaboration.

Gameplay Screenshot

🐺 Agentic AI in Action

Each wolf is more than a simple chaser. Guided by a Coordinator Agent, they dynamically adapt roles:

  • 🐾 Chaser Wolf — directly pursues the rabbit
  • 🧠 Flanker / Interceptor Wolf — predicts and cuts off escape paths
This behavior is not hardcoded — it emerges through adaptive, collaborative intelligence.
Wolves Coordinating

📊 Interactive Diagram: Wolf Agent Roles

Chaser Wolf
Interceptor Wolf
Coordinator Agent
Click any node to learn more

🌍 Beyond the Game: Real-World Impact

This simulation maps directly to real systems such as:

  • 🚚 Smart delivery fleets
  • 🧠 Healthcare diagnostic agents
  • 🤖 Collaborative robotic manufacturing

🎥 Watch It in Action

The Mental Model for Agentic AI Frameworks

The Mental Model for Agentic AI Frameworks Why People Get Confused — and How to Think About Them Clearly The explosion of “agentic A...