In the first court ruling of the legality of using copyrighted books to create answers for chatbots such as ChatGPT, the bots have won and the authors lost. The chatbots need to have access to huge amounts of information to answer your questions. There isn't much else that can match the millions of published books as a source for it. It was a mixed decision, but on the critical question of whether it is a copyright violation to use published works for this purpose, the ruling was that it is not a copyright violation. Just obtain your books in a legal manner first.
The case pitted authors Andrea Bartz, Charles Graeber, and Kirk Wallace Johnson against chatbot Maker Anthropic. Anthropic trained its chatbot, “Claude,” on works written by those authors and many others. Their works were subject to copyright protection. While copyright law in general prohibits copying copyrighted works, there are numerous exceptions that fit under the title “fair use.” The most obvious one is copying a small portion for a book review or a report assigned by your schoolteachers. We've all done it, even if we wished it was illegal so we couldn't be compelled to write these reports instead of doing fun things.
The court examined the various criteria that determine “fair use” on which there is a lot of legal precedent we won't go into here. Leave that to the lawyers. Suffice to say the court determined this to be more like copying for an original book report than copying it to sell and make the profits that should go to the authors. That is “fair use.”
This wasn't a complete victory for Anthropic, but the shortcomings of their behavior can be remedied in future cases. The court found that legally purchased books were subject to the fair use exception and could be used by chatbots. However, illegally copied books, such as those on pirate sites like LibGen that simply copies copyrighted books and posts them online, are not “fair use.” You need to copy your own legally acquired books and then you can legally use them in your chatbot.
While this is a major victory for the chatbots, it is still the first round. The decision was made by the U.S. District Court for the Northern District of California. It is precedence in Northern California and nowhere else. Besides which, it can be appealed to the Appeals Court, and that court's decision can be appealed to the Supreme Court. Meanwhile, similar cases are proceeding elsewhere and another court might reach a different conclusion. Another case was just filed against Microsoft for using copyrighted works for its Megatron AI service. Meta/Facebook has also been sued. This is a major case for access to information in the Information age, pitting access to knowledge against its creators. Other courts will read this decision, but they aren't bound by it.
This is still the first round. The outcome is yet to be definitively concluded, but the chatbots have won round one, and they will be citing this case in pleadings made to other courts. It's always better to play with a lead than to play from behind, but it's not yet game over. My own guess is that the courts will ultimately rule for the chatbots, as access to knowledge and advancements in technology are not things they will want to inhibit, but perhaps some accommodations will be required, such as providing attribution or some blanket fee.