Our methodology centers on leveraging prompt engineering and knowledge graphs to develop a customized Conversational AI system - ADQueryAid. To integrate both user-specific details and specialized knowledge on ADRD, we employ plug-and-play (PnP) modules, enhancing ChatGPT's ability to comprehend and respond to users' unique situations. These PnP modules, structured as knowledge graphs and Internal file system, grant ChatGPT access to a wealth of context-specific and medical information, thereby refining its responses to cater to individual user needs and medical inquiries. Furthermore, we design interfaces that facilitate ChatGPT's interaction with external services and databases, expanding its capabilities to include real-time data retrieval, transaction processing, and access to specialized systems. Fig 1. shows the system architecture. In the following sections, we explain the details of each of the major system components.
System Design and Development. To materialize this vision, we undertook the development of ADQueryAid, employing a multi-faceted approach that encompasses knowledge foundation construction, user intent identification, response generation, and prototype implementation.
Knowledge Foundation Construction.ADQueryAid's effectiveness is rooted in its comprehensive knowledge foundation, which integrates structured and unstructured data to provide nuanced support for ADRD caregiving.
At the heart of ADQueryAid lies a meticulously structured knowledge graph, underpinned by a well-defined ontology (Figure 2). This ontology serves as the blueprint, defining the fundamental concepts and relationships that comprise the knowledge base. It outlines the various entities relevant to ADRD care, including patients, caregivers, symptoms, diagnoses, treatments, and best practices. Furthermore, it establishes the relationships between these entities, such as the association between patients and their caregivers, the progression of Alzheimer's stages, and the link between symptoms and their potential treatments.
This ontological framework is then instantiated with specific data, creating a rich and interconnected knowledge graph. Patient profiles encompass sociodemographic details, health information like Alzheimer's stage, and relevant capabilities. Caregiver profiles include educational backgrounds, schedules, and preferences, facilitating personalized support. The graph al
incorporates comprehensive ADRD-related data, encompassing diagnosis processes, treatment options, symptom descriptions, and best practices.
Complementing the knowledge graph is a vast repository of unstructured text documents from authoritative sources like the Alzheimer's Association. This repository contains care guides, practical resources, educational materials, and in-depth information on diagnosis and treatment, further enhancing the system's ability to provide comprehensive guidance.
ADQueryAid enhances the caregiving experience through two advanced knowledge retrieval mechanisms. The first mechanism, graph data retrieval, leverages the inherent structure of the knowledge graph for efficient and precise retrieval of information. Utilizing graph query languages like SPARQL or Cypher, ADQueryAid can quickly traverse the relationships between nodes and edges in the graph to pinpoint relevant information. This enables rapid response times for direct queries, a critical factor in real-time conversational AI. The interconnected nature of the knowledge graph is a key asset in this process. By exploiting these relationships, ADQueryAid can infer implicit connections between concepts, leading to more comprehensive and insightful responses. For example, a query about a specific Alzheimer's symptom could not only retrieve direct information about that symptom but also related information about potential causes, treatments, and management strategies, all linked within the graph.
The second mechanism, text data retrieval, employs a Retrieval-Augmented Generation (RAG) workflow to access unstructured text documents. This broadens the system's informational reach beyond the knowledge graph, enriching responses with contextually relevant and authoritative information from a vast repository. Powered by vector search technology, this approach understands and responds to complex queries, even when answers aren't readily available in structured data. By combining these retrieval mechanisms, ADQueryAid delivers a dynamic support system balancing efficiency and depth. Each interaction is personalized and contextually informed, drawing from both structured and unstructured knowledge sources. This ensures proactive, anticipatory guidance rooted in a thorough understanding of ADRD care.
User Intent Identification.ADQueryAid prioritizes accurate identification of caregiver intent within their queries, a crucial step towards personalized guidance. To achieve this, the system leverages both the structured ADRD
knowledge graph and the classification abilities of a large language model (LLM).
User input is enriched through contextualization against the knowledge graph, allowing the reasoning engine to collaborate with the prompt engine to refine the query and generate a more targeted prompt for the LLM. This process involves a multi-faceted analysis of the user's input:
- Knowledge Graph Alignment: Key concepts in the query are mapped to nodes and relationships within the ADRD knowledge graph. This allows the intent to be categorized into predefined areas such as diagnosis, treatment, definitions, symptoms, resources, and caregiving strategies.
- Targeted Clarification: ADQueryAid engages the user in further refining the query. Guided by the identified intent category, it strategically elicits additional details or presents clarifying options tailored to the domain knowledge.
We use prompt engineering to guide the LLM in asking these clarifying questions. For example, if a user asks, "Why is Alice acting so strange?", ADQueryAid might ask follow-up questions like:
- "Can you describe examples of Alice's 'strange' behavior? Does this involve memory problems, disorientation, or personality changes?"
- "Has Alice received a formal diagnosis of Alzheimer's disease or a related dementia?"
- "Is Alice currently taking medications?"
This dynamic refinement process uses the knowledge graph to disambiguate and categorize the caregiver's intent. By precisely characterizing the concern, ADQueryAid ensures that the LLM generates highly personalized and contextually relevant responses.
Response Generation.ADQueryAid generates precise and personalized responses through a sophisticated integration of knowledge graphs, prompt engineering, policy engines, and reasoning logic. The response generation hinges on sophisticated prompt engineering, where the system strategically crafts prompt that leverage its diverse knowledge sources to elicit the most relevant and informative responses from the LLM. This process seamlessly integrates knowledge graph data retrieval, RAG, conversation history, policy considerations, and reasoning logic.
Extracted entities and relationships from the knowledge graph are incorporated directly into the prompt. This provides the LLM with crucial context about the patient, caregiver, and ADRD-related concepts. For instance, if the query involves a specific symptom, the prompt would include details about the patient's diagnosis, stage of Alzheimer's, and relevant medical history. Information retrieved from the unstructured text repository via RAG is strategically woven into the prompt. This ensures that the LLM has access to the most up-to-date and comprehensive information on ADRD care, even if it's not explicitly captured in the structured knowledge graph.
Key points from previous interactions are summarized and included in the prompt. This allows the LLM to maintain context and generate responses that are coherent and relevant to the ongoing conversation. For instance, if the caregiver has previously expressed concerns about a particular behavior, the prompt would remind the LLM of this concern, ensuring that the response addresses it appropriately. The prompt explicitly instructs the LLM to adhere to the predefined policies governing the interaction. This ensures that the generated response is not only informative but also empathetic, safe, and culturally sensitive. For example, the prompt might direct the LLM to use simple language if the caregiver has limited health literacy or to prioritize safety concerns if the patient is at risk.
This interplay of components allows ADQueryAid to dynamically refine caregiver requests. Each interaction is informed, contextually relevant, and increasingly attuned to the caregiver's needs, ultimately improving the caregiving experience and patient outcomes.
The response generation process follows a structured path, represented by the conversational state tuple (q, c, k, p, h) → r, where:
q: The caregiver's immediate query.
c: Background information, including patient-specific details from the knowledge graph.
k: Relevant ADRD knowledge from the knowledge graph and external documents.
p: A set of predefined rules guiding the system's interactions, ensuring ethical standards and caregiving best practices.
h: Conversation history for seamless continuity.
r: The generated response, synthesizing the gathered information.
Key policies used in the system include goal orientation, brevity, language tailoring, iterative clarification, limits on follow-up questions, empathy, safety protocols, cultural sensitivity, a feedback mechanism, and resource provision.
For example, if a caregiver asks, "My mom is wandering at night," the system would consider:
q: "My mom is wandering at night."
c: Mom has mid-stage Alzheimer's, lives with caregiver, no recent medication changes.
k: ADRD knowledge graph provides information on wandering, risks, and management strategies.
p: Empathy, Safety, Resource Provision.
r: "Wandering can be concerning. Is your mom safe when this happens? I have some tips to minimize risk, I can email you the links to safety resource. Would you like strategies to help redirect her at night?"
Prototype Implementation.We developed the ADQueryAid prototype using OpenAI's API, specifically GPT-4 models, and the Python FAST API framework. Each GPT assistant was assigned a specific role and set of tasks, adhering to predefined policies. Neo4j was used to construct the knowledge graph, providing context for the assistants. Queries were facilitated through the Python FastAPI server, allowing efficient retrieval of relevant information. Conversation history was maintained in the form of thread messages, ensuring contextual continuity for personalized interactions. Unstructured data, such as Alzheimer's-related information and caregiving guidelines, was stored within the files section of the GPT assistant, complementing the structured knowledge from the graph. The frontend was developed using the Jinja2 template engine, creating a user-friendly interface for caregivers.
Evaluation Methodology. Ethics Approval: This study was reviewed and approved by the institutional review board of NDSU. The IRB Protocol number is IRB0005069. We employed a dual-pronged approach to evaluate ADQueryAid, ensuring a comprehensive assessment of its capabilities and usability.
First, we conducted scenario-based use case studies, simulating real-world caregiving situations to gauge the system's performance in addressing diverse challenges and information needs. By immersing ADQueryAid in these scenarios, we could observe its responses in context, assessing their accuracy, relevance, and overall effectiveness in meeting caregiver needs. This approach offered valuable insights into the system's strengths and weaknesses, guiding our refinement efforts.
The second evaluation approach involved a user study with 20 participants recruited from AD Advocacy and Support Groups. This study aimed to gather direct feedback from the target user base, ensuring ADQueryAid's relevance and effectiveness in real-world caregiving scenarios. Participants were asked to interact with both ADQueryAid and the base GPT-3.5 model in a blind, randomized fashion, meaning they were unaware of which system they were using during each interaction.
The study consisted of two phases:
- Interaction phase: Participants engaged in conversations with both AI systems, posing questions and seeking information relevant to their specific caregiving experiences. They were encouraged to explore various topics and functionalities of the systems to gain a comprehensive understanding of their capabilities and limitations.
- Feedback phase: Following their interactions, participants completed the Chatbot Usability Questionnaire (CUQ). This validated tool consists of sixteen balanced questions, eight positive and eight negative, designed to thoroughly assess different aspects of chatbot usability. The CUQ's specificity, balance, and scalability allowed for a nuanced evaluation, capturing subtleties that general usability questionnaires might miss.
The CUQ's balanced approach ensured a comprehensive evaluation of the user experience, encompassing both positive and negative aspects of usability. For instance, questions addressed the chatbot's personality, clarity of responses, ease of navigation, and ability to handle errors. This detailed feedback provided a holistic view of each system's strengths and weaknesses from the perspective of the end-users.
This blind comparison was instrumental in gathering unbiased feedback on ADQueryAid's performance compared to a widely-used conversational AI model. By analyzing both CUQ scores and qualitative feedback, we identified ADQueryAid's strengths and areas for improvement, directly informed by the experiences and needs of the target user group. This valuable data will guide future development and refinement efforts, ensuring ADQueryAid continues to evolve as a practical and user-friendly tool for ADRD caregivers.