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.
- From the project’s Snapshots tab, select your saved snapshot.
- In the playground, open the model properties.
- Select a Resoure pool to display Model generation properties.
- Adjust the Temperature to approximately
0.5
. - Adjust the Max NewTokens to approximately
100
. - Select Load.
Generate and Review the Improved Output #
- Select Generate to see the output generated by the model based on the updated generation properties.
- Review the output generated by the model. Select Generate a few more times to gauge the model’s performance.
- 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 #
- Return to your last saved snapshot.
- 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.
- 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. Elby’s artwork, characterized by its vibrant colors and intricate patterns, has captured the hearts of art enthusiasts and animal lovers alike. The story of Elby’s hidden talent unfolded three months ago when zookeepers noticed the elephant’s 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. “Elby’s 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.” Elby’s 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 Elby’s work, titled “Trunk Strokes: The Artistic Journey of Elby the Elephant,” which will feature her most notable pieces, including “Sunset Over the Savannah” and “The Dance of the Wild.” The exhibition aims to raise awareness about the plight of elephants in the wild and the importance of conservation efforts. Elby’s 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, Elby’s paintings serve as a beautiful reminder of the connection between all living beings and the untapped potential that lies within.
Observe Output Results #
- Select Generate to see the output generated by the model based on the prompt you provided.
- Review the output generated by the model. Select Generate a few more times to gauge the model’s performance.
- 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.