By incorporating templates and slots as latent topics, probabilistic graphical models learns those templates and slots that best explains the text.
the edge weight between two points is their template level similarity / slot level similarity.