EscapeLifeDocs
Available now

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. 1. Ingest — Submit text content via the API. EscapeLife chunks it into overlapping segments.
  2. 2. Embed — Each chunk is embedded with OpenAI text-embedding-3-small and stored in Pinecone.
  3. 3. Retrieve — At inference time, the guest's query is embedded and matched against your property's isolated namespace.
  4. 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

sop

Standard operating procedures for staff.

rate_plan

Room rates, seasonal pricing, and special packages.

menu

F&B, spa, or retail menus with pricing.

policy

Cancellation, check-in, pet, and other guest policies.

faq

Frequently asked questions from guests.

experience

Activity and experience descriptions, availability, and pricing.

loyalty

Loyalty program terms, tiers, and redemption rules.

local_guide

Destination guides, restaurant recommendations, local attractions.

emergency

Emergency procedures and safety information.

general

Any other property knowledge not covered by a specific type.

Endpoints

POST/v1/knowledge/ingestIngest a knowledge source

Submit 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
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."
  }'
Response
{
  "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"
}
GET/v1/knowledge/sourcesList knowledge sources

Return all knowledge sources indexed for this property, ordered by most recently created.

bash
curl https://api.escapelife.ai/v1/knowledge/sources \
  -H "Authorization: Bearer sk_live_xxx"
DELETE/v1/knowledge/sources/{source_id}Delete a knowledge source

Remove 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_...).
bash
curl -X DELETE https://api.escapelife.ai/v1/knowledge/sources/ks_abc123def456 \
  -H "Authorization: Bearer sk_live_xxx"
Response
{
  "id": "ks_abc123def456",
  "deleted": true
}

Chunking behaviour

Documents are split into overlapping word-based chunks before embedding. The default configuration is:

Chunk size800 words
Overlap100 words
Embedding modeltext-embedding-3-small (OpenAI)
Vector dimensions1536
Namespace isolationPer property_id — no cross-property retrieval

Rate 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.