Is it a contradiction, or is it comprehensive? Note
Proverbs 26:4–5 (NIV)
4 Do not answer a fool according to his folly,
or you yourself will be just like him.
5 Answer a fool according to his folly,
or he will be wise in his own eyes.
Given the nature and context of the book of Proverbs, my money is on comprehensive. That is the easy part! The hard part is knowing when to follow the advice of which verse.
The interpretive key is located in the second clause in each verse, the part of the verse following “or.” In verse 4, we should not respond to the foolishness when a response draws us into similar actions and attitudes. We don’t want to become like the fool. (cp. 22:24-25)
In verse 5, we should clarify and correct their foolish positions when failure to do so will confirm them in their misinterpretation and draw others into their inaccurate conclusions. Caution is warranted here. When a fool feels threatened by wisdom, they are prone to aggressive responses aimed at backing down the opposition. Their reaction only rarely has any link to truth and logic. The wise bring calm in the end. (29:11 NIV)