If you have IBS, then your GP will work with you to find the best treatment. They will also talk to you about ways you can manage the condition to reduce its impact on your daily life. Some of this advice will be diet-related.
So, for example, your doctor will typically talk to you about foods that are good for IBS and foods that are bad for IBS. They'll also talk to you about your fibre intake.