Blog

Long-form writing on multi-agent AI, medical AI governance, HIPAA-aware architecture, and cloud-native systems. Most posts grow out of work on Bodh — an open-source Go implementation of Microsoft Agent Framework pattern tuned for medical sequential diagnosis.

Course series · Featured articles · Browse by topic · Full archive · RSS feed

Featured

Popular

Course Series

Browse by Topic

#AI Agents (311)#Backend Engineering (310)#AI Engineering (254)#Go (220)#LLMs (190)#Microsoft Agent Framework (150)#Software Engineering (144)#Python (142)#Fintech (131)#Financial Systems (129)#Machine Learning (108)#Security (101)#Distributed Systems (98)#Prompt Engineering (78)#Multi-Agent Systems (73)#RAG (69)#Evaluation (67)#Governance (61)#Testing (59)#APIs (57)#Performance (56)#Systems Programming (56)#Business Strategy (55)#Compliance (54)#Payments (54)#Reliability (53)#Observability (50)#Programming Languages (48)#Architecture (40)#Concurrency (40)#Databases (40)#AI Governance (39)#Google ADK (36)#Software Architecture (36)#MLOps (35)#Guardrails (34)#Computer Science (32)#Rust (32)#Streaming (32)#System Design (32)#Product (30)#Startups (30)#AI Security (29)#Leadership (28)#Agentic AI (25)#Career (25)#DevOps (24)#FinOps (23)#SRE (23)#AI Architecture (22)#DevSecOps (22)#MCP (22)#Tool Use (22)#Vector Databases (22)#Embeddings (21)#Production (21)#Deep Learning (20)#Forward Deployed Engineer (20)#Fundamentals (18)#AWS (17)#Kubernetes (17)#CI/CD (16)#Engineering Practices (16)#Marketing (16)#Payment Rails (16)#Rails (16)#Self-Evolving Agents (16)#Data Engineering (15)#Memory (15)#A2A (14)#Capital Markets (14)#Credit (14)#Credit Risk (14)#Data (14)#Financial AI (14)#Lending (14)#Multi-Agent AI (14)#Prompt Injection (14)#Risk (14)#Workflows (14)#Cards (13)#Computer Vision (13)#Engineering (13)#Privacy (13)#gRPC (13)#AI in Production (12)#Agentic Commerce (12)#Card Payments (12)#Crypto (12)#Cryptocurrency (12)#Fine-Tuning (12)#KYC and AML (12)#Ledger (12)#Authentication (11)#Azure (11)#Caching (11)#Go-to-Market (11)#Identity (11)#KYC (11)#LangGraph (11)#Operations (11)#Type Systems (11)#Vector Search (11)#AI Cost (10)#AI Safety (10)#API Design (10)#Cloud Native (10)#Containers (10)#Context Engineering (10)#Data Structures (10)#Design Patterns (10)#Fraud (10)#Kafka (10)#Knowledge Graphs (10)#Multi-Agent (10)#Multimodal AI (10)#Orchestration (10)#Programming (10)#Regulation (10)#Risk Management (10)#Search (10)#AI (9)#AI Evaluation (9)#AI Red Teaming (9)#AI Research (9)#Accounting (9)#Automation (9)#Azure AI Foundry (9)#Communication (9)#Computer Networking (9)#Cryptography (9)#Custody (9)#Forecasting (9)#Human-in-the-Loop (9)#Linux (9)#Migration (9)#Operating Systems (9)#Personalization (9)#Platform Engineering (9)#Protocols (9)#Reinforcement Learning (9)#Sales (9)#Settlement (9)#Software Delivery (9)#Supply Chain Security (9)#Version Control (9)#Voice AI (9)#ADK (8)#AI Cost Optimization (8)#AI Gateway (8)#API Security (8)#Accountability (8)#Agentic RAG (8)#Amazon Bedrock (8)#Business Finance (8)#C (8)#Causal Inference (8)#Claude Code (8)#Code Review (8)#Conversational AI (8)#CrewAI (8)#DSPy (8)#Data Science (8)#Edge AI (8)#Emotional Intelligence (8)#Energy (8)#Event-Driven Architecture (8)#Explainable AI (8)#FREE-AI (8)#Financial Engineering (8)#Flutter (8)#Forward Deployed Engineering (8)#Fundraising (8)#GPU (8)#Git (8)#Graph Neural Networks (8)#Harness Engineering (8)#Hiring (8)#Hugging Face (8)#IBM watsonx (8)#Inference (8)#Information Retrieval (8)#Intellectual Property (8)#Interpretability (8)#JavaScript (8)#LLM Inference (8)#LLM Infrastructure (8)#LLMOps (8)#LangChain (8)#Legal (8)#LlamaIndex (8)#Mathematical Finance (8)#NVIDIA (8)#On-Device AI (8)#Ontology (8)#Organizational Design (8)#People (8)#PreSales (8)#Product Management (8)#Pydantic AI (8)#Quantitative Finance (8)#Reasoning Models (8)#Recommender Systems (8)#RegTech (8)#Security Engineering (8)#Semantic Web (8)#Soft Skills (8)#Speech (8)#Statistics (8)#Strands (8)#Sustainability (8)#Time Series (8)#Trading (8)#TypeScript (8)#Venture Capital (8)#eBPF (8)#smolagents (8)#Metrics (7)#OWASP (7)#Open Source (7)#AG-UI (6)#BigQuery (6)#FinTech (6)#Granite (6)#Middleware (6)#Opinion (6)#Strategy (6)#Treasury (6)#Web Development (6)#Cloud (5)#Collaboration (5)#Cost Optimisation (5)#Deployment (5)#Developer Experience (5)#Developer Tools (5)#Engineering Judgment (5)#FX (5)#Foreign Exchange (5)#Function Tools (5)#GCP (5)#LLM (5)#Memory Management (5)#Mixture of Experts (5)#NIM (5)#OpenTelemetry (5)#REST (5)#Responsible AI (5)#Scalability (5)#Tooling (5)#Agents (4)#Audit (4)#Checkpointing (4)#Error Handling (4)#Feedback (4)#Gemma (4)#Markets (4)#Monitoring (4)#Process (4)#Providers (4)#Resilience (4)#Spanner (4)#Structured Output (4)#A/B Testing (3)#AML (3)#Agent Skills (3)#Analytics (3)#Attention (3)#Authorization (3)#Benchmarks (3)#Best Practices (3)#Cloud Architecture (3)#Consulting (3)#Cost Optimization (3)#Differential Privacy (3)#Documentation (3)#Engineering Culture (3)#Feature Engineering (3)#Functional Programming (3)#Generative AI (3)#GraphQL (3)#Growth (3)#HIPAA (3)#HTTP (3)#Integration (3)#Interfaces (3)#LLM-as-Judge (3)#Load Balancing (3)#Microservices (3)#Multimodal (3)#Networking (3)#OAuth (3)#Policy as Code (3)#Privacy Engineering (3)#Protocol Buffers (3)#Quality (3)#RBI (3)#Reconciliation (3)#Retrieval (3)#SLSA (3)#Sessions (3)#Software (3)#Threat Modeling (3)#Tools (3)#Type System (3)#Workflow (3)

Recent

Pratik Dhanave · ·7 min read

Risk Management and Building Models in Practice

Every model in this series was a tool for one ultimate purpose: understanding and controlling risk. Risk management is where financial engineering meets reality — where elegant models confront messy markets, fat tails, and the uncomfortable truth that the most dangerous risks are the ones your model didn't consider. This closing post covers how risk is measured and managed in practice, and how to build financial models responsibly, knowing they will eventually be wrong.

Risk management is the purpose every model served. Value at Risk and its tail-hiding flaw (so expected shortfall), fat tails, hedging with the Greeks, market microstructure as a systems problem, and the overriding lesson: models are approximations that will eventually be wrong — so respect the tails and stay humble. (Educational, not financial advice.)

Pratik Dhanave · ·6 min read

Operating in Production — Cost, Latency, Incidents, and the Tightening Loop

The final discipline of LLMOps is running the thing as a product that costs real money, has to be fast enough to use, breaks in new ways, and is expected to get better over time. Cost and latency aren't afterthoughts you optimize later — in an LLM app they're first-class constraints that shape the architecture. And incidents aren't failures of planning; they're a certainty you prepare for. This closing post ties the series together into the operating posture that keeps a living system healthy.

Running an LLM app means treating cost and latency as first-class constraints (model routing, token hygiene, caching, streaming), preparing for incidents as certainties (provider failures, instant rollback, blameless postmortems), and the closing idea: operating is continuous improvement — a tightening loop, because an LLM app is never done.

Pratik Dhanave · ·6 min read

Randomness — Stochastic Models and Monte Carlo

Prices are random, so finance is fundamentally a probabilistic discipline — and the tools for reasoning about randomness are what let quants price the instruments that have no tidy formula. A stochastic model describes how a price wanders through time; Monte Carlo simulation lets you compute almost anything by running that model thousands of times and averaging. Together they are the computational engine of modern quantitative finance, and they're territory engineers find immediately familiar.

Prices are random, so finance is a probabilistic discipline. Brownian motion and geometric Brownian motion model how a price wanders; Monte Carlo simulation turns that model into a universal engine for pricing and risk — the computational core of modern quant finance, and territory engineers find familiar. (Educational, not financial advice.)

Pratik Dhanave · ·6 min read

Observability and Tracing — Seeing Inside an LLM System

When an LLM application gives a bad answer, "the model messed up" is almost never a useful diagnosis. Was it the retrieval that pulled the wrong document? The prompt template? A tool that returned garbage? The model's generation itself? Without observability built for LLM systems, you can't tell — and you're left re-running prompts hoping to reproduce a non-deterministic failure. This post is about instrumenting an LLM app so that when something goes wrong, you can actually see why.

'The model messed up' is never a useful diagnosis. Why ordinary monitoring isn't enough, tracing as the spine (spans capturing the rendered prompt, retrieved context, tool calls, raw output, tokens/cost), and turning aggregated traces into metrics, quality trends, and drift detection.

Pratik Dhanave · ·7 min read

Option Pricing — Black-Scholes and the Greeks

The Black-Scholes model is one of the most consequential equations ever written — it turned option pricing from guesswork into engineering and arguably created the modern derivatives industry. Its genius is not a formula to memorize but an idea: you can price an option by continuously replicating it with the underlying and cash, so no-arbitrage pins down its value without any forecast of the market. This post builds that idea and the Greeks that make it operational.

Black-Scholes turned option pricing into engineering: price an option by the cost of continuously replicating it, so no-arbitrage pins its value and the underlying's expected return drops out entirely. Risk-neutral valuation, what the model assumes, implied volatility, and the Greeks traders actually hedge. (Educational, not financial advice.)

Pratik Dhanave · ·6 min read

Guardrails and Safety in Production — Containing Open-Ended Output

An LLM can say anything, which is exactly the problem. The same open-endedness that makes it useful means it can hallucinate, leak data, follow a malicious instruction hidden in its input, or produce something harmful — and in production, in front of real users, those aren't edge cases, they're inevitabilities. Guardrails are the controls that sit around the model to contain what it might do. This post covers the new failure modes LLMs introduce and the layered defenses that keep a production system safe.

An LLM can say anything, which is the problem. The new failure modes — hallucination, prompt injection, data leakage, harmful output — and layered, fail-closed guardrails (input, output, action) with humans in the loop, treated as part of the lifecycle and red-teamed.

Pratik Dhanave · ·7 min read

Derivatives and the No-Arbitrage Principle

Derivatives sound exotic, but a derivative is just a contract whose value derives from something else — a stock, a rate, a commodity. What makes them intellectually beautiful is how they are priced: not by predicting the future, but by insisting that their price be consistent with the things they depend on. That insistence — the no-arbitrage principle — is the single most powerful idea in quantitative finance, and this post builds it from the ground up.

A derivative's value derives from something else — and it's priced not by prediction but by the no-arbitrage principle: if a portfolio replicates a payoff, it must cost the same. Forwards, futures, options, payoff shapes, and the replication argument that prices a forward and links calls to puts. (Educational, not financial advice.)

Pratik Dhanave · ·5 min read

Online Evaluation and Feedback — Production Is the Real Test

Offline evaluation tells you whether a change is safe to ship; online evaluation tells you whether it actually worked. No matter how good your eval set is, production always surprises you — real users send inputs you never imagined, and the gap between your offline scores and real-world quality is where LLM apps quietly fail. This post is about measuring quality on live traffic and turning user behavior into the feedback that makes the system improve.

Offline evals say a change is safe to ship; online evals say whether it worked. The intrinsic offline–online gap, deploying to measure (canary, A/B, shadow), capturing explicit and implicit feedback, and the pipeline that turns production behavior into continuous improvement.

Pratik Dhanave · ·6 min read

Risk and Return

You cannot have higher expected return without accepting more risk — that trade-off is the deepest law in investing, and quantifying it precisely is the achievement that launched modern finance. The surprising twist is that risk is not simply additive: combine imperfectly related assets and some risk cancels out for free. Diversification is the closest thing finance has to a free lunch, and portfolio theory is the math of exploiting it.

Higher expected return requires more risk — and the surprising twist is that diversification reduces risk for free when assets are imperfectly correlated. Volatility, covariance, the efficient frontier, systematic vs. idiosyncratic risk, and how CAPM prices risk through beta. (Educational, not financial advice.)

Pratik Dhanave · ·6 min read

Eval-Driven Development — You Can't Ship What You Can't Measure

The single practice that separates teams who improve their LLM apps from teams who just change them is evaluation. Without a trustworthy way to measure quality, every prompt tweak is a gamble — you fix one case, break two others, and never know. Eval-driven development makes the eval set the center of gravity: you build it before you optimize, you gate every change on it, and you treat it as the most valuable asset the project owns. This post is about building evaluation you can actually trust.

The practice that separates improving an LLM app from merely changing it. The curated eval set as the core asset, how to score open-ended output (deterministic checks, reference metrics, LLM-as-judge, human review), and how to gate every change on evals and compare B vs A.

Pratik Dhanave · ·6 min read

Bonds and the Yield Curve

A bond is the simplest real instrument in finance — a contract to pay fixed cash flows on fixed dates — which makes it the perfect place to turn the time value of money into something concrete. But bonds also introduce the two ideas that run through all of fixed income: yield, the single number that summarizes a bond's return, and the yield curve, the market's price of time itself. Understanding bonds is understanding how markets discount the future.

A bond is the simplest real application of discounting: fixed future cash flows, priced by present value. From there come yield, the inverse price-yield relationship, duration and convexity as interest-rate risk, and the yield curve as the market's price of time. (Educational, not financial advice.)

Pratik Dhanave · ·5 min read

Prompt and Version Management — Treat Prompts Like Code

In an LLM application the prompt is the source code — it's where behavior is defined and where most changes and most bugs happen. Yet teams routinely paste prompts inline, edit them in production, and have no idea which version produced last week's output. Prompt and version management is the unglamorous discipline of treating prompts as the first-class, versioned, tested artifacts they actually are. It's the foundation the rest of the lifecycle stands on.

In an LLM app the prompt is the source code — where behavior is defined and most bugs happen. Treat prompts like code: version the whole configuration (template + model + parameters + context strategy), decouple them from app code, and route every change through review, eval, rollout, and rollback.