This question is more 'about curiosity' than a (present) need:
I have a Plone website with 'a lot of books' (which are basically Plone (markdown) pages with export functionality).
Would it be possible to add 'some kind of AI that answers question based on the content from the site (only). For example, if the site has information about AC (electricity), it would be possible to ask questions like: What are the characteristics of alternating current?
This has very little to do with Plone. Google "how to train your own LLM with your own data"....either setup your own LLM workflow or use one of the SaaS solutions. Getting your data from Plone into a LLM should be straight forward.
We are doing pilots of this for our clients now. The main way this is done is whats called RAG. but there are other ways to do it these days if the site data is all public with LLM's being able to use search apis like google but you would need to ensure you can limit the domain of those searches.