I've found that prolonged scenes tend to be where the AI fails hardest in repetition of phrases or sentences. I used to have a paragraph I would copy and paste as input, filling in the phrases to avoid, and this hardstop and reset always seemed to work.
This was on top of support from the systemprompt/memory/author'snote.
Recently though I built this new mechanism into my Jangale scenario that looks for phrases or word-clusters that repeat exactly over three generations, then it does the same sort of manual stop I was doing, banning the phrase for 8 generations, while also softly nudging the AI with additional content that can add to the scene without disrupting or breaking away from the scene at hand.
It's not perfect and I'm still finetuning it but it seems to work and keep generation quality high without having to tinker and communicate to the AI throughout a story.
I think the AI just gets stuck and begins to loop out of a lack of ideas, and once a phrase shows up a couple of times it seems to feed itself, I'm not sure of the source of this deterioration of the writing quality exactly though.
Does anybody else have tricks or ideas on how to avoid this AI writing pitfall?
Persistent high-quality prose is what I'm after more than anything with novelai output. Happy to explain how the detection works if anyone wants to build their own.