intermediateChapter 4 of 12Exercise 2 of 2

Variable Substitution with XML Tags

Create a prompt template that uses variable placeholders inside XML tags, allowing you to swap in different data while keeping the instruction constant.

Your Task

Write a reusable prompt template that translates text between languages. Use {SOURCE_LANG}, {TARGET_LANG}, and {TEXT} as placeholders, with the text wrapped in XML tags.

Success Criteria

Prompt must use XML tags and variable substitution with {PLACEHOLDER} syntax. The template should work correctly with different input values.

Recommended Background

Review Assigning Roles before attempting this exercise for the best experience.

Cmd/Ctrl + Enter to submit