diff --git a/packages/webapp/src/i18n/tooltips.ts b/packages/webapp/src/i18n/tooltips.ts
new file mode 100644
index 00000000..d5fc5210
--- /dev/null
+++ b/packages/webapp/src/i18n/tooltips.ts
@@ -0,0 +1,33 @@
+// Keep values less than 20 words.
+// Don't add links to the tooltips.
+export const toolTipText = {
+ approaches: 'Retrieve first uses Azure Search. Read first uses LangChain.',
+ promptTemplate: "Allows user to override the chatbot's prompt.",
+ promptTemplatePrefix:
+ "Allows user to provide a prefix to the chatbot's prompt. For example, `Answer the following question as if I were in high school.`",
+ promptTemplateSuffix:
+ "Allows user to provide a suffix to the chatbot's prompt. For example, `Return the first 50 words.`",
+ retrieveNumber: 'Number of results affecting final answer',
+ excludeCategory: 'Example categories include ...',
+ useSemanticRanker:
+ 'Semantic ranker is a machine learning model to improve the relevance and accuracy of search results.',
+ useQueryContextSummaries:
+ 'Can improve the relevance and accuracy of search results by providing a more concise and focused summary of the most relevant information related to the query or context.',
+ suggestFollowupQuestions: 'Provide follow-up questions to continue conversation.',
+ retrievalMode:
+ "The retrieval mode choices determine how the chatbot retrieves and ranks responses based on semantic similarity to the user's query. `Vectors + Text (Hybrid)` uses a combination of vector embeddings and text matching, `Vectors` uses only vector embeddings, and `Text` uses only text matching.",
+ streamChat:
+ 'Continuously deliver responses as they are generated or wait until all responses are generated before delivering them.',
+};
+
+// beak: triangle color
+// beakCurtain: outer edge
+// calloutMain: content center
+// No style to control text color
+export const toolTipTextCalloutProps = {
+ styles: {
+ beak: { background: '#D3D3D3' },
+ beakCurtain: { background: '#D3D3D3' },
+ calloutMain: { background: '#D3D3D3' },
+ },
+};
diff --git a/packages/webapp/src/pages/chat/Chat.tsx b/packages/webapp/src/pages/chat/Chat.tsx
index b826ddc8..b49ed83d 100644
--- a/packages/webapp/src/pages/chat/Chat.tsx
+++ b/packages/webapp/src/pages/chat/Chat.tsx
@@ -5,6 +5,7 @@ import { SettingsButton } from '../../components/SettingsButton/index.js';
import { Checkbox, DefaultButton, Dropdown, Panel, SpinButton, TextField, TooltipHost } from '@fluentui/react';
import type { IDropdownOption } from '@fluentui/react/lib-commonjs/Dropdown';
import 'chat-component';
+import { toolTipText, toolTipTextCalloutProps } from '../../i18n/tooltips.js';
const Chat = () => {
const [isConfigPanelOpen, setIsConfigPanelOpen] = useState(false);
@@ -105,9 +106,8 @@ const Chat = () => {
onRenderFooterContent={() => setIsConfigPanelOpen(false)}>Close}
isFooterAtBottom={true}
>
-
+
{
/>
-
+
{
onChange={onRetrieveCountChange}
/>
-
+
-
+
{
onChange={onUseSemanticRankerChange}
/>
-
+
{
disabled={!useSemanticRanker}
/>
-
+
{
onChange={onUseSuggestFollowupQuestionsChange}
/>
-
+
{
onChange={onRetrievalModeChange}
/>
-
+
setIsConfigPanelOpen(false)}>Close}
isFooterAtBottom={true}
>
-
-
- {(approach === Approaches.RetrieveThenRead || approach === Approaches.ReadDecomposeAsk) && (
-
+
- )}
+
- {approach === Approaches.ReadRetrieveRead && (
- <>
-
+ {(approach === Approaches.RetrieveThenRead || approach === Approaches.ReadDecomposeAsk) && (
+
- >
+
)}
-
-
-
-
-
+ {approach === Approaches.ReadRetrieveRead && (
+ <>
+
+
+
+
+
+
+ >
+ )}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);