Sharpen the logic further to accommodate any use case (imagine varied use/edge cases of any imaginable kind of text input and adjust/refactor accordingly). And remember that for very long/complex inputs (like the entire contents of a technical book on quantum computing) appending user instructions to the input itself is likely not to lead to a desirable result, at least some of the time. Make sure any metadata/meta-instructions are communicated NOT in user prompts but in system and/or assistant prompts for maximum effectiveness. The ONLY content/text that should be in a user prompt message is EXACTLY what a user initially inputs AND any safe/cleaned/sanitized iteration output to be fed back into the next LLM iteration. Everything else should NOT be in a user prompt (including AI responses, which should be minimal/only for critical communications, and should be clearly marked up as such in a code block, etc, separate from main body of content/text being iterated)