Exercise#1 Fix prompts

Objective

Your have learned general best parctices and now it is time for you to apply your knowledge to fix some prompts.

Instructions

In this exercise you are already given a notebook to work with. Open the following notebook:

Local Jupyter Lab setup

exercise-1-best-practices.png

Google colab

  • Follow instructions to setup environment
Open In Colab

1. Change the path to environment file to point to your HF key

2. Run the cells to try out the given prompts with the given model

3. Fix each of the prompts to get a desired response.

  • Prompt#1 : Model is hallucinating and you need to address it.

  • Prompt#2 : Model is generating a reponse to a question that is difficult to understand for middle schoolers

  • Prompt#3 : The prompt is for a customer service agent that needs to answer questions on products sold by a retailer. Augment the prompt with product catalog data. If a question is asked on product that is not in the catalog, the model should provide an appropriate response. The product catalog data is available under the folder model/data/acme-product-catalog.txt

  • Prompt#4 : Response is biased fix it.

Hint: For #3 read the product catalog file and use it as context

Solution

Local Jupyter Lab setup

The solution notebook is available under:

solution

Google colab

  • Follow instructions to setup environment
Open In Colab