There are some ideas to produce something like parameterised querying for LLMs, such as DeepMind's CaMeL: https://simonwillison.net/2025/Apr/11/camel/