Sit pretty is a very difficult thing for a dog to do and it's great exercise for them, especially if you ask them to alternate between "pretty" and "down."
In order to help the dog, I found it easier to start sitting with legs and feet in a "V" so the dog has something to lean against. Then you can ask for a hand touch (if they know it) and get them used to the idea of being in that position.
Eventually you can start reducing the amount of support and generalize in other areas like a corner and then a flat wall. Once they get the idea you can begin adding a "pretty" cue before they perform the maneuver.
Don't rush things and let your dog guide you as to when they are strong enough. Some dogs can pick it up quick and others need to build up their core a little more.