Appreciate the link! That is not what I had in mind though; for them, the Prolog Code is the goal, for me, Prolog is an interface language within a system I build. That code could be generated on the fly, but I lean more towards fixed templates that can be instantiated by input some variables by the LLM that is doing agentic code, rather than having that LLM reproducing that query code completely on the flow.

The reasoning behind it is that I want to put as much logic as possible into the harness where it is deterministic, controled and fast - My goal is to make agentic coding usable for my purposes even with small local LLM models. Those might botcher generating Prolog queries sometimes, but they might might be able to used my API/interface/whatever reliably (and then the harness does everything else under the hood, including instantiating the Prolog templates and running the queries)