vania-janet/multiturn-rag-retrieval-data huggingface dataset:
For details about how to add a search skill response type, see [Adding rich responses](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-dialog-overviewdialog-overview-multimedia-add).

For more tips about improving results, read the [Improve your natural language query results from Watson Discovery](https://developer.ibm.com/blogs/improving-your-natural-language-query-results-from-watson-discovery/) blog post.







 Next steps 

After you create the skill, it appears as a tile on the Skills page.

The search skill cannot interact with customers until it is added to an assistant and the assistant is deployed. See [Creating assistants](https://cloud.ibm.com/docs/assistant-data?topic=assistant-data-assistant-add).



 Adding the skill to an assistant 

You can add one skill to an assistant. Open the assistant tile and add the skill to the assistant from there. You cannot choose the assistant that will use the skill from within the skill configuration page.

One search skill can be used by more than one assistant.



1. Click the Assistants icon ![Skills menu icon](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/nav-ass-icon.png) to open the Assistants page.

v1.3: Click the Assistants tab.
2. Click to open the tile for the assistant to which you want to add the skill.
3. Click Add Search Skill.
4. Click Add existing skill.

Click the skill that you want to add from the available skills that are displayed.



After you add a search skill to an assistant, it is automatically enabled for the assistant as follows:



* If the assistant has only a search skill, any user input that is submitted to one of the assistant's integration channels triggers the search skill.
* If the assistant has both a dialog skill and a search skill, any user input triggers the dialog skill first.
Replace https://mycluster.com/discovery/core with the URL you copied previously, so the new URL should look like this: https://mycluster.com/discovery/core/instances/00000000-0000-0000-0001-597165341876/collections/new?redirect_uri=...
7. Press enter to open updated URL. You should now be on the Watson Discovery Manage collections page.

<-- </ol> -->

<-- </ul> -->Also see the issues identified in all previous releases.<-- </section "id="section-19jun2020ki" "> --><-- <section "id="section-31mar2020ki" "> --> 2.1.2, 31 March 2020 <-- <ul> --> * When using passage retrieval with Korean, Polish, Japanese, Slovak or Chinese you may encounter much slower response times in this version. To resolve this, either disable passage retrieval, or upload a custom stopword list with words that are common in your documents (for example, prepositions and pronouns). See Defining stopwords]] for example stopword lists in several languages. Also see Stopwords ISO]] ] ) on GitHub. * [Update: fixed in version 2.1.3 In versions 2.1.2, 2.1.1, and 2.1.0, PNG, TIFF, and JPG individual image files are not scanned, and no text is extracted from those files. PNG, TIFF, and JPEG images embedded in PDF, Word, PowerPoint, and Excel files are also not scanned, and no text is extracted from those image files. * Smart Document Understanding does not support .doc, .docx, .odf, .xls, .xlsx, .ods, .ppt, .pptx, and .odp conversion when FIPS (Federal Information Processing Standards) is enabled. * In a Content Mining application, any document flags set will disappear if the index is rebuilt for that collection.
For more information about SDU, see [Using Smart Document Understanding](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-configuring-fields).
10. Click Manage fields.

The Manage fields page lists the indexed fields. From here, you can include or remove fields from the index. You can also split large documents into many smaller documents.

Zoom

![Shows the fields in the index.](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/gs-sample-field-index.png)

Figure 10. Fields in the collection index

For more information about splitting documents, see [Splitting documents to make query results more succinct](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-split-documents).







 Step 4: Search the sample project 



1. Click the Improve and customize icon from the navigation panel.

The Improve and customize page is where you can try out queries, then add and test customizations to improve the query results for your project. A list of sample queries is displayed to help you get started with submitting test queries.
2. Click the Run search button forIBM.

Query results are displayed.
3. From one of the query results, click View passages in document.

A preview of the document where the result was found is shown.
4. Do one of the following things to explore the search result.

IBM Cloud



1. Click Open advanced view.

Useful summary information is displayed, such as the number of occurrences of any enrichments that are detected in the document.
2. Select the URL entity to highlight mentions of URLs within the text.

Zoom

![Shows the advanced text view with URL entities highlighted.]
It is best to use a combination of documents from all of the data sources in both data sets to get the most comprehensive set of usage examples available from the industry literature. If the overall performances scores for a test run differ greatly from the training run, it might be due to inconsistencies in the data sets used for each.
* Don't waste time with incorrectly formatted documents. Text documents that you add to the corpus must be in UTF-8 format. If you converted document from other formats to use UTF-8 encoding, you might see diacritic marks and other issues with character normalization. Such incorrect formatting can lead to inaccurate token representation. If the word tokens used to represent a mention differ between documents, it weakens the example and negatively impacts machine learning.



* Add type-specific documents

If you have a low percentage of documents that contain a certain type, it might mean that your corpus is not fully representative. The machine learning model needs lots of examples to learn from. Adding more documents to the corpus might help. If your type system and documents are truly representative of a domain, you would expect to see that any randomly chosen documents contain a reasonable subset of the types. Although not true in all cases, this situation is a signal for you to investigate your type system and the quality of the documents in the corpus. You might need to find more domain documents that better exercise the types that are under-performing. If recall is low, it is often an indication that you need to add more documents.
* Annotate corpus more

If the machine learning model is having trouble finding instances of certain types then it might be because the ground truth does not contain enough examples of the type's usage. Human annotators can sometimes be thorough about labeling entity type mentions, but be less diligent about annotating relation types and coreferences. For any key types that have a low percentage of corpus density, you might want to focus on finding more annotations of those type in the source documents. But, don't worry too much about coreference and relation accuracy if mention accuracy is deficient. Relation mentions between entities and coreferences of entities cannot be accurate unless entity mentions are accurate to begin with.
* Fix human annotations
[Screen capture showing how to move or delete an example](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/move_example.png)







 Searching intents 

The search capability was introduced with the 1.5.0 release.

Use the Search feature to find user examples, intent names, and descriptions.



1. From the Intents page header, click the Search icon ![Search icon in the Intents page header](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/search_icon.png).
2. Submit a search term or phrase.

The first time you search for something, you might get a message that says the skill is being indexed. If so, wait a minute, and then resubmit the search term.

Intents that contain your search term are displayed.

![Shows the results from a search for intents](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/intent-search-results.png)







 Exporting intents 

You can export a number of intents to a CSV file, so you can then import and reuse them for another Watson Assistant application.



1. Go to the Intents page.



* To export all intents, meaning the intents listed on this and any additional pages, do not select any individual intents. Instead, click the Export all intents icon. !
------------------------------------ | ------------------------------------
Enterprise with Data Isolation | Last 90 days
Enterprise | Last 30 days
Premium (legacy) | Last 90 days
Plus | Last 30 days
Trial | Last 30 days
Lite | Last 7 days





 Filtering messages 

You can filter messages by Search user statements, Intents, Entities, and Last n days.

Search user statements - Type a word in the search bar. This searches the users' inputs, but not your assistant's replies.

Intents - Select the drop-down menu and type an intent in the input field, or choose from the populated list. You can select more than one intent, which filters the results using any of the selected intents, including Irrelevant.

![Intents drop-down menu](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/intents_filter.png)

Entities - Select the drop-down menu and type an entity name in the input field, or choose from the populated list. You can select more than one entity, which filters the results by any of the selected entities. If you filter by intent and entity, your results will include the messages that have both values. You can also filter for results with No entities found.

![Entities drop-down menu](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/entities_filter.png)





 Viewing individual messages 

For any user input entry, click Open conversation to see the user input and the response made to it by the assistant within the context of the full conversation.
Look for the value "true" in the Customizable column, and make sure the Source and Target languages of the model match your language pair.
* Alternatively, you can use the [List models](https://cloud.ibm.com/apidocs/language-translatorlistmodels) method to search models programmatically. You can filter results by language with the source and target parameters.









 Step 1: Create your training data 

The service supports two types of customization:



* Use a [forced glossary](https://cloud.ibm.com/docs/language-translator?topic=language-translator-customizingforced-glossary-customization) to force certain terms and phrases to be translated in a specific way.
* Use a [parallel corpus](https://cloud.ibm.com/docs/language-translator?topic=language-translator-customizingparallel-corpus-customization) when you want your custom model to learn from general translation patterns from parallel sentences in your samples. What your model learns from a parallel corpus can improve translation results for input text that the model hasn't been trained on.



To create a model that is customized with both parallel corpora and a forced glossary, proceed in two steps:



1. Customize with at least one parallel corpus file. You can upload multiple parallel corpus files with a single request. To successfully train with parallel corpora, all corpus files combined must contain at least 5000 parallel sentences. The cumulative size of all uploaded corpus files for a custom model is limited to 250 MB.
2. Customize the resulting model with a forced glossary. You can upload a single forced glossary file for a custom model. The size of a forced glossary for a custom model is limited to 10 MB.



You can store a maximum of 10 custom models for each language pair in a service instance.

The service supports multiple document formats for uploading training data. The following examples use Translation Memory eXchange (TMX), an XML-based specification for the exchange of translation memories.
Lengthy text is truncated but is displayed when you hover over the dictionary.
3. On the Settings tab under Extractor Properties, click Map Terms.
4. Complete the two-column table manually or by loading from a file. The first column contains the terms to search for in the text and the second column lists the values to generate in the results. The maximum length for an entry is 1024 characters. If a term is repeated in the first column, only the first mapped value is used.



* To specify the terms manually, click ![Add Term](https://cloud.ibm.com/docs-content/v1/content/50eddb8fd81f33092880335ff107a78ff5cd0f65/watson-knowledge-studio/images/add_term.jpg), enter the term and its mapped value, and press Enter.
* To load terms from an ASCII or UTF-8 text file with each term and its mapped value, separated by a single comma, on a separate line, click ![Import Terms](https://cloud.ibm.com/docs-content/v1/content/50eddb8fd81f33092880335ff107a78ff5cd0f65/watson-knowledge-studio/images/import_terms.jpg). If an error is displayed during the import, ensure that the file does not contain unprintable characters such as Line Feed or Backspace.











 Creating a literal 

For exact matches to a single term or phrase such as white-tailed deer or Congress use a literal.



1. Click the New Literal![New Literal](https://cloud.ibm.com/docs-content/v1/content/50eddb8fd81f33092880335ff107a78ff5cd0f65/watson-knowledge-studio/images/new_literal.png) icon on the canvas toolbar. This adds a new literal to the canvas.
2. In the new literal on the canvas, enter the string of text that you want to match.
See [Organizing the dialog with folders](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-tasksdialog-tasks-folders) for more details.
* Support was added for customizing how each dialog node participates in user-initiated digressions away from the designated dialog flow. See [Digressions](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-runtimedialog-runtime-digressions) for more details.



Search intents and entities
: A new search feature has been added that allows you to [search intents](https://cloud.ibm.com/docs/assistant?topic=assistant-intentsintents-search) for user examples, intent names, or descriptions, or to [search entity](https://cloud.ibm.com/docs/assistant?topic=assistant-entitiesentities-search) values and synonyms.

Content catalogs
: The new [content catalogs](https://cloud.ibm.com/docs/assistant?topic=assistant-catalogcatalog-add) contain a single category of prebuilt common intents and entities that you can add to your application. For example, most applications require a general greeting-type intent that starts a dialog with the user. You can add it from the content catalog rather than building your own.

Enhanced user metrics
: The Improve component has been enhanced with additional user metrics and logging statistics. For example, the Overview page includes several new, detailed graphs that summarize interactions between users and your application, the amount of traffic for a given time period, and the intents and entities that were recognized most often in user conversations.





 12 March 2018 

New date and time methods
: Methods were added that make it easier to perform date calculations from the dialog. See [Date and time calculations](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-methodsdialog-methods-date-time-calculations) for more details.





 16 February 2018 

Dialog node tracing
Test for the following possible causes of misinterpretation, and address them:



* Problem: The same entity is used in more than one slot.

For example, @sys-date is used to capture the departure date in one slot and arrival date in another.

Solution: Use slot found conditions that get clarification from the user about which date you are saving in a slot before you save it.
* Problem: A term fully or partially matches the entities in more than one slot condition.

For example, if one slot captures a product ID (@id) with a syntax like GR1234 and another slot captures a number (@number), such as 1234, then user input that contains an ID, such as BR3344 might get claimed by the @number slot as a number reference and fill the $number context variable with 3344.

Solution: Place the slot with the entity condition that captures the longer pattern (@id) higher in the list of slots than the condition that captures the shorter pattern (@number).
* Problem: A term is recognized as more than one system entity type.

For example, if the user enters May 2, then your assistant recognizes both the @sys-date (2017-05-02) and @sys-number (2) entities.

Solution: In logic that is unique to the slots feature, when two system entities are recognized in a single user input, the one with the larger span is used. Therefore, even though your assistant recognizes both system entities in the text, only the system entity with the longer span (@sys-date with 2017-05-02) is registered and applied to the slot.







 Adding conditions to Found and Not found responses 

For each slot, you can use conditional responses with associated actions to help you extract the information you need from the user. To do so, follow these steps:



1. Click the Edit slot![Edit slot](https://cloud.ibm.com/docs-content/v1/content/a2b18c153837bce00a5b4de496e4b4ca64bbf56e/assistant-data/images/edit-slot.png) icon for the slot to which you want to add conditional Found and Not found responses.
2.
For example, for the @city entity, you might type New York City.

An entity value can be any string up to 64 characters in length.

Important: Don't include sensitive or personal information in entity names or values. The names and values can be exposed in URLs in an app.
2. Add synonyms for the value. For example, you might add NYC and The Big Apple as synonyms for New York City.

A synonym can be any string up to 64 characters in length.

If you want to define a pattern for your assistant to look for in user input, such as a product order number or email address, define a pattern value instead. See [Adding entities that recognize patterns](https://cloud.ibm.com/docs/assistant?topic=assistant-entitiesentities-patterns) for more details.

Note: You can add either synonyms or patterns for a single entity value, not both.

Watson can also recommend synonyms for your entity values. The recommender finds related synonyms based on contextual similarity extracted from a vast body of existing information, including large sources of written text, and uses natural language processing techniques to identify words similar to the existing synonyms in your entity value.
3. To see synonym recommendations from Watson, click Recommend synonyms. Otherwise, skip this step.

Synonym recommendations are listed. The terms are displayed in lowercase, but your assistant recognizes mentions of the synonyms whether they are specified in lowercase or uppercase.

The more coherent your entity value synonyms are, the more relevant and better focused your recommendations will be. For example, if you have several words that are focused on a theme, you will get better suggestions than if you have one or two random words.

![Shows synonym recommendations for the word apple](https://cloud.ibm.com/docs-content/v1/content/417db917d18067d9dcc4cf2612564a9a87c3ddc8/assistant/images/entities-recommended-synonyms.png)



1. Select any synonyms you want to include, and then click Add selected.
To get more information on how to search, see [Select the set of events to display through a view by applying a search query](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-viewsviews_step2).

Refine the query until you can only see the events that you want to export.







 Step 3. Map the data to the query parameters 

To define the parameters that you need for the export request, complete the following steps:



1. Map your sources to the hosts parameter. The hosts parameter is a comma-separated list of services.
2. Map the severity to the levels parameter. The levels parameter is a comma-separated list of severity values.
3. Map the query to the query parameter.

Notice that when you copy the query from the UI, you must replace every space with %20.







 Step 4. Export the events 

Run the following cURL command to export events:

curl "ENDPOINT/v1/export?QUERY_PARAMETERS" -u SERVICE_KEY:

Where



* ENDPOINT represents the entry point to the service. Each region has a different URL. [Learn more](https://cloud.ibm.com/docs/services/activity-tracker?topic=activity-tracker-endpointsendpoints).
* QUERY_PARAMETERS are parameters that define the filtering criteria that is applied to the export request.
* SERVICE_KEY is the service key that you created in the previous step.









 Samples 

To query events for a service in us-south, you can run the following command:
Filter log data by adding a search query.

When you search log data, the search applies any log filters and time queries configured in that view.

You can do simple searches (single term string search), compound search (multiple search terms and operators), field searches if the log line can be parsed, and others. For more information, see [How to Search Logs](https://docs.logdna.com/docs/search).

AND and OR operators are case-sensitive and must be capitalized.
4. Create a view.



1. Click the Views icon ![Views icon](https://cloud.ibm.com/docs-content/v1/content/f61dbc5d84bf0c89e477a05cab04c72f429e1b7a/log-analysis/images/views.png).
2. Select EVERYTHING or a view.
3. Filter log data then click Save as new view. The Create new view page opens.
4. Enter a name for the view in the Name field.
5. Optionally, add a category. Enter a name and then click Add this as new view category.
6. Click Save View









 Step 2. Create the alert 

Next, you must attach an alert to the view.

You can choose any of the following options:



* Create a preset and attach the preset to the view
* Create a specific alert on the view.



You can attach multiple notification channels to a view. You can define different triggering conditions to each notification channel.



 Create an alert by using a preset 

Complete the following steps to attach a preset to a view:



1. [Configure a preset (alert template)](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-preset_uipreset_ui_create).
2. Click the Views icon !
The relevance score ranges from 0.0 to 1.0. The higher the score, the more relevant the concept. Links to the resource(s) are provided, if applicable.





 Semantic Role extraction 

Identifies subject, action, and object relations within sentences in the input content. Relation information can be used to automatically identify buying signals, key events, and other important actions.

Example portion of a document enriched with Semantic Role Extraction:

{
"text": "The stockholders were pleased that Acme Corporation plans to build a new factory in Atlanta, Georgia.",
"enriched_text": {
"semantic_roles": [
{
"subject": {
"text": "The stockholders",
"keywords":
{
"text": "stockholders"
}
]
},
"sentence": " The stockholders were pleased that Acme Corporation plans to build a new factory in Atlanta, Georgia.",
"object": {
"text": "pleased that Acme Corporation plans to build a new factory in Atlanta, Georgia",
"keywords":
{
"text": "Acme Corporation"
},
{
"text": "new factory"
},
{
"text": "Atlanta"
},
{
"text": "Georgia"
}
],
"entities":
{
"type": "Company",
"text": "Acme Corporation"
},
{
"type": "Location",
"text": "Atlanta",
"disambiguation": {
"subtype":
"AdministrativeDivision",
"GovernmentalJurisdiction",
"OlympicHostCity",
"PlaceWithNeighborhoods",
"CityTown",
"City"
],
"name": "Atlanta",
"dbpedia_resource": "http://dbpedia.org/resource/Atlanta"
}