I'll do a longer thread---and this little toy example just scratches the surface of what's possible---but edsl (pip install edsl) is an open source python package & domain specific language for asking LLMs questions
EDSL lets you run an LLM-based survey in just a few lines of code:

