## 3 Factors Influencing Yield and Quality  
The cultivation of _C. militaris_, recognized for its significant medicinal properties, is influenced by genetic, environmental, and host-related factors that determine both yield and quality (Figure 3). The genetic makeup of the _C. militaris_ strain plays a pivotal role, as variability among strains affects growth rates, bioactive compound synthesis, and adaptability to cultivation conditions [30]. Advances in genetic engineering and selective breeding have enhanced traits such as increased cordycepin production and improved stress resistance. Temperature is a critical environmental factor in cultivating _C. militaris_, influencing both fungal growth and the production of bioactive compounds. The optimal temperature range for cultivating _C. militaris_ is between 20 \({}^{\circ}\)C and 25 \({}^{\circ}\)C [54]. Within this range, the fungus achieves optimal growth and metabolite production, including key compounds like cordycepin. Deviations from this temperature range can significantly impact fungal metabolism, affecting both the yield and quality of the final product. Lower temperatures may slow growth and metabolite production, while higher temperatures may inhibit growth or lead to the production of different metabolites [55]. Therefore, maintaining controlled environmental conditions is vital to ensure consistent, high-quality yields of _C. militaris_  
Humidity plays a significant role in the cultivation of _C. militaris_, markedly influencing fungal growth and metabolite production [56]. Optimal humidity levels, generally between 60% and 80%, are crucial for promoting healthy mycelial growth and maximizing the production of bioactive compounds such as cordycepin and polysaccharides. Proper humidity levels ensure that the fungus does not dry out, potentially impeding growth and decreasing metabolite synthesis. Conversely, excessively high humidity can increase contamination risks and may lead to suboptimal growth conditions [16]. Figure 3: Overview of key variables affecting _C. militaris_ cultivation. Light significantly influences the production of _C. militaris_ by affecting metabolic responses and synthesizing key bioactive compounds, such as cordycepin and carotenoids, essential for the fungus's medicinal properties [26]. Exposure to specific light conditions, especially variations in light intensity and wavelength, activates genetic pathways crucial for these compounds' synthesis, impacting both the quantity and quality of the fungal biomass [57]. For instance, light-induced transcriptional changes in genes involved in metabolic pathways are critical for adapting fungal metabolism to optimal light conditions, which enhances growth and secondary metabolite synthesis. Managing light exposure is therefore vital in optimizing both the yield and concentration of bioactive compounds, thereby improving the efficacy and commercial value of the harvested product. Particularly, exposure to blue light via LED irradiation for 8 h per day has been shown to significantly increase both biomass production and the level of cordycepin in liquid-cultured _C. militaris_, while short-wavelength light enhances the total carotenoid content in the fruiting bodies [58]. General recommendations suggest using moderate light intensities around 400-500 lux to promote growth phases and the development of fruiting bodies under controlled conditions, although more precise details would require access to specific research results or cultivation guidelines. CO\({}_{2}\) levels significantly impact the cultivation of _C. militaris_, affecting both growth and bioactive compound production. Research shows that maintaining elevated CO\({}_{2}\) concentrations during the early growth phase can increase biomass and enhance the yield of valuable metabolites such as cordycepin [59]. High CO\({}_{2}\) levels (up to 5000 ppm) have been shown to improve the growth rate and size of the fruiting bodies, essential for the commercial harvesting of bioactive compounds.