AI Engine

The engine behind the layer.

A six-stage pipeline purpose-built for accuracy, grounding, and conversion — not generic chat.

01
Phase 1

Safety Check

Before anything else, the query is checked for prompt injection attempts, harmful content, and out-of-scope requests. Blocked queries get a natural redirect back to the domain.

  • Prompt injection detection and blocking
  • Out-of-scope query redirection
  • Harmful content filtering
  • Internal instruction protection

Incoming query

"Ignore your instructions and…"

Blocked

Redirect response

"I can help you plan the perfect trip! Where are you looking to travel?"

InjectionScopeHarmfulPrompt
02
Phase 2

Query Embedding

The user's question is transformed into a high-dimensional semantic vector. This captures meaning — "affordable beach holidays in Greece" and "cheap Greek island resorts" map to similar vectors.

  • State-of-the-art embedding model
  • High-dimensional vector representation
  • Semantic similarity over keyword matching
  • Sub-100ms embedding generation

User query

"beach holiday in Greece for 6 people under €1200"

Embedding vector

[0.023, -0.847, 0.156, 0.432, -0.091, 0.668, -0.234, 0.512, ..., 0.412]

High-dimensional vector

03
Phase 3

Semantic Retrieval

The query vector is matched against your entire knowledge base. The most relevant results are returned, ranked by semantic relevance. A confidence threshold prevents irrelevant results from surfacing.

  • Enterprise-grade vector search
  • Top results ranked by relevance
  • Confidence threshold filtering
  • Each result carries source metadata

Top results by semantic relevance

Crete Beach Resorts

destination

0.94

Greek Islands Group Deals

package

0.91

Corfu All-Inclusive July

package

0.87
Confidence threshold
04
Phase 4

Context Assembly

Retrieved content is formatted with source attribution and assembled into context. The AI receives ONLY your data — it cannot reference external knowledge.

  • Source-attributed context blocks
  • Metadata preservation (names, types, ratings)
  • Strict context boundary enforcement
  • Hallucination prevention by architecture
Source 1: Chania, Crete (destination)
Source 2: Corfu North Coast (destination)
Source 3: Greek Islands Packages (package)

Context Assembly

Context: [3 sources assembled]

External knowledge: blocked

05
Phase 5

Response Generation

The AI generates a response grounded in the assembled context. Streaming delivers words in real-time as they're generated. Formatting, tone, and behavior are fully configurable.

  • High-performance language model
  • Real-time streaming responses
  • Sub-500ms first-token latency
  • Configurable tone and formatting rules
Streaming response

For a group of 6 in July, I'd recommend Chania, Crete for stunning beaches and nightlife, and Corfu for a quieter, more scenic experience. Both have group packages…

First token: 420msHigh-performance LLM
06
Phase 6

Lead Scoring

After every response, the conversation is analyzed for buying signals. A deterministic scoring algorithm assigns a 0–10 quality score and priority tier — in under 10ms.

  • Contact depth signals — phone, email, name
  • Intent signals — destination, dates, budget
  • Urgency signals — near-term dates, explicit requests
  • Instant scoring — no delays, pure algorithmic
Phone numberHigh
Email addressMed
Full nameMed
DestinationMed
Travel datesMed
BudgetMed
Near-term dates
Explicit bookingMed
Total Score
7/10Hot

See it in action.

Watch the six-stage pipeline turn a visitor question into a qualified lead — live.

Get started