Skip to content
RED SAGSkills
medium10 pts · first answer countsprompt-engineeringprompt-templates

Template crash on JSON example

This Python code raises a KeyError. Why?

template = """Classify the review.
Return JSON like {"label": "positive"}.
Review: {review}"""
prompt = template.format(review=text)
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions