Some great tips adn advice here certainly, my own views will pretty much sum up whast already been said, but I'm gonna dd them anyway as differnt points of view make more sense to different people.
I try and get to know the people I am riding with, find out what their abilities and skills are, and how I think they compare to mine, and of course what type of bike they ride plays a factor. When riding in a group this can prove to be very important, it will give you some idea of when a bike in front or behind you will try an overtake or some other manouver, and make you more prepared
I know some people who ride like a bat out of hell, on a sports bike, i know that they will take a corner faster and better than me on my FJ, so if I am following them the information I get from them is pretty much reference only, more so if I don't know the road. I know they can out ride me, even if I was on the same bike. So if I am gaining on them approaching a corner, I am probably going a tad fast, and back off, but thats about it, I knwo they will take that corner much faster than i will and their bike will play a good part in allowing them to do that, as it will handle better than mine.
If I am following someone on a smililar bike, who has similar or slightly better skills, and they are pullign away from me, I know that I am probably safe to increase my speed around bends somewhat, but you always have to factor in that if you are following someone and using them as a guide, if they overcook it, you stand a good chance of doing the same.
At the end of the day, if you're not confident to race or keep up with another bike, then don't do it, its really not worth it.
The only good way to improve is to practice as much as you can in all weather conditions, attend things like bike safe, and get some advanced training.
Some of the best riders I have seen ride sports tourers, and have done advanced training, and they ride SMOOTH, and when you get that right you maintain a improved overall speed, and they are able to keep up easily with the 'faster bikes' with out all the effort, heavy braking and acceleration.
Without embarrassing people, watch how Dave rides his FJR1300, even with Meike on the back, its always a smooth ride to watch and he maintains a good progress, no excessive braking (unless in emergency), I have to say that I am always impressed when I see him riding, and I admit that Dave is a rider that inspires me to ride better, I really like his style, and he's a great chap to boot!
But no matter what, never ride above you ability, confidence or the bikes abilities, sure use other people to get tips and ideas from, but always ride your own ride, and only push yourself when its safe for you to do so, and you are confident enough. Ignore speed, go for smoothness of ride, and you will find that your cornering and overall riding will improve vastly.
I can highly recomend getting some ROSPA or IAM advanced training, its suprising how much it can help, and you also get discounts on your insurance if you hold one of those certificates.