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.
Four phases. One unified flow. From conversation to confirmed booking in under a minute.
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.
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.
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.
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.
GPT decides. Code orchestrates. No hardcoding. Ever.
One GPT call extracts every field, detects corrections, generates the response, and matches options. Prompt budget: 400–650 tokens for configs with 20 fields.
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.
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.
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.
_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.
Exponential-backoff retries, semaphore-bounded concurrency, structured cost tracking, full audit log per turn. 200–800ms latency on gpt-4.1-nano.
One unified prompt extracts every field, detects corrections, generates the assistant reply, and matches options — no orchestration layer above it.
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"{
"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.
Widget falls back to a minimal form path with the same field config. Booking never breaks.
Non-fatal. AI continues with partial data and asks the user to confirm what was extracted.
DFS-walk over the dependency graph clears stale downstream fields. Destructive cascades show a confirmation.
Filtered by _meta.mf guard. Code-side correction guard catches drift.
Exponential backoff (3 retries). Final failure surfaces a retry button — session state is preserved.
User → widget → API → GPT → enrichment → response. Median 200–800ms.