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