A Latin term meaning “for this”, used as a definition to describe something (such as a committee or hypothesis), specifically intended to solve a particular problem, result, or desire. If an administrator at a university organizes a committee tasked with approving “that” thing (say, campus security), that employee will have set up an ad hoc committee. Usually, these committees are short-lived, and once the problem is resolved, they are dissolved.
An ad hoc hypothesis arises to fill a gap in a theory. For example, when the geocentric theory of Ptolemy and other astronomers began to contradict the improving observations of celestial bodies, the proponents of this theory made an ad hoc hypothesis about orbits: the planets not only revolve around the Earth but move in small circles (epicycles), together with their movements in their circular orbits. Further, in order to correct Ptolemy’s view with the observed data, it became necessary to assume that the planets move in an incredibly complex scheme of epicycles.
In general, the need to adopt an ad hoc hypothesis in order to support a theory betrays a symptom of insufficiency in the theory, although it does not necessarily mean the emergence of a general reason for rejecting this theory.