I am no lawyer, but I suspect what will be considered either fair use or infringing will probably depend on how the programmed AI model is used.
For example, if you train it on a book of poetry, asking it questions about the poetry will probably be considered fair use. If you ask the AI to write poetry in the style of the book’s poems and you publish the AI’s poetry, I suspect it might be considered laundering copyright and infringing. Especially if it is substantially similar to specific poems in the book.
https://www.wired.com/story/elon-musk-pcrm-neuralink-monkey-deaths/