system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does our bodies regulate the amount of blood it needs to produce in order to compensate blood lost or donated?
gpt
The magic of the kidney! The kidney is a really cool organ that does more than just filter your blood. It also has an endocrine (hormones that control what your body does) function. Specifically, it produces erythropoeitin, which causes your bone marrow to make red blood cells. 

The kidney also has cells that act like little oxygen sensors, and when they detect persistent decreases in oxygenation (such as if you're missing blood) they will cause more erythropoetin to be produced, so your bone marrow increases red blood cell production.