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.

System instructions

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-2.5-pro
Temperature: 0.2
Max output tokens: 256
TopK: 1.0
TopP: 0.95

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月07日 UTC.