feat: chatbot trip search finds trips by trip name, hotel name and code
This commit is contained in:
1 parent
26d4140c18
commit
fe40e1807e
8 files changed
+448
-52
No files matched your search
+20
-2
@@ -40,7 +40,7 @@ that prices and availability are a snapshot (`dataAsOf`) and only the booking pa
|
||||
|
||||
| Tool | Use | Returns |
|
||||
|---|---|---|
|
||||
| `search_trips` | The website's travel search: which trips exist, when, where, how much | One result per trip × hotel × travel date (default 10, max 25), with "ab" price, nights, inclusions, room types, availability, link; `total` and `dataAsOf` |
|
||||
| `search_trips` | The website's travel search: which trips exist, when, where, how much | One result per trip × hotel × travel date (default 10, max 25), with trip `code` and `hotelCode`, "ab" price, nights, inclusions, room types, availability, link; `total` and `dataAsOf` |
|
||||
| `get_trip` | One trip by product `code`, or one date of it by date code such as `SSLMP061226` (optionally `hotelCode`) | Product text with FAQs, hotels with facts, all upcoming dates with bookable rooms, pickups for the first 3 dates |
|
||||
| `search_content` | Questions not about dates or prices | Up to 8 hits with a ~600-character excerpt |
|
||||
| `get_document` | The full text of one `search_content` hit, by `url` | Markdown body, truncated at 20 000 characters |
|
||||
@@ -57,7 +57,7 @@ the variant by the path it is pointed at; tokens, rate limit and log are those o
|
||||
- What remains from TYPO3 is structured: trip and hotel names, `url`, `site`, destination, concept and
|
||||
the hotel `facts` (beds, altitude, distances, sauna, wifi, …; no prices). Which trips exist is still
|
||||
decided by TYPO3's products and their `searchable` flag, and the free-text `query` of `search_trips`
|
||||
still matches page text to find a trip, without returning any of it.
|
||||
still falls back to the page texts to find a trip, without returning any of it.
|
||||
- The server instructions tell the model to refer to the trip's `url` for anything the tools don't answer.
|
||||
|
||||
To give a client the editorial content back, point it at `/mcp` again.
|
||||
@@ -75,6 +75,10 @@ Trip rules (`App\Chatbot\TripCatalog`):
|
||||
- TYPO3 products are joined to the export on `product.code`. Several products can share a code, and
|
||||
each is listed as its own trip. Hotels are joined on any entry of the TYPO3 hotel's `codes` (BusPro
|
||||
uses the matchcode aliases). A code that is one hotel's own and another's alias resolves to its owner.
|
||||
- BusPro has hotel names of its own (`hotel.xml`, joined on the hotel id). They are internal wording
|
||||
("NEU Sportclub Lederer Wochenenden und Kurztrips", "Vacanceole Résidence L'Edelweiss"), so a hotel is
|
||||
shown under its TYPO3 title, and under BusPro's name only when TYPO3 has no hotel for its code.
|
||||
`query` searches both. Trips have no name in BusPro's export, only a code; their names are TYPO3's.
|
||||
- A room is bookable unless its status is `Buchungsstop`. The baby row (room code `Baby`) is not a room.
|
||||
`available` counts rooms, so the places of a date at a hotel are `Σ available × maxPax` over its
|
||||
bookable rooms. The tools never output room counts, only `frei` or `auf Anfrage`.
|
||||
@@ -109,6 +113,20 @@ hotel in `App\Model\Chatbot\TravelDateFacts`:
|
||||
- **Inclusions:** selection groups 7 (Skipass), 71 (board), 86 (Programm), 87 (Kurse), 89 (Events), and the
|
||||
outbound bus when its price is 0. `bus: true` asks for any bookable outbound bus.
|
||||
- **Nights:** days between start and end. The site's "short" is ≤ 4 and its "long" is ≥ 5.
|
||||
- **`query`:** the site has no free text. A code or a name is taken at its word, so that naming a trip or
|
||||
hotel returns that one and not every page mentioning it. The first of these that finds anything decides
|
||||
(`TripCatalog::resolveQuery()`, `App\Chatbot\Search\NameQuery`):
|
||||
1. a product code, a hotel code or alias, or a date code;
|
||||
2. names holding every word of the query, compared without accents, case and German stopwords, each
|
||||
word as a prefix: "Lederer" is "Sportclub Lederer", "Chaviere" is "Val Chavière". Names are those of
|
||||
products, hotels (TYPO3's and BusPro's), cities, regions, countries and concepts;
|
||||
3. names the query spells out among other words ("Hotel Chamois d'Or in Val Thorens"), where the most
|
||||
specific kind wins: product or hotel, then city, region, country or concept;
|
||||
4. the page texts of those records, every term required, then any term.
|
||||
|
||||
A matching hotel selects its own travel dates, not all hotels of its trips. A destination or concept
|
||||
selects its trips. Matches of one step are combined, so "Österreich Sportclub" is everything in Austria
|
||||
plus every Sportclub; `country` and `concept` narrow instead.
|
||||
- **Order:** by start date, then "ab" price. The site sorts by concept first, which the feed doesn't carry.
|
||||
- Results link to the product page. Links with the hotel preselected and the site's "Restplätze" badge need
|
||||
two fields the TYPO3 content feed doesn't send yet (`hotelUrls`, `lowContingent`).
|
||||
|
||||
Reference in new issue
Block a user