Author(s): Durga Prasad Amballa
Online symptom checkers have emerged as valuable tools for individuals seeking health advice and guidance. Powered by artificial intelligence (AI) algorithms, these symptom checkers aim to provide more accurate and personalized health assessments, directing users to the appropriate level of medical care. This study presents an innovative architecture that combines Vector Database (VDB), Faiss similarity search algorithm, and GPT (Generative Pre-trained Transformer) API to analyze user inputs, identify intents, and generate tailored responses. The proposed system leverages the power of VDB to store symptom and test data as embeddings, enabling efficient similarity searches. The GPT model is employed to analyze user inputs, determining whether the user is seeking symptom analysis, test suggestions, booking details, booking help, or general health queries. Based on the identified intent, the Faiss algorithm searches for relevant tests and returns appropriate recommendations. The GPT model then generates personalized responses by considering the user's input, suggested tests, intent, and a summary of the chat history. The chatbot also incorporates a memory mechanism to store conversation summaries, providing context for subsequent interactions. Experimental results demonstrate the effectiveness of the proposed architecture in delivering accurate and context-aware health advice, guiding users to the most suitable medical care options. This study highlights the potential of AI-powered online symptom checkers in improving healthcare accessibility, reducing unnecessary medical visits, and empowering individuals to make informed decisions about their health.
The growing availability of online health information has empowered individuals to take a more proactive role in managing their health. Online symptom checkers have emerged as popular tools that allow users to input their symptoms and receive guidance on potential causes and appropriate actions [1]. These symptom checkers aim to bridge the gap between self-diagnosis and professional medical advice, helping users make informed decisions about their health [2].
Traditional online symptom checkers often rely on rule-based algorithms and pre-defined decision trees, which can lead to generic and sometimes inaccurate advice [3]. These systems may struggle to capture the nuances and complexity of individual health situations, resulting in misdiagnosis or inappropriate recommendations [4]. Moreover, traditional symptom checkers often lack the ability to provide personalized and context-aware guidance, as they do not consider the user's medical history, demographics, or specific concerns [5].
Artificial Intelligence (AI) has the potential to revolutionize online symptom checkers by enabling more accurate, personalized, and context-aware health advice [6]. AI algorithms can analyze vast amounts of medical data, learn patterns, and make intelligent inferences based on user inputs [7]. By leveraging advanced techniques such as natural language processing, machine learning, and knowledge representation, AI-powered symptom checkers can provide more reliable and tailored guidance to users [8].
The primary objective of this study is to propose an innovative architecture for AI-powered online symptom checkers that combines Vector Database (VDB), Faiss similarity search algorithm, and GPT (Generative Pre-trained Transformer) API to enhance the accuracy and effectiveness of health advice. The specific contributions of this study are as follows:
Figure 1: Chatbot application on User mobile to give input symptoms
Online Symptom Checkers
Online symptom checkers have been the subject of numerous studies in recent years. Semigran et al. evaluated the accuracy of 23 online symptom checkers and found that they provided the correct diagnosis as the first result in 34% of cases and within the top three results in 51% of cases [9]. The study highlighted the need for improvements in the accuracy and usability of these tools.
AI has shown promising results in various healthcare applications, including disease diagnosis, treatment recommendation, and patient monitoring [10]. Deep learning techniques have been employed to analyze medical images, such as X-rays and CT scans, for accurate diagnosis [11]. Natural language processing has been used to extract relevant information from electronic health records and generate clinical notes [12].
Vector databases have emerged as powerful tools for storing and searching high-dimensional data, such as text embeddings [13]. These databases enable efficient similarity searches, allowing for quick retrieval of relevant information based on semantic similarity [14]. Faiss, a library developed by Facebook AI Research, has gained popularity for its fast and scalable similarity search capabilities [15].
GPT for Natural Language Understanding and Generation GPT (Generative Pre-trained Transformer) models have revolutionized natural language processing tasks, including text understanding and generation [16]. These models have been pre-trained on large corpora of text data and can be fine-tuned for specific tasks, such as intent identification and response generation [17]. GPT models have shown impressive results in various conversational AI applications, including chatbots and virtual assistants [18].
The proposed AI-powered online symptom checker consists of the following components:
Vector Database (VDB): The VDB stores symptom and test data as high-dimensional embeddings. Each symptom and test is represented as a dense vector in the database, enabling efficient similarity searches.
Faiss Similarity Search: The Faiss library is utilized to perform fast and accurate similarity searches on the VDB. Given a user's input symptoms, Faiss retrieves the most relevant tests based on semantic similarity.
GPT Model: The GPT model is employed for two main tasks: intent identification and response generation. The model analyzes the user's input to determine the intent, such as symptom analysis, test suggestions, booking details, booking help, or general health queries. Based on the identified intent, the GPT model generates personalized responses, considering the user's input, suggested tests, and a summary of the chat history.
Chatbot Interface: The chatbot interface allows users to interact with the symptom checker through natural language conversations. The interface displays the generated responses and provides a user-friendly experience.
Figure 2: System Architecture Diagram
Symptom and Test Data: A comprehensive dataset of symptoms and their associated tests is collected from reliable medical sources. Each symptom and test is represented as a text description.
Embedding Generation: The text descriptions of symptoms and tests are converted into high-dimensional embeddings using a pre-trained language model, such as BERT (Bidirectional Encoder Representations from Transformers) [19]. These embeddings capture the semantic meaning of the symptoms and tests, enabling accurate similarity searches.
Vector Database Population: The generated embeddings are stored in the VDB, along with their corresponding symptom and test information. The VDB is optimized for fast retrieval and similarity searches.
User Input Processing: The user's input is preprocessed by removing any special characters, converting to lowercase, and tokenizing the text.
Intent Classification: The preprocessed user input is passed through the GPT model, which has been fine-tuned for intent classification. The model predicts the user's intent based on the input text, such as symptom analysis, test suggestions, booking details, booking help, or general health queries.
Symptom Similarity Search: If the identified intent is symptom analysis or test suggestions, the user's input symptoms are converted into embeddings using the same pre-trained language model used for data preparation.
Faiss Similarity Search: The symptom embeddings are used to perform a similarity search on the VDB using the Faiss library. Faiss retrieves the top-k most similar tests based on the cosine similarity between the symptom embeddings and the test embeddings stored in the VDB.
Context Summarization: The chatbot maintains a summary of the conversation history, including the user's previous inputs, suggested tests, and generated responses. This summary serves as context for generating personalized responses.
GPT Response Generation: The GPT model takes the user's input, identified intent, suggested tests (if applicable), and the conversation summary as input. The model generates a personalized response based on this information, providing relevant advice, recommendations, or requested details.
User Interface: The chatbot interface displays the generated responses to the user in a conversational format. The interface allows users to input their queries and view the symptom checker's responses.
Conversation Summary: The chatbot stores a summary of the conversation history, including the user's inputs, suggested tests, and generated responses. This summary is updated after each user interaction and serves as input for subsequent response generation.
The proposed AI-powered online symptom checker was evaluated using a dataset consisting of 10,000 user queries related to various health concerns. The dataset included a diverse range of symptoms, medical conditions, and user intents. The queries were manually annotated with the corresponding intents and relevant tests for evaluation purposes.
The GPT model was fine-tuned for intent classification using the annotated dataset. The model achieved an accuracy of 95% in identifying user intents, demonstrating its effectiveness in understanding the purpose behind user queries.
The Faiss similarity search algorithm was evaluated based on the relevance of the suggested tests to the user's input symptoms. The top-5 suggested tests were compared against the manually annotated relevant tests for each query. The system achieved a mean average precision (MAP) of 0.87, indicating its ability to retrieve highly relevant tests based on symptom similarity.
Figure 3: Giving Test Suggestions and Analysis of the Symptoms Given by User
The quality of the generated responses was assessed through human evaluation. A sample of 500 user queries and their corresponding generated responses were randomly selected and evaluated by medical experts. The experts rated the responses on a scale of 1 to 5 based on their relevance, accuracy, and helpfulness. The system obtained an average rating of 4.2, suggesting that the generated responses were of high quality and provided valuable guidance to users.
A user study was conducted to evaluate the overall satisfaction with the AI-powered online symptom checker. A group of 100 participants interacted with the system and provided feedback through a survey. The participants rated the system on various aspects, including ease of use, accuracy of advice, and overall satisfaction. The system received an average satisfaction score of 4.5 out of 5, indicating a high level of user satisfaction.
Advantages of AI-Powered Online Symptom Checkers
The proposed AI-powered online symptom checker offers several advantages over traditional symptom checkers:
Improved Accuracy: By leveraging advanced AI techniques, such as GPT for intent identification and response generation, and Faiss for similarity search, the system provides more accurate and relevant health advice to users.
Personalization: The incorporation of conversation history and context summarization enables the system to generate personalized responses tailored to each user's specific needs and concerns.
Efficiency: The use of vector databases and efficient similarity search algorithms allows for fast retrieval of relevant tests and information, reducing response time and enhancing user experience.
Scalability: The system can handle a large volume of user queries and easily scale to accommodate growing demand, making it suitable for widespread deployment.
While the proposed system demonstrates promising results, there are some limitations that should be addressed in future work:
Domain Coverage: The current system relies on a curated dataset of symptoms and tests. Expanding the knowledge base to cover a wider range of medical conditions and specialties would enhance the system's utility.
Integration with Electronic Health Records: Integrating the symptom checker with electronic health records (EHRs) could provide a more comprehensive view of the user's medical history and enable more accurate and personalized recommendations.
Multilingual Support: Extending the system to support multiple languages would increase its accessibility and usability for a global audience.
Continuous Learning: Implementing mechanisms for continuous learning and updating the knowledge base based on user feedback and new medical information would ensure the system remains up-to-date and accurate.
In conclusion, this study proposes an AI-powered online symptom checker that combines Vector Database, Faiss similarity search algorithm, and GPT API to provide accurate and personalized health advice to users. The system demonstrates high accuracy in intent identification, relevance in test suggestions, and quality in response generation. The incorporation of conversation history and context summarization enables the generation of tailored responses, enhancing user satisfaction.
The proposed architecture highlights the potential of AI in revolutionizing online symptom checkers, improving healthcare accessibility, and empowering individuals to make informed decisions about their health. By guiding users to appropriate medical care, the system can help reduce unnecessary medical visits and alleviate the burden on healthcare systems.
However, further research is needed to address the limitations and extend the system's capabilities. Expanding the knowledge base, integrating with electronic health records, supporting multiple languages, and implementing continuous learning mechanisms are key areas for future work.
Overall, the AI-powered online symptom checker presents a promising approach to enhancing the accuracy and effectiveness of health advice provided to individuals through digital platforms. With continued advancements in AI and the integration of additional features, these symptom checkers have the potential to transform the way people access and interact with healthcare information, ultimately improving health outcomes on a global scale [20-26].
The authors would like to thank the participants in the user testing for their valuable feedback and contributions to this research.