the algorithm to do this is beautiful. think of this as building a turning machine around ChatGPT. we may even need to create a new class of automata for the more general purpose machine this can create.