Here's how I think about it.
Also, a fair warning, my asset allocation is more conservative than is commonly recommended here. But I've come up with an allocation that suits my risk tolerance. Maybe a similar framework would work for you.
Here's what I do.
1. I think carefully about how much I'm actually willing to lose in a draw down. How would I feel if I lost $10,000? $20,000? Convert the amount you're willing to lose into a percent of your portfolio.
2. Double the percentage. This is how much you should allocate to stocks. So if you're okay losing $20K of a $100K portfolio, your stock allocation should be ~40%.
3. Reduce your stock allocation by 5-10 percentage points if you've never invested through a downturn before. This will help prevent you from making emotional decisions in a major market drawdown.
My personal risk tolerance works out to 65% stocks (roughly split 2/3 domestic, 1/3 international), 25% bonds, 10% alternatives.