Most vegetables will grow best if they are provided with good deep soil. However, root vegetables are most sensitive to soil depth. In general, 6-12 inches deep is considered the minimum soil depth for growing vegetables. You may need to add another layer for your beds that are only 4 inches deep. You may find a couple of our slide shows helpful. Here's one on growing vegetables in raised beds and here's one on the best cold-tolerant vegetables.