You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/customization.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ The chat tab uses the approach programmed in [chatreadretrieveread.py](https://g
33
33
34
34
The `system_message_chat_conversation` variable is currently tailored to the sample data since it starts with "Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook." Change that to match your data.
35
35
36
-
### Ask approach
36
+
####Ask approach
37
37
38
38
The ask tab uses the approach programmed in [retrievethenread.py](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/app/backend/approaches/retrievethenread.py).
39
39
@@ -42,6 +42,33 @@ The ask tab uses the approach programmed in [retrievethenread.py](https://github
42
42
43
43
The `system_chat_template` variable is currently tailored to the sample data since it starts with "You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions." Change that to match your data.
44
44
45
+
#### Making settings overrides permanent
46
+
47
+
The UI provides a "Developer Settings" menu for customizing the approaches, like disabling semantic ranker or using vector search.
48
+
Those settings are passed in the "context" field of the request to the backend, and are not saved permanently.
49
+
However, if you find a setting that you do want to make permanent, there are two approaches:
50
+
51
+
1. Change the defaults in the frontend. You'll find the defaults in `Chat.tsx` and `OneShot.tsx` (for Ask). For example, this line of code sets the default retrieval mode to Hybrid:
2. Change the overrides in the backend. Each of the approaches has a `run` method that takes a `context` parameter, and the first line of code extracts the overrides from that `context`. That's where you can override any of the settings. For example, to change the retrieval mode to text:
64
+
65
+
```python
66
+
overrides = context.get("overrides", {})
67
+
overrides["retrieval_mode"] ="text"
68
+
```
69
+
70
+
By changing the setting on the backend, you can safely remove the Developer Settings UI from the frontend, if you don't wish to expose that to your users.
71
+
45
72
## Improving answer quality
46
73
47
74
Once you are running the chat app on your own data and with your own tailored system prompt,
0 commit comments