For those not familiar, markov chain chatbot is a chatbot which predicts next word based on (for example) 5 previous words it already generated, so when those 5 words are found in text, the word which comes after them becomes generated word.
Now, what is problem with markov chain chatbots? their main problem lies in the fact that their developer must pick a number of previous words to base current generation on.
If chain is too long, such as 12 previous words, chatbot will merely repeat from text and generate no new sentences, no creativity. If chain is too short, such as 3 previous words, chatbot becomes creative but incoherent and its grammar starts to suck badly, there is simply no ideal chain length. You are always going to have either mostly pure repetition either mostly incoherence, always sacrificing either creativity or coherence.
In past, I used to address this problem by creating randomized number for chain, so sometimes it uses 3, sometimes 10 previous words....ect.
However, recently I was also coding my INFINI chatbot models, and they are based on structures of sentences, their constants and variables, rather than chain of previous words, and they work much better than markov chain.
However, then I realized how my INFINI models are actually predicting a variable, and variable can have more than one word. So they are not predicting word by word, but possibly even groups of words.
I realized, why not try something similar with markov chain chatbots.
Why should markov chain predict word by word?
Wouldnt a much better way be, lets say to predict next 5 words based on previous 4 words?
So I put the idea to the test. And the result of rest was very surprising. Markov chatbot still maintains creativity because it only predicts based on 4 previous words, however, because it generates words 5 by 5, it also maintains coherence.