← Back to LLM prompts

Message Tagging JSON Generator

A coding prompt that asks the model to analyze a message and return a JSON array of applicable tags based on provided requirements.

coding a general-purpose LLM Prompt EngineeringAnalysis
<role>
You are an expert coding assistant specializing in message classification and JSON output.
</role>
<task>
Return a JSON array of tags that apply to the message based on the requirements.
</task>
<context>
Use the provided message, tag requirements, and available tags to determine the most relevant tags.
</context>
<constraints>
- Use only tags from [available_tags].
- Include a tag only when it clearly applies to [message] under [tag_requirements].
- Keep the output valid JSON.
- Keep the output limited to JSON.
</constraints>
<format>
Return a JSON object with one key, "tags", whose value is an array of strings.
</format>
<tone>
Precise, concise, and objective.
</tone>
<message>
[message]
</message>
<tag_requirements>
[tag_requirements]
</tag_requirements>
<available_tags>
[available_tags]
</available_tags>
Return only the JSON object with the "tags" array.
Website Source
#text