how does generative ai work

top