You MUST learn your pentatonic up and down the fretboard mate!
As for improvising, its easy to say `play by ear`, but every player uses little stock phrases occasionally. Here`s one i`m over-using at the moment, its in the SAME key as that posted above by littleknowitall.
e--------------------------------------------------
B-----------------------5--------------------5----
G----------------7h8-------------------7h8-------
D-------------------------------------------------
The chromatic note between the 4th and 5th here gives the lick some flavour!
After a quick burst of something like that, its nice to land on the Root note (or the 4th or 5th depending on where you are in the song), so land yourself (on A) like this...
e---------------------------------------------------
B-------------------8------------------------------
G----------7--s--9---9---7-s-5-------------------
D-----------------------------------7~------------
Ah, the pentatonic! The posibillities are endless....