When models are trained on diverse datasets assembled from literature, high precision does not guarantee physically significant predictions in material engineering. To predict the compressive strength of the widely used material, ultra-high-performance concrete (UHPC) , this paper suggests a physics-guided machine learning framework that puts physical consistency ahead of inflated accuracy metrics. A dataset of experimentally reported UHPC mixtures was compiled, and physically meaningful descriptors were constructed to represent effective binder content, effective water-to-binder ratio, particle-packing contribution, steel-fiber reinforcement and curing-time effects as domain-consistent input features. To limit nonphysical model behavior, monotonic constraint reflected the inverse connection between compressive strength and effective water-to-binder ratio was incorporated into the learning process. In addition to explicit physical consistency evaluation based on monotonicity violation analysis, the model's performance was assessed using regression metrics. Under a conventional random train–test split, the unconstrained baseline model achieved an R² of 0.940, an RMSE of 8.71 MPa and an MAE of 6.22 MPa. Under a more demanding fly-ash-based regime split, the physics-guided model achieved an R² of 0.845, an RMSE of 13.36 MPa and an MAE of 10.86 MPa. In their respective evaluation settings, the baseline and physics-guided models produced monotonicity-violation rates of 29.6% and 26.4%, respectively. The proposed framework demonstrates the importance of evaluating machine-learning models using physical plausibility in addition to conventional accuracy metrics.