Oil a wok and fry the yam, shallots, dried shrimp and mushrooms until fragrant. The yam should be soft but still firm. Add light soy sauce, salt and pepper to taste. Set aside.
Mix together rice flour and water until a watery mixture is produced. Pour the mixture into a wok and stir under high heat until it becomes a paste.
Mix in the fried yam until well-combined. Transfer the flour and yam mixture into a deep pan and flatten it out so that it fills the entire pan, not leaving any holes. Use a spatula and some water to flatten the top of the mixture.
Cook under low heat for 35 minutes. Turn off heat and allow the yam cake to cook in the pan for a day.
Slice the yam cake and either steam it in a steamer or in a microwave oven. Serve with sweet sauce.