Update README.md
#3
by pphuc25 - opened
README.md
CHANGED
|
@@ -109,11 +109,20 @@ That order matters. Weak personas produce fluent but empty outputs. Stronger per
|
|
| 109 |
```python
|
| 110 |
from datasets import load_dataset
|
| 111 |
|
|
|
|
| 112 |
ds = load_dataset("Meddies/meddies-persona-vie", split="train")
|
|
|
|
| 113 |
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
```
|
| 118 |
|
| 119 |
## Good fits
|
|
|
|
| 109 |
```python
|
| 110 |
from datasets import load_dataset
|
| 111 |
|
| 112 |
+
# Load the dataset
|
| 113 |
ds = load_dataset("Meddies/meddies-persona-vie", split="train")
|
| 114 |
+
p = ds[0]
|
| 115 |
|
| 116 |
+
# Injecting the persona into an LLM prompt
|
| 117 |
+
system_prompt = f"""
|
| 118 |
+
Act as a Vietnamese primary care doctor. Adapt your vocabulary to this patient:
|
| 119 |
+
|
| 120 |
+
- Patient: {p['demographics']['full_name']} ({p['demographics']['gender']}, {p['demographics']['province']})
|
| 121 |
+
- Background: {p['socioeconomic']['occupation']} (Health literacy: {p['healthcare_behavior']['health_literacy_level']})
|
| 122 |
+
- Chief Complaint: "{p['llm_fields']['chief_complaint']}"
|
| 123 |
+
"""
|
| 124 |
+
|
| 125 |
+
print(system_prompt)
|
| 126 |
```
|
| 127 |
|
| 128 |
## Good fits
|