Getting Started with watsonx.ai Prompt Lab

Friday, August 16, 2024 by emmanueliriarte
Getting Started with watsonx.ai Prompt Lab

Build a generative AI application for a use case improving productivity with watsonx.ai

IBM watsonx.ai is a powerful platform that brings together the capabilities of IBM's Watson services, including natural language processing, machine learning, and automation, to create intelligent solutions tailored to your business needs. You can utilize watsonx generative AI technology to improve productivity by quickly extracting knowledge and insights from vast amounts of data across multiple documents.

In this hackathon, you will use watsonx.ai Prompt Lab to build and deploy an intelligent solution that can significantly improve productivity and streamline an everyday activity.
The Prompt Lab is a powerful tool within watsonx.ai that enables you to interactively explore the capabilities of AI models and generate human-like text or code snippets. Here are some ways the watsonx.ai Prompt Lab can enhance day-to-day tasks:

  • Interactive exploration: The Prompt Lab allows you to experiment with different AI models and parameters, giving you a deeper understanding of how they work and how they can be applied to your specific use cases.

  • Human-like text generation: You can use the Prompt Lab to generate human-like text, for things like responses to customer inquiries or draft emails, saving you time and effort.

  • Code snippet generation: The Prompt Lab can also generate code snippets for various programming languages, enabling you to automate tasks and integrate AI models into your workflows more efficiently.

  • Training assistance: The Prompt Lab can help you train AI models by providing feedback on your input and suggesting improvements, making it easier to optimize your models for your specific needs.

Before you begin

IBM Cloud account set up

Follow the instructions to set up your IBM Cloud account for the hackathon.

Note on available services

The IBM Cloud and the watsonx.ai platform are pre-configured with all the required services to complete the hackathon. If you notice a permission/access issue for any service, then they are not required/available for this hackathon.

Data sets

As you collect data for your project, you’ll want to use best practices. Here are helpful tips:

  • Teams are responsible for ensuring data is compliant.

  • Data from public websites may be used, if the terms allow for commercial use, but please keep a list of the websites you use.

  • Do not use data or assets containing company confidential data, or any other data without permission from the data owner. Teams are responsible for getting approval.

  • Do not use any client data.

  • Do not use any data containing personal information (PI).

  • Do not use data obtained from social media.

Get started with Prompt Lab

The watsonx.ai Prompt Lab is an easy-to-use interface that helps you experiment with foundation models and build prompts.

In the Prompt Lab in IBM watsonx.ai, you can experiment with prompting different foundation models, explore sample prompts, and save and share your best prompts. Before you start using Prompt Lab, you will first need to Create a Project.

  1. Log in to watsonx.ai platform (https://dataplatform.cloud.ibm.com/wx/home?context=wx) with the email you use to access your IBM Cloud account.

  2. From the navigation menu at the top-left corner, select View all projects.

    Navigation Menu
    The Navigation Menu
  3. Select New Project > Create an empty project.

  4. Give the project any name. In the Storage panel, “watsonx – Challenge COS” will be selected for you by default.

    project page
    The Project Page
  5. Click Create. You will be taken to the project’s overview dashboard.

  6. Select the Manage tab on the dashboard, select the Services & integrations on the left pane, and click Associate service +.

    Manage Tab
    The Manage Tab
  7. From the list of services, select the “watsonx-Challenge WML” Watson Machine Learning instance and then click Associate.

    Associate Service Page
    Associate Service Page
  8. Select the Assets tab, click New asset +, and search for “prompt”.

  9. Select the “Chat and build prompts with foundational models” tile.

    Prompt Lab Editor
    Prompt Lab Editor
  10. The Prompt Lab Editor opens with a chat window to get you started with the prompt session.

Chat Window
Chat Window

AI model

For this hackathon, participants are encouraged to use the granite series model available on the watsonx.ai platform. To select different granite model:

  1. Select the AI Model drop-down menu and select View all foundation models.
    Foundational Models
    View Foundational Models
  2. The Select a foundational model widget will appear. Clear all the filters and enter “granite” in the search bar. All the granite series models will be displayed. You can select any granite model tile to learn about the model and use it for your prompting session.
    Select Granite Model
    Select Granite Model

Saving your prompt

You can save your prompt lab session for later use.

  1. On the top of the Prompt Lab, select the Save work dropdown button and then select the Save as option.

    Save Work
    Save Work
  2. A Save your work widget will appear. Select Prompt session under the Asset type option. Enter a name and check the View in project after saving option under the Define details section. Finally, click the Save button.

    Save Button
    Save Button
  3. Once you save, you will see the saved work under the Assets tab.

  4. You can also save your work as:

    1. Prompt template to save only the current prompt without its history and selecting a Task suitable for your prompting.
    2. Notebook to continue working on your prompting on a Jupyter Notebook environment.

Useful resources

Discover tutorials with similar technologies

Upcoming AI Hackathons and Events