How do you determine if a pair of aqueous solutions will produce a precipitate when mixed?
How else but by experiment?
Chemistry is an experimental science, and all our solubility rules derive from experiment. There are many empirical rules, e.g. all nitrates are soluble; all halides are soluble except for what? Of course these solubility rules commonly refer to aqueous solution.