Improve the following code | prompts.chat