Classify headlines

Label news headlines with custom topics using examples.

You can query a model directly and test the results returned when using different parameter values with the Cloud console, or by calling the Vertex AI API directly.

Context
What is the topic of a given news headline?

  • business
  • entertainment
  • health
  • sports
  • technology

Please only print the category name without anything else.

Examples Structured

Text The answer is
Pixel 7 Pro Expert Hands On Review, the Most Helpful Google Phones technology
Quit smoking? health
Roger Federer reveals why he touched Rafael Nadal's hand while they were crying sports
Business relief from Arizona minimum-wage hike looking more remote business
#TomCruise has arrived in Bari, Italy for #MissionImpossible. entertainment

Test

Text The answer is
CNBC Reports Rising Digital Profit as Print Advertising Falls business
Model: gemini-1.5-flash-001
Temperature: 1
Max output tokens: 256
TopK: 40
TopP: 0.95