Preparing for the expected wealth of Gaia detections, we consider here a simple algorithm for classifying unresolved astrometric binaries with main-sequence (MS) primary into three classes: binaries with a probable MS secondary, with two possible values for the mass ratio; probable hierarchical triple MS systems with an astrometric secondary as a close binary, with a limited range of mass-ratio values; and binaries with a compact-object secondary, with a minimal value of the mass ratio. This is done by defining a unit-less observational parameter Astrometric Mass-Ratio Function (AMRF), $mathcal{A}$, of a binary, based on primary-mass estimation, in addition to the astrometric parameters - the angular semi-major axis, the period and the parallax. We derive the $mathcal{A}$ value that differentiates the three classes by forward modeling representative binaries of each class, assuming some mass-luminosity relation.To demonstrate the potential of the algorithm, we consider the orbits of 98 Hipparcos astrometric binaries with main-sequence primaries, using the Hipparcos parallaxes and the primary-mass estimates. For systems with known spectroscopic orbital solution, our results are consistent with the spectroscopic elements, validating the suggested approach. The algorithm will be able to identify hierarchical triple systems and dormant neutron-star and black-hole companions in the Gaia astrometric binaries.