AgentRE: An Agent-Based Framework for Navigating Complex Information Landscapes in Relation Extraction