Preheat the oven to 180ºC/350ºF/gas 4. Trim, wash and finely slice the leek. Peel and dice the carrot, onion and celery.
Heat a splash of oil in a medium pan on a medium heat, add the leek, carrot, onion and celery. Pop the lid on and cook for 5 to 10 minutes, or until softened. Add the lentils, stock and peas, then bring to the boil, stirring regularly. Once boiling, reduce to a simmer and cook for 10 to 15 minutes, or until the lentils are cooked through.
For baby, remove a small amount to a blender (use a hand-held stick blender, if you prefer), or a bowl, then either blend to a purée, pulse, mash and/or finely chop depending on the stage your little one is at (for more information on stages of complementary feeding, click here).
For adults, season to taste with sea salt and black pepper, then add the tomato purée. Scrub the sweet potato clean, then coarsely grate it into a bowl, toss with a little oil and a good few gratings of Parmesan.
Transfer the filling to a 15cm x 20cm ovenproof dish and sprinkle with the sweet potato. Bake for 15 to 20 minutes, or until the potato topping is golden and cooked through and the filling is piping hot.