The layout of the pump station is easily affected by topography, site, and other factors, resulting in poor inlet flow patterns in the forebay, which seriously affect the normal operation of the pump station. To optimize its inlet flow pattern, the size of the hollow rectification sill has been continuously improved through physical model tests to meet the requirements of the required pump station inlet flow field. In this paper, particle swarm optimization (PSO) was combined with the Gaussian process (GP) to establish a particle swarm-Gaussian process (PSO-GP) model to predict the velocity uniformity of the inlet sump of pump stations with different hole-to-height ratios, hole-to-width ratios, upper-to-lower sill length ratios, and sill height-to-water table ratios. Finally, the hollow rectification sill with the optimal size was obtained and tested in the physical model to compare the rectification effect with other sizes of hollow sills. The results show that the algorithm model can help the traditional physical experiment quickly predict the velocity uniformity of the inlet sump of the pump station. Through the optimization by the PSO-GP algorithm, we can get the optimal size of the hollow rectification sill. Its hole-to-height ratio is 0.62, its hole-to-width ratio is 0.37, upper-to-lower sill length ratio is 0.63, and sill height-to-water table ratio is 0.23. It shows that this method is practical in the optimization design of the hollow rectification sill and provides a new method for the optimization of the flow field in the forebay of the pump station.