Cut 3 onions into thin julienne slices and fry them in a large frying pan with a little olive oil.
When they start to brown, add small splashes of water, always over medium-high heat, allowing them to caramelize without burning.
Repeat until very soft and dark brown (about 45 minutes). You can prepare the quantity and store it in the refrigerator for other preparations.
Meanwhile, with the oven preheated to 200°C: Arrange the sweet potatoes in medium cubes on a tray and bake for 25-30 minutes, stirring halfway through, until soft and slightly golden.
While the onions are sautéing and the sweet potatoes are cooking: Cook the loin (you can use the loin for a Sunday sandwich recipe).
Season the tenderloin with salt and pepper.
Brown all sides in a frying pan with a little olive oil and, if you like, a clove of garlic and aromatic herbs.
When well sealed, reduce heat and leave covered for 10-12 minutes, stirring halfway through the cooking process.
Let it rest for 5 minutes before cutting it into slices.
When the onions are cooked and brown, blend them until you get a smooth sauce. Adjust salt.
Serve a generous base of onion sauce on the plate.
Place the cut loin or medallions on top.
On one side, add the roasted sweet potato cubes and if you like, finish with olive oil or some rosemary leaves.