How it works

How Typelessity works

Four phases. One unified flow. From conversation to confirmed booking in under a minute.

01

Chat

Natural language data collection.

User describes their booking in plain language — any of 25+ languages, voice or text. GPT-4.1-nano reads the field config and extracts values directly. No regex, no hardcoded patterns, no language switches.

02

Select

Smart UI for precise choices.

When options must be exact (a specific doctor, a specific time slot, a specific vehicle), the widget renders interactive cards. Triggered by enrichment APIs — e.g. specialty filled → GET /doctors?specialty=cardiology → cards rendered.

03

Review

Inline edit before submit.

Full form review surface. User verifies every extracted field, edits inline if needed. Cascade-aware — changing a field clears downstream-dependent fields with a warning. No surprises at submit.

04

Confirm

Submit via your API.

Booking sent to your system via webhook or REST POST with field-mapping you defined in config. Success screen with confirmation ID. Failures retry with exponential backoff.

Architecture

How the AI actually works

GPT decides. Code orchestrates. No hardcoding. Ever.

01

Single unified prompt

One GPT call extracts every field, detects corrections, generates the response, and matches options. Prompt budget: 400–650 tokens for configs with 20 fields.

02

Config-driven, not pattern-driven

Each field has an aiHint that tells GPT what it means semantically. The system never matches words like "airport" or "hotel" with regex. GPT reads context, GPT decides.

03

Real-time enrichment APIs

Fields can trigger external API calls. Specialty → fetch doctors. Date → fetch slots. Pickup location → fetch routes. Up to 5 enrichments per config, 10s timeout each, non-fatal on failure.

04

Cascade-aware corrections

If a user changes an upstream field (e.g. switches specialty mid-flow), the system DFS-walks the dependency graph and clears stale downstream data — with a confirmation if the change is destructive.

05

Anti-hallucination guardrails

_meta.mf signals: GPT can only commit a field value if it explicitly marked the field as mentioned by the user. Filters phantom extractions. Code-side correction guardrail catches drift.

06

Reliable by design

Exponential-backoff retries, semaphore-bounded concurrency, structured cost tracking, full audit log per turn. 200–800ms latency on gpt-4.1-nano.

Inside one GPT call

What the prompt looks like

One unified prompt extracts every field, detects corrections, generates the assistant reply, and matches options — no orchestration layer above it.

Prompt (≈420 tokens)

You are a booking assistant. Extract values for the
fields below from the user's message. Only commit a
field if you see explicit evidence in the input.

Fields:
  specialty       (enum: cardiology|dermatology|...)
  preferredDate   (ISO 8601)
  preferredTime   (HH:MM, 24h)
  patientName     (string)
  doctorGender    (enum: M|F|any)

Return JSON: { fields: {...}, _meta: { mf: [...] },
reply: "<assistant text>" }

User: "I need a cardiologist next Tuesday at 2pm,
patient name Robert Smith"

Response (single JSON)

{
  "fields": {
    "specialty": "cardiology",
    "preferredDate": "2026-05-28",
    "preferredTime": "14:00",
    "patientName": "Robert Smith"
  },
  "_meta": {
    "mf": ["specialty", "preferredDate", "preferredTime", "patientName"],
    "correction": null
  },
  "reply": "Got it — cardiology, next Tuesday at 14:00, for Robert Smith. Any preference for the doctor?"
}

The _meta.mf array (mentioned-fields) is the anti-hallucination guard: a field's value is only committed if its name appears in mf. Phantom extractions are filtered before the field reaches the form layer.

Edge cases handled

What happens when things go wrong

  • GPT outage

    Widget falls back to a minimal form path with the same field config. Booking never breaks.

  • Enrichment timeout (10s)

    Non-fatal. AI continues with partial data and asks the user to confirm what was extracted.

  • User changes upstream field mid-flow

    DFS-walk over the dependency graph clears stale downstream fields. Destructive cascades show a confirmation.

  • GPT hallucinates a value

    Filtered by _meta.mf guard. Code-side correction guard catches drift.

  • Submit endpoint 5xx

    Exponential backoff (3 retries). Final failure surfaces a retry button — session state is preserved.

One turn, end to end

What happens in a single turn

User → widget → API → GPT → enrichment → response. Median 200–800ms.

User
Types or speaks
Widget
Captures input
API
/agent/turn
GPT
Single call · 200–800ms
Enrichment
Optional API · 10s timeout
Response
Filled fields + reply
Embed

One line of HTML

Drop into any page. React, Vue, plain HTML — same script tag.

<script src="https://cdn.typelessity.com/widget.js"
        data-config="your-config-id"></script>

For React, the script auto-mounts to <div id="typelessity-widget">. Vue and Svelte hooks ship with the same package.

Ready to replace your form?