The interplay between physicists and philosophers is particularly interesting here. Einstein himself mentions that reading Hume was helpful to him[1]:

"Your exposition is also quite right that positivism suggested rel. theory, without
requiring it. Also you have correctly seen that this line of thought was of great
influence on my efforts and indeed E. Mach and still much more Hume, whose
treatise on understanding I studied with eagerness and admiration shortly before
finding relativity theory." - Albert Einstein

[Logical] Positivism, which he also mentions, was a contemporary school of philosophy very much inspired by the empirical skepticism of Hume.

But the influence goes both ways; P. W. Bridgman held Einstein up as an exemplar for his operational perspective[2] which is a very important (if problematic) idea in the philosophy of science that says we can have to define concepts in terms of the actual operation we will carry out when we measure it, for example measuring distance by attaching a mirror to it and timing how long it takes for a laser pulse reflected off it to come back to us.

I agree with your statement that things can go badly wrong when philosophers start making predictions. At that point they are no longer doing philosophy but actually doing physics or some other kind of science... and unfortunately they are often unqualified for that kind of work. Some philosophers are strong logicians or mathematicians but few, I think, have enough applied mathematics or domain expertise to succeed when they start doing science.

But this is also troubling in many ways. For example, there is no way that Descartes, merely by sitting in an oven and applying his method of skepticism, could have deduced special relativity. Indeed, if he had deduced it, he would have had to reject it (for the time being) as not parsimonious enough! The observations needed to even know that relativity is necessary (Michelson–Morley experiment, orbit of mercury, gravitational lensing) are so technical that you can't even make the observations unless you already have a fairly sophisticated theory of how the world works! For example, you have to know that light is a wave that can interfere with itself before you can build a Michelson interferometer. (This problem is sometimes called the theory-ladenness of observation[4].) We have to layer many models to reach the truth. For example, to conduct an experiment meant to verify some prediction of general relativity, I might design a instrument (such as a telescope) using classical physics. I would then operate the instrument using the intuitive model of human-scale physics learned in my childhood - turning knobs and reading dials. Should philosophy have to be consistent with all of these models and well as providing guidance about how to move between them? What exactly is the relationship between science and philosophy? I don't know if anyone has yet given a full account.

My tentative view is that philosophy has to play midwife to science (providing methods, inspiration, and analyses) while being very careful to avoid competing with science in its own arena, as Bergson did. Socrates may have been able to play the perfect midwife (or so we're told) but for most subsequent philosophers it has proven very difficult to do pure philosophy without also letting their own preconceptions about how the world works accidentally slip in.

[1]: https://www.pitt.edu/~jdnorton/papers/HumeMach.pdf

[2]: https://plato.stanford.edu/entries/operationalism/

[3]: https://en.wikipedia.org/wiki/Michelson%E2%80%93Morley_exper...

[4]: https://en.wikipedia.org/wiki/Theory-ladenness