Yes, it is context based and up to interpretation, but in most cases, it lasts until there is an "a tempo" marking, where you should return to the original speed. If your ritardando is at the very end of your piece without any following a tempo, my guess is that it should last until the last note.