Researchers at the University of Lübeck have established a comprehensive technical and regulatory blueprint demonstrating how organizations can build and operate large language model chatbots that remain compliant with strict legal standards. Published in Discover Artificial Intelligence by Ludwig Pechmann, Frederic Kanter, Christoph Aust, and Martin Leucker, the study addresses the core challenges that emerge when deploying generative conversational agents across real-world environments. The authors examine how technical chatbot construction, systematic software quality assurance, and legal accountability under European regulations intersect throughout the system lifecycle. To ground their architectural analysis in practical implementation, the investigators developed and evaluated an operational chatbot designed to answer queries regarding the university’s Master of Science program in Artificial Intelligence. This academic implementation, which centers on querying proprietary institutional information, serves as an empirical demonstration of how deliberate engineering decisions and governance workflows can keep an artificial intelligence system fully compliant with both the European Union Artificial Intelligence Act and data protection rules.
From a technical standpoint, the architectural foundation of the examined chatbot comprises three primary components: the client frontend, the application backend, and the underlying large language model. In the University of Lübeck case study, the user-facing interface was constructed as a web application utilizing the React.js framework alongside HTML and CSS, designed to deliver direct access while fulfilling statutory transparency mandates such as presenting automated system disclosures, privacy notices, and user rights interfaces. Behind this interface, backend orchestration was engineered using FastAPI in Python, interfacing directly with intermediate storage and retrieval mechanisms. Relational data are maintained using PostgreSQL, while high-dimensional text representations are indexed through the FAISS vector database. Although initial deployments leveraged commercial inference endpoints via OpenAI application programming interfaces, the research team actively advanced a self-hosted variant running Ollama on local hardware infrastructure. Migrating inference to on-premises hardware directly alters the regulatory perimeter, relocating computational processing into the institution’s immediate jurisdiction.
The execution flow within the backend follows a multi-stage pipeline designed to handle user requests while enforcing operational constraints prior to model interaction. When an inquiry is submitted through the frontend, the backend first performs an input validation routine to verify that the query pertains exclusively to the master’s degree curriculum and does not involve prohibited content. In the documented system, this validation step is operationalized through a secondary language model check evaluating whether the prompt matches the designated educational program. If the input is deemed valid, the system converts the query into an embedding and executes a similarity search against the FAISS vector database to retrieve relevant textual passages from university documentation. Through a retrieval-augmented generation workflow, these retrieved institutional texts, accompanied by system instructions emphasizing polite communication, enrich the prompt. This contextualized prompt is subsequently transmitted to the language model for synthesis, after which the generated response is inspected and delivered to the client application.
The paper stresses that expanding conversational systems into multimodal modalities such as spoken dialogue introduces profound legal ramifications under European privacy jurisprudence. Speech-enabled chatbots and voice assistants process acoustic signals that qualify as biometric data under Article 4(14) of the General Data Protection Regulation whenever signals are used to uniquely identify a natural person. Such processing converts user speech into special category data governed by Article 9, which imposes strict prohibitions unless a specific exemption under Article 9(2) applies. Because contemporary acoustic models can derive identifiable features and biometric templates from raw audio streams, developers must implement strict purpose limitations to prevent unintended biometric processing. Voice-enabled systems must ensure that no biometric templates or voiceprints are generated without valid legal grounds. Furthermore, cross-border architectures distributing users, frontends, vector databases, and inference servers across international borders create complex multi-jurisdictional obligations under divergent data protection laws that cannot be treated as secondary implementation issues.
To assure dependable performance, the authors analyze how software engineering standards can accommodate the non-deterministic nature of generative models. Classical software components can be evaluated using the ISO/IEC 25000 series, specifically leveraging ISO/IEC 25010 for quality models, ISO/IEC 25023 for metrics, ISO/IEC 25030 for requirements, and ISO/IEC 25040 for evaluation processes. However, conventional testing methods like static analysis cannot fully govern machine learning pipelines whose outputs vary based on probabilistic sampling, contextual retrieval shifts, and training cut-offs. Consequently, existing quality criteria must be expanded to encompass artificial intelligence dimensions such as fairness, robustness against adversarial inputs, explainability, and post-market drift. The authors incorporate complementary guidance from ISO/IEC TR 24028:2020 on artificial intelligence trustworthiness, the Organization for Economic Cooperation and Development principles revised in 2024, the international ISO/IEC 42001 quality management framework, and the CRISP-PCCP methodology originally created for predetermined change control plans in artificial intelligence medical devices.
The regulatory framework outlined in the study demonstrates that legal compliance functions as a cumulative, multi-layered assessment rather than an isolated classification. Depending on the deployment domain, developers must navigate sector-specific legislation alongside horizontal digital regulations. For instance, deploying a conversational assistant within healthcare for diagnosis or triage can classify the software as a medical device under the European Union Medical Device Regulation, triggering mandatory ISO 13485 quality management, ISO 14971 risk controls, and clinical evaluations. Similarly, systems interacting with connected wearable products trigger obligations under the Data Act, while platforms operating individual user profiles fall under the Digital Services Act. Across general applications, horizontal legislation like the Artificial Intelligence Act and the General Data Protection Regulation establishes mandatory benchmarks for transparency, fairness, and data minimization. Because technical architectural decisions dictate statutory obligations, legal compliance must be embedded directly into system design from inception rather than audited retrospectively.
Under the European Union Artificial Intelligence Act, statutory duties are assigned through a tiered, risk-based classification scheme encompassing minimal risk, transparency risk, high-risk, and prohibited systems. General-purpose artificial intelligence models, including the foundational large language models powering conversational tools, are treated as technology-neutral at their base level and do not automatically carry a high-risk designation. Instead, regulatory obligations depend upon the specific downstream implementation, functional purpose, and deployment context. The regulation establishes distinct legal roles across the value chain, differentiating between upstream model providers and downstream system deployers. Under Article 3, the University of Lübeck acts as a deployer when utilizing the chatbot under its authority, while also qualifying as a downstream system provider because it develops, configures, and operates the application under its institutional name. Furthermore, Article 25 dictates that deployers or integrators who substantially modify, rebrand, or repurpose an existing system for sensitive functions may assume full provider responsibilities, demonstrating how regulatory duties evolve dynamically.
A central objective of the University of Lübeck project was to deliberately design the academic chatbot so that it remained outside the high-risk classifications defined in Annex III of the Artificial Intelligence Act. Although Annex III covers artificial intelligence deployed in education and vocational training, that designation specifically targets systems that evaluate academic performance, assess applicants, rank students, determine eligibility, allocate educational resources, or influence admission decisions. The AI Master Chatbot excludes all such evaluative capabilities. The software does not inspect applicant files, access examination records, evaluate academic qualifications, or formulate admission recommendations. Its operational scope is strictly restricted to disseminating non-binding, general information regarding curriculum structure, formal application prerequisites, and administrative deadlines. Users requiring binding administrative decisions are directed to contact human program coordinators. Because the chatbot performs no evaluative or resource-allocating functions, it is classified as a transparency-risk system, subject primarily to Article 50 disclosure mandates requiring clear notification that users are interacting with an artificial intelligence agent.
In parallel with product safety rules, the General Data Protection Regulation applies whenever conversational interactions involve personal information. To reduce regulatory burdens, the university implemented an architectural strategy centered on strict data minimization rather than an assumption that privacy laws are inapplicable. The chatbot operates without user accounts, authentication logins, tracking mechanisms, individual profiling, or conversational history storage. Upfront interface notices explicitly direct visitors not to input personal information, and any incidental data submitted in free-text prompts is processed transiently in temporary memory solely to generate responses before being permanently discarded without retention for profiling or model training. Under Article 6, the primary legal basis for processing incidental submissions within this educational mandate is Article 6(1)(e) for public tasks. Relying on legitimate interests under Article 6(1)(f) is generally unavailable to public authorities performing official duties, while user consent under Article 6(1)(a) cannot serve as a reliable legal foundation within university administrative communication structures.
To verify that operational behavior strictly aligned with governance goals, the authors instituted a formalized risk assessment and behavioral testing methodology. Utilizing a two-dimensional risk evaluation model aligned with ISO 31000 and the NIST Artificial Intelligence Risk Management Framework, hazards were scored by multiplying severity across four levels by probability across four levels. Any calculated risk score exceeding an acceptable threshold of six triggered mandatory technical mitigation measures. Where commercial application programming interfaces transmit free-text prompts to United States infrastructure, international transfers under Chapter V were verified through certification under the EU-U.S. Data Privacy Framework or Standard Contractual Clauses accompanied by documented Transfer Impact Assessments. Finally, empirical validation protocols subjected the chatbot to extensive testing across four core categories: general informational accuracy benchmarked against official university sources under ISO/IEC 25000 functional suitability, bias and non-discrimination handling when challenged with prejudiced prompts, detection and rejection of illegal requests, and resilience against abusive exploitation beyond designated educational boundaries.
Subject of Research: Regulatory compliance and software architecture for large language model chatbots
Article Title: Building regulation-compliant chatbots
Article References: Pechmann, L., Kanter, F., Aust, C., & Leucker, M. (2026). Building regulation-compliant chatbots. Discover Artificial Intelligence, 6(1), Article 1987. https://doi.org/10.1007/s44163-026-02749-0
Image Credits: AI Generated
DOI: 10.1007/s44163-026-02749-0
Keywords: artificial intelligence, large language models, AI Act, General Data Protection Regulation, chatbot architecture, retrieval augmented generation, data minimization, software quality, ISO 25000, risk assessment, transparency risk, University of Lübeck, FAISS, FastAPI, data subject rights, cross-border data transfers, biometric data, prompt validation
Cite Scienmag News
Denise Maddox. (November 29, 2026). Study Outlines Architectural Framework for Building Regulatory Compliant AI Chatbots. Scienmag. https://scienmag.com/study-outlines-architectural-framework-for-building-regulatory-compliant-ai-chatbots/
Denise Maddox. "Study Outlines Architectural Framework for Building Regulatory Compliant AI Chatbots." Scienmag, 29 November 2026, https://scienmag.com/study-outlines-architectural-framework-for-building-regulatory-compliant-ai-chatbots/. Accessed 29 November 2026.
Denise Maddox. "Study Outlines Architectural Framework for Building Regulatory Compliant AI Chatbots." Scienmag. November 29, 2026. https://scienmag.com/study-outlines-architectural-framework-for-building-regulatory-compliant-ai-chatbots/








