Great write up, I enjoyed the reading the explanations for each piece and found them to be clear and quite thorough.
I did make the mistake though of clicking "+ expand source", and after seeing the (remarkable) abomination I can sympathize with ChatGPT's "SQL is not suitable for implementing large language model..." :)