As geological exploration and oil and gas development continue to advance, improvement in fluid prediction becomes increasingly crucial. Drilling data often suffer from limited sample size, challenging traditional machine learning methods to fully harness these data. Consequently, a more adaptable and versatile approach is required. In response to this issue, we introduce the meta-ViT (Vision Transformer) method—a novel framework that merges meta-learning with the ViT. Meta-learning's parameter updating mechanism refines the model's ability to discern patterns and nuances across tasks, while ViT, powered by meta-learning, achieves an enhanced grasp of geological exploration characteristics, boosting fluid detection efficiency. The support set supplies meta-learning insights, while the query set assesses generalization. ViT excels at identifying subterranean fluids. Meta-learning replicates varied tasks and data distributions, fortifying model adaptability. Meanwhile, Transformers' self-attention mechanism captures distant dependencies that traditional long short-term memory struggle to manage. Their residual connections and layer normalization also address gradient challenges, simplifying training. Hence, our model effectively interprets intricate drilling data features, improving predictive accuracy and adaptability. In our experiments using a small drilling data sample set, we compared meta-ViT against other models. The results reveal superior performance of our model with limited data, affirming its efficacy and prominence in fluid classification tasks. Overall, our proposed solution excels in fluid classification tasks involving small-sample drilling data by utilizing available samples to enhance model adaptability and predictive performance.