RAG-Powered LLM System for Automated Analytics and Fraud Investigation

grab · Tech · 2024 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Analytics automation and fraud investigation

Grab's Integrity Analytics team needed to reduce repetitive analyst work for report generation and fraud investigations, where analysts were repeatedly writing similar SQL queries and manually assembling insights for stakeholders.

Constraints:

Architecture

Grab built a RAG-powered analytics automation system around Spellvault, Data-Arks, scheduled execution, and Slack delivery. Spellvault provides low/no-code RAG and prompt management. Data-Arks packages frequently used SQL queries and Python functions as APIs, including integrations with Slack, Wiki, and JIRA. Report summarizers and the A* fraud investigation bot use Spellvault to select relevant Data-Arks APIs, execute them, summarize the returned structured data, and deliver results through Slack.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  A["Data analyst queries"] --> B["Data-Arks"]
  H["Wiki"] --> B
  I["JIRA"] --> B
  B --> C["Spellvault"]
  C --> D["Scheduler"]
  D --> E["Report Summarizer"]
  E --> B
  E --> G["Slack"]
  C --> F["A* bot"]
  F --> B
  F --> G
  B --> G
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Data analyst queries Repeatable SQL queries and Python scripts used for reports and fraud investigations. Data-Arks
Data-Arks Python API middleware that exposes SQL queries, Python functions, and collaboration-tool integrations as callable APIs. Data analyst queries, Spellvault, Slack, Wiki, JIRA
Spellvault Internal LLM tool with prompt storage, refinement, and low/no-code RAG capabilities. Data-Arks, Scheduler, Report Summarizer, A* bot
Scheduler Runs LLM applications at regular intervals for routine reporting. Spellvault, Report Summarizer
Report Summarizer Calls Data-Arks APIs and uses an LLM to summarize tabular report data. Scheduler, Spellvault, Data-Arks, Slack
A* bot LLM fraud investigation helper that selects and executes investigation queries. Spellvault, Data-Arks, Slack
Slack Messaging interface where users receive reports and fraud-investigation summaries. Data-Arks, Report Summarizer, A* bot
Wiki Collaboration source that Data-Arks can parse and fetch from. Data-Arks
JIRA Issue-tracking source that Data-Arks can parse and fetch from. Data-Arks

Data flow

Analysts package repeatable SQL queries and Python functions into Data-Arks APIs. A scheduled report or user prompt reaches Spellvault, which uses RAG to select the relevant API or query, calls Data-Arks to retrieve standardized near-real-time data, and passes that data to the LLM for summarization. The generated report or fraud-investigation summary is delivered through Slack.

3 supporting quotes
“Data-Arks is an in-house Python-based API platform housing several frequently used SQL queries and python functions packaged into individual APIs.”article, stated
“Data-Arks service allows users to upload any SQL query or Python script on the platform. These queries are then surfaced as APIs”article, stated
“Upon a user prompt or query, SpellVault selects the most relevant queries using RAG, executes them and provides a summary of the results to users through Slack.”article, stated

Why this architecture

Grab did not use an LLM as a standalone analyst. It wrapped the LLM with a controlled API layer for exact SQL and Python functions, because the team already knew the data and format needed for many tasks. RAG beat fine-tuning because it could retrieve current production data, reuse one base model across use cases, and scale new applications without retraining.

3 supporting quotes
“we already have a clear understanding of the required data and format to accomplish a task.”article, stated
“RAG is computationally less expensive as it relies on retrieving only relevant data and context to augment a model’s response.”article, stated
“by using RAG, LLM is able to answer questions using the most current information from our production database, eliminating the need for model re-training.”article, stated

Models used: GPT · GPT-4o

Scale

Alternatives considered (roads not taken)

Manual analyst query writing and report summarization

Rejected because: Repeating similar SQL queries was time-consuming and inefficient for analysts.

“The conventional method of manually writing and running similar queries repeatedly is time-consuming and inefficient.”article, stated

Fine-tune models for each analytical use case

Rejected because: Fine-tuning would add compute cost and require retraining for new information.

“Fine-tuning requires significant computational cost as it involves taking a base model and further training it with smaller, domain specific data and context.”article, stated

Let the LLM infer data directly without controlled APIs

Rejected because: The system needed exact SQL execution and standardized data inputs for accurate outputs.

“the exact SQL query and channel the data output to the LLM.”article, stated

Patterns

tool-use-orchestration (orchestration)

The LLM workflow calls Data-Arks APIs that package SQL queries, Python functions, and collaboration-tool integrations.

“Data-Arks service allows users to upload any SQL query or Python script on the platform. These queries are then surfaced as APIs”article, stated

rag-retrieval (retrieval)

Spellvault uses RAG to select relevant queries and context for report generation and fraud investigation.

“Upon a user prompt or query, SpellVault selects the most relevant queries using RAG, executes them and provides a summary of the results”article, stated

batch-offline-processing (workflow)

Scheduled LLM applications generate routine report summaries at regular intervals.

“* Scheduler - runs LLM applications at regular intervals. Useful for automating routine tasks.”article, stated

fine-tuning-adaptation (model-adaptation)

The team explicitly chose RAG instead of fine-tuning as the adaptation mechanism for current data and cost efficiency.

“Fine-tuning requires model re-training with each new information update, whereas RAG simply retrieves required context and data from a knowledge base”article, stated

Tradeoffs

Use RAG rather than fine-tuning for analytics accuracy.

Chose RAG over production data and managed knowledge bases over Fine-tuning on domain-specific data.

Rationale: RAG was cheaper, more flexible across use cases, and able to use current production data without retraining.

“As the same base model can be used for different use cases, RAG is the preferred choice due to its flexibility and cost efficiency.”article, stated
“Thus, by using RAG, LLM is able to answer questions using the most current information from our production database, eliminating the need for model re-training.”article, stated

Package known analyst work as APIs.

Chose Data-Arks APIs for SQL queries and Python functions over Manual analyst execution or unconstrained LLM data access.

Rationale: The team often knew the required data and format, so exact API execution reduced ambiguity.

“In most instances, we already have a clear understanding of the required data and format to accomplish a task. Therefore, we need a tool that can execute the exact SQL query and channel the data output to the LLM.”article, stated
“* Integration: Data-Arks service allows users to upload any SQL query or Python script on the platform. These queries are then surfaced as APIs, which can be called to serve data to the LLM agent.”article, stated

Deliver insights through Slack.

Chose Slack as the report and investigation interface over A separate bespoke analytics UI.

Rationale: The article frames messaging as the user interface for commands, reports, and insights.

“* Messaging Tool - a user interface where users can interact with LLM by entering a command to receive reports and insights.”article, stated

Gotchas (what bit them)

LLMs alone were only a fragment of the analytics automation system.

Root cause: Analytical tasks require tools for data retrieval, scheduling, and user interaction around the model.

Resolution: Integrate Spellvault with Data-Arks, a scheduler, and Slack to form a complete workflow.

“LLMs are just one piece of the puzzle, to build a comprehensive solution, they must be integrated with other tools.”article, stated
“While LLMs are known for their proficiency in data interpretation and insight generation, they represent just a fragment of the entire solution. For a comprehensive solution, LLMs must be integrated with other essential tools. The following is required in assembling a solution:”article, stated

Data format and latency directly affected answer accuracy.

Root cause: The LLM depends on standardized, current data inputs.

Resolution: Use Data-Arks to serve exact query outputs in a standardized format with real-time or near-real-time data.

“with real time or close to real-time latency to ensure accuracy. It has to be in a standardised format to ensure that all LLM data inputs are accurate.”article, stated

Fine-tuning would make fresh production-data answers expensive to maintain.

Root cause: A fine-tuned model would need retraining for each new information update.

Resolution: Use RAG over production databases and knowledge bases so current context can be retrieved at answer time.

“Fine-tuning requires model re-training with each new information update, whereas RAG simply retrieves required context and data from a knowledge base”article, stated

Evaluation

The article demonstrates results through sample report and fraud-investigation outputs, and it frames operational success in time savings: 3-4 hours saved per report and fraud investigations reduced to minutes.

Metrics: Estimated 3-4 hours saved per report · Fraud investigations reduced to minutes · Ability to provide necessary information simultaneously · Current-data responses without retraining

3 supporting quotes
“This automated report generation has helped save an estimated 3-4 hours per report.”article, stated
“Scaling to multiple queries for a fraud investigation process, what was once a time-consuming fraud investigation can now be reduced to a matter of minutes, as the A* bot is capable of providing all the necessary information simultaneously.”article, stated
“Scaling to multiple queries for a fraud investigation process, what was once a time-consuming fraud investigation can now be reduced to a matter of minutes, as the A* bot is capable of providing all the necessary information simultaneously.”article, stated

Outcomes

Grab's broader operating context is 700 cities in eight countries; the article reports report-level and investigation-level time reductions but not query volume or active user counts for this specific system.

3 supporting quotes
“This automated report generation has helped save an estimated 3-4 hours per report.”article, stated
“Scaling to multiple queries for a fraud investigation process, what was once a time-consuming fraud investigation can now be reduced to a matter of minutes, as the A* bot is capable of providing all the necessary information simultaneously.”article, stated
“Employees from various teams and functions at Grab can self-serve to upload any SQL query that they want onto the platform”article, stated