build_prompt function

Build a concrete LLM prompt from a template