Skip to main content

How it is planned to be implemented

This section describes the high-level implementation approach, without technical or API detail.

Layered design

  • A form engine owns form configuration, validation, and navigation (e.g. which question comes next, branching). It does not handle natural language.
  • A chat layer sits on top: it receives user messages, decides the user’s intent, and either submits answers to the form engine, asks the knowledge base, or handles navigation and clarifications.
  • Configuration over code — Form definitions, prompts, and knowledge base settings are driven by config (e.g. YAML) so that behaviour can be tuned without changing application code.

Security and multi-tenancy

  • Customer/tenant model — Each deployment or integration is tied to a customer (tenant). Access and configuration are scoped per customer.
  • Existing security integration — Authentication, authorization, and rate limiting are handled by an existing security layer (e.g. Keystone). The chat and form engine rely on that layer for identity and access; they do not implement their own auth.
  • Headers — The customer (and optionally language) are passed via headers and validated by the security layer before reaching the booking logic.

Session and state

  • Short-lived sessions — Active conversation and form state are kept in a fast store (e.g. Redis) for quick access.
  • Long-term storage — When needed, sessions can be archived to a persistent store (e.g. MongoDB) for history or compliance.

Intelligence

  • Intent classification — An LLM (or similar) is used to classify the user’s latest message (answer, question, clarification, navigation, etc.) so the right handler runs.
  • Answer extraction — When the user is answering, the same or another model extracts structured values from natural language (e.g. date, time, choice) so the form engine receives clean data.
  • Knowledge generation — For factual questions, retrieved knowledge-base content is used to generate concise, on-brand answers.

This split keeps the form engine deterministic and testable, while the chat layer adds the conversational and AI behaviour on top.