To a small saucepan, add water, vinegar, and sugar; bring to a simmer over medium-high heat. Meanwhile, roughly slice chiles and garlic. Place in a food processor with salt and pulse to a rough chop; add to the pot. Turn heat to low to maintain a steady simmer and cook, uncovered, until the liquid thickens slightly and becomes just slightly syrupy, 8–12 minutes. Cool to room temperature. The sauce will thicken further as it cools. Makes ¾ cup. You can store it in the refrigerator in a sealed container for months; the flavor improves as the ingredients continue to meld.
This is a "naam jim" (dipping sauce) meant to be served with Chiang Mai Roasted Chicken. It's also delicious with fried foods.