<?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: Sushant Shekhar</title>
    <description>The latest articles on DEV Community by Sushant Shekhar (@sushant_shekhar_c99a6b858).</description>
    <link>https://dev.to/sushant_shekhar_c99a6b858</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%2F4141664%2F4851b045-cabc-42e7-aefa-77f62647359a.jpg</url>
      <title>DEV Community: Sushant Shekhar</title>
      <link>https://dev.to/sushant_shekhar_c99a6b858</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sushant_shekhar_c99a6b858"/>
    <language>en</language>
    <item>
      <title>Savanna Fraud Investigator: An Agentic Fraud Investigation System on TigerGraph</title>
      <dc:creator>Sushant Shekhar</dc:creator>
      <pubDate>Thu, 24 Sep 2026 17:37:12 +0000</pubDate>
      <link>https://dev.to/sushant_shekhar_c99a6b858/savanna-fraud-investigator-an-agentic-fraud-investigation-system-on-tigergraph-3nha</link>
      <guid>https://dev.to/sushant_shekhar_c99a6b858/savanna-fraud-investigator-an-agentic-fraud-investigation-system-on-tigergraph-3nha</guid>
      <description>&lt;h1&gt;
  
  
  Savanna Fraud Investigator: An Agentic Fraud Investigation System on TigerGraph
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Built for the TigerGraph Agentic Fraud Investigation HHGOA hackathon&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What we built
&lt;/h2&gt;

&lt;p&gt;Fraud teams don't lack data — they lack time. An analyst investigating a single flagged transaction has to manually pull transaction history, trace connected cards and devices, check prior case outcomes, weigh a fraud policy, and decide what to do, often while the window to actually stop the money closes. We built &lt;strong&gt;Savanna Fraud Investigator&lt;/strong&gt; to compress that loop into an agent that investigates, decides, and explains itself — without ever letting a language model be the one making the actual call on blocking a card or filing a report.&lt;/p&gt;

&lt;p&gt;The system ships two investigation paths on top of the same graph:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A deterministic pipeline&lt;/strong&gt; (&lt;code&gt;src/generate_cases.py&lt;/code&gt;) that runs the identical evidence-gathering steps and a fixed policy engine over every case. This is what produced our 20 required answer files — reliable and reproducible by design.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A genuinely agentic investigator&lt;/strong&gt; (&lt;code&gt;src/mcp_agent.py&lt;/code&gt;) that connects to a live TigerGraph MCP server and lets Gemini, through a LangGraph ReAct loop, decide for itself which graph queries to run and in what order. This path found things the fixed pipeline structurally can't — for example, billing-region velocity that looks like impossible travel — because it isn't locked into one investigation script.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A local web dashboard sits on top of both: a case docket showing evidence, before/after next-best-action, SAR status, and case memory for all 20 cases, plus a button to run the live agent against any case and stream its real output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;At the center is TigerGraph Savanna holding the IEEE-CIS-derived transaction graph — transactions, cards, devices, customers, and prior closed cases as first-class vertices and edges. Everything else is built to &lt;em&gt;never&lt;/em&gt; replace graph analysis with model guesswork:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GSQL layer&lt;/strong&gt; (&lt;code&gt;tigergraph/&lt;/code&gt;): schema, loading jobs, and four custom installed queries — &lt;code&gt;card_window&lt;/code&gt; (transactions near a flagged one on the same card), &lt;code&gt;transaction_device&lt;/code&gt; (device fingerprint lookup), &lt;code&gt;device_neighbors&lt;/code&gt; (other cards sharing that device), and &lt;code&gt;hhg_write_case&lt;/code&gt; (writes the finished investigation back as an &lt;code&gt;InvestigationCase&lt;/code&gt; vertex — our case memory).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evidence layer&lt;/strong&gt; (&lt;code&gt;src/evidence.py&lt;/code&gt;, &lt;code&gt;src/tg_client.py&lt;/code&gt;): a thin pyTigerGraph client that calls those four queries and normalizes results into typed evidence the rest of the system can reason over.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy engine&lt;/strong&gt; (&lt;code&gt;src/policy.py&lt;/code&gt;): a fixed, non-negotiable R1–R10 rule set that owns verdicts, next-best actions, approval routes, and SAR eligibility. Neither LLM path can override it — an agent can gather evidence and explain a recommendation, but the actual decision of "block this card" or "file this report" comes from code, not a prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synthesis layer&lt;/strong&gt; (&lt;code&gt;src/synthesis.py&lt;/code&gt;): grounds Gemini's explanations strictly in retrieved evidence, with a deterministic fallback if no API key is present — the pipeline always produces policy-compliant, non-fabricated output whether or not an LLM is in the loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contracts&lt;/strong&gt; (&lt;code&gt;src/contracts.py&lt;/code&gt;): every one of the 20 generated cases is validated against the hackathon's exact JSON schema before it's written to disk.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How we used TigerGraph
&lt;/h2&gt;

&lt;p&gt;TigerGraph isn't a data store we occasionally query — it's the arbiter. Our policy explicitly treats the transaction's incoming risk score as &lt;em&gt;an investigation trigger, not a verdict&lt;/em&gt;: probability of fraud only moves meaningfully once graph evidence (a burst of small authorizations on the same card, a device shared across multiple cards) actually corroborates it. A high risk score with no graph corroboration and no customer complaint gets closed as legitimate rather than escalated — we didn't want a system that just rubber-stamps the input model's score with extra words.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;hhg_write_case&lt;/code&gt; query closes the loop by writing every finished investigation back into the graph as an &lt;code&gt;InvestigationCase&lt;/code&gt; vertex, so future investigations — whether run through the deterministic pipeline or the agentic path — can retrieve prior outcomes for the same entities as case memory rather than starting cold.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agentic design
&lt;/h2&gt;

&lt;p&gt;The deterministic pipeline gives us reliability for the 20 required answer files. The agentic investigator is where the actual agentic capability lives: it's handed the TigerGraph MCP tool surface and decides for itself, case by case, what evidence it needs and in what order, rather than following one fixed script. Its tool access is deliberately restricted to read-mostly TigerGraph MCP tools plus the single write path — it can gather evidence and record a finished case, but it can't touch schema or delete data. The dashboard's "Run Live Agentic Investigation" button calls this path directly against &lt;code&gt;mcp_agent.py&lt;/code&gt; and streams its real output, so the demo isn't simulated.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;p&gt;Most of the real engineering work wasn't the graph queries or the policy rules — it was making sure "live TigerGraph evidence" actually &lt;em&gt;stayed&lt;/em&gt; live all the way through a 20-case batch run, not just in a one-off connection test. We hit a genuinely subtle bug: our connection helper cached its result for the lifetime of the process, so if credentials weren't fully loaded at the very first call, every subsequent case in the batch silently fell back to document-only evidence with no error raised at all. It's a good reminder that "it worked when I tested it" and "it works across a full batch run" are different claims, and that a policy engine's decisions are only as trustworthy as the evidence pipeline feeding it — a silent fallback is more dangerous than a loud crash.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we'd improve with more time
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add explicit health checks and fail-loud behavior around the graph connection, rather than allowing any case to silently fall back to document-only evidence&lt;/li&gt;
&lt;li&gt;Expand the agentic path's pattern coverage beyond the five documented fraud typologies, using the freedom the ReAct loop already has&lt;/li&gt;
&lt;li&gt;Add persistent approve/reject workflow state for analysts reviewing agent recommendations, rather than a stateless demo&lt;/li&gt;
&lt;li&gt;Stream the agent's reasoning to the dashboard live, rather than only showing output once a run completes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Built for the TigerGraph Agentic Fraud Investigation HHGOA hackathon. Code: &lt;a href="https://github.com/SHKsushant/savanna-fraud-investigator" rel="noopener noreferrer"&gt;https://github.com/SHKsushant/savanna-fraud-investigator&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>tigergraph</category>
      <category>hackathon</category>
      <category>fraud</category>
    </item>
  </channel>
</rss>
