A patient is brought to the ED for altered mental status and diagnosed with hepatic encephalopathy. The patient is prescribed lactulose. What is the purpose of prescribing lactulose for this patient?