Rotor is right - the AI in F1 2010 is about the same as the AI in GRID, which was far too easy to race against - you move in front of another car and the AI lifts off the throttle to avoid hitting you, rather than trying to find another route. In GT5 it's the opposite, and from my experience so far, it's the best AI in a racing game thus far.
In real life racing, you must brake later, take risks, dive up the inside, of people in order to get the place - this is what happens in GT5. The AI takes risks, and sometimes there are moments where you might have to take avoiding action to avoid being hit - deal with it, use your mirrors, see where the AI is and prepare yourself - don't act surprised when the AI knocks you off the circuit, when actually you've turned into the front of the AI's car! Why didn't you turn in later? Why didn't you brake later? There are many ways to avoid it and it's all a part of racing.
I race karts and often the first few laps of a sprint race are a pure test of avoidance skills, nothing else. People jostle for position in real life and it's no different in GT5.
As Rotor says, if you drive "normally" - i.e. try not to bump the AI, don't deliberately swerve in front of cars to try and stop them passing (if they're passing, let them past, and have another go at passing them later round the track, same as you would in real life), then imo you should have no issues. I've had to take avoiding action from AI braking late for a corner, but had no issues so far, feels very real!