Spotty DSL can be caused by low signal quality. Most newer modems will show the signal quality via their web interface. Things you are looking for are SNR (signal to noise ratio) and Attenuation. Both are usually given in dB, though some modems may turn the number into a rating of some sort. Generally higher SNR and lower Attentuation is what you want. Anything above 50db in attenuation or below say 10db SNR is going to give you problems.
If this does turn out to be the problem, there are several things you can do. Usually the cause is bad wiring, interference (from power running along the same lines or other devices in the house, or other phones plugged in). It may be as simple as using a different outlet. Otherwise you can buy "whole home filters" that basically split the line where it comes into your house into a clean side for your modem and a filtered side for your phones (if you even have any). Then you can run that line right to your modem (avoiding running along power or around other noisy devices), ideally using ethernet cabling vs traditional phone wire.
Before you go all into that though, probably a good idea to confirm thats the problem. Really depends on how your phone service is wired up, but if its accessible from the inside it is usually pretty trivial to disconnect the rest of the house and just connect your modem directly to the service. If you do this and your SNR/Attenuation is fine, then you know the problem and can proceed with above. Otherwise the problem is probably at the ISP end and you'll have to call them to take a look.