For the complete documentation index, see llms.txt. This page is also available as Markdown.

Billing & Expense Assistant

Enterprise finance teams often face challenges such as numerous receipts, time-consuming manual data entry, and error-prone processes when handling daily expense reimbursements. Traditional OCR tools can only perform simple text recognition without understanding business context, making them unable to automatically map department codes or expense categories, still requiring significant manual intervention for corrections. Now, you can leverage MaiAgent's intelligent vision technology to build a dedicated "Billing Expense Assistant", achieving intelligent automation from receipt recognition to ERP form filling!

Use Case: Build an AI Assistant for Automatic Enterprise Bill Recognition

Suppose you are a financial accountant at a company. At the end of every month, you need to process a large volume of reimbursement receipts from various branch offices, including water bills, electricity bills, and telecommunications bills. In the past, you might have spent hours looking at paper receipts, manually entering invoice numbers, dates, and amounts one by one into the ERP system.

Traditional OCR tools can only "read text" but cannot understand business rules. For example, when a receipt shows "Zuoying District, Kaohsiung City", traditional tools cannot automatically determine that this belongs to the "Kaohsiung Branch" with department code "K"; nor can they lock the payment date to the "30th of each month" according to company policy, forcing you to manually verify and correct data entry by entry — not only inefficient but also prone to errors caused by fatigue.

Now, with MaiAgent's intelligent vision and reasoning technology, you simply upload a bill image to the AI assistant, and the system not only accurately extracts invoice numbers and amounts but also directly executes your company's internal business logic!

Workflow

1. Create a Billing Expense AI Assistant

Enter the AI assistant name and select the language model.

Recommended model: Gemini 2.5 Pro

Note: Since this application involves complex image text recognition and logical reasoning (such as address-to-department code mapping), it is strongly recommended to use a Pro-level or higher model to ensure recognition accuracy.

Select Agent mode.

2. Operational Logic Configuration

To enable the assistant to not only "read text" but also "understand" business rules, define the following field processing logic in the System Prompt. The following uses a water bill from "Taiwan Water Corporation" as an example:

------------------------------------------------------------
|  Taiwan Water Corporation                               |
|  Taiwan Water Corporation                                |
|  May, ROC Year 114 Direct Debit (Agency Collection)     |
|  Water Bill Payment Receipt                              |
|                                                          |
|  Carrier Type Number: /BB0001                            |
|  Period: 11405                                           |
|  Electronic Invoice Certificate: TP88776655              |
|                                [     QR Code     ]       |
|                                [     回回回      ]       |
|  Water Usage Address:                                    |
|  No. 7, Sec. 5, Xinyi Rd., Xinyi Dist.,                |
|  Taipei City 110 (Taipei 101 Tower)                      |
|                                                          |
|----------------------------------------------------------|
|  Customer Name: Test Taipei Headquarters                 |
|                                                          |
|  Current Billing Water Usage Period                      |
|                               Water Usage Item Details   |
|  114/03/05 - 114/05/04        Basic Fee           100元  |
|                               Water Usage Fee      950元  |
|  Current Payment Start Date   -------------------------  |
|  114/05/21                    Sales Tax             50元  |
|                                                          |
|  Next Payment Start Date      Pre-tax Subtotal           |
|  114/07/21                    (Trap F)          1,050元  |
|                                                          |
|  Current Meter Reading Date   Agency Collection Subtotal |
|  114/05/04                    Disposal Fee         300元  |
|                               Water Source                |
|                               Conservation Fee     100元  |
|----------------------------------------------------------|
|                                                          |
|  Total Amount Due (Total)                                |
|  $ 1,500 元                                              |
|                                                          |
|  Payment Deadline: 114/05/30  Account Number: 998877665544|
------------------------------------------------------------

A. Basic Information Extraction

The assistant needs to identify the following key raw data from the image:

  • Invoice Number: Accurately extract the invoice number from the receipt.

  • Amount Information: Extract the "total amount" and "pre-tax amount".

  • Date Information: Extract the relevant date range from the bill.

B. Business Logic Mapping

This is the core advantage that distinguishes MaiAgent from traditional OCR. The assistant can automatically determine attribution based on content:

  1. Address-to-Department Mapping:

    • Rule: If the recognized address contains "Kaohsiung", the "expenditure department" is automatically classified as "Kaohsiung Branch".

    • Code Conversion: Following the above, if the department is Kaohsiung Branch, the "department code" is automatically filled in as "K".

  2. Payee and Category:

    • Rule: If the payee is identified as "Taiwan Water Corporation", the "expense item" is automatically classified as "Water Bill".

  3. Payment Date Automation:

    • Rule: Regardless of the bill date, the "payment date" field is uniformly fixed to the 30th of each month.

  4. Summary Format Standardization:

    • Rule: Combine the extracted dates and information into a fixed format string.

    • Example format: YY/MM/DD-YY/MM/DD + Region + Expense Item (e.g., "114/08/20-114/10/18 Kaohsiung Water Bill").

  5. Amount Calculation and Verification:

    • Rule: The system can automatically calculate or verify amount logic, for example: Amount = Total Amount - Pre-tax Amount (depending on ERP field definitions).

Refer to the following role instructions:

C. Advanced Configuration: Connect to Google Sheet for Automatic Filing

3. Deploy the AI Assistant

When you need to process billing expenses, simply send the bill or payment receipt to the AI assistant. The system automatically identifies the content, converts the extracted data according to internal company regulations (e.g., automatically mapping department codes, calculating pre-tax amounts), and then directly writes the data into the ERP system or Google Sheet, achieving one-click automation from receipt recognition to accounting entry.

Automatic Bill Content Detection

Automatic Bill Content Entry into Google Sheet

Automatic Conversion to ERP Format JSON

4. Technical Advantages of the Intelligent Billing Assistant

🚀 Powerful Vision Language Model (VLM)

  • Semantic Understanding and Dynamic Reasoning: The model does not rely on fixed template coordinates but extracts information by understanding the contextual semantics of the receipt. Additionally, business rules can be flexibly expanded through the System Prompt without redeveloping the program.

Application Examples:

  • Automatic Classification: Recognizes the "Taiwan Water Corporation" logo and automatically classifies the category as "Water Bill".

  • Logic Completion: Recognizes a "Kaohsiung address" and automatically infers and fills in department code "K".

  • Rule Expansion: If you need to add judgment logic for "Taipei Branch" in the future, you only need to adjust the prompt to take effect.

  • Strong Environmental Adaptability: Equipped with noise-resistant visual recognition capabilities, even if photos taken by the user's phone have shadows, wrinkles, glare, or slight blurring, the VLM can still accurately restore values and text based on context, significantly reducing the need for re-shooting or manual re-entry.

🛠️ Precise Tool Invocation and Logic Execution (Tool Use & Integration)

  • Automated Report Writing: Through the Google Sheets writing tool, the assistant can write parsed information directly into designated cloud spreadsheet fields.

Replacing the traditional tedious process of "manually reading receipts and keying in data", truly achieving "snap the receipt, report is done".

  • Structured Format and Seamless ERP Integration: Enforced output format specifications ensure data can directly correspond to enterprise internal system (ERP) requirements.

Application Examples:

  • Date Unification: Whether the invoice shows 2024/01/01 or ROC Year 113, January 1, it is automatically converted to standard YYYY-MM-DD format before writing.

  • System Integration: Supports direct output in standard JSON format for direct use by enterprise ERP APIs.

  • Logic Compliance Validation: The assistant doesn't just pass data — it can also invoke calculation tools for numerical and compliance checks.

Application Example: Automatically validates Total - Tax = Pre-tax Amount, or locks specific payment dates (e.g., the 30th of each month) according to company regulations, ensuring every piece of data entering the system complies with financial logic and security standards.

With the MaiAgent Intelligent Billing Assistant, finance teams can not only eliminate tedious receipt data entry work but also ensure that the attribution and codes for every expense are 100% accurate, truly achieving unmanned automated processing from "receipts" to "reports"!

Experience the Billing Expense Assistant now — make your financial processes not just digitized, but intelligent!

Last updated

Was this helpful?