improve prompt construction performance