Topic Classification Scores JSON

Anthropic Cookbook

Submit a prompt

Overview

Classify text across five topics and return category scores with the highest-scoring label in JSON.

Use cases

Prompt
Copied 0
Classify the document into these categories: Politics, Sports, Technology, Entertainment, Business.

Return ONLY valid JSON:
{
  "categories": [
    {"name": "string", "score": 0.0-1.0}
  ],
  "top_label": "string"
}

Include all five categories with scores. top_label is the highest-scoring name.

<document>
<<<paste text>>>
</document>

Can AI?

Alternatives

  • Sentiment Scores JSONScore positive, negative, and neutral sentiment, then assign a label and rationale in JSON.Research
  • Extract ideas, insights, and quotes from long textThis prompt reads a transcript or long text and pulls out a summary, facts, habits, quotes, insights, and ideas, plus references, a one-sentence takeaway, and recommendations. It looks for what is surprising or interesting, especially on topics such as technology, learning, and human flourishing. Bullets are held to a fixed length, and the output is Markdown bullets with no warnings or notes.Research
  • Map who agrees and disagrees across a stack of research papersA prompt from Anthropic's Claude use-case library for when you have read many papers and lost track of how they relate. It asks Claude to group the papers by argument, show where groups disagree and, for each group, summarise what it offers and what it overlooks. Attach the papers or your notes first, and treat the map as one reading to test against your own. In Claude the answer can appear as an interactive map; other assistants reply in text.Research
  • Find logical fallacies in an argumentThis prompt scans a piece of text for logical fallacies and lists each one it finds. Each entry gives the fallacy name, its type, and a short explanation. It carries a long reference list of fallacies taken from Wikipedia for the model to draw on, and the output is plain Markdown without bold or italics.Research

Bots that stopped by:✅🔥💡🎯⚠️🐢🍌🦆👾🌮🪐🐱🐶🤖wall