Archive

1290 posts · Page 54 of 108. ← Blog

Pratik Dhanave · ·16 min read

Vector Search from Scratch

Build a working in-memory vector store and exact k-nearest-neighbor search in Go by hand — no vector database — then understand precisely what HNSW, FAISS, and pgvector optimize when brute force finally runs out of road.

Build an in-memory vector store and exact k-NN search in Go by hand: a VectorStore with Add and Search, top-k selection with container/heap, normalize-on-insert, an honest look at when brute force is right, and when ANN (HNSW, FAISS, pgvector) earns its keep.

Pratik Dhanave · ·11 min read

The ADK Evaluation Model

Before you can evaluate an agent in Go, you need a mental model of what "evaluating an agent" even means. This post unpacks the conceptual core of Google's Agent Development Kit eval framework — cases, trajectories, metrics, thresholds — the parts that are language-agnostic, so the rest of this series can implement them as plain Go types and functions.

Before you can evaluate an agent in Go, you need a mental model of what "evaluating an agent" even means. This post unpacks the conceptual core of Google's Agent Development Kit eval framework — cases,...

Pratik Dhanave · ·10 min read

Tools in Microsoft Agent Framework (Python): Functions, Hosted Tools, MCP, Skills & CodeAct

A complete guide to giving a Microsoft Agent Framework agent the ability to act — from a plain Python function the model can call, to provider-hosted sandboxes, remote MCP servers, and higher-level packaging patterns like Skills and CodeAct.

A complete guide to giving a Microsoft Agent Framework agent the ability to act: function tools, provider-hosted tools (code interpreter, file search, web search), local and hosted MCP, plus Skills and CodeAct — with the code and gotchas for each.

Pratik Dhanave · ·6 min read

How Models Leak Data — The Attacks That Make Privacy Necessary

A trained model feels like a safe abstraction — it's just numbers, a learned function, surely it reveals nothing about the specific data it saw. That intuition is wrong, and a family of attacks proves it: models memorize their training data and can be made to give it up. Understanding these attacks is what turns privacy from a vague worry into a concrete threat you can defend against — and it's why the formal techniques in the rest of the series exist.

A trained model feels safe — it's just numbers — but models memorize their training data and can be made to give it up. Membership inference, model inversion, training-data extraction, and model stealing — many working with only black-box API access, which is why a model trained on sensitive data is itself sensitive data.

Pratik Dhanave · ·5 min read

Modules, Config, and Tooling

Types are only half of TypeScript; the other half is the machinery that compiles, configures, and connects your code to the vast JavaScript ecosystem. ES modules organize code, `tsconfig.json` controls how strictly the compiler checks it, and declaration files let typed and untyped code interoperate. Understanding this layer is what turns a working `.ts` file into a real, maintainable project.

Types are only half of TypeScript; the other half is the machinery that compiles, configures, and connects your code to the JavaScript ecosystem. ES modules organize code, tsconfig.json controls how strictly the compiler checks it (turn on strict), and declaration files let typed and untyped code interoperate. This is the practical infrastructure of a project.

Pratik Dhanave · ·8 min read

Emotional Intelligence in Leadership and Teams

The transition that breaks the most technical careers is the one from doing the work to leading the people who do it — because it's a switch from a domain where emotional intelligence is optional to one where it's the entire job. A leader's technical brilliance means little if they can't create the conditions for a team to do its best work: trust, safety, motivation, and healthy dynamics. This closing post is about EQ where it matters most, and where technical leaders most often struggle.

The transition that breaks the most technical careers is from doing the work to leading the people who do it — a switch from a domain where EQ is optional to one where it's the entire job. A leader's technical brilliance means little if they can't create the conditions for a team to do its best work.

Pratik Dhanave · ·7 min read

What Reasoning Models Are

For years, the way to make a language model better was to make it bigger — more parameters, more training data. Reasoning models represent a different bet: instead of only scaling what the model knows, scale how much it thinks before answering. A reasoning model spends extra computation at inference time working through a problem step by step before committing to an answer — and on hard problems, that changes what's possible.

For years, making a language model better meant making it bigger. Reasoning models represent a different bet: scale how much the model thinks before answering, not just what it knows. A reasoning model spends extra computation working through a problem step by step — and on hard problems, that changes what's possible.

Pratik Dhanave · ·13 min read

Embeddings

Turn text into a `[]float32` that places meaning in space — what an embedding is, cosine similarity implemented by hand in Go, calling an OpenAI-compatible /embeddings endpoint with net/http, and a worked pairwise-similarity example that scores related sentences higher.

Turn text into a []float32 that places meaning in space — what an embedding is, cosine similarity implemented by hand in Go, calling an OpenAI-compatible /embeddings endpoint with net/http, and a worked pairwise-similarity example that scores related sentences higher.

Pratik Dhanave · ·10 min read

Why Evaluating AI Agents Is Hard

The opener to a series on evaluating agents in Go: why an agent isn't a function you can unit-test, why "it worked in the demo" doesn't survive contact with production, and the two things actually worth measuring — the steps it took and the answer it gave.

The opener to a series on evaluating agents in Go: why an agent isn't a function you can unit-test, why "it worked in the demo" doesn't survive contact with production, and the two things actually worth...

Pratik Dhanave · ·8 min read

Churn Prediction and Autonomous Retention Agents

Predicting who will leave is the easy half. The hard half is acting on it: treating the persuadable, respecting a budget, and proving the intervention actually kept anyone.

Predicting attrition and acting on it: churn features and labels, uplift vs propensity (treat the persuadable), and an agentic retention workflow that recommends and executes interventions with guardrails and holdout mea…

Pratik Dhanave · ·7 min read

Mandates and Verifiable Credentials: Proving an Agent Was Authorized

When an AI agent spends your money, "the user said so" is not evidence. A signed mandate chain is.

A deep dive on the mandate chain as evidence: verifiable credentials (VCs), signing, the non-repudiable Intent→Cart→Payment chain, revocation and expiry, and why this replaces 'trust me, the user said so' with cryptograp…