Sentiment Scores JSON

Anthropic Cookbook

Submit a prompt

Overview

Score positive, negative, and neutral sentiment, then assign a label and rationale in JSON.

Use cases

Prompt
Copied 0
Analyze sentiment of the text. Return ONLY valid JSON:

{
  "positive_score": 0.0-1.0,
  "negative_score": 0.0-1.0,
  "neutral_score": 0.0-1.0,
  "label": "positive|negative|neutral|mixed",
  "rationale": "one short sentence"
}

The three scores should roughly sum to 1.0.

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

Can AI?

Alternatives

  • Break down an earnings callThis prompt breaks down the transcript of a quarterly results call or investor conference for equity research. It pulls out what management said, the analyst questions, financial and operating signals, warning signs, and less obvious hints, then writes an executive summary in bullets.Research
  • Explain a bill or law, including what it plays downThis prompt summarizes a proposed bill or an existing law, lists the changes it would make, and contrasts how its backers present it with a balanced reading. It also points out parts that may get less attention, such as fees, loopholes, or cut programs, and their likely effects.Research
  • Four-stage fact check of a claimThis prompt tests one claim against a passage from a source in four fixed stages: pull out literal statements, rate the source's reliability, judge whether the claim is supported, then look for other readings. It ends with a verdict of supported, contradicted, or not enough info, plus a brief reason.Research