A template builder which embeds context understanding