Menu
Medium #system-design·August 15, 2026

Architecting an AI Voice Receptionist for Hotel Bookings

This article outlines the architecture for an end-to-end voice-enabled booking assistant, Aria, highlighting the integration of various AI and database technologies. It demonstrates how to combine large language models (LLMs) with specialized tools and a persistent data layer to create a conversational AI that can handle complex tasks like hotel reservations.

Read original on Medium #system-design

Overall System Architecture

The Aria system is designed as a full-stack application leveraging both frontend Web Speech APIs and a backend powered by modern AI and database services. The core architectural challenge is orchestrating natural language understanding, tool calling for specific actions (like booking), and seamless interaction with a database for data persistence and retrieval.

Key Components and Their Roles

  • Frontend (Web Speech APIs): Handles speech-to-text (STT) for user input and text-to-speech (TTS) for AI responses, enabling voice interaction directly in the browser.
  • Backend (FastAPI): Serves as the API gateway, orchestrating calls between the frontend, the LLM, and the database. It manages session state and processes requests.
  • Large Language Model (Llama 3.3 70B via Groq): The brain of the operation, responsible for understanding user intent, generating conversational responses, and crucially, performing tool calling to interact with external services.
  • Database (Supabase PostgreSQL): Provides a robust and scalable solution for storing booking information, hotel data, and potentially user preferences, managed through Supabase's integrated services.

The Role of Tool Calling in Conversational AI

ℹ️

Tool Calling for LLMs

Tool calling is a critical paradigm in modern LLM applications. It allows an LLM to dynamically invoke predefined functions (tools) based on its understanding of the user's request. For Aria, this means the LLM can decide to call a 'book_hotel' function, passing in parameters extracted from the conversation, rather than just generating a text response.

This architecture demonstrates a powerful pattern for building intelligent agents: combining the generative capabilities of LLMs with structured tools and databases. The FastAPI backend acts as an intermediary, translating LLM-generated tool calls into actual API requests to Supabase and handling the responses back to the LLM for conversational context.

Data Flow and Integration Points

  • User speaks -> Web Speech API (STT) -> Text to FastAPI.
  • FastAPI sends text and conversation history to LLM (Llama via Groq).
  • LLM analyzes and, if necessary, generates a tool call (e.g., `book_hotel(check_in='...', check_out='...')`).
  • FastAPI intercepts tool call, executes corresponding function which interacts with Supabase PostgreSQL.
  • Supabase returns booking confirmation/data to FastAPI.
  • FastAPI sends function output back to LLM for contextual response generation.
  • LLM generates natural language response -> FastAPI -> Web Speech API (TTS) -> User hears response.
AI AssistantLLMVoice UIFastAPISupabasePostgreSQLTool CallingConversational AI

Comments

Loading comments...