How to create dataset on a specific topic to fine tune llm?

Hi, I understand that to tune large language model we need dataset of inputs and outputs. Lets say I have a book and I want the llm to answer any questions within the book because and I don’t want to use context as my llm can get expensive, how do I create dataset of input and output from the book to fine-tune the llm? Any advice will be appreciated thanks!!