Technically, the person asking the question can only be sure of him or herself existing. You are correct that it is possible (but not likely or plausible) that we all be figments of your imagination. However, from my perspective, you would be a figment of my imagination. No way to get this question right because it is all of a matter of point of view.