fix(extract): require the hotel address and ask for the rental company

After dropping the vendor templates, the model skipped the (often unlabeled) Expedia-style hotel address — making address a required schema field forces it to emit the street-address line, restoring the booking's location/place. Also hint the rental company so a car booking gets a real title instead of the generic fallback.
This commit is contained in:
Maurice
2026-06-26 15:57:17 +02:00
parent 13f342e446
commit 7ece89ac5c
2 changed files with 4 additions and 2 deletions
@@ -39,7 +39,7 @@ const TYPE_HINT: Record<FlatType, string> = {
train: 'train. from_name/to_name = stations, vehicle_number = train number, times = full ISO, price/currency = total fare.',
bus: 'bus. from_name/to_name = stops, times = full ISO, price/currency = total fare.',
ferry: 'ferry/cruise. from_name/to_name = terminals/ports, times = full ISO, price/currency = total fare.',
car: 'rental car. from_name = pick-up location, to_name = return location (may differ), departure_time = pick-up, arrival_time = return, price/currency = total rental cost.',
car: 'rental car. operator = the rental company, from_name = pick-up location, to_name = return location (may differ), departure_time = pick-up, arrival_time = return, price/currency = total rental cost.',
hotel: 'hotel stay. name = hotel name, address = the hotel street address, checkin_time/checkout_time = full ISO date-time, price/currency = total paid.',
restaurant: 'restaurant booking. name = the restaurant, address = its street address, start_time = the reservation date-time, price/currency = total if shown.',
event: 'event/attraction. name = the event/ticket, address = the venue, start_time/end_time = full ISO, price/currency = ticket price.',
@@ -61,7 +61,9 @@ export const FLAT_SCHEMA_BY_TYPE: Record<FlatType, JsonSchema> = {
),
hotel: flat(
['name', 'booking_reference', 'address', 'checkin_time', 'checkout_time', 'telephone', 'website', 'price', 'currency'],
['name', 'checkin_time', 'checkout_time'],
// `address` is REQUIRED so the model actually emits the (often unlabeled) street address line
// — without it small models skip it and the booking loses its location/place.
['name', 'address', 'checkin_time', 'checkout_time'],
),
restaurant: flat(
['name', 'booking_reference', 'address', 'start_time', 'end_time', 'telephone', 'website', 'price', 'currency'],