# 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. - For an example of using the Vertex AI API, see [Quickstart using the Vertex AI API](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/api-quickstart). - To view this sample in the Cloud console: [Go to Google Cloud console](https://console.cloud.google.com/vertex-ai/generative/language/prompt-examples/Classify%20headlines) <br /> ||
| |---| | **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 |---|---| | **<br /> Text** | **<br /> The answer is** | | <br /> Pixel 7 Pro Expert Hands On Review, the Most Helpful Google Phones <br /> | <br /> technology <br /> | | <br /> Quit smoking? <br /> | <br /> health <br /> | | <br /> Roger Federer reveals why he touched Rafael Nadal's hand while they were crying <br /> | <br /> sports <br /> | | <br /> Business relief from Arizona minimum-wage hike looking more remote <br /> | <br /> business <br /> | | <br /> # TomCruise has arrived in Bari, Italy for #MissionImpossible. <br /> | <br /> entertainment <br /> | #### Test |---|---| | **<br /> Text** | **<br /> The answer is** | | <br /> CNBC Reports Rising Digital Profit as Print Advertising Falls <br /> | <br /> business <br /> | | |---|---| | **Model:** | gemini-2.5-pro | | **Temperature:** | 0.2 | | **Max output tokens:** | 256 | | **TopK:** | 1.0 | | **TopP:** | 0.95 | |