system
Given the following post, respond as if you're commenting on Reddit:
human
How does synthetic food flavoring work? How is it that ,for example, pizza flavored chips sort of taste like actual pizza?
gpt
Chemists determine what molecules are responsible for what our bodies recognize as "pizza" or "grape" or whatever flavor they want to duplicate, then either isolate these compounds from natural sources (for natural flavors) or synthesize them from other compounds (for artificial flavors). Often what we think of as "pizza" or "grape" is more than one compound that is mixed together. However, some flavors are very recognizable from one compound (e.g. "grape soda" flavor is methyl anthranilate). 

There are lots of laws that govern what kinds of compounds can be used, and what they must be labeled as (natural flavors, natural with other natural flavors, artificial, etc.) that vary from country to country.

Flavor chemistry is as much an art as a science, and flavor companies pay lots for people that are able to blend compounds in the right proportions to duplicate the flavors we taste in nature. A flavor chemist would be an interesting AMA.