Knowledge Base
The Knowledge Base module lets you ingest property documents — menus, SOPs, policies, FAQs — and index them as embeddings in a property-scoped vector store. The AI layer uses this index to ground every response in your actual property data, not generic training data.
How it works
- 1. Ingest — Submit text content via the API. EscapeLife chunks it into overlapping segments.
- 2. Embed — Each chunk is embedded with OpenAI
text-embedding-3-smalland stored in Pinecone. - 3. Retrieve — At inference time, the guest's query is embedded and matched against your property's isolated namespace.
- 4. Ground — Matching chunks are injected into the AI context. Every answer traces back to a source document.
The KnowledgeSource object
idstringUnique ID. Prefixed ks_.property_idstringThe property this source belongs to.namestringHuman label for this document, e.g. 'Spa Treatment Menu 2026'.typestringDocument type (see types table below).chunk_countintegerNumber of chunks created from this document.is_indexedbooleantrue once all chunks have been embedded and upserted to the vector store.created_atdatetimeISO 8601 timestamp.updated_atdatetimeISO 8601 timestamp.Knowledge types
sopStandard operating procedures for staff.
rate_planRoom rates, seasonal pricing, and special packages.
menuF&B, spa, or retail menus with pricing.
policyCancellation, check-in, pet, and other guest policies.
faqFrequently asked questions from guests.
experienceActivity and experience descriptions, availability, and pricing.
loyaltyLoyalty program terms, tiers, and redemption rules.
local_guideDestination guides, restaurant recommendations, local attractions.
emergencyEmergency procedures and safety information.
generalAny other property knowledge not covered by a specific type.
Endpoints
/v1/knowledge/ingestIngest a knowledge sourceSubmit a text document to be chunked, embedded, and indexed. The response is returned once indexing is complete.
Request Body
namestringrequiredHuman label for this document.typestringrequiredOne of the supported knowledge types above.contentstringrequiredPlain text content. Minimum 10 characters. No HTML.curl -X POST https://api.escapelife.ai/v1/knowledge/ingest \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Spa Treatment Menu — Spring 2026",
"type": "menu",
"content": "Swedish Massage (60 min) — $150. Ideal for first-time guests. \nDeep Tissue (90 min) — $200. Targets chronic muscle tension. \nHot Stone Therapy (75 min) — $175. Smooth heated basalt stones ease tension. \nCouples Retreat (90 min) — $320. Side-by-side experience in our private suite."
}'{
"id": "ks_abc123def456",
"property_id": "pty_xyz123",
"name": "Spa Treatment Menu — Spring 2026",
"type": "menu",
"chunk_count": 2,
"is_indexed": true,
"created_at": "2026-03-15T10:00:00Z",
"updated_at": "2026-03-15T10:00:01Z"
}/v1/knowledge/sourcesList knowledge sourcesReturn all knowledge sources indexed for this property, ordered by most recently created.
curl https://api.escapelife.ai/v1/knowledge/sources \
-H "Authorization: Bearer sk_live_xxx"/v1/knowledge/sources/{source_id}Delete a knowledge sourceRemove a knowledge source and all associated vector embeddings from the Pinecone index. This action is irreversible.
Path / Query Parameters
source_idstringrequiredThe knowledge source ID (ks_...).curl -X DELETE https://api.escapelife.ai/v1/knowledge/sources/ks_abc123def456 \
-H "Authorization: Bearer sk_live_xxx"{
"id": "ks_abc123def456",
"deleted": true
}Chunking behaviour
Documents are split into overlapping word-based chunks before embedding. The default configuration is:
800 words100 wordstext-embedding-3-small (OpenAI)1536Per property_id — no cross-property retrievalRate limits
Ingest requests are limited to 60 per minute per property. Large documents may take 1–3 seconds to fully index depending on chunk count.