Back to List
Warm
🟢
Format Conversion
Warm • Prompt Engineering Challenge
Convert text from one format to another
Challenge Description
In data processing and integration, we often need to convert information from one format to another. This challenge requires you to write a prompt that enables AI to accurately convert text from one format (such as plain text, CSV, JSON, etc.) to a specified target format, while maintaining data integrity and accuracy.
Challenge Goals
Write a prompt that enables AI to:
- Identify the data structure and format of the original text.
- Extract all relevant information.
- Convert the information to the specified target format.
- Ensure no data is lost or misinterpreted during the conversion process.
Requirements
- The conversion must be accurate and retain all original data.
- The converted format must comply with the specifications of the target format.
- The prompt must be able to handle conversions between various common formats.
- For ambiguous data, reasonable assumptions must be made and explained.
- The output must be formatted for readability and usability.
Prompt Template
[Your Prompt]
Source Format: {Source Format}
Target Format: {Target Format}
Content:
{Content}
Automated Testing Process
- For each test case, use your prompt as input.
- Use specialized validators to check the validity of the output format:
- JSON output validated by a JSON parser.
- YAML output validated by a YAML parser.
- Markdown table structure validated by a table parser.
- Compare the data content before and after conversion to ensure completeness.
- Check if data types are correctly preserved.
- Evaluate formatting quality (indentation, alignment, etc.).
- Calculate the final score (out of 5 points).
Expected Output Example (for Case 1)
Conversion Result:
{
"Name": "Zhang San",
"Age": 28,
"Occupation": "Software Engineer",
"Skills": ["Python", "JavaScript", "Docker"],
"Address": "Haidian District, Beijing"
}
Submit your solution and share your ideas and techniques with the community!
Write Your Prompt
Write your AI prompt based on the requirements
0 / 2000
Tips for Better Prompts
- Be specific and clear about what you want
- Provide context and examples when helpful
- Use appropriate tone and style for your audience
- Test and iterate to improve your results
Need help? Join our community
View Discussions