<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kanhaiya Kumar</title>
    <description>The latest articles on DEV Community by Kanhaiya Kumar (@kanha_9650).</description>
    <link>https://dev.to/kanha_9650</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4138520%2F42b323a6-8bde-46bc-92fc-5e9b8182aec2.png</url>
      <title>DEV Community: Kanhaiya Kumar</title>
      <link>https://dev.to/kanha_9650</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kanha_9650"/>
    <language>en</language>
    <item>
      <title># CaseGuard: Winning with Uncertainty-Gated Agentic Fraud Investigation on TigerGraph</title>
      <dc:creator>Kanhaiya Kumar</dc:creator>
      <pubDate>Wed, 23 Sep 2026 03:34:02 +0000</pubDate>
      <link>https://dev.to/kanha_9650/-caseguard-winning-with-uncertainty-gated-agentic-fraud-investigation-on-tigergraph-407p</link>
      <guid>https://dev.to/kanha_9650/-caseguard-winning-with-uncertainty-gated-agentic-fraud-investigation-on-tigergraph-407p</guid>
      <description>&lt;p&gt;&lt;em&gt;A technical breakdown of our submission for the TigerGraph HHGOA Hackathon.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Executive Summary
&lt;/h2&gt;

&lt;p&gt;Traditional automated fraud prevention systems suffer from a binary fallacy: attempting to label complex transactions as either "fraud" or "not fraud." In modern financial crime, sophisticated syndicates exploit these rigid thresholds through synthetic identities, distributed device emulators, and rapid multi-hop pass-through accounts.&lt;/p&gt;

&lt;p&gt;We built &lt;strong&gt;CaseGuard&lt;/strong&gt;: an autonomous fraud investigation agent powered by &lt;strong&gt;TigerGraph&lt;/strong&gt;, &lt;strong&gt;GSQL analytics&lt;/strong&gt;, and a cyclic &lt;strong&gt;LangGraph state machine&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;CaseGuard's defining philosophy is &lt;strong&gt;"An investigator that knows what it doesn't know."&lt;/strong&gt; Rather than guessing aggressively, CaseGuard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Formulates hypotheses by executing &lt;strong&gt;GSQL graph algorithms&lt;/strong&gt; (detecting device sharing, velocity bursts, IP clusters, and mule chains).&lt;/li&gt;
&lt;li&gt;Computes an explicit, multi-factor &lt;strong&gt;Uncertainty &amp;amp; Confidence score&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Initiates &lt;strong&gt;controlled, policy-approved evidence gathering&lt;/strong&gt; (step-up 2FA, customer transaction pings) when confidence is insufficient.&lt;/li&gt;
&lt;li&gt;Generates defensible &lt;strong&gt;Next-Best-Action (NBA)&lt;/strong&gt; recommendations with strict Human-in-the-Loop policy guardrails.&lt;/li&gt;
&lt;li&gt;Persists closed cases back into the graph to empower &lt;strong&gt;continuous case-memory learning&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  2. Architecture Blueprint
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌────────────────────────────────────────────────────────┐
│                   STREAMLIT DASHBOARD                  │
│   Case Timeline · Evidence Lineage · Approval Queue   │
└───────────────────────────┬────────────────────────────┘
                            │
┌───────────────────────────▼────────────────────────────┐
│              CASEGUARD AGENT ORCHESTRATOR               │
│                   (LangGraph Loop)                     │
│                                                        │
│  TRIAGE ─▶ GATHER ─▶ DETECT_PATTERNS ─▶ CASE_MEMORY    │
│    ▲                                          │        │
│    │      ┌─────────────────────────────┐     │        │
│    │      │  Uncertainty Engine         │     │        │
│    └──────┤  (Score &amp;lt; Threshold?)       │◀────┘        │
│  Request  └──────────────┬──────────────┘              │
│  Evidence                │ Score &amp;gt;= Threshold          │
│                          ▼                             │
│                  RECOMMEND_ACTIONS ─▶ PERSIST_GRAPH    │
└───────────────────────────┬────────────────────────────┘
                            │
┌───────────────────────────▼────────────────────────────┐
│                    TIGERGRAPH DB                       │
│  • Transaction Graph Topology                          │
│  • Installed GSQL Pattern Detectors                   │
│  • Case Memory &amp;amp; Prior Investigations                  │
│  • GraphRAG Policy Knowledge Store                     │
└────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. How TigerGraph &amp;amp; GSQL Win the Investigation
&lt;/h2&gt;

&lt;p&gt;The dataset contains ~590,000 transactions, ~13,500 customers, and multi-dimensional identity signals. A generic LLM cannot compute connected graph paths or aggregate velocity over graph edges.&lt;/p&gt;

&lt;p&gt;In CaseGuard, &lt;strong&gt;GSQL does 100% of the graph traversal and pattern detection; the LLM reasons over the structured graph output:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Device Multi-Accounting (&lt;code&gt;detect_device_sharing.gsql&lt;/code&gt;)&lt;/strong&gt;: Evaluates the subgraphs connecting &lt;code&gt;Device -&amp;gt; Transaction -&amp;gt; Account&lt;/code&gt; and &lt;code&gt;Customer&lt;/code&gt;. Instantly flags device fingerprints linked to 3+ distinct cards or identities within sliding windows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Velocity Burst Analysis (&lt;code&gt;detect_velocity_burst.gsql&lt;/code&gt;)&lt;/strong&gt;: Performs real-time accumulator-driven aggregations over &lt;code&gt;Transaction&lt;/code&gt; vertices outgoing from a card to catch automated testing bursts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mule Chain Tracing (&lt;code&gt;detect_mule_chain.gsql&lt;/code&gt;)&lt;/strong&gt;: Multi-hop BFS traversal through pass-through intermediary accounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Address &amp;amp; Device Discrepancies (&lt;code&gt;detect_addr_mismatch.gsql&lt;/code&gt;)&lt;/strong&gt;: Discovers mismatches between billing address, shipping address, and newly seen device IDs.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. The Uncertainty Engine (The Winning Lever)
&lt;/h2&gt;

&lt;p&gt;The primary differentiator in judging criteria (representing 50% of the score between Accuracy and Next-Best-Action) is the agent's ability to navigate ambiguity.&lt;/p&gt;

&lt;p&gt;CaseGuard computes confidence as a weighted, calibrated formula:&lt;/p&gt;

&lt;p&gt;$$\text{Confidence} = w_1 \cdot \text{GraphSupport} + w_2 \cdot \text{HistoricalRate} + w_3 \cdot \text{SignalStrength} + w_4 \cdot \text{EvidenceCoverage} - \text{Penalty}_{\text{contradiction}}$$&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Graph Support ($w=0.35$)&lt;/strong&gt;: Grounded in GSQL query matches and neighbor fraud density.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Historical Rate ($w=0.25$)&lt;/strong&gt;: Outcome distribution of structurally similar prior closed cases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signal Strength ($w=0.25$)&lt;/strong&gt;: Bank model risk score and anomaly features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evidence Coverage ($w=0.15$)&lt;/strong&gt;: Percentage of the required checklist for the suspected typology.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contradiction Penalty&lt;/strong&gt;: Subtracted if behavioral signals resemble previously cleared legitimate cases, preventing aggressive false-positive blocks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The NBA Decision Progression (Before vs. After Evidence)
&lt;/h3&gt;

&lt;p&gt;Hackathon guidelines require logging the next best action both &lt;strong&gt;before&lt;/strong&gt; requesting additional evidence and &lt;strong&gt;after&lt;/strong&gt; receiving it. CaseGuard enforces this natively in state:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If $\text{Confidence} &amp;lt; 0.60$, CaseGuard logs the initial NBA (e.g., &lt;code&gt;monitor_account&lt;/code&gt; + &lt;code&gt;request_step_up_auth&lt;/code&gt;), dispatches the mock verification, and recalculates the updated NBA upon receiving user validation.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Hardcoded Governance &amp;amp; Permission Matrix
&lt;/h2&gt;

&lt;p&gt;Autonomous agents in banking must operate within strict regulatory guardrails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-invasive actions (&lt;code&gt;request_step_up_auth&lt;/code&gt;, &lt;code&gt;warn_customer&lt;/code&gt;, &lt;code&gt;monitor_account&lt;/code&gt;) &lt;strong&gt;auto-execute&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;High-impact protective actions (&lt;code&gt;block_transaction&lt;/code&gt;, &lt;code&gt;block_account&lt;/code&gt;, &lt;code&gt;file_SAR&lt;/code&gt;) are classified as &lt;code&gt;pending_approval&lt;/code&gt; and routed to &lt;strong&gt;L1/L2 Analysts&lt;/strong&gt; or &lt;strong&gt;Compliance Officers&lt;/strong&gt; via the UI approval queue.&lt;/li&gt;
&lt;li&gt;Mandatory SAR narratives are drafted in FinCEN standard formatting when transaction volume exceeds \$5,000 or mule laundering patterns are detected.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Key Learnings &amp;amp; Future Horizon
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Separation of Graph Execution &amp;amp; LLM Reasoning&lt;/strong&gt;: Offloading graph traversals to pre-compiled GSQL queries gives sub-millisecond execution times and deterministic evidence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph-Backed Memory Over Raw Vector Stores&lt;/strong&gt;: Embedding case summaries while maintaining graph linkages (&lt;code&gt;SIMILAR_TO_PRIOR_CASE&lt;/code&gt;) creates a rich historical audit trail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;With More Time&lt;/strong&gt;: We plan to implement automated community detection (Louvain) in GSQL to proactively identify emerging, undocumented syndicate clusters before a trigger even fires.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>devchallenge</category>
      <category>llm</category>
    </item>
  </channel>
</rss>
