Dogs are known to consistently follow human pointing gestures. In this study, we asked whether dogs “automatically” do this or whether they flexibly adjust their behavior depending upon the reliability of the pointer, demonstrated in an immediately preceding event. We tested pet dogs in a version of the object choice task in which a piece of food was hidden in one of the two containers. In Experiment 1, Phase 1, an experimenter pointed at the baited container; the second container was empty. In Phase 2, after showing the contents of both containers to the dogs, the experimenter pointed at the empty container. In Phase 3, the procedure was exactly as in Phase 1. We compared the dogs’ responses to the experimenter’s pointing gestures in Phases 1 and 3. Most dogs followed pointing in Phase 1, but many fewer did so in Phase 3. In Experiment 2, dogs followed a new experimenter’s pointing in Phase 3 following replication of procedures of Phases 1 and 2 in Experiment 1. This ruled out the possibility that dogs simply lost motivation to participate in the task in later phases. These results suggest that not only dogs are highly skilled at understanding human pointing gestures, but also they make inferences about the reliability of a human who presents cues and consequently modify their behavior flexibly depending on the inference.