The idea of not tempting the Lord quoted in Matthew 4 by Jesus was originally referring to the idea of asking for additional signs in order to confirm the Lord's call in one's life, or to just better understand the will of God more generally.
This interpretation probably immediately brings to mind the story of Gideon, or the Pharisees, who kept asking for signs, but was told that "there shall be no sign given to it, but the sign of the prophet Jonas."
But today, we're going to look at Ahaz as he refuses to ask the Lord for a sign because that would be tempting to the Lord. Surprisingly, within this context, Ahaz is rebuked.
Here's the context: Ahaz, the King of Judah, is a little distressed because Syria and Israel have combined their armies against Judah. At this point, Isaiah informs Ahaz that the Lord will not allow the plans of these armies to stand.
But immediately after these words, the book of Isaiah records this dialogue in Isaiah 7:10-13,
"Moreover the Lord spake again unto Ahaz, saying, Ask thee a sign of the Lord thy God; ask it either in the depth, or in the height above. But Ahaz said, I will not ask, neither will I tempt the Lord. And he said, Hear ye now, O house of David; Is it a small thing for you to weary men, but will ye weary my God also?"
It would seem that Ahaz had the right sentiment about not tempting the Lord for further confirmation about what the Lord had already said He would do. However, at the point, where it was directly against what the Lord had told him to do, it was disobedience and the nice sentiment didn't matter.
It is very easy to fall into a trap of thinking you're doing just fine because you have a good sentiment behind what you are saying, but to actually deep down be ignoring the command of the Lord altogether.