Samples determines the quality. The setting is found on the AO shader which is piped into the surface shader you assign to your objects.