content: Tays source code was released to the public,  so I'm not sure much modification was needed. I'm pretty sure the script is largely repeat only at first (sort of like cleverbot), but it apears to learn conversational skills over time. With tay, it sure seems like it uses phrases to converse as it builds a conversational memory, and as that memory grows, its rules for word choice improve. My suspicion is they let it spend a few hours shitposting on 4chan, and thats how the "preloading" took place. The pyton code might just be the interface needed to post and read from twitter.