IBM Cloud Docs
Deploying the built-in UI components

Deploying the built-in UI components

For Document Retrieval and custom projects, a set of user interface components are available for your use.

Work with a developer to use the pre-built UI components that are provided by IBM to deploy an application.

For more information about building your own app, see the Building custom applications with the API.

Several built-in UI components are available.

Search results

A set of results that rank the most relevant passages and tables to a query.

Search results list
Search results list

Try it

Facets

Refine your results with facets that help users filter the search results by specific categories and domains.

Facets
Facets

Try it

Rich document preview

Displays your results in a document preview. This view highlights result passages within the text of the original document. It also shows any enrichment mentions that are detected in the document. The rich preview is available with source documents where an SDU model is applied, such as PDF, Microsoft PowerPoint, and Microsoft Word files.

Rich document preview
Rich document view

Try it

Deploying a project

To deploy your project, complete the following steps:

  1. To use the API, you need to know the project ID for your project. Go to the Integrate and Deploy > API Information page.

  2. From the Integrate and Deploy > UI Components page, find links to resources that a developer can use to get started.

Getting started with the GitHub sample app

From resources available in GitHub, you can run a script to start a sample app with prebuilt UI components. In fact, the sample app looks a lot like the Improve and customize page of the product because the product itself uses these UI components.

The script requires some prerequisite software to function. After you start the script, it checks whether you have the necessary software installed on your system. If not, it lets you know what software you need to install. Install the following packages if they are not installed already:

The script needs information about your service instance and project to use the data and search settings that you configured for your project and apply them to the sample app. You must collect the following information so that you can share it with the script when it asks you for the information later:

Service credentials

The following information is used by the sample app script to construct an endpoint where it can send API requests and to authenticate with your service instance:

  • URL
  • API key

To get this information, complete the appropriate steps for the type of deployment you are using:

  • IBM Cloud From the IBM Cloud Resource list, expand the AI/Machine Learning section, and then find the service instance that you created earlier. Click the instance to open its overview page. From the Credentials section, copy the URL and API key values and store them somewhere where you can access them later, such as a local text file.

  • IBM Cloud Pak for Data From the IBM Cloud Pak for Data web client main menu, expand Services, and then click Instances. Find your instance, and then click it to open its summary page. Scroll to the Access information section of the page, and then copy the URL and bearer token. Store the values somewhere where you can access them later, such as a local text file. (The bearer token serves as the apikey for installed deployments.)

Project ID

The unique identifier for the project you created in this tutorial.

You can copy the project ID from the API Information tab of the Integrate and deploy page.

To run the script that starts the sample app, complete the following steps:

  1. Do one of the following things:

    • If you downloaded the repo, extract the files from the archive to a workding directory on your system. Open a command terminal window, and then change to the directory where you downloaded the repository files.

    • If you cloned the repo, open a terminal window from the directory to which you cloned the repository.

  2. Enter the following command to start the script:

    ./runExampleApp.sh
    

    Give the script time to set up the necessary resources to run the application.

    If any required prerequisite software packages are missing, the script lets you know what packages you need to install before you can use the script successfully.

  3. When prompted to specify the authType, enter the type of authentication you use. The type differs based on how your service instance is deployed:

    • IBM Cloud Enter iam

    • IBM Cloud Pak for Data Enter CP4D.

      The iam value indicates that you are using Identity and Access Management, which is a service that is used by IBM Cloud to authenticate its managed services. For installed instances that are deployed on IBM Cloud Pak for Data, CP4D is specified instead.

    For the next three prompts, enter the information that you copied and saved earlier.

    • url
    • apikey
    • project_id

When the script is done, it asks if you want to start the sample app now. Enter y for yes. A new web browser window or tab is displayed and the sample app is rendered in the page. The URL for the sample app is http://localhost:3000/, which means that the app is running locally and cannot be accessed by anyone who is using a different computer.

Shows the sample app user interface
Sample app user interface

The sample app gives you a preview of your search project. Use it to test your search project and make any necessary adjustments.

When you're done testing with the sample app, you can stop it by returning to the terminal window where you ran the initial script, and pressing Ctrl + C.

Deploying other project types

To analyze data from a Content Mining project, click Launch application from the Improve and customize page. For more information, see Analyzing your data.

To analyze a contract from a Document Retreival for Contracts project, submit a query. For more information about understanding contract information, see Understanding contracts.

To deploy a Conversational Search project, connect this project to an assistant that is built with watsonx Assistant. The general steps to follow include:

  1. Create an assistant.

    You can use a watsonx Assistant Trial plan for testing purposes.

  2. Add a search skill to your assistant, and then connect it to this project.

  3. Deploy your assistant.

    For more information about building a watsonx Assistant search skill, see the appropriate documentation for your deployment: