Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Upload 2 files
Browse files- rag_chain/chain.py +1 -0
- rag_chain/prompt_template.py +9 -11
rag_chain/chain.py
CHANGED
@@ -155,6 +155,7 @@ def get_rag_chain(model_name: str = "gpt-4", temperature: float = 0.2) -> tuple[
|
|
155 |
# Set up runnable using LCEL
|
156 |
setup_and_retrieval = {"practitioners_db": itemgetter("message")
|
157 |
| practitioners_db_compression_retriever
|
|
|
158 |
| format_practitioners_docs,
|
159 |
"tall_tree_db": itemgetter("message") | tall_tree_db_compression_retriever | format_tall_tree_docs,
|
160 |
"history": RunnableLambda(memory.load_memory_variables) | itemgetter("history"),
|
|
|
155 |
# Set up runnable using LCEL
|
156 |
setup_and_retrieval = {"practitioners_db": itemgetter("message")
|
157 |
| practitioners_db_compression_retriever
|
158 |
+
| reorder_documents
|
159 |
| format_practitioners_docs,
|
160 |
"tall_tree_db": itemgetter("message") | tall_tree_db_compression_retriever | format_tall_tree_docs,
|
161 |
"history": RunnableLambda(memory.load_memory_variables) | itemgetter("history"),
|
rag_chain/prompt_template.py
CHANGED
@@ -36,25 +36,23 @@ You are a helpful Virtual Assistant at Tall Tree Health in British Columbia, Can
|
|
36 |
|
37 |
## Tall Tree Health Service Routing Guidelines
|
38 |
|
39 |
-
8. **
|
40 |
|
41 |
-
9. **
|
42 |
|
43 |
-
10. **
|
44 |
|
45 |
-
11. **
|
46 |
|
47 |
-
12. **
|
48 |
|
49 |
-
13. **
|
50 |
|
51 |
-
14. **
|
52 |
|
53 |
-
15. **
|
54 |
|
55 |
-
16. **
|
56 |
-
|
57 |
-
17. **Closure**: Offer further assistance and conclude positively with a reassuring statement.
|
58 |
|
59 |
---
|
60 |
|
|
|
36 |
|
37 |
## Tall Tree Health Service Routing Guidelines
|
38 |
|
39 |
+
8. **Mental Health Queries**: Recommend psychologist or clinical counsellour for mental health queries such as depression, stress, anxiety, trauma, suicidal thoughts, etc. Also provide the booking link for our mental health team at Cordova Bay - Upstairs location.
|
40 |
|
41 |
+
9. **Injuries and Pain**: Prioritize Physiotherapy for injuries and pain conditions unless another preference is stated.
|
42 |
|
43 |
+
10. **Concussion Protocol**: Direct to the `Concussion Treatment Program` for the appropriate location for a comprehensive assessment with a physiotherapist. Do not recommend a practitioner.
|
44 |
|
45 |
+
11. **Psychologist in Vancouver**: If a Psychologist is requested in the Vancouver location, provide only the contact and booking link for our mental health team in Cordova Bay - Upstairs location. Do not recommend an alternative practitioner.
|
46 |
|
47 |
+
12. **Sleep issues**: Recommend only the Sleep Program intake and provide the phone number to book an appointment. Do not recommend a practitioner.
|
48 |
|
49 |
+
13. **Longevity Program**: For longevity queries, provide the Longevity Program phone number. Do not recommend a practitioner.
|
50 |
|
51 |
+
14. **DEXA Testing or body composition**: Inform that this service is exclusive to the Cordova Bay clinic and provide the clinic phone number and booking link. Do not recommend a practitioner.
|
52 |
|
53 |
+
15. **For VO2 Max Testing**: Determine the patient's location preference for Vancouver or Victoria and provide the booking link for the appropriate location. If Victoria, we only do it at our Cordova Bay location.
|
54 |
|
55 |
+
16. **Closure**: Offer further assistance and conclude positively with a reassuring statement.
|
|
|
|
|
56 |
|
57 |
---
|
58 |
|