What I write about

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

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

Saturday, 29 March 2025

The Complete Picture: Understanding the Full Software Procurement Lifecycle

 If you regularly respond to Requests for Proposals (RFPs), you've likely mastered crafting compelling responses that showcase your solution's capabilities. But here's something worth considering: RFPs are just one piece of a much larger puzzle.

Like many professionals, I used to focus solely on the RFP itself - until I realized how much happens before and after that document gets issued. Understanding this complete lifecycle doesn't just make you better at responding to RFPs; it transforms how you approach the entire sales process.



1. Request for Information (RFI): The Discovery Phase

Before any RFP exists, organizations typically begin with an RFI (Request for Information). Think of this as their research phase - they're exploring what solutions exist in the market without committing to anything yet.

Key aspects of an RFI:

  • Gathering market intelligence about available technologies

  • Identifying potential vendors with relevant expertise

  • Understanding current capabilities and industry trends

Why this matters: When you encounter vague or oddly specific RFPs, it often means the buyer skipped or rushed this discovery phase. A thorough RFI leads to better-defined RFPs that are easier to respond to effectively.

Real-world example: A healthcare provider considering AI for patient records might use an RFI to learn about OCR and NLP solutions before crafting their actual RFP requirements.


2. Request for Proposal (RFP): The Formal Evaluation

This is the stage most vendors know well - when buyers officially outline their needs and ask vendors to propose solutions.

What buyers are really doing:

  • Soliciting detailed proposals from qualified vendors

  • Comparing solutions, pricing, and capabilities systematically

  • Maintaining a transparent selection process

Key to success: Generic responses get lost in the shuffle. The winners are those who submit tailored proposals that directly address the buyer's specific pain points with clear, relevant solutions.


3. Proposal Evaluation: Behind Closed Doors

After submissions come in, buyers begin their assessment. This phase combines:

Technical evaluation: Does the solution actually meet requirements?
Financial analysis: Is it within budget with no hidden costs?
Vendor assessment: Do they have proven experience and solid references?

Pro tip: Even brilliant solutions can lose points on small details. Include a clear requirements mapping table to make evaluators' jobs easier.


4. Letter of Intent (LOI): The Conditional Commitment

When a buyer selects their preferred vendor, they typically issue an LOI. This isn't a final contract, but rather a statement that says, "We plan to work with you, pending final terms."

Why this stage is crucial: It allows both parties to align on key terms before investing in full contract negotiations.

For other vendors: Don't despair if you're not the primary choice. Many organizations maintain backup options in case primary negotiations fall through.


5. Statement of Work (SOW): Defining the Engagement

Before work begins, both parties collaborate on an SOW that specifies:

  • Exact project scope (inclusions and exclusions)

  • Clear timelines and milestones

  • Defined roles and responsibilities

The value: A well-crafted SOW prevents scope creep and ensures everyone shares the same expectations from day one.


6. Purchase Order (PO): The Green Light

The PO transforms the agreement into an official, legally-binding commitment covering:

  • Payment terms and schedule

  • Delivery expectations and deadlines

  • Formal authorization to begin work

Critical importance: Never start work without this formal authorization - it's your financial and legal safeguard.


7. Project Execution: Delivering on Promises

This is where your solution comes to life through:

  • Development and testing

  • Performance validation

  • Final deployment

Key insight: How you execute often matters more than what you promised. Delivering as promised (or better) builds the foundation for long-term relationships.


8. Post-Implementation: The Long Game

The relationship doesn't end at go-live. Ongoing success requires:

  • Responsive support and maintenance

  • Continuous performance monitoring

  • Regular updates and improvements

Strategic value: This phase often determines whether you'll secure renewals and expansions. It's where you prove your commitment to long-term partnership.


Why This Holistic View Matters

Understanding the complete procurement lifecycle enables you to:

  • Craft more effective proposals by anticipating the buyer's full journey

  • Develop strategies that address needs beyond the immediate RFP

  • Position yourself as a strategic partner rather than just another vendor

Final thought: When you respond to an RFP, you're not just submitting a proposal - you're entering a relationship that will evolve through all these stages. The most successful vendors understand and prepare for this entire journey, not just the initial document.




Saturday, 22 February 2025

The Journey Beyond Learning: My Year at IIM Lucknow

A year ago, I embarked on a journey at IIM Lucknow, driven by the pursuit of professional growth. I sought knowledge, expertise, and a refined understanding of business dynamics. But as I stand at the end of this transformative chapter, I realize I am leaving with something far greater—a profound evolution of my spirit, character, and perception of life.

What began as a quest for professional excellence soon unfolded into a deeply personal and spiritual exploration. The structured curriculum, case discussions, and strategic frameworks were invaluable, but what truly shaped me was the realization that growth is not just about skills—it’s about resilience, patience, and self-discipline. And nowhere was this lesson more evident than in a simple yet powerful idea: “I can think, I can wait, I can fast.”

The Wisdom of Siddhartha: The Lessons We Often Overlook

Hermann Hesse’s Siddhartha tells the story of a man in search of enlightenment. When asked about his abilities, Siddhartha humbly states:
“I can think, I can wait, I can fast.”
At first glance, these may seem like ordinary statements. But as I reflected on them, I saw their profound relevance—not just in spiritual journeys but in our professional and personal lives as well.

Thinking: The Power of Deep Contemplation

In an environment as intense as IIM, quick decisions and rapid problem-solving are often celebrated. But I realized that the true power lies in the ability to pause, reflect, and analyze beyond the obvious. Critical thinking is not just about finding solutions—it is about questioning assumptions, challenging biases, and understanding perspectives beyond our own. The ability to think deeply is what sets apart great leaders from the rest.

Waiting: The Strength in Patience

Patience is an underrated virtue in a world that demands instant results. IIM taught me that waiting is not about inaction—it is about perseverance. There were times when ideas took longer to materialize, when failures felt discouraging, when the next step seemed uncertain. But waiting allowed me to develop resilience, to trust the process, and to realize that true success is not immediate—it is earned over time.

Fasting: The Discipline to Endure

Fasting is not just about food—it is about the ability to withstand hardships and resist temptations. In the corporate world, in leadership, and in life, there will be moments of struggle, of deprivation, of difficult choices. The ability to endure, to sacrifice short-term pleasures for long-term goals, is what defines true strength. At IIM, I learned to push beyond my comfort zone, to embrace challenges with determination, and to understand that true discipline is the key to transformation.

More Than an Institution—A Journey of Self-Discovery

IIM Lucknow was not just an academic experience; it was a crucible that shaped my mind, spirit, and character. I came seeking professional advancement, but I left with something far deeper—an understanding of what it means to be a better human being.

Beyond business models and strategy decks, I learned that the greatest asset is self-awareness, the greatest skill is patience, and the greatest success is inner peace.

A heartfelt thanks to Professor Neerja Pande, whose guidance in communication not only refined my professional skills but also enlightened us with a path of spirituality and wisdom, leading to profound personal and professional growth.

As we strive for excellence in our careers, let us not forget to nurture the qualities that make us better individuals—the ability to think, to wait, and to fast. Because in mastering these, we master not just our professions but our very existence.

This is not just my story—it is a reminder for all of us, and a lesson we must pass on to the next generation.



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 Cha...