Rinse white rice with water 2-3 times until the water runs clear. Soak it in 4-5 cups of water for 30 minutes.
Once the ghee is hot, add whole cashew nuts and fry until they are light brown in colour. Stir frequently while frying.
Now add 10-12 raisins to the pan and fry until they plump up.
Remove the cashew nuts and raisins to a bowl and keep them aside.
Add cinnamon stick, whole green cardamoms, cloves, and whole black peppercorns, and let them crackle for 3-4 seconds.
Add thinly sliced onions to the and fry until they turn dark brown in color (4-5 minutes), stirring frequently.
Drain the water from the rice and add it to the pan along with 2-3 green chilies (slit into half), 2 cups of water, ½ teaspoon salt, and fried cashews and raisins. Stir gently.
Reduce the heat to low. Cover the pan with a tight-fitting lid and cook undisturbed for 20-25 minutes until all the liquid is absorbed and the rice is cooked well.
Remove the pan from heat and let it rest for 5 minutes. Fluff the rice gently using a fork and serve hot. You can also garnish the rice with coriander leaves.