Disclosed are triazole, imidazole and pyrrole condensed piperazine derivatives and their use as allosteric modulators of mGlus receptor activity, pharmaceutical compositions comprising such compounds, and methods of treatment therewith. Compounds of the invention can be used for the treatment and/or prevention of neurological and psychiatric disorders associated with glutamate dysfunction such as schizophrenia or cognitive decline, dementia or cognitive impairment, or other pathologies that can be related either directly or indirectly to glutamate dysfunction, i.e., disorders treatable by positive allosteric modulation (PAM) or by negative allosteric modulation (NAM) of mGluR5.