Midrash is a genre of rabbinic literature that includes nonliteral elaborations of biblical texts. The midrash Genesis Rabba 84:6, for example, notes the affinities between Jacob and Joseph.