Project

General

Profile

Actions

Improvement #30848

open

Improvement #29635: Code Review, Upgrade and changes in Prompt of Email Boat

Improvement #30680: Implement in policy out policy filtering in flight results with mock data

Extract Purpose of Travel from User Email

Added by Sachin Suresh 4 months ago. Updated 4 months ago.

Status:
Fixed not Tested
Priority:
Normal
Assignee:
Target version:
-
Start date:
12/04/2025
Due date:
12/05/2025 (about 4 months late)
% Done:

100%

Estimated time:
8:00 h
Spent time:
remarks:
DB Changes:
Keys & Permissions:
Areas Affected:
Files Changed:

Description

Currently, the system uses a default travel purpose (the first available purpose from the API) when matching flights against corporate travel policies. This implementation will enable the AI to extract the purpose of travel directly from the user's email content and use it for more accurate policy matching.

Problem: Using a default purpose may result in incorrect policy selection when users have different travel purposes (e.g., business travel vs. personal vacation).

Solution: Extend the AI extraction schema to include a

TravelPurpose
field, inject the list of available purposes into the AI prompt, and use the extracted purpose for policy matching.

Update AI schema to include TravelPurpose field
Update system instruction to include purpose extraction
Modify AI processor to inject available purposes into prompt
Update filterService to use extracted purpose instead of default
Update policyService to handle purpose matching
Actions

Also available in: Atom PDF