emilevh/Thesis_chatbot_phase1_v1
0
π€ Emma: HAPA Behavioral Change Bot (Intake Phase)
This repository hosts a prototype AI-driven intake coach developed for a Masterβs Thesis in Biomedical/Behavioral Engineering. The bot, named Emma, is designed to conduct a structured health intake conversation based on the Health Action Process Approach (HAPA) framework.
π― Project Objective
The goal of this application is to automate the "Motivational Phase" of the HAPA model by gathering specific patient parameters. This data is used to build a dynamic User Profile (JSON), which serves as the foundation for personalized behavioral interventions.
Data Points Collected:
- Demographics: Name, Age, Gender, Income Level.
- Preferences: Exercise Duration and Intensity.
- Status: Current Fitness Level.
π οΈ Technical Architecture
This project utilizes a Dual-Agent Micro-service Architecture:
- Conversational Layer: A Large Language Model (Llama-3.1-8B-Instruct) acting as "Emma," using a warm and professional system prompt to guide the user.
- Extraction Layer: A hidden "Extractor Agent" that parses the conversation history in real-time to identify and structure user data into a standardized JSON schema.
- Frontend: Developed with Streamlit for a lightweight, reactive user experience.
- Backend: Hosted on Hugging Face Spaces using the Inference API for high-performance GPU processing.
π How to Use (For Evaluators/Experts)
- Start the Chat: Simply say "Hi" or "I'm ready to start."
- Natural Conversation: Answer Emma's questions naturally. You do not need to provide information in any specific order.
- Researcher Dashboard: Monitor the sidebar on the left. You will see the JSON User Profile update in real-time as Emma "learns" about the user.
- Export: Once all fields are collected, an "Intake Complete" notification will appear, allowing you to download the structured data
