Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Reducing False Positives: Context-Enrichment with Auxiliary Data

Introduction

In our last lesson, we designed the high-level workflow for a real-time fraud detection agent, breaking it down into four stages: Trigger & Ingestion, Context Enrichment, Analysis & Reasoning, and Decision & Action. We established that the Context Enrichment stage is where an agentic system provides its most significant value over traditional models.

This lesson is a deep dive into that critical stage. Our objective is to design context-enrichment strategies to reduce false positives using auxiliary data sources. False positives—legitimate transactions incorrectly flagged as fraudulent—are a severe problem in banking. They create significant customer friction, lead to lost revenue, and increase the operational burden on human review teams. An agent's ability to gather and synthesize a wider array of evidence is the most potent weapon against this problem.

We will explore two primary categories of context enrichment:

  1. Semantic Enrichment: Understanding the meaning and similarity of a transaction by comparing it to historical data.
  2. Relational Enrichment: Uncovering hidden connections between the entities involved in a transaction.

By mastering these strategies, you can design agents that make nuanced, context-aware decisions, moving beyond the binary logic of simplistic rule engines.

1. The Foundation: A Unified Contextual Data Layer

Before an agent can enrich the context of a live transaction, it needs a rich, unified dataset to draw from. A transaction does not occur in a vacuum; it is part of a complex web of customer behaviors, relationships, and histories. The first step in any advanced detection strategy is to build this web.

This is achieved through two core data management principles: Entity Resolution and Data Fusion.

  • Entity Resolution (ER): The process of identifying and linking records that refer to the same real-world entity (e.g., a person, a company) across different data silos. For a bank, this means knowing that "John Smith" in the CRM, "J. Smith" on a loan application, and the holder of account #12345 are all the same person.
  • Data Fusion: The process of combining the information from these linked records into a single, comprehensive "golden record" or 360-degree view. This view integrates internal data (transactions, account info) with external data (corporate registries, sanctions lists, public records).

The result of this process is often stored in a Knowledge Graph, a flexible database structure that represents entities as nodes and their relationships as edges. This graph becomes the agent's primary source of truth for context enrichment.

To understand this foundational concept in more detail, let's turn to an article that provides a framework for this type of system architecture.

Contextual AI and Graph Intelligence in Financial Services: An ...

The article 'Contextual AI and Graph Intelligence in Financial Services' provides a rigorous overview of building a context-rich data foundation. It articulates the role of Entity Resolution and Data Fusion as precursors to any intelligent analysis.

Please read the two sections 'Entity Resolution and Data Fusion' and 'Knowledge Graph Construction'. Focus on how these processes work together to create a unified, 360-degree view of a customer by connecting disparate internal and external data sources.

This unified data layer is the well from which our agent will draw contextual information during a live transaction analysis.

2. Strategy 1: Semantic Enrichment with Vector Search

With a rich historical dataset in place, the first enrichment strategy is to find transactions that are semantically similar to the one being analyzed. Traditional rules look for exact matches (e.g., amount > $10,000), but fraud patterns are often more subtle.

This is where vector embeddings become powerful. By converting transaction data (amount, merchant, location, time, etc.) into a numerical vector, we can use similarity search to find past cases that share underlying characteristics, even if the surface details differ.

The article "AI Fraud Detection With MongoDB Atlas and Temporal" offers a superb, practical explanation of this technique.

AI Fraud Detection With MongoDB Atlas and Temporal

This article from MongoDB demonstrates how to use vector search for semantic enrichment in fraud detection. It provides a clear example of its power and quantifies its impact on reducing false positives.

Read the sections 'The AI-powered modernization solution' and 'Atlas Vector Search with Voyage AI’s finance-optimized embeddings.' Pay close attention to the example of a $49,500 wire transfer being similar to a past fraudulent $47,200 transaction. Note the reported metric: a 65% decrease in false positives compared to rule-based systems.

How an agent uses this strategy:

  1. Trigger: A new transaction for $1,950 to an online electronics merchant in a foreign country is initiated. A simple rule engine might flag this.
  2. Enrichment Tool: The agent takes the transaction data, generates a vector embedding using a finance-trained model (like the voyage-finance-2 model mentioned in the article), and queries the vector database of historical transactions.
  3. Contextual Finding: The query returns several highly similar, legitimate transactions from the same customer over the past year, all related to purchasing camera equipment from specialized international retailers.
  4. Result: The agent now has the context that this "anomalous" transaction is, in fact, part of an established behavioral pattern for this specific customer. The risk of it being fraudulent is significantly lower, preventing a false positive.

3. Strategy 2: Relational Enrichment with Graph Traversal

Semantic similarity provides one dimension of context. Relational enrichment provides another, equally critical one: understanding the network of connections surrounding a transaction. Sophisticated fraud, particularly money laundering and synthetic identity fraud, is rarely a single event but a coordinated effort across a network of accounts and individuals.

A knowledge graph is the ideal tool for uncovering these hidden relationships. An agent can traverse this graph in real-time to see if a transaction, however innocent it appears in isolation, is connected to known high-risk entities.

This image provides a clear visual of the kind of relationships a graph can expose.

Fraud Detection Through a Knowledge Graph
This knowledge graph illustrates how an agent can uncover non-obvious links. The fact that a 'Synthetic Person' and a legitimate 'Account Holder' share the same 'Mobile Number' is a powerful piece of contextual information that dramatically increases risk.

When a transaction occurs, an agent can use a graph traversal tool to ask questions like:

  • Does the recipient account share an address, phone number, or device ID with any accounts previously flagged for fraud?
  • Is the sender part of a dense cluster of accounts that were all opened recently? (A sign of a botnet or mule network).
  • Is money flowing in a circular pattern, indicating a potential money laundering loop?

The MongoDB and Quantexa articles both describe the use of graph analytics for this purpose. The graphLookup operator mentioned by MongoDB is a concrete example of a tool an agent could invoke to perform this enrichment. This allows the agent to move from analyzing a single transaction to analyzing its position within a broader financial network.

4. Advanced Enrichment: Understanding Unstructured Documents

Finally, a great deal of valuable context is often locked in unstructured data: KYC documents, customer service notes, Suspicious Activity Report (SAR) narratives, and insurance policies. Standard Retrieval-Augmented Generation (RAG) can retrieve snippets from these documents, but often misses the crucial structural context, which can lead to catastrophic errors.

For example, an agent might retrieve text describing an activity but fail to realize it's listed under the "Exclusions" section of a policy document. The following video explains this problem and presents a more sophisticated set of strategies for document-based context enrichment.

This RAG Trick Makes Your AI Agents WAY More Accurate (n8n)

The video 'This RAG Trick Makes Your AI Agents WAY More Accurate' provides a technical deep-dive into advanced RAG techniques. It demonstrates why simple chunking fails and how to preserve document structure to provide an agent with truly accurate context.

Please watch two key segments. First, from 04:10 to 05:54, which explains how standard RAG can lead to hallucinations using a clear insurance policy example. Second, from 16:02 to 17:38, which introduces the superior strategy of fetching an entire logical 'section' of a document. This highlights the importance of understanding document hierarchy for accurate context.

The key takeaway is that for high-stakes decisions, an agent's tools must be more sophisticated than simple semantic search over document chunks. By using techniques that respect the document's structure (e.g., retrieving an entire section or parent section), an agent can reliably extract context from complex legal and policy documents, further reducing the risk of errors.

Conclusion

In this lesson, we have moved beyond the abstract idea of "context" and designed concrete, implementable strategies for an agent to enrich its understanding of a financial transaction. By employing these techniques, an agent can drastically reduce false positives, improving both security and customer experience.

Key Takeaways:

  • Foundation is Key: Effective context enrichment relies on a unified data layer built through Entity Resolution and Data Fusion, often materialized as a Knowledge Graph.
  • Semantic Enrichment: Use vector similarity search on historical transactions to identify behavioral patterns and find analogous past events, adding a layer of behavioral context.
  • Relational Enrichment: Use graph traversal to analyze the network of connections around a transaction, uncovering hidden risks from collusive fraud rings, synthetic identities, and money laundering schemes.
  • Advanced Document Enrichment: Go beyond simple RAG by using context expansion techniques that respect document structure, ensuring that context from policies and reports is interpreted correctly.

Preview of the Next Lesson:

Now that our agent can build a rich, multi-faceted understanding of a transaction, the next logical question is: what does it do with this assessment? In the next lesson, we will specify the escalation logic and automated alert mechanisms for suspicious activity. We will design the rules that determine whether an agent approves, declines, escalates to a human, or takes other automated actions based on its contextual analysis.

Can't find a good explanation? Sign up and we'll make it for you

Sign up