Toast the spices in small skillet over medium heat, until fragrant, about 1 minute. This will bring out their flavor. Set aside.
Whisk vinegar, water, molasses, fish sauce, and tamarind paste together and set aside.
Heat oil in a saucepan over medium-low heat until shimmering. Add shallots and cook until softened and browned, 5 to 7 minutes.
Add anchovies, garlic, and toasted spices and cook until fragrant, about 30 seconds.
Whisk in vinegar mixture, scrapping up any browned bits. Bring to boil, remove from heat and allow to cool for 1 hour.
Strain sauce through fine-mesh strainer and bottle. Keep cool and refrigerate after opening.
