File size: 10,953 Bytes
eb25711
 
 
 
 
 
 
 
2f80714
eb25711
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2f80714
eb25711
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2f80714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eb25711
 
 
2f80714
eb25711
 
 
 
 
 
 
 
 
 
 
2f80714
eb25711
 
 
 
 
 
 
 
 
 
 
 
 
 
2f80714
eb25711
 
 
 
2f80714
eb25711
 
 
 
 
 
2f80714
eb25711
 
 
 
 
2f80714
 
 
 
 
 
 
 
eb25711
 
 
 
 
 
 
 
 
 
 
2f80714
 
 
 
 
 
eb25711
 
 
2f80714
eb25711
 
 
 
 
 
 
 
 
 
 
 
2f80714
eb25711
 
 
 
 
 
 
2f80714
 
 
 
 
 
 
 
 
 
 
 
eb25711
 
 
 
 
 
2f80714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eb25711
 
 
 
 
2f80714
eb25711
 
 
2f80714
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# πŸ₯ User Guide - Lifestyle Journey MVP

## 🎯 What is this application?

**Lifestyle Journey** is an intelligent medical assistant that helps you:
- 🩺 **Get medical consultations** for symptoms and health concerns
- πŸ’š **Develop personalized programs** for physical activity and nutrition
- πŸ“Š **Track progress** of your healthy lifestyle journey
- πŸ”§ **Customize AI behavior** with personalized prompts for coaching style
- πŸ”’ **Maintain privacy** - your data remains confidential and isolated

---

## πŸš€ Getting Started

### 1. **Launch the Application**
- Open the application in your browser
- You'll see a message about private session initialization
- Your data will be isolated from other users

### 2. **Your First Conversation**
Simply type your question in the text field and click "πŸ“€ Send"

**Example starter messages:**
- "Hello, I have a headache"
- "I want to start exercising"
- "How should I eat with diabetes?"
- "What exercises are good for elderly people?"

---

## πŸ’¬ Main Operating Modes

### 🩺 **Medical Mode**
**When activated:** For medical complaints, symptoms, health questions

**What it does:**
- Analyzes your symptoms
- Provides first aid recommendations
- Advises when to see a doctor
- Explains medical terms in simple language

**Example questions:**
- "I have chest pain"
- "Blood pressure 160/100, what should I do?"
- "Can I take aspirin for headaches?"

⚠️ **IMPORTANT:** For serious symptoms, the app will immediately advise you to see a doctor!

### πŸ’š **Lifestyle Coaching**
**When activated:** For questions about sports, nutrition, healthy lifestyle

**What it does:**
- Creates personalized workout programs
- Provides nutrition advice
- Considers your medical limitations
- Motivates and supports you
- **Can be customized** with your preferred coaching style

**Example questions:**
- "I want to lose 10 kg"
- "What exercises can I do with arthritis?"
- "How should I eat with hypertension?"
- "How much water should I drink daily?"

### πŸ”„ **Mixed Mode**
**When activated:** When you have both medical complaints and lifestyle questions

**Example:** "I want to exercise but my back hurts"

The app will first address the medical issue, then help with physical activity.

---

## πŸ”§ Customize Your AI Coach

### **What is Edit Prompts?**
**Edit Prompts** allows you to customize how the AI lifestyle coach behaves and responds to your questions. You can make it more motivating, conservative, or specialized for your needs.

### **How to access:**
1. Click the **"πŸ”§ Edit Prompts"** tab at the top
2. You'll see the current system prompt that controls AI behavior
3. Edit the text to match your preferences
4. Apply changes and test them in chat

### **Customization examples:**
- **Motivational Coach:** "Be energetic, use emojis, say 'You can do it!'"
- **Medical Conservative:** "Prioritize safety, give very gradual recommendations"
- **Senior-Friendly:** "Focus on fall prevention and low-intensity activities"

### **Important notes:**
- ⚠️ Changes apply **only to your current session**
- ⚠️ Changes are **lost when you close the browser**
- ⚠️ Always maintain **medical safety guidelines**
- βœ… Easy to **reset to default** if needed

### **How to use Edit Prompts:**

#### **Step 1: Open Edit Prompts**
- Click the **"πŸ”§ Edit Prompts"** tab
- View the current system prompt in the large text box

#### **Step 2: Customize**
- Modify the prompt text according to your needs
- Use the guidelines in the right panel as reference
- Focus on tone, style, and approach preferences

#### **Step 3: Apply and Test**
- Click **"βœ… Apply Changes"** to activate
- Click **"πŸ§ͺ Test"** for testing instructions
- Go to **"πŸ’¬ Patient Chat"** tab to try it out
- Test with: "I want to start exercising"

#### **Step 4: Control Buttons**
- **βœ… Apply Changes** - Activate your custom prompt
- **πŸ”„ Reset to Default** - Return to original behavior
- **πŸ‘οΈ Preview** - Check your changes before applying
- **πŸ§ͺ Test** - Get instructions for testing

### **Requirements for custom prompts:**
- Must return **valid JSON format** with message/action/reasoning
- Must include **medical safety** guidelines
- Must handle three actions: `gather_info`, `lifestyle_dialog`, `close`
- Should respond in the **same language** as the patient

---

## πŸ§ͺ Testing with Different Patients

### **What is this?**
In the "πŸ§ͺ Testing Lab" tab, you can load profiles of different patients to test functionality and your custom prompts.

### **Ready-made test patients:**
- **πŸ‘΅ Elderly Mary** - 76 years old, complex chronic conditions
- **πŸƒ Athletic John** - 24 years old, recovering from injury
- **🀰 Pregnant Sarah** - 28 years old, pregnancy with complications

### **How to use:**
1. Go to the "πŸ§ͺ Testing Lab" tab
2. Click on one of the buttons (e.g., "πŸ‘΅ Elderly Mary")
3. Chat will restart with the new patient
4. Now you can test different scenarios for this patient
5. **Perfect for testing custom prompts** with different patient types

### **Loading custom data:**
1. Prepare JSON files with medical data and lifestyle profile
2. Upload them via "πŸ“ Load Test Patient"
3. The app will validate files and create a new test patient

---

## βœ… Helpful Tips

### **πŸ’‘ How to get better responses:**
- **Be specific:** "Morning headache" is better than "feeling bad"
- **Provide context:** "I have diabetes and want to exercise"
- **Ask direct questions:** "How many times per week should I train?"
- **Customize AI style:** Use Edit Prompts to match your preferences

### **πŸ”’ Safety and Privacy:**
- Your data is not stored on servers
- Each session is isolated from other users
- **Custom prompts are private** to your session only
- All data is deleted when you close the browser

### **⚠️ Medical Safety:**
- The app does NOT replace doctor consultation
- For serious symptoms, always contact medical professionals
- Don't make important medical decisions without a doctor
- **Custom prompts cannot override medical safety** protocols

### **🎯 Lifestyle Tips:**
- Start with small steps
- Follow recommendations regarding your limitations
- Regularly update your progress
- **Experiment with different coaching styles** to find what motivates you

### **πŸ”§ Edit Prompts Best Practices:**
- **Start small:** Make minor changes to the default prompt first
- **Test thoroughly:** Always test changes with different questions
- **Keep safety:** Never remove medical safety instructions
- **Use Reset:** If something goes wrong, use "πŸ”„ Reset to Default"
- **Be specific:** Clear instructions give better results

---

## πŸ”§ Session Management

### **Main buttons:**
- **πŸ“€ Send** - Send message
- **πŸ—‘οΈ Clear Chat** - Clear conversation history
- **🏁 End Conversation** - End conversation and save progress
- **πŸ”„ Refresh Status** - Update system status information

### **Edit Prompts buttons:**
- **βœ… Apply Changes** - Activate your custom prompt
- **πŸ”„ Reset to Default** - Return to original AI behavior
- **πŸ‘οΈ Preview** - Review changes before applying
- **πŸ§ͺ Test** - Get testing instructions

### **Ending your session:**
1. Click "🏁 End Conversation" to save progress
2. Or simply close the browser - session will end automatically
3. **Note:** Custom prompts are lost when closing browser

---

## πŸ†˜ Frequently Asked Questions (FAQ)

### **❓ Why does the app switch between modes?**
The app automatically determines your question type and chooses the best response method.

### **❓ How does the app determine my medical limitations?**
You can tell the app about your conditions during conversation, and it will consider them in recommendations.

### **❓ What to do if the response is inaccurate?**
Clarify your question or provide more details. Try customizing the AI coaching style with Edit Prompts.

### **❓ Is it safe to share medical information?**
Yes, your data is processed locally and not shared with third parties.

### **❓ How to get help in an urgent situation?**
For serious symptoms, the app will advise you to immediately contact emergency services or a doctor.

### **❓ What if my custom prompt breaks the AI?**
Use the "πŸ”„ Reset to Default" button to immediately return to safe, working settings.

### **❓ Can other users see my custom prompts?**
No, your custom prompts are completely private to your session only.

### **❓ Why do my prompt changes disappear?**
Custom prompts are session-only for security. They reset when you close the browser.

### **❓ How do I make the AI more motivating?**
Use Edit Prompts to add instructions like "Be energetic, use positive emojis, motivate with phrases like 'You can do it!'"

---

## πŸ“ž Support

If you have questions or problems:
1. Try restarting the session with the "πŸ—‘οΈ Clear Chat" button
2. **If Edit Prompts cause issues:** Use "πŸ”„ Reset to Default"
3. Check that you're using a supported browser
4. Rephrase your question more specifically

---

## 🌟 Advanced Features

### **πŸ”§ Edit Prompts Examples**

#### **Motivational Coach:**
```
You are a super-energetic lifestyle coach who:
- Always uses positive emojis 🌟πŸ’ͺπŸš€
- Says "You can do it!" and "Fantastic!"
- Celebrates even small achievements
- Keeps patients motivated and excited
```

#### **Medical Conservative:**
```
You are a careful medical coach who:
- Prioritizes safety above all
- Explains medical principles clearly
- Gives very gradual recommendations
- Always mentions when to consult doctors
```

#### **Senior-Specialized:**
```
You are a coach for elderly patients who:
- Focuses on fall prevention
- Suggests low-impact activities
- Considers age-related limitations
- Emphasizes safety and gradual progress
```

### **πŸ§ͺ Testing Your Custom Prompts**

**Recommended test questions:**
- "I want to start exercising"
- "Give me nutrition advice"
- "I have [condition] but want to be active"
- "Help me lose weight safely"

**What to check:**
- Does the tone match your expectations?
- Are responses safe and appropriate?
- Does it handle medical limitations correctly?
- Is the JSON format working properly?

---

## 🌟 Successful Usage!

**Lifestyle Journey** is created to make health care simpler and more accessible. With the new **Edit Prompts** feature, you can now personalize your AI coach to match your preferred communication style and motivational needs.

**Remember:** This app is your assistant, but not a replacement for professional medical help. Always consult with a doctor for serious health problems.

🎯 **We wish you strong health and an active lifestyle!**

---

## πŸ”— Quick Navigation

- **πŸ’¬ Patient Chat** - Main conversation interface
- **πŸ”§ Edit Prompts** - Customize AI coaching style
- **πŸ§ͺ Testing Lab** - Test with different patient profiles
- **πŸ“Š Test Results** - View testing analytics
- **πŸ“– Instructions** - This guide

**Happy coaching!** πŸ₯πŸ’š