News Summarization:
Improve Results

Introduction

The snapshot you created in the previous step serves as the foundation for iterating on and improving your model. It incorporates the model itself and the provided prompt. This step involves the iterative process of enhancing the model’s classification capabilities.


Part 5: Improve the Results

Adjust Generation Properties & Prompt

Generation Properties

We want to reduce the randomness of the output and ensure that the model is generating a coherent summary. We can do this by adjusting Temperature and Max new tokens which are found under Manage model > Model properties > Model generation properties.

  1. From the project’s Snapshots tab, select your saved snapshot.
  2. In the playground, open the model properties.
  3. Select a Resoure pool to display Model generation properties.
  4. Adjust the Temperature to approximately 0.5.
  5. Adjust the Max NewTokens to approximately 100.
  6. Select Load.

Generate and Review the Improved Output

  1. Select Generate to see the output generated by the model based on the updated generation properties.
  2. Review the output generated by the model. Select Generate a few more times to gauge the model’s performance.
  3. Select Save Snapshot and name it something like article-snapshot-2 and select Save as new snapshot.

At this point, you should have a higher quality output that tends to be somewhat consistent.

We can achieve even greater consistency by updating our prompt.

Update the Prompt

  1. Return to your last saved snapshot.
  2. Update the prompt Instruction field with the following:
    Summarize the input after "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.
  3. Update the Input field by prepending Article: before the news article text.
    Article:
    Title:Elby the Elephant Stuns Scientists with Remarkable Painting Skills
    Date: February 29, 2024
    
    Location: Global Wildlife Reserve, California
    
    In an unprecedented discovery that is challenging our understanding of animal intelligence and creativity, Elby, a seven-year-old African elephant residing at the Global Wildlife Reserve in California, has taken the world by storm with her extraordinary painting skills. Elbys artwork, characterized by its vibrant colors and intricate patterns, has captured the hearts of art enthusiasts and animal lovers alike.
    
    The story of Elbys hidden talent unfolded three months ago when zookeepers noticed the elephants keen interest in watching children paint at a workshop near her enclosure. Curious to see how Elby would react, they provided her with non-toxic paint and canvas. To their amazement, Elby grasped the paintbrush with her trunk and began to create stunning pieces of art, displaying a level of skill and emotion that rivals human artists.
    
    Elbys paintings are not just random strokes,explains Dr. Linda Hemsworth, a leading animal behaviorist at the reserve.They are deliberate and thoughtful, showcasing her ability to express herself. This discovery opens new doors to understanding the emotional and cognitive capacities of elephants.
    Elbys artwork has sparked a global conversation about animal intelligence, creativity, and the rights of animals in captivity. Art galleries from around the world are expressing interest in displaying her paintings, with proceeds going towards elephant conservation efforts.
    
    The Global Wildlife Reserve has announced plans to host an exhibition of Elbys work, titledTrunk Strokes: The Artistic Journey of Elby the Elephant,which will feature her most notable pieces, includingSunset Over the SavannahandThe Dance of the Wild.The exhibition aims to raise awareness about the plight of elephants in the wild and the importance of conservation efforts.
    
    Elbys unique talent has not only made her a global sensation but has also shone a spotlight on the hidden depths of animal intelligence and creativity. As we continue to explore the boundaries of what animals are capable of, Elbys paintings serve as a beautiful reminder of the connection between all living beings and the untapped potential that lies within.

Observe Output Results

  1. Select Generate to see the output generated by the model based on the prompt you provided.
  2. Review the output generated by the model. Select Generate a few more times to gauge the model’s performance.
  3. Select Save Snapshot > Save as new snapshot. Name it something like article-snapshot-3 and select Save.

You should start to see how improving the prompt results in higher quality and more consistent outputs.

We can improve the consistency of the model’s output significantly more by providing a series of examples. We’ll achieve that by linking the Hugging Face dataset we uploaded when we prepared our data.


Recap

  • We’ve iterated the prompt and generation properties to achieve a higher quality output.
  • We’ve saved the model as a snapshot for future use.
Try a Different Model
This is a great time to try a different model to see if it yields better results. You can do this by selecting Manage Model and choosing a different base model.