Prefixes in prompt engineering are short, guiding phrases added to AI prompts to influence the response. They specify the desired format, tone, style, or content, helping the AI understand and fulfill specific user requirements more accurately.
Practical examples include:
Instructional Prefix: “Summarize in one sentence:” followed by a complex topic, prompting the AI to condense information into a brief summary.
Tone Prefix: “Explain humorously:” attached to a question, directing the AI to adopt a light-hearted or comedic tone in its explanation.
Contextual Prefix: “In a medieval setting:” before a story prompt, guiding the AI to frame its response within a historical context.
Role-based Prefix: “As a fitness expert:” preceding a query about exercise, instructing the AI to adopt the perspective of a fitness professional in its response.
These examples illustrate how prefixes can effectively tailor AI responses to specific user needs and contexts.
See Also: Prompt, Prompt Design and Prompt Engineering, Completion