get_summary_output function

Function to extract the summary content