<p>Chatbots have the potential to offer personalized responses and information to improve patients’ healthcare. However, contextual accuracy is critical because the lack of context awareness may endanger patients’ lives. This research addresses this issue by configuring the GPT-3.5-turbo language model, i.e. adjusting parameters, such as temperature and maximum token limit, and configuring with external knowledge bases using the retrieval-augmented-generation (RAG) approach, chain-of-thought (CoT) prompt engineering techniques using chains within the LangChain framework. We visualized and traced the results using the LangSmith platform, showing that all the chains and retrievers better understood the context. Our healthcare chatbot, intended for patients seeking personalized medical guidance before going to the doctor, was evaluated against ChatGPT using expert evaluation and meta-eval metrics. Evaluation results demonstrate that the proposed medical chatbot exhibits better contextual accuracy, conciseness, and coherence. Thus, this research highlights the potential of integrating the large language model techniques, with RAG, and prompt engineering, and also suggests the frameworks and evaluation methods for language model-based chatbots, to develop context-aware healthcare chatbots for personalized medical assistance.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Context-aware chatbot for personal healthcare assistance using LLMs and LangChain

  • Syeda Kaneez Fatima,
  • Shazia Arshad,
  • Muhammad Awais Hassan,
  • Faiza Iqbal,
  • Ayesha Altaf,
  • Iram Aziz,
  • Imran Ashraf,
  • Nagwan Abdel Samee

摘要

Chatbots have the potential to offer personalized responses and information to improve patients’ healthcare. However, contextual accuracy is critical because the lack of context awareness may endanger patients’ lives. This research addresses this issue by configuring the GPT-3.5-turbo language model, i.e. adjusting parameters, such as temperature and maximum token limit, and configuring with external knowledge bases using the retrieval-augmented-generation (RAG) approach, chain-of-thought (CoT) prompt engineering techniques using chains within the LangChain framework. We visualized and traced the results using the LangSmith platform, showing that all the chains and retrievers better understood the context. Our healthcare chatbot, intended for patients seeking personalized medical guidance before going to the doctor, was evaluated against ChatGPT using expert evaluation and meta-eval metrics. Evaluation results demonstrate that the proposed medical chatbot exhibits better contextual accuracy, conciseness, and coherence. Thus, this research highlights the potential of integrating the large language model techniques, with RAG, and prompt engineering, and also suggests the frameworks and evaluation methods for language model-based chatbots, to develop context-aware healthcare chatbots for personalized medical assistance.