  (Abridged) Galactic archaeology aims to determine the evolution of the Galaxy
from the chemical and kinematical properties of its stars. The analysis of
current large spectroscopic surveys (thousands of stars) and future ones
(millions of stars) require automated analysis techniques to obtain robust
estimates of the stellar parameters. Several on-going and planned spectroscopic
surveys have selected their wavelength region to contain the IR CaII triplet
and this paper focuses on the automatic analysis of such spectra.
  We investigated two algorithms, MATISSE and DEGAS, both of which compare the
observed spectrum to a grid of synthetic spectra, but each uses a different
mathematical approach for finding the optimum match and hence the best stellar
parameters.
  We identified degeneracies in different regions of the HR diagram: hot dwarfs
and giants share the same spectral signatures. Furthermore, the surface gravity
of cooler dwarfs is difficult to determine accurately. These effects are
intensified when the information decreases (e.g. metal-poor stars or low SNR
spectra). Our results show that the local projection method MATISSE is
preferred for high SNR spectra, whereas the decision-tree method DEGAS is
preferred for noisier spectra. We therefore propose a hybrid approach of both
methods and show that sufficiently accurate results for the purposes of
galactic archaeology are retrieved down to SNR~20 for typical thin or thick
disc stars, and down to SNR~50 for the more metal-poor halo giants.
  If unappreciated, degeneracies in stellar parameters can introduce biases in
derived quantities for target stars such as distances and full space motions.
These biases can be minimised using the knowledge gained by thorough testing of
the proposed algorithm, which in turn lead to robust automated methods for the
coming extensive stellar spectroscopic surveys in the Local Group.
