Improvement #30848
openImprovement #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
100%
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
Updated by Sachin Suresh 4 months ago
- Status changed from Assigned to In Progress
Updated by Sachin Suresh 4 months ago
- Status changed from In Progress to Fixed not Tested
- % Done changed from 0 to 100
I have successfully implemented the Travel Purpose Extraction feature and documented the White-Labeling Roadmap.
AI Purpose Extraction:
Updated schema to extract TravelPurpose.
Updated aiProcessor.js to inject available purposes into the prompt.
Intelligent Policy Matching:
Implemented fuzzy matching in policyService.js.
Updated filterService.js to use extracted purpose with fallback to default.
Added BRANDING config to appConfig.js.
Updated package.json name.