A system and method are presented for dialogue tree generation. The dialogue tree may be used for generating a chatbot. Similar phrases from phrases comprising the interactions between a first party and a second party are group together from the first party of a cluster. For each group of similar phrases, percentages are determined and compared against a threshold occurrence rate. Anchors are generated and used in alignment in the determination of dialogue flows. Topic-specific dialogue trees may be determined from the dialogue flows. The topic-specific dialogue trees may be modified to generate a deterministic dialogue tree.