Anharmonicity and NLO responses: an exact diagonalization study