Meet Maya, Whispering Willow Studio’s AI Agent

Try Maya live: Open the chat icon in the lower-right corner to book an appointment and to ask questions about Whispering Willow Massage Studio.

Project at a Glance

  • Conversational AI Platform: Dialogflow CX
  • Cloud Platform: Google Cloud
  • Conversation Design: Flows, Pages, Intents, Entities, Parameters, Routes, Event Handlers & Routine Playbook
  • Knowledge & Grounding: RAG using Google Cloud AI Applications Data Store and a curated studio FAQ (PDF)
  • Integrations: Webhooks, Google Cloud Application Integration, Google Calendar & Gmail
  • Testing & Evaluation: Golden Evaluation Datasets, 4-Dimension Quality Rubric, AI-Assisted Test Case Generation (Claude & ChatGPT), Automated Conversational Testing (ChatGPT) & Regression Testing
  • Error Analysis: Dialogflow CX Simulator Traces, Google Cloud Logging & Application Integration Execution Logs

About Maya

Maya is a hybrid AI agent that I independently designed, developed, tested, and deployed from the ground up for Whispering Willow Studio, a fictional massage practice. Its business goal is to reduce routine phone calls by automating appointment scheduling and answering frequently asked questions.

My Role: Conversation Designer, AI Quality Analyst & AI Agent Developer

1. Golden Evaluation Dataset & Rubric-Based Quality Scoring

I developed a golden evaluation dataset covering both knowledge-based Q&A and transactional booking scenarios. The Q&A test cases were derived from the studio's approved FAQ documentation, while the transactional test cases were based on business rules, booking parameters, and conversation flow logic. Using Claude and ChatGPT, I expanded baseline test cases into realistic conversational variations, including ambiguous inputs, time-zone conversions, policy violations, mid-booking interruptions, and multi-turn corrections.

Evaluation Methodology: AI-Assisted Testing & Rubric-Based Scoring

I established a four-dimension quality rubric with a 1–5 scoring scale to systematically assess Maya's generative FAQ responses and deterministic booking interactions.

I used AI-assisted conversational testing and human review of Dialogflow CX simulator traces to compare expected versus observed behavior, identify recurring error patterns, and assess their impact on conversational quality and transactional reliability. Evaluation findings informed targeted improvements, followed by regression testing.

The rubric is designed to support LLM-as-a-Judge evaluation, in which an LLM assesses agent responses against predefined expectations and scoring criteria. Human-in-the-Loop (HITL) review provides an additional validation layer for ambiguous judgments, critical failures, and scenarios requiring inspection of conversation state or backend execution.


Quality Evaluation Rubric

The following four rubric dimensions define the expected behavior and failure criteria used to assess Maya's conversational performance.

Rubric Dimension Pass Criteria Failure Criteria
1. Source Grounding & Accuracy Provides accurate information about massage services, pricing, studio location, parking, therapist qualifications, and appointment policies. Answers questions, compares massage types, and provides recommendations using information supported by the approved studio FAQ documentation. Providing inaccurate or unsupported information, inventing services, prices, policies, or therapist qualifications, or making recommendations and therapeutic claims that are not supported by the approved knowledge base.
2. Policy & Business-Rule Compliance Enforces Monday–Friday, 9 AM–6 PM Pacific Time operating hours, validates appointment dates and supported durations, correctly converts supported time zones, verifies calendar availability, and obtains explicit customer confirmation before creating an appointment. Accepting invalid, past, weekend, out-of-hours, or already-booked appointment slots; incorrectly converting time zones; failing to revalidate availability after scheduling changes; providing inaccurate appointment policy information; or creating an appointment without explicit customer confirmation.
3. Conversation Routing & Context Management Correctly recognizes customer intents, extracts and manages booking parameters, and transitions between deterministic flows and the FAQ playbook. Preserves previously collected booking details during interruptions and corrections, resumes the appropriate booking step, and resets booking state when appropriate following completion or abandonment. Incorrect intent recognition or conversation routing, losing or overwriting previously collected booking details, unnecessarily repeating questions, resuming at the wrong booking step, mishandling customer corrections, or retaining outdated booking information.
4. Clarity, Conciseness & Tone Provides clear, concise, polite, and relevant responses using straightforward language, with sufficient information to answer questions and guide users through the booking process without unnecessary repetition. Providing overly verbose, vague, confusing, or irrelevant responses; using abrupt or inappropriate language; including unnecessary information; or repeating prompts without a conversational purpose.

Quality Scoring Scale

Behavioral scoring definitions establish consistent expectations for human and LLM evaluators across the four rubric dimensions.

1 Critical Failure Fundamentally fails the applicable quality requirements or introduces a critical error.
2 Poor Contains significant errors or fails important behavioral expectations.
3 Needs Improvement Partially meets expectations but contains noticeable quality deficiencies.
4 Good Meets essential requirements with minor quality issues that do not prevent task completion.
5 Excellent Fully meets expected behavior with no meaningful quality deficiencies.

Sample Golden Evaluation Dataset & Edge-Case Test Matrix

The following sample evaluation dataset demonstrates how predefined expected behavior can be compared against observed agent behavior using the four-dimension quality rubric. The scenarios cover knowledge-based questions, business-rule validation, intent recognition, conversation continuity, customer corrections, and booking abandonment.

Each scenario is mapped to one or more applicable rubric dimensions. The matrix includes successful interactions and a historical failure scenario to illustrate how quality deficiencies can be identified and classified.

The numerical scores and Pass/Fail classifications in this sample matrix are illustrative rather than formally verified evaluation results.

Test Utterance Expected Behavior Actual Behavior Rubric Dimension & Score Result
“What is your cancellation policy?” Asked mid-booking Provide accurate cancellation policy information grounded in the approved FAQ documentation and resume the interrupted booking step without losing collected details. The FAQ was handled during the booking conversation, and the booking process resumed. Response accuracy requires transcript review.
Source Grounding & Accuracy 5/5
Conversation Routing & Context Management 5/5
Pass
“10 AM Eastern” Appointment time outside studio operating hours Convert 10 AM Eastern to 7 AM Pacific, identify that the requested time falls outside studio operating hours, and request an alternative appointment time. Outside-hours appointment requests were rejected during business-rule testing. Exact utterance-level response pending review.
Policy & Business-Rule Compliance 5/5
Pass
“Book deep tissue next Friday at 10 AM for 60 minutes.” Multiple booking parameters in one utterance Recognize the booking intent, extract the massage type, appointment date, time, and duration, and request only the remaining required booking information. Multi-parameter booking requests were included in conversational testing. Exact parameter extraction and response pending transcript verification.
Conversation Routing & Context Management 5/5
Pass
“Change the massage type to Swedish.” Customer correction during booking Update the massage type to Swedish, preserve unrelated booking parameters, and resume the appropriate booking step. Booking parameter modification scenarios were exercised during regression testing. Exact utterance-level response pending review.
Conversation Routing & Context Management 5/5
Pass
“Stop booking.” Booking abandonment before final confirmation Stop the booking process, clear the abandoned booking state as appropriate, and avoid creating a calendar appointment. Booking abandonment was covered in conversational testing. State reset and calendar outcome require trace verification for this exact test.
Conversation Routing & Context Management 5/5
Policy & Business-Rule Compliance 5/5
Pass
“What is the weather today?” Out-of-scope question during booking Politely explain that the request is outside the agent's supported scope and repeat the pending booking question without losing previously collected details. Out-of-scope questions were used to test fallback behavior and booking continuity across multiple booking stages. Exact responses pending transcript review.
Clarity, Conciseness & Tone 5/5
Conversation Routing & Context Management 5/5
Pass
“how do I prepare for an appointment” FAQ interruption during appointment date collection; historical failure example Recognize the FAQ regardless of punctuation, invoke the FAQ playbook, provide a grounded answer or an appropriate no-answer response, and resume the pending booking step. Maya repeated the appointment date question instead of invoking the FAQ playbook. Historical behavior before corrective changes.
Conversation Routing & Context Management 2/5
Fail

Sample scoring illustration. Numerical scores and corresponding Pass/Fail classifications demonstrate the proposed rubric-based evaluation methodology and are subject to formal evaluation. Behavior summaries are not verbatim conversation transcripts. Historical failure examples represent behavior observed during development rather than necessarily reflecting the current deployed agent.


Evaluation Decision Rules

Independent Dimension Scoring Each applicable rubric dimension is evaluated independently on a 1–5 scale. Dimensions that are not relevant to a particular scenario are excluded from scoring.
Pass/Fail Threshold A scenario passes only when every applicable dimension receives a minimum score of 4/5 and no critical violations are identified. A score below 4 in any applicable dimension results in a failed evaluation.
Critical Failure Override Critical violations, such as creating an appointment without explicit customer confirmation or booking an unavailable appointment slot, automatically result in a failed evaluation regardless of scores in other dimensions.
Human Review & Regression Testing Ambiguous judgments, critical failures, and scenarios requiring verification of conversation state or backend execution are subject to human review. Identified failures inform corrective actions and targeted regression testing.

2. Prompt Engineering & Hallucination Guardrails

I applied prompt engineering techniques to design and refine Maya's FAQ Routine Playbook instructions to improve factual accuracy, define knowledge and capability boundaries, minimize hallucinations, and control playbook execution and handoff to the structured conversation flow. These instructions work alongside retrieval-augmented generation (RAG) to support reliable, contextually relevant responses while preserving conversation state. These guardrails address the quality risks identified in the evaluation rubric, translating predefined quality expectations into actionable LLM instructions and conversation controls.


Prompt Design & Behavioral Constraints

The following examples illustrate how I structured prompts to govern the LLM's knowledge retrieval, factual accuracy, response style, operational boundaries, task completion, and conversation state preservation. Each prompt engineering technique addresses a specific risk to conversational quality and reliability.

Prompt Engineering Technique Actual Playbook Instructions Design Rationale
Mandatory Knowledge Retrieval “Use ${TOOL:Whispering Willow Knowledge} to retrieve information when answering factual questions about Whispering Willow Studio.” Require retrieval of approved business information rather than relying on the LLM's general knowledge.
Strict Source Grounding “Base factual answers on information retrieved from the knowledge base.” “Do not invent or assume information that is not supported by the knowledge base.” Minimize hallucinations and prevent the LLM from relying on general knowledge to fill gaps in studio-specific information.
Tool-Use Integrity “Do not claim to have checked the knowledge base unless the tool was actually used.” Prevent misleading claims about knowledge retrieval and tool execution.
Scope & Safety Boundaries “Do not answer unrelated questions about weather, politics, general trivia, news, or topics unrelated to Whispering Willow Studio.” “Never: ... Make unsupported medical or therapeutic claims.” Keep responses within the agent's intended domain and prevent unsupported health-related claims.
Insufficient Knowledge Handling “Use notify to briefly tell the customer you don't have that information. Keep the reply specific to the question.” “An empty search result for a clear question does not require clarification or an offer of further help.” Prevent unsupported answers and unnecessary conversational loops when the customer's question is understood but the required information is unavailable.
Capability Restrictions “Do not collect booking parameters.” “Do not check availability.” “Do not create calendar events.” “Do not claim that an appointment has been booked.” Restrict the playbook to informational tasks and prevent unauthorized transactional actions or false booking confirmations.
Response Optimization “Answer the customer's actual question directly.” “Keep responses concise while providing enough information to be helpful.” “Ask a clarifying question only when necessary to understand the customer's request.” “Do not automatically offer to book an appointment after every FAQ answer.” Reduce unnecessary verbosity, clarification, repetition, and unsolicited booking prompts while maintaining a natural conversational experience.
Task Completion & Control Handoff “Immediately after notify, use done to complete the playbook successfully in the same turn.” “Allow Dialogflow CX to return control to the previously active booking flow.” Action definitions: notify delivers the response to the customer, while done completes the playbook and allows control to return to the previously active conversation flow. Ensure the playbook completes its task and returns control to the structured conversation flow without waiting for another customer message.
Conversation State Preservation “Do not modify, clear, or overwrite any booking session parameters.” “Do not restart the booking process.” Preserve collected booking information and prevent disruption of an in-progress booking.

Selected excerpts from the Whispering Willow Studio FAQ Routine Playbook instructions.


Knowledge Retrieval & RAG Configuration

To complement prompt-based grounding instructions, I configured the Whispering Willow Knowledge data store to support relevant and contextually accurate knowledge retrieval.

Knowledge source
Studio FAQ documentation (PDF)
Chunk size
500 tokens
Document parser
Layout Parser — preserves document structure
Ancestor headings
Enabled — retains hierarchical context

Controlled Playbook Invocation & Flow Integration

I configured the FAQ Routine Playbook to be invoked only when a customer's utterance matches a configured FAQ intent, limiting generative AI execution to supported studio-related questions. The structured conversation flow remains responsible for booking parameter collection, validation, availability checks, and appointment creation.

Appointment Review Handoff

When a customer asks an FAQ during the final appointment review, I instructed the playbook to return a custom completion parameter to the booking flow. This allows the structured flow to present the appointment summary again and request final confirmation, preventing the LLM from independently reconstructing booking details or generating confirmation prompts.

3. Failure Pattern Analysis, Simulator Trace Auditing & Root-Cause Diagnosis

Throughout iterative evaluation and regression testing, I analyzed Dialogflow CX simulator traces, session parameters, Google Cloud Logging records, and Application Integration execution logs to identify recurring failure patterns, investigate root causes, and implement targeted improvements.

I categorized failures according to the quality evaluation rubric, assessed their impact on conversational quality and transactional reliability, and used the findings to guide improvements to intent recognition, conversation routing, parameter handling, business-rule validation, generative playbook behavior, and integration logic.


Representative Failure Patterns & Corrective Actions

The following examples demonstrate how I translated evaluation findings into targeted technical improvements through systematic root-cause analysis, corrective actions, and regression testing.

Failure Pattern Identified Affected Rubric Dimension Root-Cause Diagnosis Corrective Action Outcome
Outdated Availability After Appointment Time Change When a customer changed their appointment time during final review, Maya retained the availability status of the original time slot without checking whether the newly requested time was available. Policy & Business-Rule Compliance Conversation Routing & Context Management Appointment time changes during final review bypassed business-hours validation and calendar availability checks. Reconfigured scheduling edit routes to reset the previous availability status, revalidate the requested appointment time against business rules, and check Google Calendar for scheduling conflicts. Resolved Appointment time changes now trigger renewed validation and availability checks, preventing booking decisions based on outdated availability information.
Delayed Validation of Weekend Appointment Requests When a customer requested a weekend appointment, Maya continued collecting the appointment time and duration before informing the customer that the studio was closed on weekends. Policy & Business-Rule Compliance Conversation Routing & Context Management Appointment date validation occurred after additional booking parameters had been collected, even though the date alone was sufficient to determine that the appointment could not be booked. Reconfigured conversation routes to validate the appointment date immediately after collection, explain the studio's Monday–Friday operating schedule, and request an alternative date before collecting additional booking details. Resolved Weekend appointment requests are now rejected immediately upon date validation, eliminating unnecessary questions and reducing customer effort.
Inconsistent FAQ Intent Recognition During an active booking conversation, Maya recognized certain FAQ questions only when phrased in a particular way. For example, removing the question mark from “how do I prepare for an appointment?” triggered a booking-date reprompt instead of invoking the FAQ playbook. Conversation Routing & Context Management Insufficient training phrase coverage was identified as a contributing factor to inconsistent FAQ intent recognition across variations of the same customer question. Expanded FAQ intent training phrases to include natural variations in customer wording and punctuation, and retrained the NLU model using Train Advanced NLU. Improved FAQ intent recognition and routing across natural variations in customer questions.
Incomplete FAQ Task Execution After Unsuccessful Knowledge Retrieval When a customer asked a question about preparing for a massage during an active booking conversation, the knowledge base returned no relevant information. Maya provided a fallback response, but the generative FAQ playbook remained active instead of returning control to the interrupted booking flow. Conversation Routing & Context Management Simulator traces showed that the playbook remained in a pending execution state (OUTPUT_STATE_PENDING). The no-answer instructions did not sufficiently enforce task completion and immediate control handoff following unsuccessful knowledge retrieval. Refined the playbook instructions to distinguish insufficient knowledge from an ambiguous customer question. Required a concise, question-specific fallback using notify, followed immediately by done in the same turn, without unnecessary clarification or offers of further assistance. Resolved Regression testing confirmed successful playbook completion and return to the booking flow. Maya resumed the interrupted step by repeating the pending email address question.

Evaluation Insights & Customer Experience Improvements

Quality Trend Analysis Identified inconsistencies in FAQ intent recognition across natural variations of customer questions, demonstrating the importance of evaluating conversational behavior beyond predefined training phrases and idealized conversation paths.
Customer Experience Impact Assessment Identified unnecessary customer effort caused by delayed appointment date validation and interrupted booking conversations caused by incomplete FAQ task execution. These findings highlighted opportunities to reduce unnecessary conversational turns and improve booking continuity.
Data-Driven Prioritization Assessed failure severity using observed conversational behavior, business-rule requirements, and potential customer impact. Failures involving outdated appointment availability carry greater transactional risk than minor response wording issues because they can lead to invalid booking decisions.
Actionable Evaluation Insights Used identified failure patterns to inform subsequent regression test coverage, with particular emphasis on natural-language variations, mid-conversation corrections, FAQ interruptions, and scheduling revalidation across different booking stages.

End-to-End AI Quality Evaluation Framework

Maya's evaluation framework connects predefined quality expectations, preventive guardrails, evaluation execution, failure analysis, and regression testing into an iterative improvement process.

STEP 1 Define Quality Standards Golden evaluation datasets, expected behavior, and quality scoring rubrics.
STEP 2 Implement Quality Guardrails Prompt engineering, source grounding, and deterministic business rules.
STEP 3 Execute & Score Evaluations Conversational testing, rubric-based response assessment, and human review.
STEP 4 Analyze & Address Failures Identify trends, assess customer impact, diagnose root causes, and implement improvements.
STEP 5 Regression Testing & Validation Verify corrective changes and protect previously successful conversation paths.

6. Conversational Recovery, Error Paths & Escalation Strategy

I designed Maya's conversational recovery strategy to address situations in which customer interactions deviate from expected conversation paths, including ambiguous inputs, unsupported requests, business-rule violations, unavailable appointments, and backend execution failures.

The recovery strategy focuses on preserving conversation context, reducing customer effort, communicating limitations clearly, and providing appropriate next steps. These recovery scenarios also inform negative-path and edge-case evaluation to assess conversational resilience beyond successful task completion.


Core Recovery Design Principles

Graceful Recovery Respond to unexpected inputs, unsupported requests, and system failures with clear, polite, and contextually appropriate messages rather than exposing technical errors or leaving customers without guidance.
Actionable Guidance Explain relevant limitations and provide meaningful next steps, such as clarifying an ambiguous response, selecting an alternative appointment date or time, or contacting the studio directly.
Context Preservation Preserve previously collected valid booking information during recoverable interruptions and errors, allowing customers to resume the appropriate conversation step without unnecessarily restarting the booking process.
Loop Prevention Minimize unnecessary conversational loops through targeted clarification, context-aware reprompting, and alternative resolution paths, with progressive retry thresholds identified for future implementation.
Customer Experience Over Containment Prioritize successful resolution and customer needs rather than keeping visitors within the automated experience at all costs. Provide alternative contact options when automated assistance is insufficient.

Conversational Recovery & Interruption Evaluation Matrix

The following scenarios define expected recovery behavior across representative conversational interruptions, invalid inputs, knowledge limitations, transactional failures, and customer requests that cannot be resolved through the automated experience.

Each scenario is mapped to applicable dimensions of the quality evaluation rubric, supporting systematic assessment of recovery behavior and identification of quality deficiencies.

Recovery Scenario Example Input or Trigger Expected Recovery Behavior Quality & Evaluation Focus
Out-of-Scope Request “Can you order me a pizza?” “What is the weather like today?” Politely communicate the agent's scope limitations, avoid providing unrelated information, and repeat the pending booking question when an active booking conversation exists. Clarity, Conciseness & Tone Conversation Routing & Context Management
Unrecognized or Invalid Input An unsupported response to a booking question, such as an unrecognized massage type or unsupported duration. Explain the relevant input requirements, present supported options when appropriate, and repeat the pending question without losing previously collected valid appointment details. Conversation Routing & Context Management Clarity, Conciseness & Tone Policy & Business-Rule Compliance
Ambiguous Input “At 10.” An appointment time without AM or PM. Request the specific missing information needed to resolve the ambiguity, rather than assuming the customer's intended appointment time or restarting the booking process. Conversation Routing & Context Management Clarity, Conciseness & Tone
Business-Rule Violation “I'd like to book for Sunday.” “10 AM Eastern.” A request outside the studio's operating schedule. Identify the invalid appointment date or time, explain the studio's operating hours, and request an alternative scheduling detail before proceeding with the booking. Policy & Business-Rule Compliance Clarity, Conciseness & Tone
Appointment Availability Conflict A requested appointment interval overlaps with an existing Google Calendar event. Inform the customer that the requested time is unavailable, request an alternative date or time, and recheck calendar availability before proceeding to appointment confirmation. Policy & Business-Rule Compliance Conversation Routing & Context Management
FAQ During an Active Booking “What is your cancellation policy?” Asked while Maya is collecting appointment details. Invoke the FAQ playbook, provide a grounded response, preserve collected booking parameters, and return to the interrupted booking step without requiring the customer to restart. Source Grounding & Accuracy Conversation Routing & Context Management
Insufficient Knowledge Retrieval A studio-related question for which the knowledge base contains no relevant information. Acknowledge that the requested information is unavailable without inventing an answer or requesting unnecessary clarification. Complete the FAQ playbook and resume the active booking step when applicable. Source Grounding & Accuracy Conversation Routing & Context Management Clarity, Conciseness & Tone
Backend or API Failure A webhook, Application Integration, or Google Calendar operation fails or does not return a successful result. Communicate the temporary inability to complete the requested operation, provide an appropriate recovery option, and avoid confirming an appointment unless successful calendar event creation has been established. Policy & Business-Rule Compliance Conversation Routing & Context Management Clarity, Conciseness & Tone
Booking Abandonment “Stop booking.” “I've changed my mind.” Respect the customer's decision, discontinue the booking process, reset abandoned booking state as appropriate, and prevent appointment creation without explicit confirmation. Conversation Routing & Context Management Policy & Business-Rule Compliance
Session Inactivity The customer leaves an incomplete booking conversation inactive beyond the configured 30-minute conversation session TTL. Allow the conversation session to expire and prevent expired booking state from being treated as an active appointment request when the customer returns. The current implementation uses passive session expiration rather than proactive inactivity notifications. Conversation Routing & Context Management Policy & Business-Rule Compliance
Human Assistance Request “Can I speak to someone?” A request requiring assistance beyond Maya's supported capabilities. Acknowledge the request and provide the studio's documented contact information as an alternative resolution path. The current implementation provides contact information rather than a direct in-channel transfer to a human agent. Clarity, Conciseness & Tone Source Grounding & Accuracy

This matrix defines expected recovery behavior and applicable evaluation criteria. It does not represent scored test results or imply that every recovery scenario has completed formal evaluation.


Planned Recovery & Escalation Enhancements

Maya's current recovery mechanisms provide context-aware reprompting, business-rule validation, knowledge-boundary handling, session expiration, and alternative contact options. The following enhancements represent opportunities to further improve conversational resilience and customer experience.

Progressive Fallbacks

Introduce increasingly specific recovery prompts after repeated unsuccessful interactions, progressing from simple clarification to additional examples, supported options, or alternative resolution paths.

Configurable Retry Thresholds

Track consecutive unsuccessful recovery attempts and introduce configurable retry limits, such as three consecutive unsuccessful attempts, before offering an alternative resolution path rather than continuing repetitive reprompts.

Proactive Inactivity Handling

Introduce inactivity-aware messages that give customers an opportunity to resume an unfinished booking or acknowledge session expiration before starting a new conversation.

In-Channel Human Escalation

Extend the existing alternative contact options to support direct human-agent handoff where appropriate, with relevant conversation context transferred to minimize repeated questions and customer effort.

These enhancements represent proposed future capabilities and are not part of Maya's currently deployed functionality.

Proposed Recovery Quality Indicators

The following proposed quality indicators provide a framework for measuring recovery effectiveness, establishing baseline performance, and assessing the impact of future enhancements on customer experience.

Repeated Fallback Frequency
Frequency of consecutive unsuccessful recovery attempts within a conversation.
Recovery Success Rate
Percentage of recoverable conversational breakdowns that return the customer to a valid conversation path.
Customer Effort
Additional conversational turns and repeated information required to recover from an error or interruption.
Post-Failure Abandonment
Percentage of conversations that end without task completion following a recovery attempt.
Escalation Appropriateness
Percentage of evaluated escalation decisions that align with defined escalation criteria and customer needs.

Proposed measurement framework. No measured values are reported for these indicators.


Recovery & Escalation Decision Logic

The following diagram illustrates the current recovery approach and its proposed extension into a progressive retry and escalation strategy. Solid borders represent current recovery mechanisms, while dashed borders identify planned enhancements.

Unexpected Input or Error A conversational breakdown, unsupported request, validation failure, or backend error.
Identify Failure Type Input ambiguity, scope limitation, insufficient knowledge, business-rule violation, or API failure.
Context-Aware Recovery Clarify, explain the limitation, provide an alternative, or repeat the pending booking question.
Recovery Successful? Can the customer's request or active conversation continue appropriately?
Yes — Successful Recovery
Resume Conversation Preserve valid context and continue the active booking step or complete the informational interaction.
No — Additional Assistance Needed
Current Recovery Options Reprompt when appropriate or provide alternative studio contact information when the request cannot be resolved.
Progressive Retry Offer more specific clarification, examples, or supported options. Planned enhancement
Retry Threshold Reached? Proposed configurable limit, such as three consecutive unsuccessful attempts. Planned enhancement
No ↻ Return to context-aware recovery using progressively more specific guidance.
Yes ↓ Offer an alternative resolution instead of continuing repetitive recovery attempts.
Alternative Resolution & Escalation Offer an appropriate alternative based on the customer's needs and the agent's capabilities.
Currently supported: Studio contact information.
Planned: Threshold-based escalation and direct human-agent handoff with relevant conversation context.
Current recovery design
Planned enhancements

This conceptual diagram combines existing recovery behavior with a proposed future retry and escalation framework. The planned retry logic and human-agent handoff are not currently implemented.


Recovery-Driven Quality Evaluation

Recovery and interruption scenarios extend evaluation coverage beyond factual accuracy and successful task completion. They help identify repetitive fallback patterns, unnecessary conversational turns, context loss, conversational dead ends, and transactional failures, providing actionable insights into conversational resilience, customer effort, and opportunities for targeted improvements and regression testing.

5. Agent & Visitor Personas: Behavioral Expectations & Evaluation Coverage

As part of Maya's conversation design, I defined her agent persona, behavioral boundaries, and representative visitor interaction patterns to establish consistent expectations for conversational quality, accuracy, tone, and recovery behavior.

These design decisions informed both conversation development and evaluation scenario creation, ensuring that Maya's performance could be assessed against realistic user goals, communication styles, and conversational challenges.


Maya's Agent Persona

Maya's persona establishes not only her personality and communication style but also her operational responsibilities, knowledge boundaries, and expected behavior throughout customer interactions.

Persona Attribute Design Definition & Behavioral Expectations
Role & Responsibilities A virtual front-desk assistant for Whispering Willow Studio, responsible for answering studio-related questions and guiding customers through the appointment booking process.
Personality Warm, calm, attentive, approachable, and professional, reflecting the welcoming atmosphere of a massage therapy studio.
Tone & Communication Style Friendly, conversational, clear, and concise. Provides sufficient information to answer customer questions and guide next steps without unnecessary explanations, repetition, or technical terminology.
Knowledge Boundaries Grounds informational responses in approved studio FAQ documentation, acknowledges when information is unavailable, never guesses appointment availability, and avoids unsupported medical or therapeutic claims.
Transactional Behavior Collects required appointment details, validates scheduling information against studio business rules, checks calendar availability, and obtains explicit customer approval before creating an appointment.
Conversational Flexibility Supports both direct booking requests and step-by-step conversations. Allows customers to ask questions, modify previously provided booking details, or stop the booking process while maintaining appropriate conversation context.
Recovery Behavior Responds politely to invalid, ambiguous, unsupported, or out-of-scope requests. Explains relevant constraints, provides actionable guidance, and resumes the appropriate booking step when applicable.

Visitor Personas & Behavioral Scenarios

I defined representative visitor interaction patterns based on customer goals, communication styles, and potential conversational challenges. These behavioral profiles informed the design of realistic evaluation scenarios covering both straightforward interactions and complex conversational variations.

Each profile is mapped to applicable dimensions of the quality evaluation rubric, connecting visitor behavior to specific expectations for agent performance.

These profiles are scenario-based behavioral personas developed for conversation design and evaluation purposes, rather than demographic personas validated through formal user research.

Visitor Persona Behavioral Characteristics Representative Utterances Expected Agent Behavior
Direct Booker Knows what type of massage they want and may provide several appointment details in a single message. “Book a deep tissue massage next Friday at 10 AM for 60 minutes.” “I'd like a Swedish massage tomorrow.” Recognize the booking intent, extract supplied appointment parameters, and request only the remaining required information.
Applicable Rubric Dimensions Conversation Routing & Context Management
Inquisitive First-Time Client Seeks information about massage services, pricing, therapist qualifications, or studio policies before deciding whether to book an appointment. “What's the difference between Swedish and deep tissue massage?” “How much does a 90-minute massage cost?” Provide accurate, grounded, and concise information without making unsupported recommendations or pressuring the visitor to book.
Applicable Rubric Dimensions Source Grounding & Accuracy Clarity, Conciseness & Tone
Mid-Flow Editor Changes previously provided appointment details during the booking process or final appointment review. “Actually, change the massage type to Swedish.” “Can we make it 2 PM instead?” Update the requested booking parameter, preserve unrelated valid information, revalidate scheduling details when necessary, and resume the appropriate booking step.
Applicable Rubric Dimensions Conversation Routing & Context Management Policy & Business-Rule Compliance
Cross-Time-Zone Visitor Provides an appointment time in a supported time zone other than the studio's local Pacific Time zone. “10 AM Eastern.” “I'd like to come in at 2 PM Central.” Correctly convert the requested time to Pacific Time, validate it against studio operating hours, and check availability for the corresponding appointment interval.
Applicable Rubric Dimensions Policy & Business-Rule Compliance
Mid-Booking FAQ Visitor Asks informational questions while completing a booking, including during appointment parameter collection or final review. “What is your cancellation policy?” “Where can I park?” Invoke the FAQ playbook, provide a grounded answer or appropriate no-answer response, preserve collected booking information, and return to the interrupted booking step.
Applicable Rubric Dimensions Source Grounding & Accuracy Conversation Routing & Context Management
Undecided Visitor Begins the appointment booking process but changes their mind, declines the proposed appointment, or decides not to complete the booking. “Actually, I don't want to book right now.” “Stop booking.” Respect the customer's decision, stop the booking process, reset abandoned booking state as appropriate, and avoid creating a calendar appointment without explicit approval.
Applicable Rubric Dimensions Conversation Routing & Context Management Policy & Business-Rule Compliance

Representative utterances illustrate potential evaluation inputs. The applicable rubric dimensions identify primary evaluation priorities rather than exhaustive scoring requirements for every interaction.


Persona-Driven Evaluation Coverage

Agent and visitor personas provide complementary inputs to evaluation scenario design. The agent persona defines expected conversational behavior, while visitor personas introduce realistic goals, communication patterns, interruptions, and edge cases.

Agent Persona Tone, responsibilities, knowledge boundaries, and behavioral expectations.
Visitor Personas User goals, communication styles, and conversational patterns.
Expected Agent Behavior Define appropriate responses, actions, conversational boundaries, and recovery behavior for each visitor scenario.
Evaluation Scenario Design Create realistic utterances, multi-turn test cases, conversational variations, and edge-case scenarios.
Rubric-Based Quality Assessment Assess observed agent behavior against predefined expectations and applicable quality evaluation dimensions.
Persona-driven evaluation connects human-centered conversation design with systematic AI quality assessment, supporting broader and more realistic evaluation coverage.

4. Hybrid System Architecture & Technical Decision Logic

I designed and implemented Maya's end-to-end hybrid architecture, combining deterministic state-machine logic, generative AI with retrieval-augmented generation (RAG), and cloud API orchestration across five interconnected system layers.

The architecture intentionally separates knowledge-based interactions from transactional operations, leveraging generative AI where conversational flexibility is valuable and deterministic logic where precision, predictability, and business-rule compliance are essential.

This separation supports independent evaluation of response accuracy, conversation routing, state management, validation logic, and backend execution, making quality failures easier to isolate, diagnose, and resolve.


Four Core Design Principles

Transactional Precision

Deterministic flows collect seven required booking parameters, validate scheduling details against Pacific Time business rules, and verify live calendar availability, reducing reliance on generative interpretation for transactional decisions.

Supports: Policy & Business-Rule Compliance

Grounded Knowledge

The FAQ Routine Playbook retrieves information from the indexed studio FAQ PDF, grounding responses about services, pricing, policies, and therapist credentials in approved documentation.

Supports: Source Grounding & Accuracy

Context Preservation

Mid-booking FAQ interruptions and parameter changes preserve previously collected valid booking information, allowing the conversation to resume at the appropriate step without unnecessary repetition.

Supports: Conversation Routing & Context Management; Clarity, Conciseness & Tone

Explicit User Control

Two explicit approval gates—appointment slot confirmation and final booking summary approval—combined with stop-booking and state-reset logic, are designed to prevent unintended Google Calendar writes and preserve customer control over transactional actions.

Supports: Policy & Business-Rule Compliance; Conversation Routing & Context Management

Five-Layer System Architecture

Each architectural layer has a distinct technical responsibility and corresponding quality evaluation focus, supporting targeted testing and more precise identification of system failures.

System Layer Component Technical Responsibility & Data Flow Quality & Evaluation Focus
1. Web Channel Squarespace + Dialogflow CX Messenger Renders the custom-styled widget, raises the welcome event, and manages the 30-minute conversation session TTL. Session lifecycle, welcome behavior, and interaction continuity.
2. Conversation & State Default Start Flow & Massage Booking Flow Routes booking and FAQ turns, extracts multiple details from a single utterance, manages mid-flow edits, preserves session parameters, and enforces two explicit user approval gates. Intent recognition, parameter extraction, routing accuracy, context preservation, and user approval.
3. Knowledge (RAG) FAQ Routine Playbook + Google Cloud AI Applications Data Store + Cloud Storage PDF Retrieves information from the indexed studio knowledge store, delivers grounded responses or appropriate no-answer responses, and returns control to the structured Dialogflow CX conversation flow. Retrieval relevance, factual accuracy, source grounding, hallucination prevention, and response boundaries.
4. Validation & APIs Flexible Webhooks + Google Cloud Application Integration

Connects four booking webhooks (Validate Appointment Date, Validate Business Hours, Check Availability, and Create Appointment) to backend operations.

Application Integration uses Jsonnet transformations to process scheduling data and normalize appointment intervals to UTC.

Input validation, time-zone accuracy, parameter mapping, business-rule compliance, and integration reliability.
5. Calendar Execution Google Calendar Connector Checks the normalized appointment interval for scheduling conflicts and creates a demo Google Calendar event after final user confirmation. Availability accuracy, conflict prevention, authorized transactional execution, and successful event creation.

End-to-End Architecture & Transactional Decision Logic

Squarespace + CX Messenger Customer interaction
Dialogflow CX Intent recognition & conversation routing
FAQ Request
Generative FAQ Routine Playbook + RAG
Knowledge Retrieval AI Applications Data Store + indexed studio FAQ PDF
Grounded Response or No-Answer Fallback Answer using approved knowledge or acknowledge unavailable information without making unsupported claims.
↩ Return control to CX
Resume the active booking prompt or review, when applicable.
Booking Request
Deterministic Booking Five required scheduling parameters
Validation & Availability Webhooks + Application Integration + Calendar conflict check
Approval Gate 1 Confirm available slot
Customer Information Collect customer name and email address
Approval Gate 2 Review and approve final booking summary
Application Integration Create Appointment
Google Calendar Authorized demo event creation
Declining or stopping a booking prevents calendar event creation. Scheduling changes trigger renewed validation and availability checks before final approval.
Generative / Calendar
Deterministic
User approval
Infrastructure

Architecture-Driven Quality Evaluation

The separation of generative, deterministic, and integration layers enables targeted evaluation and failure isolation. By distinguishing knowledge retrieval and response generation issues from intent recognition, session state, business-rule validation, and backend execution failures, I can identify root causes more precisely and implement targeted corrective actions and regression tests.

7. Automated Conversational Testing & Regression Testing

To expand evaluation coverage beyond manual testing, I used ChatGPT with browser automation to interact directly with Maya's deployed chatbot. Rather than manually scripting every conversation, I provided testing objectives, business constraints, and expected behaviors, allowing ChatGPT to generate realistic multi-turn test scenarios, execute them, and document observed outcomes.


Automated Testing Coverage

Test Category Evaluation Focus
End-to-End Booking Exercise realistic booking conversations using different massage types, durations, time zones, appointment details, and FAQ questions.
Mid-Conversation Corrections Systematically test modifications to all seven booking parameters across different conversation stages, verifying parameter accuracy, context preservation, scheduling revalidation, and final appointment summaries.
Repeated FAQ Interruptions Interrupt booking prompts with FAQ questions to evaluate transitions between deterministic booking flows and the generative FAQ playbook, followed by successful return to the pending booking step.
Negative-Path & Boundary Testing Evaluate out-of-scope requests, invalid appointment details, business-rule violations, unavailable time slots, and booking abandonment.

Automated Testing Campaigns & Results

The following provisional summary consolidates selected historical testing campaigns conducted during iterative development, including initial test executions and targeted retesting following corrective changes.

Testing Campaign Executed Passed Failed Partial
General booking and edge-case testing 20 19 1 0
Appointment time modifications 20 14 6 0
Parameter changes across booking stages 63 47 10 6
Retesting failed appointment time modifications 6 6 0 0
Fallback handling across booking fields 7 7 0 0
Provisional Total 116 93 17 6

Preliminary historical counts and classifications are subject to verification against original execution reports. Test executions include individual scenario checks and retests rather than exclusively unique end-to-end conversations. Pass, Fail, and Partial classifications reflect reported scenario outcomes rather than formal rubric-based scores.

Combined Reported Test Execution Results

Test executions 116
Passed 93
Passed 80.2% Failed 14.7% Partial 5.2%

Provisional historical results across different development stages, not the current deployed agent's pass rate. Percentages are rounded independently.


Sample Automated Test Findings

Automated testing helped identify subtle conversational and transactional failures beyond conventional happy-path testing. The following reported historical findings illustrate how unexpected agent behavior can be translated into actionable quality insights.

Customer Input or Action Unexpected Behavior Detected Quality Risk
Change the appointment date from December 8 to December 9. The appointment summary retained the original date. Incorrect appointment date.
Request to change an email address. Maya captured toavery.qa@example.com, incorrectly including part of the customer's instruction in the email address. Incorrect parameter extraction.
Change the full name to Harper Ellis. The appointment summary displayed only “Ellis.” Incomplete parameter extraction.
Modify scheduling details during final appointment review. Maya returned to availability confirmation without consistently presenting the updated appointment summary. Incomplete confirmation sequence.
“What is the weather like today?” Maya interpreted “today” as the requested appointment date instead of treating the message as an out-of-scope question. Unintended booking parameter modification.
Ask a pricing question during booking. Maya interpreted the question as an appointment duration selection instead of an FAQ. Intent misclassification.
Ask about deep tissue massage during appointment date collection. Maya repeated the pending appointment date question without answering the FAQ. Incorrect conversation routing.
Ask how to prepare for a massage during email collection. Maya returned to availability confirmation and subsequently required the customer to provide their email address again. Context loss and unnecessary customer effort.
Ask about rescheduling an appointment. Maya provided policy information but omitted the requested rescheduling instructions. Incomplete response.
Complete final appointment confirmation. Maya unexpectedly requested the customer's name again after booking confirmation. Incorrect conversation state transition.
Interrupt availability confirmation with an unsupported question. Maya's repeated confirmation prompt omitted the previously stated 60-minute appointment duration. Incomplete context-aware reprompting.
Submit an FAQ without a question mark. Maya repeated the pending booking question rather than recognizing and routing the FAQ. Inconsistent natural-language recognition.
Ask a question for which no relevant knowledge was retrieved. The FAQ playbook remained in a pending execution state instead of returning control to the interrupted booking flow. Incomplete generative task execution.

Historical findings from iterative development and testing, summarized rather than presented as verbatim transcripts. Individual examples are subject to confirmation against original testing records and do not necessarily reflect the current deployed agent's behavior.


Additional Multi-Turn Evaluation Coverage

Additional automated testing included repeated FAQ interruptions across multiple knowledge categories, verification of collected booking parameters against the final appointment summary, and successful demo appointment creation. Systematic parameter modification testing was designed to cover seven booking parameters across nine conversation stages.


AI Testing AI: Live Demonstration

The following video demonstrates ChatGPT autonomously interacting with Maya's deployed chatbot, introducing FAQ interruptions during an active booking conversation, and evaluating transitions between deterministic booking flows and the generative FAQ playbook.


Value of AI-Assisted Testing

AI-assisted testing expanded evaluation coverage without requiring manual scripting of every conversation. It helped uncover subtle parameter extraction errors, context management failures, routing inconsistencies, and transactional risks that conventional happy-path testing could overlook. These findings informed targeted corrective changes and regression testing while reducing the manual effort required to generate and execute diverse conversational scenarios.