Let's start with a simple harmonisation of the end of a soprano melody - see figure 1 on the whiteboard. The melody is A B B C and the respective chords I have chosen are IV V V I. We therefore currently have a fairly simple perfect cadence in C major. To increase its sophistication, first we will look at how to incorporate a dominant seventh chord. A dominant seventh chord consists of the dominant triad of the key as well as the note which is a minor seventh above the dominant. In C major, therefore, the seventh in the dominant seventh is F. Because the seventh of the dominant seventh chord creates dissonance, it must be approached and departed via conjunct, or step-wise, movement. The rule to remember is: preparation, suspension, resolution. To be able to use a dominant seventh chord there must, therefore, be the opportunity to incorporate the minor seventh note in the chord that precedes the actual dominant seventh. In this example (see figure 1) the F is present in chord IV, which can be used to harmonise the A in the soprano line. Look at figure 2, and you will see that the F is in the alto part: it is prepared in chord IV, causes dissonance in chord V7, is resolved in chord V.
A further way to improve the sophistication of your cadence is to use unaccented passing notes. Look at figure 2 again and specifically look at the last two notes of the alto line. They are a third apart. A quaver passing note can therefore be used to make the alto line more conjunct. Because this means that we are now using an F in chord V, it has become chord V7 on the second quaver beat: therefore, label this beat as V(7). It is also important to note here that the alto falling to the third of the tonic chord, which it does in these last two chords, is stylistic of a Bach chorale. A passing note can also be used in the tenor: see figure 4.