From d264bdbae50a73014a4a5fb045b6db806d9fefaa Mon Sep 17 00:00:00 2001 From: Angel Lee Date: Fri, 27 Oct 2023 13:45:09 -0400 Subject: [PATCH 1/8] add Filter confidence score from Watson Discovery in core components --- docs/3-Create/Prepare/Core Components.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/3-Create/Prepare/Core Components.md b/docs/3-Create/Prepare/Core Components.md index c9214cb..e23571b 100644 --- a/docs/3-Create/Prepare/Core Components.md +++ b/docs/3-Create/Prepare/Core Components.md @@ -18,7 +18,7 @@ title: Core Components 1. [Create WatsonX custom extension](#3-create-watsonx-custom-extension) 1. [Configure WA action to integrate WatsonX Search using Watson Discovery](#4-configure-wa-action-to-integrate-watsonx-search-using-watson-discovery) 1. [Setup Watson Assistant](#3-setup-watson-assistant) -1. [WatsonX Customization](#customize-watsonx-actions) +1. [WatsonX Customization](#4-watsonx-customization) - Add source link to response - Configure model response by customizing prompt @@ -99,7 +99,7 @@ title: Core Components 1. We can customize the preview background to match any organization homepage by "Change background" -> "Enter Url" option -> "Continue" -> Enter website url. ------------------------ -### 4. WatsonX Customization +### 4. WatsonX Customization #### Add source link to response 1. To add source link to the response, We need to configure two actions. 1. Navigate to "Seach" action @@ -111,6 +111,17 @@ title: Core Components - In step 10, in bottom of the 'Assistant says' text box, type `For more information, click $source_url`, Enter. - Save, and Close. + +#### Filter confidence score from Watson Discovery +1. To access the confidence score of source link from watson discovery, we used expression such as`${step_474_result_2}.body.results[0].result_metadata.confidence` +1. We recommend setting a variable `confidence_score` to be used as a filter + 1. Navigate to "Seach" action + - step 5, click "set new value" within the set variable values section. + - click "New session variable" from the dropdown, input Name `confidence_score`, select `Number` for Type, click "Apply". + - in the text box after 'To', select "Expression" from dropdown, and input for example `${step_474_result_2}.body.results[0].result_metadata.confidence`. Click "Apply". + - Save, and Close. + 2. We could start setting conditions using `confidence_score` variable. + #### Configure model response by customizing prompt 1. When a user prompt Watson Assistant with keywords such as "answer in bullet points", we would like the model to output in bullet points format. This requires additional configuration in the "Generate Answer" actions. 1. Navigate to "Generate Answer" action From 5864460db656e8080ac44754a5f661b7dd92869b Mon Sep 17 00:00:00 2001 From: Angel Lee Date: Fri, 27 Oct 2023 14:10:42 -0400 Subject: [PATCH 2/8] add NeuralSeek Advanced Features --- docs/3-Create/Prepare/Optional/NeuralSeek.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/3-Create/Prepare/Optional/NeuralSeek.md b/docs/3-Create/Prepare/Optional/NeuralSeek.md index 9c7b908..52695d4 100644 --- a/docs/3-Create/Prepare/Optional/NeuralSeek.md +++ b/docs/3-Create/Prepare/Optional/NeuralSeek.md @@ -11,6 +11,7 @@ title: NeuralSeek - [Lite-WatsonX](#setup-NS-watsonx) - [Create NeuralSeek custom extension](#create-neuralseek-custom-extension) - [Create WA action to trigger NeuralSeek Search](#create-wa-action-to-trigger-neuralseek-search) +- [NeuralSeek Advanced Features](#neuralseek-advanced-features) ### Setup NeuralSeek and integrate with Watson Discovery @@ -77,5 +78,13 @@ credentials for LLM 1. "New Step". In the "And then" section, select "go to a subaction" -> select "NeuralSeek Search" in the dropdown options -> "Apply". 1. "Save" and "Close" +### NeuralSeek Advanced Features +- Enabled **Topic Continuity** through setting up session_id in WA: in the action step where we call out to use NeuralSeek extension, set parameters `user_session.system.session` To Text `context.system.session_id` +- Enabled **Consistent Answer Format** in through prompt Engineering + - Within NeuralSeek: navitage to Configure > prompt engineering > Enabled + - Enter `When possible, answer the question in bulleted list form.` +- Enabled **Searching in different collections** + - in the Watson Assistant action step where we call out to use NeuralSeek extension, set parameters *options.filter* To `collection_id:""` + ### References - [Integrate NeuralSeek with Watson Assistant and Watson Discovery](https://developer.ibm.com/tutorials/integrate-neuralseek-with-watson-assistant-and-watson-discovery/) \ No newline at end of file From dba1b4f91b036054e2105a82cbc325bf28f56182 Mon Sep 17 00:00:00 2001 From: Angel Lee Date: Fri, 27 Oct 2023 14:12:06 -0400 Subject: [PATCH 3/8] add NeuralSeek Advanced Features: how to find collection id --- docs/3-Create/Prepare/Optional/NeuralSeek.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/3-Create/Prepare/Optional/NeuralSeek.md b/docs/3-Create/Prepare/Optional/NeuralSeek.md index 52695d4..1527fa6 100644 --- a/docs/3-Create/Prepare/Optional/NeuralSeek.md +++ b/docs/3-Create/Prepare/Optional/NeuralSeek.md @@ -85,6 +85,7 @@ credentials for LLM - Enter `When possible, answer the question in bulleted list form.` - Enabled **Searching in different collections** - in the Watson Assistant action step where we call out to use NeuralSeek extension, set parameters *options.filter* To `collection_id:""` + - collection-id could be found in Watson Discovery: navigate to a collection and copy the url after `collections/` ### References - [Integrate NeuralSeek with Watson Assistant and Watson Discovery](https://developer.ibm.com/tutorials/integrate-neuralseek-with-watson-assistant-and-watson-discovery/) \ No newline at end of file From 23801830412c17d11e6882f5079de865786c0516 Mon Sep 17 00:00:00 2001 From: Angel Lee Date: Wed, 1 Nov 2023 12:55:06 -0400 Subject: [PATCH 4/8] update NeuralSeek Advanced Features --- docs/3-Create/Prepare/Optional/NeuralSeek.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/3-Create/Prepare/Optional/NeuralSeek.md b/docs/3-Create/Prepare/Optional/NeuralSeek.md index 1527fa6..f91413e 100644 --- a/docs/3-Create/Prepare/Optional/NeuralSeek.md +++ b/docs/3-Create/Prepare/Optional/NeuralSeek.md @@ -79,13 +79,18 @@ credentials for LLM 1. "Save" and "Close" ### NeuralSeek Advanced Features -- Enabled **Topic Continuity** through setting up session_id in WA: in the action step where we call out to use NeuralSeek extension, set parameters `user_session.system.session` To Text `context.system.session_id` -- Enabled **Consistent Answer Format** in through prompt Engineering - - Within NeuralSeek: navitage to Configure > prompt engineering > Enabled - - Enter `When possible, answer the question in bulleted list form.` +- Enabled **Topic Continuity** through setting up session_id in WA: in the action step where we call out to use NeuralSeek extension, set parameters `user_session.system.session` To Expression `$system.session_id` +- Prompt Engineering: + 1. Enabled **Consistent Answer Format** in through + - Within NeuralSeek: navitage to Configure > prompt engineering > Enabled + - Enter `When possible, answer the question in bulleted list form.` + 2. Lower variance - Enabled **Searching in different collections** - in the Watson Assistant action step where we call out to use NeuralSeek extension, set parameters *options.filter* To `collection_id:""` - collection-id could be found in Watson Discovery: navigate to a collection and copy the url after `collections/` +- Enable **multilingual capability**: set parameters *options.language* + - Spanish: `es` + - Match input: `xx` ### References - [Integrate NeuralSeek with Watson Assistant and Watson Discovery](https://developer.ibm.com/tutorials/integrate-neuralseek-with-watson-assistant-and-watson-discovery/) \ No newline at end of file From 9ab3348a6f4bad06e8bd10b13bb4084104be4005 Mon Sep 17 00:00:00 2001 From: Angel Lee Date: Wed, 1 Nov 2023 12:57:04 -0400 Subject: [PATCH 5/8] added Inactivity timeout --- docs/3-Create/Prepare/Core Components.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/3-Create/Prepare/Core Components.md b/docs/3-Create/Prepare/Core Components.md index e23571b..212a262 100644 --- a/docs/3-Create/Prepare/Core Components.md +++ b/docs/3-Create/Prepare/Core Components.md @@ -137,6 +137,10 @@ title: Core Components ("[INST] <>\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Be brief in your answers. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don’t know the answer to a question, please don’t share false information.\n<>\n\nGenerate the next agent response in bullet points by answering the question. You are provided several documents with titles. If the answer comes from different documents please mention all possibilities and use the titles of documents to separate between topics or domains. If you cannot base your answer on the given documents, please state that you do not have an answer.\n\n").concat(${passages}).concat("\n\n").concat(${query_text}).concat("[/INST]")``` - ![Customize WatsonX Prompt](https://github.com/ibm-client-engineering/solution-ithelpdesk-watsonx/tree/main/docs/3-Create/Customize_WatsonX_Prompt.png) +#### Inactivity timeout +- In Watson Assistant, navigate to Environments. +- Click on the "Settings" icon next to Draft environment +- Navigate to "Inactivity timeout" to set the timeout limit ------------------------ ## References - [Language Model Conversational Search starter kit](https://github.com/watson-developer-cloud/assistant-toolkit/tree/master/integrations/extensions/starter-kits/language-model-conversational-search) From 38981a811ee52f9156dd0237f31bade35b024938 Mon Sep 17 00:00:00 2001 From: Angel Lee Date: Wed, 1 Nov 2023 12:57:22 -0400 Subject: [PATCH 6/8] added Lendyr Steps to Deployment v1 --- docs/3-Create/Prepare/Optional/Lendyr.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/3-Create/Prepare/Optional/Lendyr.md b/docs/3-Create/Prepare/Optional/Lendyr.md index 58d9004..5d119b5 100644 --- a/docs/3-Create/Prepare/Optional/Lendyr.md +++ b/docs/3-Create/Prepare/Optional/Lendyr.md @@ -2,4 +2,14 @@ id: solution-prepare-optional-lendyr sidebar_position: 1 title: Lendyr ---- \ No newline at end of file +--- + +### Steps to Deployment +- In IBM Cloud, initiate a Kubernetes Services + - VPC +- URL and SSL certificate + - Create a link in a domain + - Enable the SSL Certificate +- Build Docker File +- Configure github Repo hosting +- Build CI/CD Pipeline \ No newline at end of file From 4a3b19345bcb601ae46c33e75732e44806cdb146 Mon Sep 17 00:00:00 2001 From: Angel Lee Date: Wed, 1 Nov 2023 13:19:38 -0400 Subject: [PATCH 7/8] Update serviceInstanceID and integrationID to connect to Watson Assistant --- docs/3-Create/Prepare/Optional/Lendyr.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/3-Create/Prepare/Optional/Lendyr.md b/docs/3-Create/Prepare/Optional/Lendyr.md index 5d119b5..f2d39a7 100644 --- a/docs/3-Create/Prepare/Optional/Lendyr.md +++ b/docs/3-Create/Prepare/Optional/Lendyr.md @@ -3,6 +3,11 @@ id: solution-prepare-optional-lendyr sidebar_position: 1 title: Lendyr --- +### Update serviceInstanceID and integrationID to connect to Watson Assistant +- In Watson Assistant, navigate to Integrations, and click "Open" for Web Chat, click "Confirm". +- Navigate to Embed tab and find the IDs for the following changes + - Use serviceInstanceID in `demoConstants.ts`. Change the `serviceInstanceID` for const DEMO_ASSISTANT + - Use integrationID in `enviornmentVariables.ts`. Change the `DEMO_ASSISTANT_INTEGRATION_ID` for case EnvironmentType.DEVELOPMENT ### Steps to Deployment - In IBM Cloud, initiate a Kubernetes Services @@ -11,5 +16,6 @@ title: Lendyr - Create a link in a domain - Enable the SSL Certificate - Build Docker File -- Configure github Repo hosting -- Build CI/CD Pipeline \ No newline at end of file +- Configure Github Repo hosting +- Build CI/CD Pipeline (Travis, Github Actions,...) + - set branches From 0263f4b7c9440f2b0a1dd6458f1e5d2b081e687c Mon Sep 17 00:00:00 2001 From: Angel Lee Date: Wed, 1 Nov 2023 13:51:16 -0400 Subject: [PATCH 8/8] added highlevel Lendyr Steps to Deployment --- docs/3-Create/Prepare/Optional/Lendyr.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/3-Create/Prepare/Optional/Lendyr.md b/docs/3-Create/Prepare/Optional/Lendyr.md index f2d39a7..8e09b0e 100644 --- a/docs/3-Create/Prepare/Optional/Lendyr.md +++ b/docs/3-Create/Prepare/Optional/Lendyr.md @@ -12,10 +12,21 @@ title: Lendyr ### Steps to Deployment - In IBM Cloud, initiate a Kubernetes Services - VPC +- In Kubernetes Services, Create a Namespace and Ingress + - Create a Namespace, e.g. `watson-assistant-` + - Ingress is a outside connection that takes you inside to a pod or a service + - Ingress is like a load balancer and where we map DNS entry to URL, and will forward any matching - URL and SSL certificate - - Create a link in a domain - - Enable the SSL Certificate + - Create a link in a domain that you own + - Attach the SSL Certificate + - note: the certificate should be good for 90 days + - Export the certificate as a secret into the Kubernetes Cluster - Build Docker File - Configure Github Repo hosting - Build CI/CD Pipeline (Travis, Github Actions,...) + - Travis File - set branches + +### IBM Cloud CLI +- Refer to [Getting started with the IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started) +- \ No newline at end of file