System Architecture and Capabilities
A Dialogue Manager is the user interface in this system architecture, just like other telehealth chatbots. In particular, it prompts the user to provide any missing information and confirms essential details, for example, by asking for the patient’s age or location when necessary. This approach is similar to existing AI assistants that collect patient data step by step. Our focus is on ensuring legal compliance. Using pattern matching or simple intent recognition, a lightweight Natural Language Understanding (NLU) component processes each word to extract key facts (such as age or issue type). The dialogue manager and NLU resemble typical healthcare chatbot pipelines that convert user input into structured data and guide the dialog flow.
Figure 1 illustrates the modular architecture of the proposed compliance-aware AI system. The framework consists of several components, including a dialogue manager for user interaction, a natural language understanding module for parsing input, a fuzzy inference engine for handling ambiguity, a compliance reasoner for legal rule evaluation, and an explanation module to deliver user-facing outputs. While the figure presents a complete system pipeline, this paper focuses primarily on the fuzzy reasoning mechanism—specifically, the use of membership functions and fuzzy rule evaluation to assess consent requirements under variable age thresholds and jurisdiction-specific legal rules.
The fuzzy inference engine handles all imprecise or incomplete inputs (Yorita et al., 2023). In natural language, people may say “almost 18” or “I’m seventeen and a half,” which do not map cleanly to a single number. The fuzzy engine interprets such expressions by assigning membership degrees to age categories. For example, we might define a fuzzy set “minor” that fully includes ages below 17 and a set “adult” for ages above 18, with a smooth transition in between. In our framework if the user says “17.5,” the system might compute a membership of 0.5 in “minor” and 0.5 in “adult.” This fuzzification process means mapping a crisp input to degrees of membership between 0 and 1.
To represent the semantic vagueness of age-related conditions, we define two fuzzy sets: minor and adult, each with linear membership functions. For example, the membership value of 17.5 is 0.5 in both sets, indicating semantic ambiguity. These values are then used in rule evaluations through fuzzy conjunctions, such as min(μ_minor, 1) when paired with crisp conditions like the patient’s location. This formalization enables reasoning over soft boundaries and avoids brittle binary thresholds.
Fuzzy logic is well-suited for such vagueness: it provides a mathematical way to represent imprecision and “degrees of truth”. In practice, the fuzzy engine evaluates linguistic terms and outputs fuzzy facts that carry these partial truth values. This is similar to how some conversational chatbots use fuzzy models to handle language ambiguity; for instance, Cleverbot incorporates fuzzy logic to manage uncertain conversational cues. In our system, the fuzzy output may prompt the bot to ask for clarification when a condition is only partially met (for example, “Are you at least 18 years old?”) rather than making a binary decision. The use of fuzzy membership allows the system to ask follow-up questions on borderline cases, preventing hasty compliance judgments when information is not clear.
The Compliance Reasoner is the core rule-based component that applies legal and policy rules to the collected information. It takes inputs from NLU and the fuzzy engine (for example, a partial age value) and uses rules from the knowledge base to infer what actions are legally required. Each rule is typically an “if–then” statement derived from regulations (for example, “if age < 18 and jurisdiction is Missouri and service is mental health, then parental consent is required”). During reasoning, fuzzy truth values are combined with crisp conditions: for instance, if the patient’s age is partly “minor” and partly “adult,” the rule may fire with intermediate strength. The reasoner essentially executes all applicable rules to compute a result (in classic fuzzy inference style). Based on this, it draws a conclusion such as “consent needed,” “consent not needed,” or a “borderline” situation. The system is designed so that a partially triggered rule will not immediately allow an action; instead, the assistant will advise caution and typically seek more precise data before finalizing a decision. This careful fuzzy inference ensures that legal logic is applied transparently (Reddy, 2022) and that uncertain cases are handled by engaging the user rather than failing silently.
To handle the inherent semantic vagueness in legal rules (Mukhopadhyay et al., 2025) based on age, we formally define two fuzzy sets—minor and adult—with corresponding membership functions. These membership functions represent mathematically how clearly a given age falls into each category. Specifically, the membership in the “minor” set is calculated as:
Similarly, the membership in the “adult” set is defined as:
While the value 18 is used in this paper for illustrative purposes, the age threshold can be flexibly adjusted based on state-specific legal requirements. For example, in Illinois, the consent age is 16 (World Population Review, n.d.), and the membership functions can be recalibrated accordingly. This ensures the framework remains jurisdiction-sensitive and adaptable across regions. These functions ensure a gradual, linear transition between the categories, rather than a sharp cutoff. For instance, if the patient states their age as 17.5, the system computes membership values of 0.5 for both (1) and (2). Once these fuzzy values are calculated, the compliance reasoner uses them to evaluate legal rules with fuzzy conjunctions (typically using the min operator). Consider a rule such as “If age is minor AND the state is Missouri, then parental consent is required.” Given a patient from Missouri whose stated age is 17.5, the rule’s activation strength is calculated as min(μ_minor(17.5), 1.0), which equals 0.5. Because the resulting truth value (0.5) indicates ambiguity rather than a clear truth or falsehood, the system avoids immediate binary judgment. Instead, the assistant issues a cautious response, such as asking the patient for clarification (“Are you definitely under 18?”) or explicitly communicating that parental consent is likely necessary but additional confirmation is recommended. This fuzzy inference logic allows the system to mimic nuanced human judgment, effectively navigating borderline legal scenarios without committing prematurely to rigid yes/no conclusions.
Finally, once a conclusion is reached, a simple Explanation module converts the logical outcome into human-readable text (e.g., “You are 17 and Missouri law requires a parent’s permission for counseling, so we cannot proceed without it”). An optional Suggestion module can offer alternatives (for example, “You could arrange for a guardian to join the session”). These modules are auxiliary but ensure the system provides clear guidance after reasoning.
Overall, the system uses a capability-oriented flow: the dialogue manager, NLU, fuzzy engine, and reasoner interact flexibly rather than in a rigid pipeline. For example, when the NLU detects ambiguity, control temporarily shifts to the fuzzy engine; after the reasoner decides, control returns to the dialogue manager to deliver the response. In this way, each module can be developed or improved independently, and the fuzzy logic at the center helps the assistant emulate human-like reasoning under uncertainty.
The modular design allows this compliance logic to be integrated into existing telehealth workflows. For instance, the fuzzy engine and compliance reasoner could be deployed as backend services or plugins alongside a patient intake chatbot or electronic health record system. They would receive patient information (age, location, service type, etc.) from the telehealth front end and return a compliance status or recommendation. Because the modules communicate via well-defined interfaces, a provider could attach them to any conversational interface (e.g., a messaging app, web form, or voice bot) without overhauling the system. This design makes augmenting current telehealth assistants with legal compliance checks straightforward: the assistant simply invokes the fuzzy compliance components whenever consent rules must be verified. The result is a telehealth application that gathers patient data and reasons with it, delivering immediate, explainable feedback on legal requirements and next steps.