I am sure you heard before: there are only two hard things in CS: cache invalidation and naming things.
In the history of this company, I can honestly say that this SQL/LLM thing wasn't the hardest :)
And the other of the two problems is off-by-one errors.
And the other of the two problems is off-by-one errors.