Expense Categorization Agent

Agent Description:

The Expense Categorization Agentis an automated financial intelligence pipeline that ingest raw transaction data and performs high-accuracy classification. It utilizes Retrieval-Augmented Generation (RAG) to cross-reference transactions against internal GL policies and tax regulations, ensuring every expense is correctly tagged for reporting and reimbursement.

This agent enables organizations to:

  • Normalize Raw Transactions: Automatically clean merchant names and verify business purposes to ensure data consistency.

  • Automate GL Mapping: Precisely map expenses to correct account codes (for example, mapping "Uber" to "5201 – Travel") using RAG-based policy retrieval.

  • Ensure Tax Compliance: Determine GST applicability and deductibility status based on real-time tax policy analysis.

  • Quantify Data Confidence: Assign confidence levels to categorizations, flagging low-confidence items for human review.

  • Generate Audit-Ready Reports: Produce structured summaries for finance dashboards and compliance audits.

Purpose and Components
  • Purpose: Manual expense management often results in incorrect GL mapping, missed tax deductions, and policy non‑compliance. Unstructured transaction data—such as inconsistent merchant names and vague descriptions—makes it difficult to maintain audit‑ready records, causing reporting delays and higher reconciliation costs.

    This agent automates expense extraction, classification, and policy validation. It standardizes merchant data, maps expenses to the correct GL accounts, identifies tax‑relevant fields, and generates structured, audit‑ready records—reducing manual effort, improving compliance, and accelerating financial reporting.

  • Components:
    • Transaction Intake Agent: Normalizes merchant names and verifies business purposes.

    • Category and GL Mapping Agent: Matches transactions to categories using RAG over GL policies.

    • Tax and Compliance Tagging Agent: Determines GST applicability and deductibility status.
    • Expense Reporting Agent: Generates structured reports suitable for finance dashboards.
Supported Capabilities
  • Automated normalization of date, merchant, and amount fields.

  • Precise GL mapping (for example, Uber to 5201 – Travel) backed by RAG confidence levels.

  • Identification of reimbursement eligibility and deductible versus non-deductible items.

  • Grouping of monthly expenses to highlight policy conflicts for audit review.

LLM Used
  • OPENAI GPT_4O_MINI

    Note: To learn more about the LLM and to modify its behavior, refer to the Configuring LLM settings section.

Sub-Agents

1. Transaction Intake Agent

  • Role:Transaction Ingest

  • Scope:Collects and prepares raw expense data for downstream processing.

  • Description:Validates transaction details (date, amount, merchant). It ensures a business purpose is present and normalizes text for consistent interpretation. It flags incomplete entries before they reach the mapping stage.

  • LLM Used: Default (Inherits from parent agent).

2. Category and GL Mapping Agent

  • Role:Category and GL Matcher

  • Scope:Maps transactions to categories and GL accounts using RAG over internal policies.

  • Description: A REACT agent that retrieves rules from Expense_and_GL_Policy.pdf. It analyzes the intent behind a purchase to assign correct account codes and a confidence score (High/Medium/Low).

  • LLM Used: Default (Inherits from parent agent).

3. Tax and Compliance Tagging Agent

  • Role:Tax and Compliance Evaluation

  • Scope:Applies tax, deductibility, and reimbursement tags via RAG-based policy lookup

  • Description:A REACT agent that utilizes the Tax_and_Compliance_Policy.pdf to determine GST applicability and reimbursement eligibility. It attaches specific compliance reasoning to each transaction.

  • LLM Used: Default (Inherits from parent agent).

4. Expense Reporting Agent

  • Role:Report Generator

  • Scope:Generates structured, audit-ready reports for finance teams.

  • Description:Aggregates all processed data by category, account, and tax tag. It creates human-readable summaries and highlights policy conflicts, delivering a final package suitable for executive dashboards.

  • LLM Used: Default (Inherits from parent agent).

Tools Used:
  • MCP Client (RAG): Connects to the knowledge base to extract specific rules from Expense_and_GL_Policy.pdf and Tax_and_Compliance_Policy.pdf.

Note: For details on modifying the Tools, refer Tools Library section.
Agent Workflow Behavior Summary

Raw transaction details from the user interface (for example, "05/10/2026 - $45.00 - Starbucks - Client Meeting").

  1. Ingestion & Validation:

    • The Intake Agent confirms the business purpose and normalizes "Starbucks" as a Meals/Entertainment merchant.

  2. Policy Retrieval & Mapping:

    • The Mapping Agent queries the GL policy.

    • Action: Assigns "Meals & Entertainment" category and GL Code "5305."

  3. Compliance Check:

    • The Tax Agent checks the compliance PDF.

    • Action: Tags the transaction as "50% Deductible" and "GST Eligible" based on local tax laws.

  4. Final Synthesis:

    • The Reporting Agent groups this with other monthly expenses and highlights any "Low Confidence" items for the CFO.

Sample Questions:
  • Do you want to flag this expense for manual review?<upload pdf>