<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by nachiappan palaniappan on Medium]]></title>
        <description><![CDATA[Stories by nachiappan palaniappan on Medium]]></description>
        <link>https://medium.com/@nachiappan4uni?source=rss-af7dba1b8ba6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*2VlHtgby8B8YECY3.</url>
            <title>Stories by nachiappan palaniappan on Medium</title>
            <link>https://medium.com/@nachiappan4uni?source=rss-af7dba1b8ba6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 14:36:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nachiappan4uni/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Evaluating AI Agents: A Practical Guide for Anyone Building One]]></title>
            <link>https://medium.com/@nachiappan4uni/evaluating-ai-agents-a-practical-guide-for-anyone-building-one-678e8c715613?source=rss-af7dba1b8ba6------2</link>
            <guid isPermaLink="false">https://medium.com/p/678e8c715613</guid>
            <dc:creator><![CDATA[nachiappan palaniappan]]></dc:creator>
            <pubDate>Sun, 05 Jul 2026 12:59:05 GMT</pubDate>
            <atom:updated>2026-07-05T12:59:05.932Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve built anything with an LLM at its core, you’ve hit this wall: how do you know if it’s actually working?</p><p>Not “does it run without crashing.” Not “did it produce an answer.” But: is the answer <em>good</em>, is the reasoning <em>sound</em>, and will it still be good next week after you tweak a prompt?</p><p>This guide walks through how the field actually answers that, using two running examples so nothing stays abstract for long:</p><ul><li><strong>For analysts:</strong> a small reasoning agent that diagnoses <em>why a website’s conversion rate dropped</em></li><li><strong>For developers:</strong> a customer support agent that reads incoming tickets and drafts responses</li></ul><p>Every concept below gets introduced with a simple, everyday comparison first, then the technical name, then both worked examples. If a section feels slow, that’s on purpose. The goal is that you never have to hold an abstract idea in your head without something concrete to hang it on.</p><h3>Why I Started Taking This Seriously</h3><p>Here’s the moment this stopped being theoretical for me.</p><p>I’d built the first version of a reasoning agent that could pull descriptive stats across several business areas, traffic, funnel, supply, customer behavior, and synthesize them into a narrative. It worked well enough that we wanted to ship something simple: an executive summary embedded in a daily mailer.</p><p>Every time we generated that summary, it came back different. Not just different wording, different <em>structure</em>. Some days it led with the metric that moved most. Other days that callout was buried three paragraphs in. Some outputs were plain text, others rendered a table halfway through for no consistent reason. The insight underneath was usually fine, but the format was unpredictable enough that we couldn’t put it in front of executives without a human checking it first.</p><p>That’s the moment I understood the gap between “the system is smart” and “the system is production-ready” is entirely about evaluation and consistency, not intelligence. A brilliant analysis nobody can trust to format correctly, twice in a row, is not a shippable feature. It’s a demo.</p><h3>Why This Is Genuinely Hard</h3><p>Imagine you’re grading two different kinds of exams.</p><p><strong>Exam A: a math test.</strong> Every question has one correct answer. You check it against an answer key. Done in seconds, no debate possible.</p><p><strong>Exam B: an essay.</strong> There’s no single correct essay. Two good essays can say completely different things and both deserve full marks. Two bad essays can both be technically well-written and still miss the point entirely. Grading this requires reading, interpreting, and applying judgment, and two different teachers might give slightly different scores to the same essay.</p><p>Traditional software testing was built for Exam A. assert output == expected_output is an answer-key check. It works great for code that returns a number or a boolean.</p><p>AI agents force you into Exam B territory, constantly. Ask an LLM the same question twice, you get two differently-worded answers, so string-matching against a fixed answer breaks immediately. Ask “why did conversion rate drop,” there’s no single correct sentence, many explanations could be equally valid. And here’s the part that trips people up most: <strong>a good-looking essay can be plagiarized, and a technically clumsy one can still contain the real insight.</strong> Translated to agents: your conversion-rate agent might land on the right cause by getting lucky and skipping a check it should have made. Your support agent might draft a defensible-sounding response built on outdated information it never should have trusted. Grading only the final essay, the final answer, doesn’t tell you which happened.</p><p>This is why the field split evaluation into three categories, based on a simple question: <strong>what can actually be checked, and by what?</strong></p><pre> ┌───────────────────────────────────────────────────────────┐<br> │                  THE THREE-PART TAXONOMY                  │<br> │                                                           │<br> │   DETERMINISTIC          RUBRIC-BASED         TRAJECTORY  │<br> │   &quot;the math test&quot;        &quot;the essay&quot;          &quot;how they   │<br> │                                                worked it  │<br> │                                                out&quot;       │<br> │                                                           │<br> │   One correct answer.    Judgment needed,     Was the     │<br> │   Checkable by code.     but scoreable        PATH sound, │<br> │   Yes/no.                against criteria.    not just    │<br> │                          Human or LLM judge.   the answer?│<br> └───────────────────────────────────────────────────────────┘</pre><p>The litmus test for sorting anything into the right bucket: <strong>could two different careful engineers write code to check this and get the identical answer, every time, with zero ambiguity?</strong> If yes, it’s deterministic. If even slightly no, it needs judgment.</p><h3>Layer 1: Deterministic Evals — Airport Security, Not Art Criticism</h3><p>Think of an airport security checkpoint. The scanner doesn’t ask “is this a <em>good</em> bag.” It asks one fixed question: does this bag contain a prohibited item, yes or no. No interpretation, no debate, no “it depends.” That’s the entire nature of a deterministic eval: <strong>a gate, not a score.</strong></p><p>Deterministic evals check binary pass/fail conditions at fixed checkpoints in your pipeline. The moment you catch yourself asking “is this <em>good</em>” instead of “does this <em>pass</em>,” you’ve left gate territory.</p><p><strong>The techniques, each with an example immediately attached:</strong></p><ul><li><strong>Schema validation</strong> — did the output have the required fields, correct types? <em>Analyst example:</em> did the conversion-rate agent’s output include a numeric delta, a date range, and a segment label, or did it skip one? <em>Developer example:</em> did the drafted support response include a ticket ID reference, so it can be logged correctly?</li><li><strong>Execution accuracy</strong> — run the generated artifact, check the actual result. This is how text-to-SQL benchmarks work: execute the generated query, diff the returned rows against the expected rows. <em>Analyst example:</em> did the SQL the agent wrote to pull funnel data actually run without error, against the correct table? <em>Developer example:</em> if the agent generates a refund-processing API call, does that call actually succeed against a test order?</li><li><strong>String and regex checks</strong> — does the output contain or avoid specific required patterns? <em>Analyst example:</em> does the output avoid stating a percentage without also stating the absolute number it’s based on (a house style rule)? <em>Developer example:</em>does every refund-related response include the mandatory legal disclaimer sentence?</li><li><strong>Tool-call assertions</strong> — correct tool, correct arguments, correct order. <em>Analyst example:</em> did the agent query the funnel metrics table before attempting to attribute the drop to a funnel stage? <em>Developer example:</em> did the agent call lookup_order_status before drafting any response that mentions order details?</li><li><strong>State checks</strong> — after the agent acts, is the system actually in the state you’d expect? <em>Analyst example:</em> did the flagged anomaly actually get logged to the tracking sheet? <em>Developer example:</em> did the ticket’s status field actually update to “responded” after the draft was sent?</li></ul><p><strong>The honest limit:</strong> gates check <em>form</em>, never <em>insight</em>. The security scanner can confirm there’s no prohibited item in the bag while having no opinion on whether the trip itself is a good idea. Your conversion-rate agent’s SQL can execute flawlessly and return a real number while answering a subtly wrong question. Your support agent’s response can pass every policy check while still being unhelpful.</p><p><strong>Working around the limit:</strong> push as much of the task as possible <em>into</em> checkable form, rather than trying to make gates smarter than they can be. Instead of asking an LLM to “decide” whether a metric drop is seasonal, encode the seasonality check as a rule: compare against the same week last year, flag if within a set threshold. That’s now a gate, not a judgment call. The underlying principle: <strong>shrink the territory that actually needs judgment</strong>, because judgment is where evaluation gets expensive and unreliable.</p><h3>Layer 2: Rubric-Based Evals — Grading the Essay</h3><p>Once everything checkable has been gated, what’s left is genuinely subjective, and this is where you need something closer to a human grader, except at a scale no human team can sustain. This is what LLM-as-judge is for: an LLM reads an output against a rubric and produces a graded verdict.</p><p><strong>Two ways to ask a judge to grade:</strong></p><ol><li><strong>Absolute scoring</strong> — show the judge one output, score it against criteria on a scale. Like a teacher grading one essay against a rubric.</li><li><strong>Pairwise comparison</strong> — show the judge two outputs side by side, ask which is better, no number involved. This is usually <em>more reliable</em>, because relative judgment (“which of these two is better”) is a much easier task than absolute judgment (“rate this a 7 out of 10”), for LLMs and humans alike. This is literally how Chatbot Arena works: real people compare two model responses head to head and vote.</li></ol><h3>G-Eval: The Technique Behind Most Custom LLM Judges</h3><p>Here’s a small scenario before any jargon: imagine you ask five different expert reviewers to rate the same essay from 1 to 5, privately, without seeing each other’s scores. Two say 3, one says 2, one says 3, one says 4. The “true” quality probably isn’t a clean 3, it’s something like 2.9, a blend that respects how uncertain and split the opinions were. That blended number captures more truth than any single reviewer’s flat score.</p><p><strong>G-Eval does exactly this, but with one LLM instead of five humans.</strong> Rather than asking the model to blurt out a single number, it looks underneath, at the probability the model internally assigns to <em>each</em> possible score, and computes a weighted average across all of them. If the model’s internal probabilities look like 10% for a 1, 20% for a 2, 50% for a 3, 15% for a 4, and 5% for a 5, the real answer isn’t a flat 3, it’s closer to 2.85. This matters because LLMs tend to clump onto certain scores (3 shows up disproportionately often) and struggle to output decimals even when explicitly asked, so reading the underlying distribution recovers nuance a raw integer would hide.</p><pre>If you only look at the model&#39;s FINAL PICK:<br> ┌────┐<br> │ &quot;3&quot;│   ← looks like a flat, confident 3<br> └────┘</pre><pre> If you look at the model&#39;s FULL PROBABILITY SPREAD:<br>   1    2    3    4    5<br>  10%  20%  50%  15%   5%<br>   ▓    ▓▓   ▓▓▓▓▓ ▓▓   ▓<br>                              → weighted average ≈ 2.85<br>                                a more honest, nuanced score</pre><p>G-Eval is also <strong>reference-free</strong>, meaning it doesn’t need a gold-standard answer to compare against. Older metrics like BLEU and ROUGE score by counting overlapping words with a reference text, which only works when there’s one correct wording to match. There’s no single reference paragraph for “why did conversion drop” or “how should we respond to this ticket,” so reference-free scoring is what makes this technique usable for open-ended agent output at all.</p><p><strong>The three steps, in order:</strong></p><ol><li><strong>Write criteria in plain language.</strong> <em>Analyst example:</em> “Did the diagnosis rule out at least one alternative cause before concluding, and is every numeric claim traceable to a specific query result mentioned in the trace?” <em>Developer example:</em>”Does the response acknowledge the customer’s specific complaint, not a generic apology, and does the tone match the severity of the issue?”</li><li><strong>Form-filling, not one holistic score.</strong> The judge scores each criterion separately with its own reasoning, rather than mashing everything into one number. <em>Analyst example:</em> separate scores for “alternatives ruled out” and “claims traceable to data,” so you know exactly which one failed if the overall verdict is weak. <em>Developer example:</em> separate scores for “acknowledged complaint” and “tone matched severity.”</li><li><strong>Probability-weighted scoring</strong>, as shown above, applied to each of those individual criteria, not just one overall number.</li></ol><h3>The Problem Nobody Mentions: Judges Have Biases</h3><p>Imagine hiring a single judge for a cooking competition who happens to personally love garlic. Even trying to be fair, that judge will unconsciously score garlicky dishes a little higher. An LLM judge has the exact same problem, just with different flavors of bias.</p><ul><li><strong>Position bias</strong> — The everyday version: In a debate, people tend to remember and favor whoever spoke first — What it looks like in practice: In pairwise comparison, the judge favors whichever output is shown first, regardless of quality — The fix: Run every comparison twice with positions swapped; trust only verdicts that hold up both ways</li><li><strong>Verbosity bias</strong> — The everyday version: A longer answer on an examfeelsmore thorough, even when it’s padded — What it looks like in practice: Judges rate longer outputs higher even with no added value — The fix: Explicitly instruct the judge to penalize unnecessary length, or score length-appropriateness as its own criterion</li><li><strong>Self-preference bias</strong> — The everyday version: A garlic-loving judge favors garlicky dishes — What it looks like in practice: A judge favors outputs written in a style similar to its own model family — The fix: Use a judge from a different model family than the system being graded</li><li><strong>The weak-judge trap</strong> — The everyday version: Asking a student to grade their own exam — What it looks like in practice: If the judge isn’t meaningfully more capable than the system it grades, it can’t reliably catch that system’s mistakes — The fix: Use a stronger or differently-sourced model as judge, or narrow the rubric into small binary questions a same-tier model can still answer reliably</li><li><strong>Rubric ambiguity</strong> — The everyday version: “Rate this essay’s quality” means something different to every grader — What it looks like in practice: Vague criteria produce wildly inconsistent scores run to run — The fix: Break one vague rubric into several small, specific, binary questions</li></ul><p>That last one deserves emphasis: <strong>fixing rubric ambiguity first shrinks the weak-judge problem automatically.</strong> A narrow, specific question like “did it check seasonality: yes or no” is answerable reliably even by a same-tier model, whereas “rate analytical rigor, 1 to 10” leaves enormous room for a weak judge to wobble. Fix the question before worrying about who’s answering it.</p><p><strong>One more thing worth knowing:</strong> if your system, like the support agent example, only ever shows one output to one user rather than comparing two candidates, position bias simply doesn’t apply to your setup at all. Don’t spend engineering effort defending against a bias your architecture never exposes you to.</p><h3>Layer 3: Composite Evals — Chaining Checks Together with a DAG</h3><p>So far each check has stood alone. Real systems need several checks run in sequence, where a failure early on should stop everything downstream, the same way a broken foundation makes it pointless to inspect the roof.</p><p>The technique here is called a <strong>DAG</strong>, a Directed Acyclic Graph: a graph of small nodes where the <em>path through the graph</em>, not just the final result, determines the verdict. “Directed” means each check flows in one direction toward the next. “Acyclic” just means it never loops back on itself, it’s a straight line of dependency, not a circle.</p><pre>              ┌─────────────────────┐<br>              │   NODE A            │<br>              │   Deterministic     │<br>              │   &quot;Did it parse?&quot;   │<br>              └─────────┬───────────┘<br>                        │  passes ✓<br>                        ▼<br>              ┌─────────────────────┐<br>              │   NODE B            │<br>              │   Rubric            │<br>              │   &quot;Is reasoning     │<br>              │    grounded?&quot;       │<br>              └─────────┬───────────┘<br>                        │  passes ✓<br>                        ▼<br>              ┌─────────────────────┐<br>              │   NODE C            │<br>              │   Rubric / Agent    │<br>              │   &quot;Right things     │<br>              │    checked?&quot;        │<br>              └─────────────────────┘</pre><pre>   If Node A fails, B and C never run.<br>   You get a precise failure location,<br>   not one opaque score for the whole thing.</pre><p><strong>Why the short-circuit matters, with an example:</strong> for the conversion-rate agent, if Node A discovers the agent queried the wrong date range entirely, there’s no point running an expensive rubric check on whether its reasoning was “grounded”, grounded in the wrong data is still wrong. For the support agent, if Node A discovers the agent never actually looked up the order status, there’s no point grading the tone of a response built on a guess.</p><p><strong>The same structure in actual code</strong>, using DeepEval, an open-source Python library:</p><pre>from deepeval.metrics import GEval, BaseMetric<br>from deepeval.test_case import LLMTestCase, LLMTestCaseParams</pre><pre># NODE A — deterministic gate<br>class DeterministicGate(BaseMetric):<br>    def measure(self, test_case: LLMTestCase):<br>        trace = test_case.additional_metadata[&quot;trace&quot;]<br>        self.score = 1.0 if &quot;required_field&quot; in trace[&quot;fields_fetched&quot;] else 0.0<br>        self.success = self.score == 1.0<br>        self.reason = &quot;Required field fetched&quot; if self.success else &quot;Required field missing&quot;<br>        return self.score<br>    def is_successful(self):<br>        return self.success</pre><pre># NODE B — rubric, written as plain-English criteria<br>quality_metric = GEval(<br>    name=&quot;Reasoning Quality&quot;,<br>    criteria=&quot;Determine if the output ruled out at least one alternative &quot;<br>             &quot;explanation before reaching its conclusion.&quot;,<br>    evaluation_params=[LLMTestCaseParams.INPUT, LLMTestCaseParams.ACTUAL_OUTPUT],<br>    threshold=0.7,<br>)</pre><pre># WIRING — the short-circuit behavior from the diagram above<br>def run_eval(input_q, output, trace):<br>    test_case = LLMTestCase(input=input_q, actual_output=output,<br>                             additional_metadata={&quot;trace&quot;: trace})<br>    gate = DeterministicGate()<br>    gate.measure(test_case)<br>    if not gate.is_successful():<br>        return {&quot;result&quot;: &quot;FAILED at gate&quot;, &quot;reason&quot;: gate.reason}  # Node B never runs</pre><pre>    quality_metric.measure(test_case)<br>    return {&quot;gate&quot;: &quot;PASSED&quot;, &quot;rubric_score&quot;: quality_metric.score}</pre><p>Walking through it line by line: DeterministicGate is Node A, a plain code check with no LLM call at all. quality_metric is Node B, where criteria is your rubric written in English, and the library handles the probability-weighting math from the previous section internally, you never write that part yourself. run_eval is the wiring: it checks the gate first, and the if not gate.is_successful() line is the entire short-circuit, if that gate fails, the function returns immediately and the expensive rubric check simply never runs.</p><h3>Agent-as-a-Judge: When the Judge Needs to Investigate, Not Just Read</h3><p>Picture the difference between a book reviewer who only reads the back cover blurb, and a fact-checker who goes back to the primary sources the book cites and verifies each one. Most LLM judges are the first kind, they read the final output and form an opinion. <strong>Agent-as-a-Judge is the second kind:</strong> a full agent with tools that re-runs queries, inspects intermediate artifacts, and checks whether a claimed source was actually used, rather than just reading the narrative about it.</p><p>Research on coding-agent evaluation found this approach aligns far more closely with human expert judgment than a plain LLM judge reading only the final output, precisely because it <em>verifies</em> instead of merely reading.</p><p><em>Analyst example:</em> an Agent-as-a-Judge could work backward from the agent’s stated conclusion (“supply contraction caused the drop”), re-deriving what data would need to exist for that to be true, then actually checking whether that evidence appears in the trace. This catches a fluent-sounding conclusion that doesn’t actually connect to real numbers, confabulated reasoning that reads fine but was never checked.</p><p><em>Developer example:</em> an Agent-as-a-Judge for the support agent could re-check the real order status via the same tool the agent used, confirming the drafted response’s claims are still accurate at verification time, not just plausible at generation time.</p><p><strong>The honest cost:</strong> this is slow and expensive, you’re running an eval system nearly as complex as the system it’s evaluating. The standard resolution: run cheap gates on every single production output, and reserve Agent-as-a-Judge for offline regression testing and a sampled slice of high-stakes cases, not everything, every time.</p><h3>Trajectory Evaluation: Why the Final Answer Alone Lies to You</h3><p>Imagine grading a student’s math homework by only checking the final number at the bottom of the page, ignoring all the working shown above it. You’d miss two very different problems:</p><ol><li><strong>The student got the right answer by copying it, with wrong steps above it.</strong> Looks perfect at a glance, but the process was broken, and it’ll fail on the next problem where copying isn’t an option.</li><li><strong>The student’s working was entirely correct, but they made one small arithmetic slip at the very end.</strong> The final number is wrong, but the actual mathematical understanding was sound.</li></ol><p>Grading only the final line treats these two students identically. Trajectory evaluation is what lets you tell them apart, by looking at the full working, not just the last line.</p><pre>THE FULL EXECUTION TRACE, STEP BY STEP:</pre><pre> Step 1: Pull weekly metrics  ──────►  ✓ PASS<br> Step 2: Confirm drop is real ──────►  ✓ PASS<br> Step 3: Check demand pillar  ──────►  ✓ PASS<br> Step 4: Check supply pillar  ──────►  ✗ FAIL  ← the exact<br> Step 5: Synthesize verdict   ──────►  ? UNCLEAR    failure point,<br>                                                     pinpointed,<br> vs. grading ONLY the final verdict:                 not buried in<br>                                                      an aggregate<br> Final Output: &quot;Verdict looks off&quot; ──► ✗ FAIL       score for the<br>                                                     whole run</pre><p><strong>The core techniques, each grounded in the diagram above:</strong></p><ul><li><strong>Step-order assertions</strong> — did the steps happen in the required sequence? <em>Analyst example:</em> did the agent confirm the drop was real (Step 2) before attributing it to a cause (Step 5), rather than jumping straight to a conclusion? <em>Developer example:</em> did the agent check availability before confirming a price, not the reverse?</li><li><strong>Span-level evaluation</strong> — score each individual step, not one score for the whole run, exactly as shown in the diagram. This is what lets you say “Step 4 failed” instead of just “something’s wrong somewhere.”</li><li><strong>Backward-chaining validation</strong> — work backward from the final answer, re-deriving what evidence <em>should</em> exist if it were true, then check whether that evidence is actually in the trace. Covered above under Agent-as-a-Judge, this is one of its core techniques.</li><li><strong>Coverage checks</strong> — for diagnostic tasks specifically, did the trajectory explore the dimensions it should have, even if most were correctly ruled out? <em>Analyst example:</em> a verdict that jumps straight to “supply issue” without evidence of also checking demand and pricing is suspicious even if supply turns out to be the real cause. <em>Developer example:</em> did the agent check both the shipping-delay policy and the refund-eligibility policy before responding to a “where’s my order” ticket, or only one?</li></ul><p><strong>A distinction that only becomes visible once you have span-level scores:</strong> you can now tell apart a <strong>process failure</strong>, a specific step in the middle was wrong, like Step 4 in the diagram, from a <strong>synthesis failure</strong>, every individual step was correct, but the final combination or interpretation at Step 5 went wrong. These need completely different fixes. A process failure gets patched at that specific node, better data validation, a corrected check. A synthesis failure means the final reasoning step itself needs work, a stronger model at that stage, a clearer prompt, better-defined decision logic. If you only ever score the final output, both failures look identical, just “wrong verdict.” Only span-level scoring lets you tell them apart at all, and that difference determines where you actually spend your engineering time fixing it.</p><h3>The Tooling Landscape</h3><p>Every tool below is doing things you <em>could</em> hand-code yourself. What you’re actually paying for, in engineering time if not money, is a pre-built UI, pre-built bias mitigations, dataset management, and CI/CD integration.</p><ul><li><strong>LangSmith</strong> — Core strength: Tracing, deeply integrated with LangChain/LangGraph; built-in regression testing across prompt versions — Best fit: If you’re already building in the LangChain ecosystem</li><li><strong>MLflow</strong> — Core strength: Experiment tracking, versioning which prompt or config produced which trace — Best fit: Answering “did yesterday’s deploy make things worse”</li><li><strong>DeepEval</strong> — Core strength: Purpose-built eval library: G-Eval, DAG metrics, RAG metrics, bias mitigations, all built in; open-source, pytest-style — Best fit: Where you write and run your rubric and DAG logic yourself</li><li><strong>Ragas</strong> — Core strength: RAG-specific: faithfulness, context precision and recall — Best fit: Grading retrieval quality specifically, if your system leans heavily on retrieval</li><li><strong>Arize Phoenix / Langfuse</strong> — Core strength: OpenTelemetry-native span-level tracing — Best fit: If you need finer-grained trace visibility than basic logging gives you</li><li><strong>Braintrust</strong> — Core strength: Hosted platform combining tracing, evals, datasets, and CI/CD in one product; production traces become eval datasets with one click; live scoring on production traffic; CI posts pass/fail results directly on pull requests — Best fit: Teams that want the entire trace-to-eval-to-CI loop pre-built, rather than assembling it from separate tools</li></ul><p>The standard production pattern: a tracing tool for observability, plus a dedicated eval library for the scoring logic. Braintrust is the exception that collapses both into one hosted product, worth it once the engineering cost of maintaining that glue yourself exceeds the subscription cost, less compelling if you already have tracing in place and the capacity to build scoring on top of it.</p><h3>Scaling Beyond One Hardcoded Example</h3><p>Everything above works cleanly for one example. Real systems handle many different question types, and hand-writing a fresh rubric for every single question doesn’t scale.</p><p>Think of it like a recipe template rather than cooking from scratch every time. You don’t invent a new recipe from nothing for every meal, you have a small library of recipes, and you fill in the specific ingredients you have on hand. Evaluation criteria should work the same way.</p><p>The tempting but wrong approach is to let an LLM generate the rubric on the fly for each new question. This just moves the problem up a level: now you need to evaluate whether the <em>generated rubric</em> was any good, with no stable way to check that, it’s recursive and unstable.</p><p><strong>The actual pattern: enumerate problem types, template within them.</strong> Most systems have a manageable, enumerable set of question types, and a routing or intent-classification layer usually already exists to sort incoming requests into these types. Attach a fixed required-fields set and a rubric <em>template</em>, with blanks to fill in, to each type once, authored by a human and reviewed carefully. At runtime: classify the question’s type, look up its pre-written gate and rubric template, fill in the specific details (a metric name, a customer’s complaint), and run. This is dynamic in the way that matters, no hardcoded string per individual question, but stable in the way that matters, no LLM inventing evaluation criteria from scratch every time.</p><h3>Where to Start, Practically</h3><p>If you’re building either of the two example systems above, or anything like them, here’s a reasonable build order:</p><ol><li><strong>Gate everything checkable first.</strong> Schema, tool calls, state changes. Cheap, and it catches the most obvious failures immediately.</li><li><strong>Write one rubric for the single most important subjective judgment.</strong>Don’t try to cover everything at once, pick the one question that matters most, faithfulness, reasoning quality, tone, and get that right before adding a second.</li><li><strong>Calibrate against roughly 100 human-labeled examples</strong> before trusting the rubric’s scores. This tells you the judge’s agreement rate with real humans; without it, you’re trusting an unvalidated grader.</li><li><strong>Add trajectory checks only once single-output scoring is stable.</strong> Span-level and backward-chaining evaluation are more valuable, but also more expensive to build, so they belong second, not first.</li><li><strong>Wire the cheap gates into CI immediately; save expensive composite and trajectory evaluation for sampled or offline runs.</strong></li></ol><p>None of this needs to be perfect on day one. The point isn’t building a flawless eval system, it’s building one that catches the regression before your users do.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=678e8c715613" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What if We Could Encode an Organization’s Brain?]]></title>
            <link>https://medium.com/@nachiappan4uni/what-if-organizations-had-a-brain-8989a18042e0?source=rss-af7dba1b8ba6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8989a18042e0</guid>
            <category><![CDATA[gen-ai-for-business]]></category>
            <category><![CDATA[byte-pair-encoding]]></category>
            <category><![CDATA[applied-ai]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[nachiappan palaniappan]]></dc:creator>
            <pubDate>Sat, 09 May 2026 13:45:29 GMT</pubDate>
            <atom:updated>2026-05-09T14:24:30.201Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Introducing Hierarchical Task Tokenization and Intent Compression (HTTIC)</em></p><p><strong>The Simplest Analogy That Changes Everything</strong></p><p>Before GPT could write your emails, something unglamorous had to happen first: raw text had to be compressed into a vocabulary the model could actually work with.</p><p>Byte Pair Encoding (BPE) solved this. It scanned massive text corpora, found character sequences that frequently co-occurred (“t-h-e”, “i-n-g”, “t-i-o-n”), and merged them into single tokens. Repeat this a few thousand times and you get a vocabulary of roughly 100,000 tokens that can represent the entirety of human language. The key insight was simple: language has compressible structure, and if you find the right units of compression, you can represent anything efficiently.</p><p>Now, here is the question I have been obsessing over: <strong>what if we applied the same compression logic, not to language, but to how organizations think and act?</strong></p><p>Organizations have recurring patterns too. An analyst investigating a revenue drop follows a predictable sequence of steps. A product manager responding to a conversion decline triggers a predictable chain of cross-functional actions. These sequences repeat with minor variations, across teams, across companies, across entire industries.</p><p>What if we could tokenize them?</p><p><strong>The Problem with How AI Agents Think Today</strong></p><p>Today’s AI agents are tool-constrained thinkers. You define a set of tools (query a database, call an API, search the web), and the model picks from them. The “thinking” is bounded by the action space you gave it.</p><p>Ask a well-built agent “why did conversion drop last week?” and it will do a reasonable job: pull the data, slice it by dimensions, find that Brand X had a fill-rate collapse, and report back. Task complete.</p><p>But here is what a seasoned analyst actually does after that finding:</p><ul><li>Flags the ranking team to deboost Brand X until listings are fixed</li><li>Pings the brand partnerships team to escalate with the vendor</li><li>Checks whether the same brand has similar issues in adjacent categories</li><li>Adjusts coupon allocation to redirect spend away from broken inventory</li><li>Sets up a monitoring alert to track recovery over the next 7 days</li><li>Knows that if recovery does not happen in 48 hours, this escalates to the category head</li></ul><p>None of this is part of “investigate the conversion drop.” It is the organizational muscle memory that kicks in after the investigation is done. Current agents cannot do this because they are trained to decompose and execute single tasks. They have no concept of what the organization does next. <strong>This is the gap.</strong></p><p><strong>The Core Idea: Two Levels of Compression</strong></p><p>I am proposing a framework called <strong>Hierarchical Task Tokenization and Intent Compression (HTTIC)</strong> that applies BPE-style compression at two levels of organizational reasoning.</p><p><strong>Level 1: The Workflow Layer (Tasks as Vectors)</strong></p><p>Organizations run on repeating workflows. “Revenue drops, so we investigate. Investigation reveals a supply issue, so we fix listings and deboost in ranking. Deboost triggers monitoring. Monitoring either resolves or escalates.” This is a sequence of tasks that recur, with domain-specific variations, every time a similar problem surfaces.</p><p>Just like BPE finds that “t-h-e” always appears together and compresses it into one token, HTTIC finds that “diagnose, deboost, flag, monitor, escalate” always appears together in an organization’s operational patterns and compresses it into a workflow vector.</p><p>The model learns which tasks follow which, conditioned on who is asking (an analyst vs. a category head triggers different downstream chains), what business context they operate in (fashion e-commerce vs. grocery delivery vs. fintech), and what organizational structure exists (centralized vs. decentralized ops teams).</p><p>This is not task planning. This is <strong>organizational reasoning</strong> encoded as learned sequential relationships between tasks.</p><p><strong>Level 2: The Task Layer (Prompts and Tool Calls as Vectors)</strong></p><p>Zoom in to any single task, and you find the same compression opportunity. “Investigate a conversion drop” decomposes into a predictable sequence of prompts and tool calls: query the data warehouse for conversion metrics by category, filter for statistically significant deviations, drill into the top declining segments, check supply-side health (fill rate, listing quality, stock-outs), check demand-side health (traffic, click-through, pricing competitiveness), and synthesize findings into a root cause narrative.</p><p>This sequence varies by domain, but within a domain, it is remarkably stable. An analyst investigating conversion at a fashion marketplace follows a different trace than one at a food delivery platform, but each follows their own consistent pattern.</p><p>HTTIC compresses these prompt/tool sequences into task vectors: the execution grammar of each task type, learned from how people actually do the work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EqxG5kNli08dpG5p-SFRqQ.png" /></figure><p><strong>The Hierarchy</strong></p><p>Put both levels together and you get a hierarchical vector space. Workflows are sequences of task vectors (what the org does in response to a situation). Tasks are sequences of prompt/tool vectors (how each unit of work gets executed).</p><p>The model does not just know how to investigate a problem. It knows what the organization does after the problem is investigated. It does not just decompose one task. It reasons across the full chain of organizational response.</p><p><strong>How This Differs from Existing Work</strong></p><p>The academic landscape has explored adjacent ideas, but not this specific combination.</p><p><strong>Srivastava &amp; Pallagani (2024)</strong> made “The Case for Developing a Foundation Model for Planning-like Tasks from Scratch.” Their thesis is related: planning-like tasks (business processes, workflows, programs) share enough structure to justify a dedicated foundation model. But their unit of analysis is a single task. Given a goal, decompose it into a plan, execute it. HTTIC adds the layer above: what happens after this task is done? What does the organization do next? That is workflow reasoning, not task planning.</p><p><strong>IntentCUA (2026, AAMAS)</strong> learns intent-level representations from user interaction traces and compresses them into reusable skills. This is close to Level 2 of HTTIC, but scoped to GUI automation (clicking through desktop applications). HTTIC operates at the business domain level, where “skills” are not click sequences but analytical reasoning patterns and cross-functional decision chains.</p><p><strong>Current agent frameworks</strong> (LangGraph, CrewAI, AutoGen) hard-code the orchestration. A human architect defines the agent graph, the routing logic, the tool selection. HTTIC proposes learning that orchestration from data. The scaffolding itself becomes a learned representation, not a hand-built DAG.</p><p><strong>Enterprise process mining</strong> (Celonis, ServiceNow workflow intelligence) is the closest commercial overlap. Process mining maps what happened: it discovers, visualizes, and audits existing workflows from event logs. HTTIC reasons about what should happen next. Process mining is descriptive and retrospective. HTTIC is generative and forward-looking. The relationship is complementary: process mining could supply the structured traces that HTTIC learns from.</p><p>The key distinction: existing approaches either plan within a single task, hard-code multi-task workflows, or describe historical workflows after the fact. HTTIC learns multi-task workflows from organizational data and uses them to generate forward-looking reasoning in real time.</p><p><strong>The Training Data Already Exists</strong></p><p>Here is the part that makes this feasible rather than theoretical: the training data for HTTIC is hiding in plain sight across every organization.</p><p><strong>Jira and project management tools</strong> contain sequences of tickets that represent how work actually flows. An RCA ticket spawns a ranking fix ticket, which spawns a monitoring ticket, which spawns an escalation ticket. That is a workflow trace.</p><p><strong>Runbooks and SOPs</strong> are literally written-down task decompositions. “When X happens, do Y, then Z, then check W.”</p><p><strong>Analyst SQL workflows</strong> and notebook histories show the exact prompt/tool sequences used to investigate problems. The order of queries, the dimensional cuts, the joins, all of it encodes execution patterns.</p><p><strong>Slack and email threads</strong> contain the cross-functional reasoning: “Found the issue, looping in the ranking team” is a task transition signal.</p><p><strong>RCA documents</strong> are end-to-end traces of organizational reasoning, from problem identification through root cause analysis to resolution and monitoring.</p><p>None of this data was created for ML training. But all of it encodes the organizational reasoning patterns that HTTIC would learn from. The challenge is extraction and structuring, not data availability.</p><p><strong>Same Question, Different Brains</strong></p><p>The real test of HTTIC is not whether it can investigate a problem. Any well-prompted agent can do that. The test is whether it reasons about what the organization does next.</p><p>The universal question: <strong>“Conversion rate dropped this week. What happened?”</strong></p><p>Take a quick commerce platform. A current agent would investigate and land on the root causes: estimated delivery times above the BAU threshold, delivery charges and other operational charges deterring small-basket orders, and assortment gaps leading to incomplete carts and abandonment. Finding reported, task complete.</p><p>An HTTIC-trained system does not stop there. It knows what this organization does when these levers break. High ETAs get flagged to city ops for rider rebalancing. Assortment gaps get routed to supply chain with SKU-level, store-level specificity because it has learned that generic fill rate alerts get ignored in this org. The fee impact gets packaged as a quantified tradeoff and routed to the growth team, not ops, because it knows pricing decisions happen in a different cadence. And it knows the recovery sequence: fix ETAs first (hours), then assortment (1–2 days), then evaluate fee structure (weekly cycle).</p><p>Now imagine the same question at a large horizontal marketplace. The investigation forks differently: pricing competitiveness, marketing mix shifts, catalogue freshness. The org response routes through completely different teams on different cadences. Or at a food delivery platform: estimated wait times, restaurant participation, rider availability, weather. Same question, completely different organizational reasoning.</p><p>The task execution layer is largely transferable. The workflow reasoning layer is where the real differentiation lives, and that is what HTTIC learns.</p><p><strong>The Operational Edge: Workflow Reasoning Over Tool Reasoning</strong></p><p>Tool-based agents make individual analysts faster. HTTIC makes the organization smarter. The difference shows up in four ways:</p><ul><li><strong>Coordination costs drop. </strong>Cross-functional problem resolution today is mostly meetings, Slack threads, and “looping in” messages. HTTIC pre-routes actions to the right teams with the right context, cutting person-hours per incident significantly.</li><li><strong>Time-to-action compresses. </strong>The gap from “we found the problem” to “the right teams are working on it” shrinks from hours to minutes. In e-commerce, that difference over a weekend is directly measurable in revenue.</li><li><strong>Generalized, maintainable protocols. </strong>Organizational reasoning lives in one place, not scattered across people’s heads and tribal knowledge. Updates to how the org responds to a problem type get made once and propagate everywhere.</li><li><strong>Response quality becomes consistent. </strong>A junior analyst triggering an HTTIC system produces the same workflow reasoning a senior analyst would. The floor rises.</li></ul><p><strong>Why This Matters Now</strong></p><p>Three trends are converging to make HTTIC timely:</p><p><strong>Agent capabilities are plateauing on single-task performance. </strong>The marginal gains from better prompting, better tool selection, and better single-task decomposition are shrinking. The next unlock is not making agents better at one thing. It is making them understand what comes next.</p><p><strong>Organizational data is increasingly structured and accessible. </strong>The shift to tools like Jira, Notion, Linear, and Slack means that workflow traces are already being captured digitally. Five years ago, most organizational reasoning lived in people’s heads and hallway conversations. Today, a surprising amount of it is in searchable, parseable systems.</p><p><strong>The cost of fine-tuning has collapsed. </strong>LoRA on a single GPU, QLoRA for even cheaper experimentation, and increasingly powerful small models (7B-13B range) mean that testing HTTIC does not require a research lab budget. A motivated team with domain expertise and access to operational data can run the proof of concept.</p><p><strong>The Honest Caveats</strong></p><p><strong>Learned traces encode what the org did, not what it should have done. </strong>This is the sharpest risk. Organizations repeat bad behaviors constantly. If a company historically over-discounted during every slowdown, the model learns “revenue drop leads to coupon escalation” as the default workflow, even if that pattern was destroying margins. Without outcome weighting, HTTIC risks automating institutional dysfunction rather than encoding institutional intelligence. The distinction between organizational autocomplete (predicting what usually happens) and organizational intelligence (reasoning about what should happen) is everything. Feedback loops that condition workflow traces on resolution effectiveness, not just frequency, are essential.</p><p><strong>Predictive is not prescriptive. </strong>HTTIC in its initial form is predictive: it learns what organizations typically do. That is valuable as a starting point, but “what the org usually does” and “what the org should do” are different things. The prescriptive layer, where the system recommends the best workflow rather than the most common one, requires outcome data, success weighting, and iterative reinforcement. The honest framing is that HTTIC starts as a learned prior and evolves toward prescription as outcome signals accumulate.</p><p><strong>Reliability is a real concern. </strong>A model that confidently recommends “deboost Brand X and reallocate spend” when that is the wrong action can cause real damage. The organizational reasoning layer needs robust evaluation frameworks, likely involving domain experts reviewing generated workflow traces against ground truth. This is the evals problem, and it is hard.</p><p><strong>Context sensitivity is tricky. </strong>The same problem in the same company might require different workflows depending on the season, the org’s current priorities, budget constraints, or a dozen other factors that are hard to capture in training data. HTTIC will produce good priors, not perfect plans. Human oversight remains essential, especially early on.</p><p><strong>Data privacy and IP concerns are non-trivial. </strong>Organizational workflow traces are proprietary and sensitive. The foundation model play requires solving data anonymization at a level that preserves the reasoning patterns while stripping company-specific details. This is not a solved problem.</p><p>None of these are reasons not to build it. They are reasons to build it carefully, iteratively, and with clear evaluation criteria at each stage.</p><p><strong>The Bigger Picture</strong></p><p>We trained language models on how humans write. We trained code models on how developers code. We trained reasoning models on how people solve problems step by step.</p><p><strong>We have not yet trained a model on how organizations think.</strong></p><p>HTTIC proposes that organizational reasoning, the full chain from problem identification through cross-functional response to resolution and monitoring, is compressible, learnable, and representable as hierarchical vector sequences. The compression insight that made BPE work for language applies to how businesses operate. The recurring patterns are there. The training data exists. The tools to train are accessible.</p><p>The question is not whether someone will build this. It is who builds it first, and whether they start from the formal planning side (top-down, PDDL-style, theoretically clean but disconnected from how messy organizations actually work) or from the operational data side (bottom-up, trace-based, grounded in real workflows).</p><p>I believe the bottom-up path wins. Organizations do not operate like PDDL planners. They operate like organisms: messy, adaptive, context-dependent, and deeply patterned. The model that learns from how they actually behave will outperform the model that prescribes how they should.</p><p><em>This is an early-stage conceptual framework. I am actively exploring the feasibility of HTTIC through domain-specific prototyping. If you are working on adjacent problems, whether in agentic AI, organizational intelligence, or workflow automation, I would be glad to exchange notes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8989a18042e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decision Frameworks with AI]]></title>
            <link>https://medium.com/@nachiappan4uni/decision-frameworks-with-ai-f5b1bc3802be?source=rss-af7dba1b8ba6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5b1bc3802be</guid>
            <category><![CDATA[llm-mining]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-applications]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[nachiappan palaniappan]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 20:55:17 GMT</pubDate>
            <atom:updated>2026-04-13T20:55:17.914Z</atom:updated>
            <content:encoded><![CDATA[<h3>Architecting Decision Intelligence with AI</h3><h3>Part 1: Tuning Into Consumer Signals at Scale</h3><blockquote><strong>From Questions to Simulations: A New Paradigm for Decision Intelligence</strong></blockquote><p>LLMs have quietly become the most consulted system in most people’s lives. Not because they are always right, but because they are always present at the exact moment a decision begins to take shape. Somewhere between curiosity and commitment, people turn to them. They ask, they hesitate, they refine, they compare. And in doing so, they leave behind something far more valuable than answers. They leave behind traces of how decisions are formed.</p><p>If LLMs could leave a confession note, it would probably read:<br><em>“Two thirds of the time, people ask me to explain something or fix something. I don’t mind. But I have seen far more than I’m ever asked to share,”</em><br>because they are also the <strong>largest repository</strong> <strong>of human perspectives ever assembled.</strong></p><p>This is not about querying answers. This is about learning how to query those patterns.</p><h3>Every System We Care About Is Driven by Decisions</h3><p>A customer deciding what to buy. A user deciding what to click. A team deciding what to prioritise. An investor deciding where to allocate capital.</p><p>And yet most of our data systems are built to observe outcomes, not decisions.</p><p>We measure clicks, conversions, and revenue. We run experiments and track deltas. We build dashboards that tell us what moved. But the actual shape of how a decision unfolded, the hesitation, the trade-offs, the moment of doubt, the final trigger, remains largely invisible.</p><p>That is the gap. And LLMs, quietly, change this.</p><h3>From Asking Questions to Simulating Decisions</h3><p>For decades, decision discovery has followed a familiar pattern. You define a question, design an instrument around it, collect responses, analyse them, and then act. The process is structured, rigorous, and in many cases, necessary.</p><p>But it carries a fundamental constraint. It can only surface what you thought to ask before the process began.</p><p>In fast-moving systems, where behaviour shifts quickly and new contexts emerge constantly, this becomes a structural limitation. By the time you have an answer, the underlying reality may already have moved. More importantly, entire dimensions of decision-making remain unobserved simply because they were never part of the original frame.</p><p>LLMs introduce a different possibility. They are trained not just on facts, but on interactions, billions of them. Conversations where people are unsure, exploratory, contradictory, and evolving. They carry within them a passive record of how people think through decisions across contexts, categories, and constraints.</p><p>Which shifts the question entirely. It is no longer about asking better questions. It is about reconstructing decisions that already exist within the model.</p><h3>The Core Idea: Simulating Decision Systems</h3><p>The shift is subtle but powerful.</p><p>Instead of asking the model a question, we place an actor inside it. A persona with a defined context, a specific motivation, and a set of constraints. That persona is not used to extract an answer. It is used to generate a journey.</p><p>The model plays out that journey across multiple turns. Each turn reveals something different: what the persona is trying to do, what stops them, how they articulate their concerns, and what eventually moves them forward.</p><p>What emerges is not a response. It is a decision in motion.</p><p>When this is done across multiple personas, contexts, and entry points at scale, the model begins to behave less like an answer engine and more like a system that can simulate decisions. And because each decision unfolds across a sequence of states, the system captures not just what someone chose but the full topology of how they got there.</p><p>A person discovers something, evaluates whether they can access it, weighs the cost, checks if it fits their context, worries about what might go wrong, compares it with alternatives, looks for validation, encounters friction, imagines usage, and finally decides. Each of these stages carries a different signal. Together, they form something no single query can surface.</p><p>This is the architecture that captures it.</p><h3>From Idea to System</h3><p><em>For those who build: this section is for you. Decision-makers, skip to the worked example.</em></p><p>What sits underneath this approach is a structured pipeline that separates two distinct concerns: the simulation of decisions, and the extraction of signal from those simulations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ICSuo2x0Yf-FguKsIhUFhA.png" /></figure><p>The system begins with persona definition. This is the only place where human judgement is intentionally injected. The goal is not to cover every possible user, but to design meaningful contrast. Differences in context, access, profile, preferences, risk tolerance, and motivation are encoded into narrative structures that the model can internalise. Each actor gets a full identity, not a data segment.</p><p>These actors are then passed into a prompt engine that seeds a conversation. Unlike standard interactions, this is not stateless. Each turn carries forward the context of the previous one, allowing the decision to evolve naturally rather than collapsing into a single response.</p><p>At scale, these conversations are generated asynchronously across models, with each turn stored as structured data. What matters here is not the answer itself but the trace it leaves behind: the intent, the hesitation, the language, the transition from one stage of the journey to another.</p><p>An extraction layer then processes each turn, decomposing it into signals. Not summaries, but structured representations of what the persona was trying to do, what blocked them, and what shifted their state.</p><p>Once this is done, the system steps back and looks at each conversation as a whole. Patterns begin to emerge not just in isolated turns but in the arc of the journey. Where did hesitation occur? What combination of signals led to resolution? What conditions needed to align before a decision was made?</p><p>These signals are then clustered through deterministic grouping, not generative models. This is intentional. At this stage, frequency and structure matter more than interpretation.</p><p>Only after this does synthesis happen. The model is brought back in, but now with a structured evidence base. Instead of generating from scratch, it is reasoning over extracted signals, identifying gaps, patterns, and opportunities that were not explicitly visible before.</p><p>The output is not a report. It is a decision framework.</p><h3>A Worked Example: What Actually Surfaces</h3><p>To make this concrete, consider a simple scenario: someone building a skincare routine for the first time.</p><p>A persona is defined, a student in a Tier 2 city, entering in discovery mode, unsure whether she even needs a routine. The conversation unfolds without being guided toward a conclusion.</p><p>What surfaces is not what most systems would expect.</p><p>Not price. Not complexity. Fear.</p><p>The fear of making her skin worse than it already is. It appears early, persists across turns, and subtly shapes every decision she makes. Once visible, it becomes obvious why it was never captured before. No traditional instrument explicitly probes for that kind of fear. And even if it did, it would likely appear diluted, abstracted, or rationalised. Here, it emerges naturally, in the language she actually uses, at the turn where it actually appears.</p><p>The arc analysis then reveals something the individual turns cannot. She commits only when two things land together in the same moment: confirmation that the product is affordable, and confirmation that it is available where she shops. One without the other stalls the journey every time. That is not a product insight. It is a distribution and messaging insight, and it only becomes visible when you read the shape of the full arc rather than any single signal inside it.</p><p>The clustering layer surfaces something else entirely. A different actor, a mid-career professional in a metro expected to be the most deliberate buyer in the set, signals comfort with spending significantly more than her profile would suggest. The trigger is not brand prestige. It is ingredient transparency. She will pay more when she understands exactly what she is paying for. That signal was never in the brief. It surfaced because the conversation was open enough to find it.</p><p>The synthesis layer reads across all of this and identifies what is structurally absent. No brand owns the moment when a consumer first encounters the word purging. The actor who understands what it means before it happens to her completes the routine. The one who does not quits and blames the product. That is a content gap presenting as a retention problem. Any instrument that stops at purchase intent would have missed it entirely.</p><p>Four signals. None of them were in the original brief. All of them are actionable.</p><h3>What This Changes</h3><p>What this approach fundamentally shifts is not just speed or cost, but the nature of what is observable.</p><p>Traditional systems optimise for answering predefined questions. This system optimises for uncovering what was never asked.</p><p>It moves us from a world where we analyse decisions after they happen, to one where we can simulate and understand them as they unfold. The cost of a full run is under $5. The time to output is hours, not weeks. And unlike a study, it has no ceiling on the number of conversations. The signal gets richer every time you run it.</p><h3>Where This Goes Next</h3><p>While this may look like a consumer problem on the surface, it is not limited to it.</p><p>Any system where decisions are sequential, uncertain, and context-dependent can benefit from this approach. Product design, pricing strategy, investment behaviour, policy modelling, user journey optimisation. Any domain where understanding the path to a decision matters as much as the outcome itself.</p><h3>Closing Thought</h3><p>The future of intelligence systems will not be defined by better dashboards, or even better questions. It will be defined by how well we can simulate decisions, how deeply we can understand journeys, and how early we can detect what moves people.</p><p><strong>The systems that win will not be the ones that ask better questions.<br>They will be the ones that understand decisions before they happen.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5b1bc3802be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why FP-Growth Isn’t Enough: Introducing the Behavioral Link Graph (BLG)]]></title>
            <link>https://medium.com/@nachiappan4uni/why-fp-growth-isnt-enough-introducing-the-behavioral-link-graph-blg-f542f55978f5?source=rss-af7dba1b8ba6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f542f55978f5</guid>
            <category><![CDATA[market-basket-analysis]]></category>
            <category><![CDATA[cross-sell]]></category>
            <category><![CDATA[personalization]]></category>
            <category><![CDATA[ecommerce-analytics]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[nachiappan palaniappan]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 18:54:19 GMT</pubDate>
            <atom:updated>2025-06-16T18:54:19.460Z</atom:updated>
            <content:encoded><![CDATA[<p>In the age of personalization and nuanced customer behavior, traditional association mining techniques like FP-Growth fall short. They operate primarily on frequency, failing to capture <em>directionality</em>, <em>time sensitivity</em>, and <em>behavioral context</em>. Enter <strong>Behavioral Link Graph (BLG)</strong> — a mathematically robust framework that models user-product interactions as a directional, penalized, time-weighted graph.</p><h3>Limitations of Traditional Association Mining (e.g., FP-Growth)</h3><ol><li><strong>Symmetry Assumption:</strong> FP-Growth assumes co-occurrence is bidirectional (A ⇄ B), which breaks down when A → B is more common than B → A.</li><li><strong>No Time Decay and Basket Context:</strong> A shampoo bought 6 months after a lipstick carries the same weight as one bought in the same session/same week.</li><li><strong>Popularity Bias:</strong> Head categories dominate patterns simply due to volume.</li></ol><h3><strong>Purpose of BLG</strong></h3><p>To construct a <strong>directional, time-aware association graph</strong> between product categories based on real customer purchase behavior. BLG brings structure and causality to behavioral sequences by integrating:</p><ul><li><strong>Directional Scoring</strong> — Captures asymmetry (A → B ≠ B → A), thereby pivoting more on causation rather than mere co-existence (still doesn’t solve fully)</li><li><strong>Multi-Basket Transitions</strong> — Applies distance-based decay across purchase sessions (Exponential decay of time gap between purchases).</li></ul><blockquote>Note: Exponential decay retains influence from all past purchases, but emphasizes recent and causal ones. Strong co-occurrence, especially in tight succession often signals genuine user relevance, not noise. BLG respects such behavior, focusing not only on causality (which it slightly overweighs), but also accounts for popular behavior.</blockquote><ul><li><strong>Head-Category Penalization</strong> — Reduces bias from high-frequency categories (Strategic categories or cart fillers tend to appear in nearly every basket, diluting signal regardless of how good your algorithm is)</li><li><strong>Confidence Scaling</strong> — Weighs associations by how reliably A leads to B</li></ul><p><strong>Let’s define:</strong></p><p><strong>1. Association Strength (PMI-Based)</strong></p><ul><li><strong>Formula</strong>:<br>PMI(A → B) = log [ P(A ∩ B) / (P(A) * P(B)) ]</li><li><strong>Normalization</strong>:<br>PMI_norm = tanh(PMI)</li><li><strong>Rescaling (optional)</strong>:<br>Map PMI_norm from [-1, +1] to [0, 1] for combining with other metrics.</li></ul><p><strong>2. Cross-Basket Directional Score</strong></p><ul><li><strong>Formula</strong>:<br>DirBias(A → B) = log [ Σ(exp(−λ * Δt_i)) / Σ P(B) ]<br><em>(where Δt_i is time between A and B)</em></li><li><strong>Parameters</strong>: λ (lambda) ∈ [0.05–0.5] → controls time decay</li><li><strong>Normalization</strong>:<br>Apply Min-Max scaling → Rescale to [0, 1]</li></ul><p><strong>3. Head Category Penalty</strong></p><ul><li><strong>Formula</strong>:<br>h(A → B) = [ P(A → B) / P(A) ]^β</li><li><strong>Purpose</strong>:<br>Penalizes broad, over-dispersed head categories.</li><li><strong>Parameter</strong>:<br>β (beta) ∈ [0.3–0.8]</li></ul><p><strong>4. Final BLG Score</strong></p><ul><li><strong>Formula</strong>:<br>Final_Score(A → B) = (w1 * PMI_norm + w2 * DirBias_norm) * h(A → B)</li><li><strong>Weights</strong>: w1 = weight for PMI (default: 0.5); w2 = weight for DirBias (default: 0.5)</li><li><strong>Output Range</strong>:<br>Final Score ∈ [0, 1]</li></ul><p><strong>5. Optional Preprocessing — Outlier Treatment &amp; Standardization</strong></p><p>A. Winsorization via Percentiles</p><ul><li>Bottom 30% → Clip to 30th percentile</li><li>Top 20% → Clip to 80th percentile</li><li>Use case: Reduces impact of outliers on PMI or DirBias before combining.</li></ul><p>B. Percentile-Based Scaling</p><ul><li><strong>Formula</strong>:<br>Scaled_Value = 100 * PERCENTRANK(x)</li><li>Applies smoothly between the 30th–80th percentile, flattens beyond.</li></ul><h3>Closing Notes</h3><p>BLG lays a strong foundation in diversifying the customers based on their current journey. It helps in:</p><ul><li><strong>Next-Product Prediction</strong>: Recommending the most likely next purchase.</li><li><strong>Personalized Bundling</strong>: Creating smart bundles from co-behavior patterns.</li><li><strong>Pattern Mining</strong>: Surfacing latent associations and behavioral links.</li></ul><p>Its strength lies in bridging intuitive behavioral reasoning with mathematically grounded scoring, making it both interpretable and scalable.</p><p>Then the <strong>PMI++ score</strong> for A → B is:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f542f55978f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>