My raised bed is on top of thick clay soil, so I put a 2-3cm layer of clay pebbles down first to help the water drain away. Then I filled it up half way with compost mixed with a few tiny twigs and pebbles, roughly 20% - just as an extra drainage caution. Then pure compost for the rest.
I had no idea if this was right at the time. But this year my spuds in the bed produced True potato seeds, they look like tomatoes. I read they only do this in 'perfect conditions' I was doing cartwheels in my head when I read that. Years ago I'd have done an actual cartwheel