AI-Powered Expense Product Prediction

Automatically suggest product categories from expense descriptions

The Expense Predict Product module uses artificial intelligence (AI) to automatically suggest appropriate product categories when entering expense descriptions. This module learns from the company's approved expense history data.

Using PostgreSQL's Full-Text Search technology, the module understands expense description semantics and provides accurate suggestions, saving time and ensuring consistency in expense classification.

AI
Auto Suggestion
Machine Learning
Full-Text Search
Smart Classification
Time Saving
Multilingual

Benefits of Automatic Prediction

Previously, employees had to enter description "Taxi to airport", then manually select Transportation category, wasting time and prone to errors.

With this module, employees just enter description "Taxi to airport", system automatically suggests Transportation, employee confirms or changes.

Key points

  • Save data entry time: No need to search and manually select categories

  • Reduce classification errors: AI suggests based on accurate history

  • Ensure consistency: Same expense types always classified identically

  • Improve experience: Expense creation process faster and easier


Key Features

Key points

  • Auto suggestion: Automatically propose product when entering expense description

  • Learn from history: Analyze 10,000 most recent approved expenses

  • Context-aware intelligence: Understand semantics, not just keyword matching

  • Multilingual support: Works with Vietnamese, English, French

  • No configuration needed: Automatically activated when installing Expense module

  • Completely free: No external services used, no fees


How AI Works

The module uses PostgreSQL's Full-Text Search technology to analyze and match expense descriptions in 5 steps:

Steps

  • 1. Collect historical data: Retrieve 10,000 most recent approved expenses from company

  • 2. Analyze description: Break description into keywords (e.g., "Coffee client meeting" → "Coffee | client | meeting")

  • 3. Search similar expenses: Compare with history descriptions, calculate similarity score (0.0 to 1.0)

  • 4. Rank results: Group by product, sort by highest score, prioritize products appearing frequently

  • 5. Suggest product: Select product with highest score, if not found use "General Expense"


Illustrated Examples

Suggestion Cases

SituationInput DescriptionSuggestion Result
Accurate suggestionTaxi to airportTransportation (score: 0.92, based on history "Grab to airport", "Uber home")
Multiple similar resultsCoffeeClient Entertainment (same score 0.85 but appears 10 times vs Office Supplies 2 times)
Not foundSpecial expense never seen beforeGeneral Expense (EXP_GEN) - default product

Using Prediction Feature

Steps

  • 1. Open Expense form: Go to Expenses → New

  • 2. Enter description: Click Description field, enter expense description (e.g., "Taxi to airport")

  • 3. Press Tab or click outside field

  • 4. View suggestion: System automatically fills Product field (e.g., "Transportation")

  • 5. Confirm or change: If correct continue entering other info, if wrong select different product

  • 6. Save expense: Click Save or Create Report


Special Cases

Key points

  • Product selected first: If product selected before entering description, system does NOT change manual selection

  • Description changed: When editing description, system updates suggestion (e.g., "Taxi" → Transportation, edit to "Taxi and coffee" → Client Entertainment)

  • New company without history: All descriptions suggest "General Expense" until enough learning data available


Learning Data Conditions

System only learns from finally confirmed expenses to ensure accuracy.

Key points

  • Expenses used: Status Paid, In Payment, or Posted

  • Expenses NOT used: Status Draft, Submitted, Approved - not finally confirmed

  • Scope: Only current company expenses with description and product

  • Limit: Analyze 10,000 most recent expenses (balance accuracy and speed)


Tips to Improve Accuracy

Key points

  • Clear descriptions: "Taxi to client office" instead of just "Expense"

  • Use distinctive keywords: Taxi/Uber/Grab for Transportation, Coffee/Restaurant for Client Entertainment

  • Consistent writing: Always write "Taxi" instead of sometimes "Taxi", sometimes "Cab"

  • Check and fix wrong suggestions: When suggestion wrong, fix product, system will learn from your choice

  • Clean old data: Find and fix old misclassified expenses to improve learning quality


Distinctive Keywords by Expense Type

Keyword Suggestions

Expense TypeKeywords to Use
TransportationTaxi, Uber, Grab, bus, gas, travel
Client EntertainmentCoffee, restaurant, lunch, dinner, client, partner
Office SuppliesPen, paper, ink, office, equipment
TrainingCourse, training, conference, seminar, learning
AccommodationHotel, Airbnb, room, stay

Workflow Optimization Tips

Key points

  • Enter description first: Always enter description before selecting product for auto suggestion

  • Use description templates: Create template list for common expenses (e.g., "Taxi to [location]")

  • Check suggestions: Always check suggestion before saving, fix if incorrect

  • Train employees: Guide how to enter good descriptions, explain why clear descriptions matter

  • Monitor trends: See which expense types often get wrong suggestions, adjust process


Handling Special Situations

Situations and Solutions

SituationSolution
Rare expense (e.g., "Photocopy machine repair")Manually select "Maintenance & Repair" product, system will learn for next time
Combined expense types ("Taxi and coffee meeting")Split into 2 separate expenses or choose main type (Client Entertainment if coffee is larger expense)
English description in Vietnamese companyEncourage Vietnamese input or enter both languages: "Coffee meeting / Cà phê họp"
New company without dataEarly stage: manual selection, after 50-100 approved expenses: system starts learning, after 500+: high accuracy

System Limitations

The system has limitations to note:

Key points

  • CANNOT understand complex context: "Buy client gift" may suggest wrong if history unclear

  • CANNOT distinguish personal and company expenses: "Coffee" could be entertainment or personal, need clear description

  • CANNOT predict completely new expenses: If company never had this expense type, system doesn't know

  • CANNOT automatically fix old classification errors: Need manager to manually fix old wrong expenses


System Capabilities

Key points

  • Learn from repeating patterns: If "Starbucks" always classified "Client Entertainment", system will learn

  • Understand synonyms: "Taxi", "Uber", "Grab" all understood as transportation

  • Improve over time: More data, more accurate

  • Multilingual operation: Supports Vietnamese, English, French


Frequently Asked Questions

FAQ

QuestionAnswer
Why does system suggest wrong?May be due to unclear description, insufficient historical data, old expenses misclassified, or rare expense type
How to make system smarter?Enter clear and consistent descriptions, fix wrong suggestions before submitting, ensure old expenses correctly classified, accumulate enough data (at least 100 expenses)
Can suggestion feature be disabled?No, but can ignore suggestion and manually select, or select product before entering description (system won't suggest)
Does suggestion cost money?No, this feature is completely free, no external services used
Is data sent outside?No, all processing happens in company database, no data sent outside
Does system learn from other companies' expenses?No, each company has separate data, system only learns from your company's expenses

Security and Privacy

Key points

  • All processing happens in company database

  • No data sent outside

  • Each company has separate learning data

  • System only learns from approved expenses