In a medium bowl, combine the lentils and rice and rinse a few times until the water runs clear. Fill the bowl with warm water and allow to soak. Set aside.
Place the onion, garlic, and ginger in a food processor and pulse to chop finely (but not blend).
Turn Instant Pot on Sauté mode and set to More/High. Once hot, add oil, ghee, and chopped onion mixture. Sauté for about 8-10 minutes, until the onions are lightly golden. While the onions are sautéing, add all the spices listed under Whole Spices.
Add the meat and sauté until the color of the meat changes (~5 minutes). Meanwhile, pulse to chop the tomatoes and green chilies in the food processor. Set aside.
Add the spices (haleem masala, red chili flakes, and turmeric) and salt and sauté for 30 seconds. Add the chopped tomato mixture and yogurt along with 3 cups of water.
Drain the soaked lentils and rice and add it to the Instant Pot. Mix to combine. Cancel Sauté. Cover the Instant Pot and set the valve to Sealing. Select the Meat/Stew Setting to set the pressure time to 45 minutes.
Allow the pressure to naturally release for at least 5 minutes, and then manually release the remaining pressure. Open the pot, and use a slotted spoon and tong to remove the beef pieces and add them to the food processor. Discard any large whole spices (the bay leaves, cinnamon stick, etc.) as they come up. Pulse to process the beef until it is just shredded and stringy but not smooth (7-8 pulses). (Alternatively, shred the beef in a stand mixer on low speed.)
Use an immersion blender to blend the dal until smooth. (You can also blend in the food processor after shredding the beef.) Turn the Instant Pot on to Sauté mode and set to Less.
Add the shredded beef and rolled oats and stir. Sauté for 3-5 minutes to cook this mixture down. Once the haleem starts bubbling, cancel sauté and cover with a lid.
Select Slow Cook and set to More/High. Allow to cook, stirring occasionally, for an additional 20-30 minutes (See Note 1). The haleem is done once a 'laced' consistency is achieved. (See Note 2) If the haleem thickens too much, add 1/2-1 cup boiling water and continue to stir. Add the garam masala and black pepper and stir to mix.
Tadka (Optional Step)
In a medium skillet, heat ghee or oil over medium-high heat. Add the onions and sauté, stirring occasionally, until golden brown (~5-6 min). Stir more cautiously toward the end because you want them the deep brown color but not burnt.
Pour the tadka over the haleem. Garnish and serve with more garnishing on the side.
Note 1: I like to go back and forth between Sauté - Less and Slow Cook - More. If using Sauté - Less, stir constantly to prevent bubbling. If you have the time, I suggest letting it Slow cook - More even longer, up to 4 hours. Add water to thin out as necessary. Note 2: If you lift your spoon and drop the haleem, it shouldn't drop like a soup or curry, but like a thick batter or paste with the shreds of the haleem lingering from the spoon.