How does the brain process sensory information to generate adaptive behaviors that are innate, yet flexible? My lab investigates this question in the taste system of the fruit fly Drosophila, which offers unique tools to study how individual neurons contribute to neural circuit computations and behavior. First, I will discuss our work using optogenetics, behavior, calcium imaging, and connectomic analyses to investigate how taste circuits transform sensory signals into motor actions. Second, I will discuss a project that bridges experimental and theoretical approaches to understand how flies make foraging decisions. Through these studies, we hope to uncover principles of neural processing that generalize across species.