An upper GI endoscopy looks at the upper part of the gastrointestinal tract including the esophagus, the stomach, and the first part of the small intestine, called the duodenum. Gastroenterologists commonly perform this procedure as a way to evaluate and diagnose various problems, such as chronic heartburn (acid reflux), difficulty swallowing, stomach or abdominal pain, bleeding, ulcers, and tumors.