A criminal who carried out a knifepoint sex attack on a woman who went to his house to fit him with an electronic tag has been jailed for four-and-a-half years.