In a small bowl, combine the tamarind, fish sauce, lime juice and palm sugar and stir until the sugar is mostly dissolved. Stir in the shallots and the chili flakes and set aside while you make the toasted rice powder; don't worry about any undissolved sugar chunks.
2 tablespoon tamarind paste, 1 tablespoon fish sauce, 1 tablespoon lime juice, 1 tablespoon palm sugar, 2 tablespoon minced shallots or chopped green onion, ½ teaspoon roasted chili flakes
Make the toasted rice powder: In a dry skillet, add the rice and toast it over medium high heat, stirring constantly, until the grains are deep brown (see video for the colour you're going for). Pour onto a plate to cool, then grind in a mortar and pestle or coffee grinder into a mostly-fine powder.
1 tablespoon uncooked jasmine or sticky rice
Close to serving time, stir the sauce; the sugar should now be completely dissolved, and if there are a few stubborn chunks, they can be easily smushed with the back of a spoon. Stir in the toasted rice powder and cilantro or mint.
3 sprigs cilantro or mint