In comments you provided addition information...
My girlfriend is not a Brit and she will also participate in the exchange programme. The exchange period starts days later than the date we arrive in UK. We will live together in a hotel or airbnb before we head to our university. We don't live together on campus.
You are in an exchange programme, so I assume you are holding a T5 or using one of the short-term visitor routes. So you tell the Immigration Officer you are boyfriend and girlfriend and let's see what goes through the IO's mind.
Given that you qualified for an exchange programme, the IO will be relatively confident that you are not a flight risk and that's 80% of the problem. He's also relatively confident that you have the financial capacity to pursue your programme without resorting to public funds. That part of the interview will be very short.
Given that your girlfriend is in the same programme, the IO will move straight to checking your onward travel and accommodation. Presumably your accommodation has been arranged and you can produce some evidence supporting it.
I would expect the landing interview to take about 120 - 180 seconds max.
It's common for boyfriends and girlfriends to travel together. Where problems arise is when they try to hide it either by lying or by selective information. Selective information is like "Do you have the time?" and you say "Yes" and wait for the next question. They don't like that and there's little to be gained by doing it.
Hiding a relationship gets the IO worried about your girlfriend's overall circumstances, especially accommodation and intent in entering the UK. And of course if the IO trips you up, then he won't trust you and that can lead to detention.
The 'best practices' strategy is
- to ignore horror stories on the net, they are irrelevant for people in an exchange program;
- to ignore advice on the net telling you to lie or use selective information;
- be candid and transparent;
- and especially trying to help the IO do his job.