The text seems to refer to Jeremiah Chapter 31. The choice of Ephraim as the lineage of the messianic figure described in the text seems to draw on passages in Jeremiah, Zechariah and Hosea.
The text alludes to Jeremiah Chapter 31. The choice of Ephraim as the lineage of the messianic figure aligns with themes found in Jeremiah, Zechariah, and Hosea.