CabinClaim – a cabin‑rules desk that answers without web search
Описание и применение
CabinClaim предоставляет точные ответы на вопросы о правилах перевозки в салоне, используя структурированные данные в Sanity и GROQ‑запросы, а не поиск по веб‑страницам.
Задача
Guests need instant, accurate cabin‑rule answers for specific carriers and travel dates, but keyword search on unstructured web pages fails to apply structured rule logic.
Результат
CabinClaim delivers accurate cabin‑rule answers by querying structured rule claims, handling conflicts, and refusing incomplete data, all without real‑time web search.
Рабочий процесс
- 1. Store each rule sentence as a Sanity document with fields: operator, value, unit, appliesTo, effectiveFrom, effectiveUntil, sourceUrl, quote.
- 2. Query current claims with GROQ filtering by carrier IATA and travel date.
- 3. In solveCabin.ts, check that required fields (value, operator, effectiveFrom) exist; otherwise refuse.
- 4. Present verdicts for each item, showing conflicting quotes when applicable.
- 5. Host the desk on Vercel; no login required for users.
- 6. Provide public API endpoints for querying ruleClaim documents.
Доказательства
Keyword search finds "allowed," "100Wh," and "carry‑on" in one blob. CabinClaim stores each official sentence as its own claim: operator, value, appliesTo, effectiveFrom, sourceUrl, and the exact quote.
If you delete value, operator, or effectiveFrom, the desk refuses. That is the Path One test.
- Дата записи: 2026-09-22T05:00:33.112Z