With any improv, you want to tell a story. The licks, riffs and grooves are your words. Each phrase you play is a sentence. So a phrase should be no longer than what you take to say a sentence. Where the phrase should resolve to depends on whether it's contributing to rising or falling action (more later.)
So the first thing is your voice. You should sing all your phrases while comping along with yourself. And record it. Don't worry about your voice; Monk and Keith Jarett constantly sang along with themselves. People respond to saxophones and trumpets and violins because they commonly play in the same register as the human voice. Don't listen to pianists, listen to jazz vocalists, sax players, trumpet players. Breath is your best phrasing guide.
When you have a voice you need a story to tell. Writers structure stories as narrative arcs.
A narrative arc is usually:
- Exposition: The introduction the story in which characters are introduced, setting is revealed.
- Rising Action: A series of events that complicate matters for the protagonist, creating a rise in the story's suspense or tension.
- Climax: The point of greatest tension in the story and the turning point in the narrative arc from rising action to falling action.
- Falling Action (Anti-climax): After the climax, the unfolding of events in a story's plot and the release of tension leading toward the resolution.
- Resolution: The end of the story, typically, in which the problems of the story and of the protagonists are resolved.
In good stories there's usually a series of rising actions (and slight falling actions) that gradually get bigger to the big climax and the resolution of the story.
So a piano story might go like this:
- Exposition: Restate the hook or some other melodic fragment in your opening solo phrase
- Rising Action 1: Start mutating the fragment by changing notes, rhythm or octave in each phrase
- Falling Action 1: Either state the hook again or play a little chord-melody off the fragment or even stop briefly.
- Rising Action 2: Continue to mutate the fragment. Get edgier, add some notes or chords that don't fit in the scale. Get louder. Start using flash moves.
- Falling Action 2: Play the mutated fragment cleanly and simply
- Rising Action 3: Start playing a completely different melodic fragment
- Falling Action 3: Go back to your original or mutated original fragment
- Rising Action 4: Start combining parts of the original fragment and the new fragment and switching between the two. This is dialog and conflict and interesting. Slice and dice, baby. Maybe play one fragment high and the other low. Get them arguing.
- Rising Action 5: Keep combining and switching and slicing and dicing and effecting until combined statement is now really intense and difficult to play and busy.
- Falling Action: Take out the parts that jar (or skip this step)
- Climax: Add your special sauce, whatever makes listeners go "Woo!"
- Resolution: State your original fragment and then segue back into the tune.
(Bonus points to nerds who noticed that this solo is a sonata.)
The conflict in the rising actions are usually described as "tension and release" and the tension can be anything that is unsettled: busy vs. sparse, funky vs. straight, quiet vs. loud, playing up and down the keyboard, adding more chromatic notes or even playing in a key that's different from the song, playing behind the beat or in front of the beat, slow vs. fast, etc.