food_recommend was trained mostly on food-ordering/delivery samples, so
travel-food queries ("Ăn gì ở Hà Nội", "Ẩm thực đặc sắc tại Hà Nội",
"What should I eat in Hanoi") were misclassified as activity_suggest/
destination_info — notably for Hà Nội.
- Augment intent_train.json with 151 travel-food examples (VI+EN templates ×
cities, excluding the SC-I-17/18 test strings to avoid leakage). Held-out
val accuracy stable (92.05%→92.14%); all 20 SC-I scenarios now pass (was 18).
- Add an application-layer food-intent guard in predict() as a safety net.
Model is gitignored and retrained from this dataset on Space startup.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(chatbot): add test coverage for all 17 intents; fix dataset quality
Files were saved with BOM by a Windows editor, crashing the HuggingFace
startup. Removed BOM bytes directly so the files load correctly regardless
of encoding parameter.
- Added 80 training samples for show_map intent (VI + EN, including
'from saved plan' phrasings like 'dựa vào kế hoạch đã lưu thì bật map')
- Added show_map handler in routes.py: falls back to context destination_id
when NER finds no location (covers 'from saved plan' use case)
- Added show_map to additional_rc map trigger list so map card is rendered
- Added show_map response templates to responses_vi.json + responses_en.json
- Added show_map quick replies to ResponseGenerator
- Retrained classifier: overall accuracy 94.2%, show_map P/R/F1=1.00
Wave 3: expand NER fixture 85->102, time_preference F1 0.40->0.98, people/duration fixes
Backend:
- Add RateLimitingFilter (Bucket4j): login 5req/60s, forgot-password 3req/60s
- Add WebSocketAuthInterceptor: validate JWT on HTTP upgrade handshake
- Add BookingExpiryScheduler: auto-cancel PENDING bookings after 30 min
- Fix race condition in FlightSeatService using atomic findAndModify
- Fix race condition in WalletServiceImpl using atomic $inc with balance check
- Fix idempotency in PaymentService: check existing payment before creating Stripe session
- Fix N+1 query in ActivityStatusScheduler using bulkOps
- Fix FlightService: push filters (isDirect, price range) down to MongoDB query
- Fix RoomService: sync Hotel.lowestPrice after every room create/update/delete
- Add pagination support (Page<T>) to FlightRepository, ActivityRepository
- Add @TextIndexed on Hotel.name/address for full-text search
- Add HTTP security headers (HSTS, CSP, X-Frame-Options) to SecurityConfig
- Remove Stripe debug endpoint from StripeWebhookController
- Strengthen JWT secret: require JWT_SECRE…
feat(chatbot): add chain-of-thought logic for personalize_recommend intent
Wanderlust Dev
3ebc772
When user asks for destination suggestions (e.g. 'Gợi ý điểm đến') without
providing any preferences, the chatbot now:
1. Detects missing preferences (travel style, budget, activities, etc.)
2. Asks clarifying questions instead of faking 'analyzed your preferences'
3. Provides quick replies like 'Tôi thích biển/núi' to guide the user
4. Only gives personalized recommendations when real preferences exist
Changes:
- routes.py: Add preference-checking logic (7.6) before generating response.
Checks entities, user profile, and conversation context for any signals.
Overrides intent to 'missing_preferences' when no info is available.
Adds actual recommendation handler using rec.recommend() when prefs exist.
- responses_vi.json: Fix templates to not claim 'analyzed your preferences'.
Add 'missing_preferences' templates with friendly preference questions.
- responses_en.json: Same fixes for English templates.
- generator.py: Add 'missing_preferences' quick replies (beach/mountain/
b…
Round 15: Dark mode page backgrounds + Chatbot fixes (NER/weather/events/templates/currency)
Wanderlust Dev
fa626b2
- Dark mode: Add dark:bg-gray-900/950 to 36+ page wrappers (bg-gray-50, bg-white, bg-slate-50, gradients)
- NER: Add word-boundary matching for short names + blocklist to prevent false positives
- Weather: Load coords from KB (9,474 destinations) instead of hardcoded 12-city map
- Routes: _get_coords_for_id() now uses KB data via realtime_service
- Events: Fix Hoi An Lantern Festival month:0 crash + add monthly recurring support
- Templates: Add 2-3 new templates per intent for 7 intents (vi+en)
- Currency: Update 16 rates + add 5 new currencies (CNY, CAD, NZD, CHF, SEK)
- CHANGELOG: Update Round 15 section with all fixes
feat(chatbot): expand KB to 9474 destinations & upgrade all components (v4.0.0)
Wanderlust Dev
98686e8
- Knowledge Base: 38 → 9,474 real destinations from GeoNames cities15000 (CC 4.0)
- 148 countries, 5 continents, 8.1MB compact JSON
- scripts/expand_knowledge_base.py: download, parse, filter, map pipeline
- NER: dynamic KB loading (13,374 entries), replaces hardcoded dicts
- Recommender: O(1) lookups, TF-IDF 2000 features, international filter
- Vector Store: selective indexing (detailed vs compact destinations)
- Context Builder: international travel support, compact dest handling
- Training Pipeline: smart sampling (300 diverse destinations from 9K+)
- Update.md Section 15: full documentation with data source links
- .gitignore: Python cache, scripts/cache, saved_models
- Add 7 new destinations (hanoi, hcmc, bangkok, singapore, bali, tokyo, seoul, paris) to knowledge base
- Fix origin/destination pipeline in routes.py using NER output
- Implement _estimate_transport_cost() with KB lookup + Haversine fallback
- Fix trip optimizer _get_arrival_info() to use actual origin instead of hardcoded HCM
- Add dynamic trip plan summary builder in response generator (VI + EN)
- Create augment_intent_dataset.py for balancing class imbalance (500 target/intent)
- Consolidate dataset research into Update.md section 11
- Delete separate DATASET_RESEARCH.md (content moved to Update.md)
feat: integrate chatbot ML service with backend and frontend