Getting started with Watsonx.ai I

Nathalia Trazzi
10 min readMay 23, 2024

--

Watsonx.ai is a studio where various activities can be performed, using the Foundation Models provided by IBM to perform tasks such as translation, answering questions, text classification, sentiment analysis, content generation, code generation, code conversation (from one language to another), to MLOps capabilities.

Today, I will do a guided walkthrough of Watsonx.ai, showing what is and what it can do.

To access a trial of Watsonx.ai, simply visit this link: https://www.ibm.com/products/watsonx-ai

Click on Start your free trial

Note that when testing this trial, the Watsonx.Governance will be provided with Watsonx.ai.

Log in or create an account on IBM Cloud. (New accounts receive a $200 credit to use during the one-year period.)

Choose the data center closest for latency reasons.

It may be necessary to provide some information. Fill in the required fields and click on Next

It may take a few minutes for the Watsonx.ai environment to be ready for use.

To start, take a brief tour of the Watsonx.ai page or simply skip it.

Let’s take a tour on Watsonx.ai.

First things first: There is a recently implemented feature by IBM where this top shortcut that allows the user to chat and build prompts through the Prompt Lab.

Customize My Journey

This section can be personalized according to how the user will use Watsonx.ai.

This can be changed any time.

There are options such as:

  • Recommended: Things will stay as they are. This is the default version for using Watsonx.ai.
  • Prepare your data for AI: Connect to data sources, generate synthetic tabular data with the Synthetic Data Generator, and prepare and visualize data with Data Refinery.
  • Work with Models: To test and use foundation models and build prompts with the Prompt Lab.
  • Tune a foundation model with labeled data with Tuning Studio
  • Build machine learning models automatically with Auto AI
  • Work with data and models in python or R notebooks with Jupyter notebook editor
  • Build models as a visual flow com SPSS Modeler
  • Solve optimization problems with Decision Optimization
  • Train models on distributed data with Federal Learning
  • Automate model lifecycles com Open Pipelines
  • Govern AI Assets: Request or track models in AI Use Cases with AI Governance
  • View All: To see all the capabilities of Watsonx.ai.

Recent Work section

To view the recently implemented tasks in Watsonx.ai.

This section allows to create a project in Watsonx.ai, by clicking on the “+” icon next to the word “Projects”.

In “Deployments spaces”, everything created will be stored in this space.

AI use cases

By clicking on Get started with governance, there is the feature to evaluate an AI asset in a project and then track the AI asset in an AI use case.

This part won’t be covered here, to learn more follow the guided tutorial by IBM to learn more about it or check the official documentation. (https://mediacenter.ibm.com/media/Model+evaluation+and+documentation+with+IBM+watsonx.governance/1_2dudp2f2)

Discover Section

Resource Hub: View the available resources in Watsonx.ai, such as Foundation Models, pre-built prompts (to assist the user in their use case), Data to manage data the project, project management, and notebooks generated by Watsonx.ai through the request.

Featured: Watsonx.ai’s Features.

The home page is now complete. Let’s return to the starting point.

Prompt Lab

Return to top of page.

Note that now users can start a chat and build prompts in the Prompt Lab, a feature available in the Watsonx.ai interface.

In the image bellow, there is “Write a short poem about roses” wrote on this Chat and build prompts in Prompt Lab space

Write something like the following example, after typing something, click on the send icon.

Make sure to agree to IBM’s terms to be able to use the Prompt Lab, then click on “Skip Tour” or “Start Tour”.

This should be the result:

The Prompt Lab is a tool that allows to use Watsonx.ai through a software as a service (SaaS) created by IBM to facilitate the display of results.

This tool can be used to view available Foundation Models in Watsonx.ai, choosing the ideal type of the prompt to write prompts to perform a lot of activities.

Types of Prompts

The Prompt Lab allows to work with three types of prompts: Chat, Structured, and Freeform.

Chat: This is the way to write a prompt asking in a chat interface. It’s simple and intuitive, ideal for users who don’t have much experience in writing prompts and setting parameters.

The user writes what they want, and Prompt Lab delivers the result, simple and practical. It’s gives the idea of talking to a customer service.

Structured: This is a structured way to build prompts, as the name suggests.

Write instructions for the chosen Foundation Model and then provide examples of input and output (Add more examples as needed). Then provide an input and click on “Generate” to get the output response.

In the example used in this article, the chosen Foundation Model(llhama-2–70b-chat) was instructed to act as a composer of romantic songs.

Two examples of input (the input phrase) and output (the output phrase that the Foundation Model will generate) were provided to the model. In the Try section, an input was written, and after clicking Generate ->, the model produced an output based on the entire prompt.

Observe the instructions and the results in the following image:

This is an example of a guided prompt/few-shot prompting. This means it provides guidance or examples to help direct the model’s response.

Freeform: Freeform option, allows to write a prompt without any structure, freely, as shown in the image below:

When using Foundation Models, there are parameters to configure. This will be shown in more detail later on.

The Prompt Lab features pre-made prompt templates for various activities.

Sample prompts: By clicking on the left sidebar menu on “Sample prompts” (the first available icon), there is a range of ready-made prompt samples to test.

There are samples for meeting summaries, call summaries, classification scenarios, content generation…

… fact extraction, Answering questions about a subject, code generation, code conversion from one language to another, and translation of text from one language to another.

In the image below, there is a example of answering questions about one subject (The article about tomatoes provided by IBM).

At the end of this example, there is a question to test.

By clicking on Generate ->the obtained result can be seen in the image bellow:

Saved prompt and History: Still on the left menu, to can access saved prompts and history in the last two buttons.

-> If it’s your first time using Prompt Lab, you might not have anything yet. That’s completely normal

Let’s return to the home page of Watsonx.ai.

Simply click on “IBM Watsonx” in the top menu above.

Creating a project on Watsonx.ai from scratch.

Navigate to the Projects section and click on the “+” icon.

On the next page

Choose a name, a description (optional), and a storage option.

I’m using a trial option of Watsonx.ai so I shouldn’t worry about this at the moment. If you are using the Trial Option, you shouldn’t either.

Expand the Advanced Settings section.

I won’t enable these options for this article, but you can enable them to test yourself.

Note that in the left sidebar menu, you can create a project from a local file (Choose a .ZIP file that contains an exported Watson Studio project.) or from the resource hub.

Click on “Create” to create a new project.

Let’s take a brief tour of the project’s home page.

Overview Tab

The overview tab allows to:

  • Add users and collaborators to work on the same project.
  • Add data to work with.
  • Access the Prompt Lab.
  • Perform fine-tuning with the foundation models offered by IBM.
  • Access resources already added to the project.
  • Configure the use of resources.
  • Add a Readme to the project.
  • View the project’s history.

This page can be customized by clicking on “Recommended” and expanding the section

Assets

The assets tab allows to create new assets or import existing ones. All existing assets will be displayed in this page.

Data in this project

Data can be added to the project to work with.

Next asset

Click on “New asset +” to add an asset to the project.

When you click on New asset, you will see the options that you can add to Watsonx.ai.

To exit, simply click on the “x” on the right side of the pop-up window.

Manage

This page allows to manage the project.

There is a left menu with the options: General, Access, Control, Environments, Resource Usage, Services & Integrations.

  • General

On this page, users can view information such as the project’s name, description defined by the user, the project_id (when users want to use it via API), controls (users can switch platforms, some resources available in Watsonx.ai are also available in Cloud Pak for Data), manage access, view the project’s storage, and perform management tasks on IBM Cloud. Users can also leave the project or delete it.

  • Access control

On this page, collaborators can be added to the project and manage them, as well as create access tokens.

  • Environments

According to IBM, in Environments, users can utilize compute resources in projects when running jobs and most tools. Depending on the tool, users might have a choice of compute resources for the runtime of the tool.

Compute resources are known as either environment templates or hardware and software specifications. In general, compute resources with larger hardware configurations incur larger usage costs.

  • Resource Usage

On this page, the usage of the project can be managed.

  • Services & Integrations

To associate services with Watsonx.ai from IBM or third-party providers, this page should be used.

When you subscribe to the use of Watsonx.ai, you will need two resources to utilize it.

In the trial version of Watsonx.ai, these two instances are created, so don’t need to worry about them.

However, when you create a new project in Watsonx.ai (which is the case at this moment) you must associate Watson Machine Learning with your project.

This is done in the “Associate Services” tab on Manage Options. Simply select this service.

and click on Associate

Note that the service is already associated, and everything is ready.

This article was a brief introduction to Watsonx.ai and some of its features.

To continue learning about more advanced topics and deeper into how to use Prompt Lab, proceed to Getting started with Watsonx.ai II: https://medium.com/@nathalia.trazzi/getting-started-with-watsonx-ai-ii-b9fbfec80825

--

--

Nathalia Trazzi

AI Engineer. Proficient in Watsonx.ai, Assistant and Discovery. Full stack software engineer and Chatbot developer. Fine art photographer.