https://bennycheung.github.io/ask-a-book-questions-with-langchain-openai
https://github.com/langchain-ai/langchain
Essentially, you cut the pdf/text file up into chunks, process it to embeddings, then ask the AI questions and it responds with the relevant segments of the book
And this is why you password protect your ssh keys