Many people tend to think that “Knowledge” and “Intelligence” are similar. But in fact, the aren’t. Knowledge and Intelligence are two heterogeneous aspects which floats on poles apart.
Here is a picture of what i think of knowledge & Intelligence.

This above diagram is how an artificial intelligence system works. All the intelligence of the system lies in the inference engine. So, its almost the same analogy. In a particular situation, a person uses his senses (“User Interface”->eyes, nose,ear ….) and get facts from the environment. Then he uses his intelligence (Inference Engine) to process the information just received from the external environment together with existing knowledge. This will output a series of action.
The image above has been obtained from here but i saw that it needed an improvement. Because whenever we think, our knowledge increases because we happen to deduce new things. Such as when we do some works, we obtain skills. So, every for each process of intelligence, our knowledge base is updated

So, whether or not the action are “good” or “bad” depends both on the knowledge and most importantly, INTELLIGENCE.