<?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: Hiyansh_Sharma</title>
    <description>The latest articles on DEV Community by Hiyansh_Sharma (@hsg00195).</description>
    <link>https://dev.to/hsg00195</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%2F4140656%2Fe656f0c8-2568-4c89-9083-59456f139bae.jpg</url>
      <title>DEV Community: Hiyansh_Sharma</title>
      <link>https://dev.to/hsg00195</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hsg00195"/>
    <language>en</language>
    <item>
      <title>🚀 Building Sentinel: An Autonomous, GraphRAG-Powered Fraud Investigation Agent on TigerGraph</title>
      <dc:creator>Hiyansh_Sharma</dc:creator>
      <pubDate>Thu, 24 Sep 2026 16:10:04 +0000</pubDate>
      <link>https://dev.to/hsg00195/building-sentinel-an-autonomous-graphrag-powered-fraud-investigation-agent-on-tigergraph-4eao</link>
      <guid>https://dev.to/hsg00195/building-sentinel-an-autonomous-graphrag-powered-fraud-investigation-agent-on-tigergraph-4eao</guid>
      <description>&lt;p&gt;Modern fraud operations teams are drowning in alerts. Detection engines currently generate thousands of alerts per day, and the process of investigating them is still largely manual and fragmented. Analysts perform a multitude of time-consuming tasks to triage an alert before any action can be taken — sifting through different SQL databases, cross-referencing device fingerprints across disparate systems, tracing the flow of funds, reviewing ambiguous compliance-related notes, and estimating potential losses to the company — all while the customer is on hold or the money is in-flight.&lt;/p&gt;

&lt;p&gt;For the TigerGraph × Hacker House Goa (HHGOA) Hackathon, our team built Sentinel: an autonomous, explainable fraud-investigation agent.&lt;/p&gt;

&lt;p&gt;Sentinel leverages the power of TigerGraph’s internal multi-hop graph engine, LangGraph’s stateful orchestration, and decision-theoretic Bayesian models to turn raw transaction anomalies into fully-auditable regulatory reports.&lt;/p&gt;

&lt;p&gt;In this post, we’ll discuss the architecture of our solution, the mathematical underpinnings of our decision-theoretic engine, and some lessons-learned during development.&lt;/p&gt;

&lt;p&gt;High-Level Architecture: The Deterministic State Machine&lt;/p&gt;

&lt;p&gt;Sentinel avoids non-deterministic LLM routing loops by implementing a state machine built on LangGraph. The investigation flows sequentially through calibrated nodes:&lt;br&gt;
┌────────────────────────┐&lt;br&gt;
                          │    1. TRIGGER NODE     │&lt;br&gt;
                          │ (Score/Dispute/Alert)  │&lt;br&gt;
                          └───────────┬────────────┘&lt;br&gt;
                                      │&lt;br&gt;
                                      ▼&lt;br&gt;
                          ┌────────────────────────┐&lt;br&gt;
             ┌───────────►│  2. INVESTIGATE NODE   │◄───────────┐&lt;br&gt;
             │            │ (TigerGraph Traversal) │            │&lt;br&gt;
             │            └───────────┬────────────┘            │&lt;br&gt;
             │                        │                         │&lt;br&gt;
             │                        ▼                         │&lt;br&gt;
             │            ┌────────────────────────┐            │&lt;br&gt;
             │            │    3. ASSESS NODE      │            │&lt;br&gt;
             │            │   (Bayesian Ledger)    │            │&lt;br&gt;
             │            └───────────┬────────────┘            │&lt;br&gt;
             │                        │                         │&lt;br&gt;
             │                        ▼                         │&lt;br&gt;
             │            ┌────────────────────────┐            │&lt;br&gt;
             │            │   4. VoI CHECK NODE    │            │&lt;br&gt;
             │            │ (Value of Information) │            │&lt;br&gt;
             │            └─────┬────────────┬─────┘            │&lt;br&gt;
             │   Net VoI &amp;gt; 0    │            │   Net VoI &amp;lt;= 0   │&lt;br&gt;
             │  (Gather Data)   │            │  (Ready to Act)  │&lt;br&gt;
             │                  ▼            │                  │&lt;br&gt;
    ┌────────┴───────────────┐               │                  │&lt;br&gt;
    │  5. GATHER EVIDENCE    │               │                  │&lt;br&gt;
    │ (Customer/2FA/Analyst) │               │                  │&lt;br&gt;
    └────────────────────────┘               │                  │&lt;br&gt;
                                             ▼                  │&lt;br&gt;
                          ┌────────────────────────┐            │&lt;br&gt;
                          │      6. ACT NODE       │            │&lt;br&gt;
                          │   (Cost-Loss Matrix)   │            │&lt;br&gt;
                          └───────────┬────────────┘            │&lt;br&gt;
                                      │                         │&lt;br&gt;
                                      ▼                         │&lt;br&gt;
                          ┌────────────────────────┐            │&lt;br&gt;
                          │    7. POLICY ENGINE    │            │&lt;br&gt;
                          │ (FinCEN / Rules R1-R10)│            │&lt;br&gt;
                          └───────────┬────────────┘            │&lt;br&gt;
                                      │                         │&lt;br&gt;
                                      ▼                         │&lt;br&gt;
                          ┌────────────────────────┐            │&lt;br&gt;
                          │    8. EXPLAIN NODE     │            │&lt;br&gt;
                          │    (LLM Synthesis)     │            │&lt;br&gt;
                          └───────────┬────────────┘            │&lt;br&gt;
                                      │                         │&lt;br&gt;
                                      ▼                         │&lt;br&gt;
                          ┌────────────────────────┐            │&lt;br&gt;
                          │   9. WRITE CASE NODE   │────────────┘&lt;br&gt;
                          │(Upsert Case to Graph)  │ (Lifelong Memory)&lt;br&gt;
                          └────────────────────────┘&lt;/p&gt;

&lt;p&gt;Graph Topology: TigerGraph as the Native Knowledge Base&lt;/p&gt;

&lt;p&gt;Relational databases buckle when performing 4-to-6 hop joins across billions of transactions. TigerGraph handles these traversals natively in milliseconds.&lt;br&gt;
&lt;code&gt;(Customer) ──[OWNS]──&amp;gt; (Card) ──[MADE]──&amp;gt; (Transaction)&lt;br&gt;
                                                │&lt;br&gt;
       ┌──────────────────┬─────────────────────┴──────────────────┐&lt;br&gt;
       ▼                  ▼                                        ▼&lt;br&gt;
[FROM_DEVICE]       [BILLED_IN]                             [PURCHASER_EMAIL]&lt;br&gt;
       │                  │                                        │&lt;br&gt;
       ▼                  ▼                                        ▼&lt;br&gt;
 (DeviceProfile)    (BillingRegion)                          (EmailDomain)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Graph Schema Elements&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vertices: Customer, Card, Transaction, DeviceProfile (hardware fingerprint, OS, browser hash), BillingRegion (geographic postal zone), EmailDomain, ClosedCase (verified historical outcomes), AgentCase (active investigations), and Evidence (atomic claims).

Key Edges:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OWNS: (Customer -&amp;gt; Card)

MADE: (Card -&amp;gt; Transaction)

FROM_DEVICE: (Transaction -&amp;gt; DeviceProfile)

BILLED_IN: (Transaction -&amp;gt; BillingRegion)

NEXT: (Transaction -&amp;gt; Transaction) — explicit temporal sequence linking within cards to trace velocity without indexing penalties.

CASE_EVIDENCE: (AgentCase -&amp;gt; Evidence)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Core GSQL Pattern QueriesSentinel leverages GSQL to spot complex fraud topologies instantly:Syndicate Ring Traversal: Detects when cardholder $A$'s device profile suddenly links to cardholder $B$, or matches an identifier logged in a previously confirmed fraud case.Geographic Deviation: Compares the billing region (addr1) of an active authorization against the user's historical graph baseline to spot physical card-cloning patterns.Velocity Burst Sequences: Traverses temporal NEXT chains to pinpoint rapid micro-authorizations (card testing) preceding larger merchant charges within small sliding windows.Core Agentic Intelligence1. The Bayesian Evidence LedgerLLMs are prone to uncalibrated overconfidence. To maintain reliable calibration, Sentinel computes fraud probability deterministically via log-odds:&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Facg1ie3iiptai7080rwe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Facg1ie3iiptai7080rwe.png" alt=" " width="363" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
&lt;/code&gt;$w_i$: Base evidentiary weight (e.g., recognized card-testing sequence $= +2.0$, customer confirmation $= -2.5$).$d_i$: Directionality ($+1$ for malicious, $-1$ for benign).$r_i$: Reliability factor of the data source ($0.0$ to $1.0$).Every evidentiary claim stores its raw provenance (ref: query:device_neighbors(device_id=D000731)), making the reasoning path fully auditable.`&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Dynamic Next-Best Action (NBA) Evolution
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "next_best_actions": {
    "initial": [
      { "action": "VERIFY_WITH_CUSTOMER", "route": "AUTO", "rule": "R1" }
    ],
    "evidence_requests": [
      { "type": "SMS_OUTREACH", "status": "DENIED_BY_CARDHOLDER" }
    ],
    "final": [
      { "action": "BLOCK_CARD", "route": "L1", "rule": "R2" },
      { "action": "FILE_SAR", "route": "L2", "rule": "R6" }
    ],
    "what_changed": "Customer explicitly denied the charge; device fingerprint matched an undocumented syndicate ring across 3 separate cards. Risk shifted to 0.99; triggered mandatory SAR under FinCEN R6."
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key Test Case HighlightsUndocumented Coordinated Syndicate (HHG-014): Sentinel recognized a Samsung device fingerprint (SM-G935F Build/NRD90M) across three disparate customer records and correctly created an unprompted multi-subject SAR narrative, escalating L1 approval to Tier-L2.Benign Travel Spike Saved (HHG-007): An alert about a large transaction at a customer's secondary location was cleared as CLOSE_NO_FRAUD after Sentinel observed similar seasonal billing patterns in that alternate address, saving the customer from an unwarranted card block.The Analyst ExperienceTo experience the system, we wrapped the agent in a Streamlit console:State Machine Visualizer: See the real-time context state vector as it transitions between the 8 execution phasesBayesian Ledger Inspector: Explore evidence contributions as the mathematical elements were added to the $P(\text{Fraud})$ loss functionLoss Curve Visualizer: Compare expected $ loss by action type (BLOCK_CARD, CHALLENGE_USER, ALLOW)FinCEN Compliance Drawer: Examine XML/JSON payloads and regulatory narratives for downstream reportingKey Lessons&lt;/p&gt;

&lt;p&gt;LearnedTopology Wins Over Embeddings in Fraud Detection: Vector search over natural language is blind to distributed fraud rings; our graph traversal reveals discrete, deterministic relationships that LLMs would otherwise hallucinateValue of Information Stops Mindless&lt;/p&gt;

&lt;p&gt;Agent Looping: The max_iterations=5 guard is arbitrary; by formulating the problem in terms of Value of Information we created systems that explicitly balanced risk reduction with operational costIsolate LLMs to Explainability: Use code and Bayesian models for decision-making, policy enforcement, and routing; &lt;/p&gt;

&lt;p&gt;let LLMs handle the synthesis of multi-hop graph reasoning into a comprehensible incident reportNext StepsWith the architecture proven, these are our likely engineering priorities:Streaming Graph &lt;/p&gt;

&lt;p&gt;Ingestion: Kafka + TigerGraph streaming connectors to ingest multi-hop topology with &amp;lt;10ms latencyIn-Database Graph Neural Networks: Training inductive GraphSAGE models on TigerGraph vertices to score unknown device clustersMulti-Agent Specialist Swarms: Decompose the main agent into sub-agents for AML screening, biometric telemetry, and adversary simulations&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F98lh13gpzxz3n2z5xrtc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F98lh13gpzxz3n2z5xrtc.png" alt=" " width="799" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>hackerhousegoa</category>
      <category>agentaichallenge</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
