Really? I retain plenty of copyrighted material in my head. What matters is the contexts in which I reproduce it (if any).
A search index might also contain copyrighted material. As long as it's used for search queries as opposed to regurgitation there's no problem. Search indexes and LLMs are both clearly very beneficial tools to have access to.
Are you a for profit product?
Reproduce it. Sit in a clean room and write it all out. Then go check your accuracy. I'm curious to see what it is.