Archive

1422 posts · Page 72 of 119. ← Blog

Pratik Dhanave · ·8 min read

Generative AI and LLMs in Finance: Patterns and Guardrails

Large language models earn their place in regulated finance as fast, well-supervised assistants — not as autonomous agents with a hand on the money.

Where LLMs fit in regulated finance: document analysis/extraction, retrieval-grounded Q&A, and agentic decision support — plus the guardrails (grounding, human-in-the-loop, output validation, audit trails) that keep them…

Pratik Dhanave · ·7 min read

"maximum recursion depth exceeded": A Durable-Workflow Checkpointing War Story

Passing an SDK client through a checkpointed agent workflow crashed on circular references. The fix reshaped how I cross @step boundaries.

Threading an SDK client through a checkpointed workflow crashed with maximum recursion depth exceeded. The checkpoint boundary is a serialization boundary: JSON only, values and keys, and anything non-serializable gets injected out-of-band at the composition root.

Pratik Dhanave · ·8 min read

Orchestration and Handoff: Routing Intent to a Specialist

Lesson 5 of Harness Engineering in Go — a triage step that first-matches a keyword and hands the request to a specialist, and the exact place a substring table stops being able to think.

Lesson 5: a triage router first-matches a keyword to hand intent to a specialist, and the exact point a substring table stops being able to think.

Pratik Dhanave · ·7 min read

Observational Methods — Causal Inference Without an Experiment

Often you can't run an experiment — it's unethical, infeasible, or too slow — but you still need to know whether something causes something. Observational causal inference is the set of techniques for extracting causal conclusions from data you didn't control, by reconstructing the comparable groups that randomization would have given you for free. This post covers the main tools (adjustment, matching, propensity scores) and the uncomfortable assumption they all depend on.

When you can't experiment, observational methods reconstruct the comparable groups randomization gives for free — adjustment, matching, propensity scores. All share one goal (remove confounders' influence) and one unprovable Achilles' heel: the 'no unmeasured confounding' assumption. How to use them honestly.

Pratik Dhanave · ·6 min read

Control Flow, Functions, and the Stack

C's control flow is the ancestor of the syntax you already know — `if`, `while`, `for`, `switch`. Its functions look familiar too, but they hide a defining C fact: arguments are passed by value, always copied. Understanding pass-by-value, and the call stack that makes function calls work, is the bridge to the hardest and most important topic in C — pointers.

C's control flow is the ancestor of the syntax you already know, and its functions look familiar too — but they hide a defining C fact: arguments are passed by value, always copied. Understanding pass-by-value, and the call stack that makes function calls work, is the bridge to the hardest and most important topic in C: pointers.

Pratik Dhanave · ·7 min read

Valuation

Valuation feels like it should be a fact — what the company is "worth" — but for an early-stage startup with little revenue and an uncertain future, there is no objective number to discover. Valuation is a negotiated price, not a measurement, and understanding that changes how you think about it: it's the price at which you sell ownership, it directly determines how much you're diluted, and chasing the highest possible number can quietly work against you. This post demystifies where valuations come from and why the number matters less than founders think and differently than they expect.

Valuation feels like it should be a fact — what the company is 'worth' — but for an early-stage startup there's no objective number to discover. Valuation is a negotiated price, not a measurement: it's the price at which you sell ownership, it directly determines your dilution, and chasing the highest number can quietly work against you.

Pratik Dhanave · ·7 min read

EXHAUSTED Is Not Failure: Bounding Agent Runs

An agent that burns its turn budget without finishing is neither a success nor an error. Give it a distinct outcome and a typed event stream.

The scariest agent failure is the runaway loop that never finishes. Cap every run at max_turns and make EXHAUSTED a first-class outcome, neither a failure nor a silent success, with a typed event stream you can route on.

Pratik Dhanave · ·7 min read

Advanced Memory: Threads, Keyword Retrieval, and Lossy Summarization

Lesson 4 of Harness Engineering in Go — three collaborating stores (a thread, a knowledge index, and a summarizer) behind interfaces, and an honest accounting of where each local stand-in leaks.

Lesson 4: memory is three stores, not one — an append-only thread, a keyword knowledge index, and a lossy first-and-last summarizer — and an honest account of where each local stand-in leaks against Azure.

Pratik Dhanave · ·7 min read

Causal Graphs — Drawing What You Believe Causes What

Causal reasoning gets dramatically clearer when you draw it. A causal graph is a diagram of what causes what — nodes for variables, arrows for causal influence — and it turns fuzzy debates about confounding and adjustment into visual rules you can actually check. This post introduces causal graphs (DAGs) and the single most useful thing they do: tell you exactly which variables to control for, and which ones you must leave alone.

Causal reasoning gets clearer when you draw it. A causal graph (DAG) turns fuzzy debates about confounding and adjustment into visual rules: the three building blocks (chain/mediator, fork/confounder, collider) and why 'control for everything' is wrong — adjusting the wrong variable adds bias.

Pratik Dhanave · ·6 min read

Types, Variables, and Operators

In C, a type is a promise about how many bytes a value occupies and how to interpret them. There's no hidden bignum, no automatic string, no safety rail — just fixed-width integers, floating-point, and the bit patterns underneath. Understanding C's types means understanding sizes, signedness, and the surprising rules of integer promotion, because in C the difference between `int` and `unsigned` can be the difference between correct and catastrophically wrong.

In C, a type is a promise about how many bytes a value occupies and how to interpret them — no hidden bignum, no safety rail, just fixed-width integers and the bits underneath. Understanding C's types means understanding sizes, signedness, and the surprising rules of integer promotion, where the difference between int and unsigned can be catastrophic.

Pratik Dhanave · ·8 min read

Equity, Cap Tables, and Dilution

The single most misunderstood thing about startup ownership is what happens to your slice when you raise money. Founders imagine they're "giving up 20%" and keeping a fixed 80% forever — but ownership isn't a slice carved from a fixed pie; it's a percentage of a share count that keeps growing. Every round issues new shares, and every new share makes everyone's existing percentage smaller. Understanding this — dilution, the cap table, and the option pool — is understanding what you actually own, and it's where founders most often get an unpleasant surprise.

The most misunderstood thing about startup ownership is what happens to your slice when you raise. Ownership isn't a slice of a fixed pie; it's a percentage of a share count that keeps growing. Every round issues new shares, and every new share makes everyone's percentage smaller. That's dilution — and it's where founders most often get an unpleasant surprise.