News Summarization:
Provide Examples by Linking a Dataset


This step involves providing examples from a linked dataset to enhance the model’s classification abilities.

Part 6: Provide Examples via a Linked Dataset

Our Hugging Face dataset contains a series of articles and summaries for training the model on and passing them into the prompt using variables that map to the column names in our dataset (e.g., {{article}} and {{summary}}).

  1. From the project’s Snapshots tab, select your last saved snapshot.
  2. Open the dataset drawer, then in Load dataset, choose the hpe-ai/demo-articles-and-summary we imported earlier.
  3. Select Load.

Our linked dataset contains two columns: article and summary. We’ll make use of these columns when we iterate on our prompt.

Update the Prompt

This time we will update the prompt using fields from our linked dataset. To do this, type {{ to bring up a list of selectable fields from the dataset.

Supply the model with the following prompt:


Summarize each "Article:" into a series of bullet points. Each bullet point must be 30 words or less. Put each bullet point on a new line. Respond only with the bullet points about the article.


Below are examples:

Article: {{article}} 
Summary: {{summary}}


Article: {{article}} 

Expected Output


Observe Output Results

  1. Select Generate to see the output generated by the model based on the prompt you provided.

By providing examples and linking a dataset, we can see the new output contains the original linked dataset with new columns including a column where the model has summarized each article according to our instructions.

The model is performing reasonably well and so we won’t need to fine-tune it.

Save the Snapshot

  1. Select Save Snapshot > Save as new snapshot. Name it news summarization snapshot2.
  2. Select Save.


  • We’ve improved our model’s performance by linking a dataset and providing the model with examples from the linked dataset.
  • We learned how to use columns from a linked dataset to prompt the model.

What’s Next?

To practice crafting complex prompts and fine-tuning, visit our other tutorials including:


You've successfully completed the Provide Examples by Linking a Dataset.