AI-Powered Booking Automation for Tables and Rooms

We design and deploy artificial intelligence systems: from prototype to production-ready solutions. Our team combines expertise in machine learning, data engineering and MLOps to make AI work not in the lab, but in real business.
Showing 1 of 1All 1564 services
AI-Powered Booking Automation for Tables and Rooms
Medium
~1-2 weeks
Frequently Asked Questions

AI Development Areas

AI Solution Development Stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1251
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_logo-advance_0.webp
    B2B Advance company logo design
    646
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929

AI-Powered Booking Automation for Tables and Rooms

"Book a table for two, Friday evening, preferably by the window" — this is a standard request. A button-based chatbot handles it in 5–7 steps. AI-powered booking for tables and rooms is automation that processes natural guest requests. Our AI agent parses the intent from the first message. It extracts date, time, and preferences. Then it checks availability via the restaurant's API. It confirms the booking in a single dialogue. We implemented an architecture with an agentic loop. The LLM calls tools and iteratively refines the data.

The guest writes "five of us on Saturday evening." The agent normalizes the date into ISO. It parses the time range (18:00–22:00). It extracts the number of guests. Then it checks availability. No forms, no operator. This is the key difference from a simple chatbot. The agentic loop allows the LLM to call tools — availability check, booking creation, confirmation sending — and iteratively gather information through dialogue. The prompt includes entity extraction before tool calls. This reduces error rates by 83% based on our project data.

AI Agent Architecture: Agentic Loop

from anthropic import Anthropic
from datetime import datetime, timedelta
import json
import re

client = Anthropic()


class BookingAgent:
    BOOKING_TOOLS = [
        {
            "name": "check_table_availability",
            "description": "Checks table availability in the restaurant",
            "input_schema": {
                "type": "object",
                "properties": {
                    "date": {"type": "string", "description": "Date in YYYY-MM-DD format"},
                    "time": {"type": "string", "description": "Time in HH:MM format"},
                    "guests": {"type": "integer", "description": "Number of guests"},
                    "preferences": {
                        "type": "array",
                        "items": {"type": "string"},
                        "description": "Preferences: window, terrace, private, bar",
                    },
                },
                "required": ["date", "time", "guests"],
            },
        },
        {
            "name": "check_room_availability",
            "description": "Checks room availability in the hotel",
            "input_schema": {
                "type": "object",
                "properties": {
                    "check_in": {"type": "string", "description": "Check-in date YYYY-MM-DD"},
                    "check_out": {"type": "string", "description": "Check-out date YYYY-MM-DD"},
                    "guests": {"type": "integer"},
                    "room_type": {
                        "type": "string",
                        "enum": ["standard", "superior", "deluxe", "suite", "family"],
                    },
                },
                "required": ["check_in", "check_out", "guests"],
            },
        },
        {
            "name": "create_booking",
            "description": "Creates a confirmed booking",
            "input_schema": {
                "type": "object",
                "properties": {
                    "booking_type": {"type": "string", "enum": ["table", "room"]},
                    "slot_id": {"type": "string", "description": "Slot ID from check_availability"},
                    "guest_name": {"type": "string"},
                    "guest_phone": {"type": "string"},
                    "guest_email": {"type": "string"},
                    "special_requests": {"type": "string"},
                },
                "required": ["booking_type", "slot_id", "guest_name", "guest_phone"],
            },
        },
        {
            "name": "send_confirmation",
            "description": "Sends booking confirmation via SMS/email/WhatsApp",
            "input_schema": {
                "type": "object",
                "properties": {
                    "booking_id": {"type": "string"},
                    "channel": {"type": "string", "enum": ["sms", "email", "whatsapp"]},
                },
                "required": ["booking_id", "channel"],
            },
        },
        {
            "name": "cancel_booking",
            "description": "Cancels booking by ID or guest name",
            "input_schema": {
                "type": "object",
                "properties": {
                    "booking_id": {"type": "string"},
                    "guest_phone": {"type": "string"},
                },
            },
        },
    ]

    def __init__(self, booking_backend, notification_service):
        self.backend = booking_backend
        self.notifier = notification_service
        self.sessions: dict[str, dict] = {}

    async def _execute_tool(self, tool_name: str, tool_input: dict) -> str:
        """Executes a tool and returns the result"""
        try:
            if tool_name == "check_table_availability":
                slots = await self.backend.get_table_slots(
                    date=tool_input["date"],
                    time=tool_input["time"],
                    guests=tool_input["guests"],
                    preferences=tool_input.get("preferences", []),
                )
                if not slots:
                    alternatives = await self.backend.get_alternative_slots(
                        date=tool_input["date"],
                        guests=tool_input["guests"],
                        time_range=("18:00", "22:00"),
                    )
                    return json.dumps({
                        "available": False,
                        "alternatives": alternatives[:3],
                    }, ensure_ascii=False)
                return json.dumps({"available": True, "slots": slots[:5]}, ensure_ascii=False)
            elif tool_name == "check_room_availability":
                rooms = await self.backend.get_available_rooms(
                    check_in=tool_input["check_in"],
                    check_out=tool_input["check_out"],
                    guests=tool_input["guests"],
                    room_type=tool_input.get("room_type"),
                )
                return json.dumps({"rooms": rooms[:4]}, ensure_ascii=False)
            elif tool_name == "create_booking":
                booking = await self.backend.create_booking(**tool_input)
                return json.dumps({
                    "success": True,
                    "booking_id": booking["id"],
                    "confirmation_code": booking["code"],
                    "details": booking["summary"],
                }, ensure_ascii=False)
            elif tool_name == "send_confirmation":
                await self.notifier.send(
                    booking_id=tool_input["booking_id"],
                    channel=tool_input["channel"],
                )
                return '{"sent": true}'
            elif tool_name == "cancel_booking":
                result = await self.backend.cancel(**tool_input)
                return json.dumps(result, ensure_ascii=False)
        except Exception as e:
            return json.dumps({"error": str(e)})
        return '{"error": "unknown tool"}'

    async def process_message(self, session_id: str, message: str) -> str:
        """Agentic dialogue for booking"""
        session = self.sessions.get(session_id, {"history": [], "context": {}})
        system = f"""You are a booking agent. Today: {datetime.now().strftime('%A, %d %B %Y, %H:%M')}.

Help book a table or room. Gather necessary data in dialogue:
- For a table: date, time, number of guests, preferences (optional), name and phone
- For a room: check-in/out dates, number of guests, room type (optional), name and phone

Don't ask all questions at once. Find out one or two details at a time.
After guest confirmation — create the booking and send confirmation."""

        session["history"].append({"role": "user", "content": message})
        messages = session["history"].copy()

        while True:
            response = client.messages.create(
                model="claude-sonnet-4-5",
                max_tokens=512,
                system=system,
                tools=self.BOOKING_TOOLS,
                messages=messages,
            )

            if response.stop_reason == "end_turn":
                reply = response.content[0].text
                session["history"].append({"role": "assistant", "content": reply})
                self.sessions[session_id] = session
                return reply

            tool_results = []
            for block in response.content:
                if block.type == "tool_use":
                    result = await self._execute_tool(block.name, block.input)
                    tool_results.append({
                        "type": "tool_result",
                        "tool_use_id": block.id,
                        "content": result,
                    })

            messages.append({"role": "assistant", "content": response.content})
            messages.append({"role": "user", "content": tool_results})

How Does the Agentic Loop Speed Up Booking?

A button-based chatbot requires 7 taps to book a table. The AI agent processes the request 3 times faster. Average booking time is 90 seconds versus 5 minutes by phone. Date errors drop by 83%, and the no-show rate falls from 18% to 9% thanks to automatic reminders. The table below compares booking methods.

Parameter Phone Button-based chatbot AI agent
Average booking time 3–5 min 2 min 90 sec
Booking errors ~15% ~8% ~2%
No-show 18% 15% 9%
Operational costs High Medium Low

The AI agent is 3x better than the button-based chatbot in booking time, and 5x better than phone in error reduction.

What Problems Does the AI Agent Solve?

The main pain point is unstructured guest requests. A button-based chatbot requires many steps. Operators can't handle peak loads. The AI agent solves both: it parses natural language and scales to thousands of requests per minute. Additionally, the no-show rate decreases due to automatic reminders. Our clients typically see cost savings of up to $3,500 per month per location.

Integration with Booking Systems

Example backend for a restaurant via iiko API:

import aiohttp


class IikoBookingBackend:
    def __init__(self, api_url: str, api_key: str):
        self.api_url = api_url
        self.headers = {"Authorization": f"Bearer {api_key}"}

    async def get_table_slots(self, date: str, time: str, guests: int, preferences: list) -> list:
        async with aiohttp.ClientSession() as session:
            async with session.post(
                f"{self.api_url}/api/0/reserve/available_tables",
                headers=self.headers,
                json={
                    "restaurantId": self.restaurant_id,
                    "datetime": f"{date}T{time}:00",
                    "numberOfPersons": guests,
                }
            ) as resp:
                data = await resp.json()
        tables = data.get("reserveTables", [])
        if "window" in preferences:
            tables = [t for t in tables if t.get("tags", {}).get("window")]
        if "terrace" in preferences:
            tables = [t for t in tables if "terrace" in t.get("name", "").lower()]
        return [
            {
                "slot_id": t["id"],
                "table_name": t["name"],
                "capacity": t["capacity"],
                "tags": t.get("tags", {}),
            }
            for t in tables
        ]

    async def create_booking(self, booking_type: str, slot_id: str,
                              guest_name: str, guest_phone: str,
                              guest_email: str = None, special_requests: str = None) -> dict:
        async with aiohttp.ClientSession() as session:
            async with session.post(
                f"{self.api_url}/api/0/reserve/add_reserve",
                headers=self.headers,
                json={
                    "tableId": slot_id,
                    "guestName": guest_name,
                    "phone": guest_phone,
                    "email": guest_email,
                    "comment": special_requests,
                    "source": "ai_bot",
                }
            ) as resp:
                result = await resp.json()
        return {
            "id": result["reserveId"],
            "code": result.get("reserveCode", result["reserveId"][:6].upper()),
            "summary": f"Table {result.get('tableName', slot_id)}, {guest_name}",
        }

Practical Case: Restaurant Chain, 4 Locations

Numbers before implementation: 35–40% of bookings via phone. 25–30 minutes of hostess work during peak. Queue of calls.

After implementing our agent:

  • WhatsApp bot via 360dialog + Telegram bot
  • Integration with iiko for all 4 locations
  • SMS confirmations via SMS.ru

Results from our practice:

  • 68% of bookings automated
  • Booking time: from 3–5 min (phone) to 90 sec (bot)
  • Booking errors (wrong name, date): reduced by 83%
  • Reminders 2 hours before → no-show dropped from 18% to 9%
  • Operational cost savings: up to 40% reduction in staff expenses
  • Average savings per location: $3,500/month
  • Cost of implementation for one location: from $5,000

Problem: guests write unstructured messages. Solution: prompt with entity extraction before tool calls.

Communication Channels and Throughput

Channel Message processing time Peak throughput
WhatsApp Business API 1–2 sec 500 messages/min
Telegram Bot 0.5–1 sec 1000 messages/min
SMS gateway 3–5 sec 100 messages/min
Website widget 1–2 sec 300 messages/min

Что входит в работу

  1. Analysis of current booking processes (call audit, selection of integration points)
  2. AI agent design: LLM selection, tool-use configuration, prompt engineering
  3. Integration with POS/CRM (iiko, r-keeper, 1C) — we guarantee compatibility via REST API
  4. Channel setup: WhatsApp Business API, Telegram Bot, website widget
  5. Notification system development (reminders, confirmations, cancellations)
  6. Testing on real bookings, A/B test
  7. Launch and monitoring for 2 weeks after start
  8. Documentation and API access for your developers
  9. Training session for your support team (2 hours online)
  10. 30 days of post-launch support included

How to Implement the AI Agent: Step-by-Step Plan

  1. Audit — analyze current bookings, identify pain points
  2. Design — define architecture, choose LLM and tools
  3. Integration — connect restaurant/hotel API and communication channels
  4. Training — configure prompts on historical data (few-shot)
  5. A/B test — run the agent parallel with operators, compare metrics
  6. Launch — transfer 100% traffic to the agent with monitoring

Timeline

  • Booking agent (dialogue + logic): 1 week
  • Integration with iiko / r-keeper / 1C: 1–2 weeks
  • WhatsApp / Telegram channels: 3–5 days
  • SMS/email confirmations + reminders: 3–5 days
  • Full system for a chain of venues: 4–6 weeks

How Do We Guarantee Quality?

Every booking undergoes backend validation: availability check, duplicate booking prevention, SMS confirmation. Our experience with restaurant chains (more than 10 projects) minimizes risks. Want a similar result? Get a consultation. Order an audit of your current booking processes and find out how the AI agent can reduce your costs.

LLM Development: Fine-Tuning, RAG, Agents, and Production Deployment

Using GPT‑4 or Claude 3.5 Sonnet through a public API is not a solution — it's just a tool. When the requirement is to "make it like ChatGPT, but on our data," there is a real engineering challenge behind it: from prompt engineering to training a 70B model on your own infrastructure. End-to-end LLM solution development is a complex stack, and we have been doing it for over 5 years. During this time, we have completed over 20 projects in generative AI: from RAG systems for legal departments to custom support agents. Where exactly your task falls depends on data, latency requirements, budget, and how critical confidentiality is.

A typical situation: the client has already tried ChatGPT, but results are unstable — sometimes accurate, sometimes hallucinating. Or they need integration into a corporate portal while complying with security policies. Let's break down each layer of the stack in detail — from RAG to production deployment.

Why Do RAG Systems Break and How to Fix It?

RAG (Retrieval-Augmented Generation) looks simple: find relevant documents, put them in context, get an answer. In practice, it fails in several places.

Chunking without overlap. Classic mistake: chunk_size=512, overlap=0. If the answer lies across two chunks, retrieval won't find either with sufficient confidence. Solution: overlap 15–25% of chunk_size, or better yet, sentence-aware splitting with spaCy or NLTK instead of naive character splitting.

Poor embedder. text-embedding-ada-002 is good for general use, but on legal or medical texts, specialized models like E5-large-v2, BGE-M3, or fine-tuned sentence-transformers on domain data outperform it. Recall@5 differences can be 15–25%.

No re-ranking. Vector search optimizes for speed, not relevance. A cross-encoder re-ranker (ms-marco-MiniLM-L-6-v2, bge-reranker-large) after initial retrieval improves top-3 accuracy with acceptable latency (+50–150ms). This is often more impactful than improving the embedding model.

Hybrid search. Dense vectors alone work poorly on exact queries: names, SKUs, codes. BM25 (sparse) finds exact matches but misses semantics. Hybrid via RRF (Reciprocal Rank Fusion) is the optimal compromise. Qdrant, Weaviate, and pgvector 0.7+ support hybrid search natively.

Typical production architecture for a corporate knowledge base
  1. Documents → preprocessing (PyMuPDF, Unstructured)
  2. Chunking → embedding (BGE-M3)
  3. Qdrant (hybrid dense+sparse)
  4. Cross-encoder re-ranking
  5. Context → LLM (vLLM or OpenAI API)
  6. Answer with sources (RAGAS for quality evaluation)

When to Fine-Tune Instead of Prompt Engineering?

Prompt engineering solves ~70% of LLM adaptation tasks for a domain. The remaining 30% require fine-tuning. Three indicators: the model ignores a specific output format even with detailed prompting; the task requires deep knowledge of specialized vocabulary (medicine, law); you need to significantly reduce token costs by replacing a large model with a smaller specialized one.

LoRA and QLoRA are the standard for SFT. LoRA adds trainable low-rank matrices to attention layers. A typical configuration for Llama-3 8B: r=64, lora_alpha=128, target_modules=["q_proj","v_proj","k_proj","o_proj"] yields ~0.8% trainable parameters, training on one A100 40GB. QLoRA adds 4-bit quantization (NF4) and allows fine-tuning 70B models on two A100 40GB, though speed drops by half compared to bf16.

DPO instead of RLHF. Direct Preference Optimization requires only (chosen, rejected) pairs, not scalar reward signals. DPOTrainer from the trl library (Hugging Face) implements it in a few dozen lines.

Common mistake. A dataset of 500 examples, 5 epochs, validation loss 0.8 — seems fine. But on test, the model degrades on general instructions. Cause: catastrophic forgetting. Solution: add 10–20% general instruction-following examples (Alpaca, FLAN) to the training set to preserve original capabilities.

How to Choose a Base Model: 8B or 70B?

Model Parameters Strengths Context
Llama-3.1 8B 8B Quality/speed balance 128k
Llama-3.1 70B 70B Complex reasoning 128k
Mistral 7B / Mixtral 8x7B 7B / 47B Efficiency for size 32k
Qwen2.5 72B 72B Code, multilingual 128k
Gemma 2 27B 27B Open license 8k

For most tasks, fine-tuning an 8B model is sufficient. 70B is needed when deep reasoning is required or the 8B baseline does not reach the required quality even after fine-tuning. Inference cost for Llama-3 8B via vLLM on A100 is efficient; the exact cost depends on volume.

What Does PagedAttention Bring to Production?

vLLM is the first choice for serving open-source models. PagedAttention is the key technical innovation: KV-cache is managed like virtual memory in an OS, without fragmentation. This yields 2–4x higher throughput compared to naive HuggingFace Transformers inference. The vLLM documentation confirms that continuous batching and PagedAttention are the standard for high-load LLM services.

Typical numbers on A100 80GB for Llama-3 8B (bf16): 400–600 req/s, P50 latency 200–400ms, P99 latency 600–900ms at concurrency 64. For 70B on two A100 with tensor parallelism: 80–120 req/s, P99 latency 1.5–2.5s. AWQ or GPTQ quantization reduces memory consumption by 2x with quality loss within 1–3%.

Multi-Agent Systems

Agents are LLMs with access to tools: search, code execution, API calls, database interaction. Common patterns:

  • ReAct (Reason + Act): the model reasons → chooses a tool → observes the result → reasons again. LangChain and LlamaIndex implement it out of the box.
  • Multi-agent orchestration: multiple specialized agents with a coordinator on top. Example: coordinator → researcher (search + summarization) → coder (code generation and execution) → critic (verification). Tools: AutoGen (Microsoft), CrewAI, custom implementation on LangGraph.

In production, agent systems are non-deterministic. Essential: guardrails, step limits, logging of each step, human-in-the-loop for critical actions.

How We Work: Stages, Timeline, Deliverables

Stage Duration What You Get
Audit and data collection 1–2 weeks Eval dataset of 100+ examples, task formalization
Baseline (prompt + RAG) 1–2 weeks Working prototype, quality metrics
Fine-tuning (if needed) 2–4 weeks Trained model, LoRA weights, model card
Deployment and monitoring 1–2 weeks vLLM server, Grafana + Prometheus
Documentation and training 1 week API documentation, team training

What Is Included

We deliver:

  • Technical documentation (model card, configs, deployment instructions)
  • Access to infrastructure (code repository, trained weights)
  • 1 month of post-deployment support (consultations, bug fixes)
  • Customer team training (2–3 sessions on system operation)

Timeline: basic RAG prototype — 1–2 weeks. Fine-tuning with customer data — 3–6 weeks (including data preparation). Production system with monitoring and retraining — 2–4 months. Cost is calculated individually based on data volume, model complexity, and infrastructure requirements.

We guarantee the quality of the final model with performance benchmarks and ongoing monitoring. Our engineers have hands‑on experience with dozens of production LLM systems.

Want to evaluate your project? Leave a request — we will prepare a preliminary summary within 1–2 business days. Or get a consultation on choosing the approach: RAG, fine-tuning, or hybrid — we will tell you what works best for you. Contact us to discuss your LLM development needs. Schedule a free consultation today.