How to format a dataset for question/answers text for fine

Hello,
I see a lot of dataset here that consists of question and answers for NLP tasks. I am wondering on how to format this for fine tuning a LLM specifically for qa tasks. My first guess would be to concatenate them in the following manner:
“Question: “question”\nAnswer: “answer””. Then I suppose that for inference, I give “Question: “question”\nAnswer:” to the model. Is this the right approach to this problem ?