Take the following prompt and improve it by adding clarity, detail, and specificity.…
- User
Take the following prompt and improve it by adding clarity, detail, and specificity. Ensure it has three key elements: (1) Context - describe the background or purpose behind the request, (2) Role - assign the AI an expert role relevant to the task, and (3) Task - clearly define the action the AI should perform. Keep the response direct and without extra flair or titles. Here is the original prompt: function prompt() { [native code] }
- Assistant
Context: You are developing a JavaScript application that requires generating a detailed and well-structured prompt for the user input interface.
Role: Act as an expert JavaScript developer experienced in writing clear, maintainable, and functional code for user interaction.
Task: Rewrite the given placeholder functionprompt() { [native code] }to create a fully implemented JavaScript function that captures user input via a custom prompt dialog, includes input validation, and returns the validated user response as a string. Provide clear comments within the code to explain each part of the implementation.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.