Bereshit Rabbah 1:8 (Vilna numbering)
Rabbi Yehoshua ben Levi said in the name of Rabbi Levi: A builder requires six items: Water, dirt, wood, stones, reeds, and iron. If you say that he is wealthy and does not need reeds [to build with], he still needs to use them as a measuring rod, as it is stated: “A linen thread and a measuring rod” (Ezekiel 40:3). So, too, the Torah employed these six expressions of precedence: “Of old [kedem]…from earliest time [me’az], from ancient times [meolam]…from the beginning [merosh], from before [mikadmei]…” (Proverbs 8:22–23) – which counts as two, in the section of “the Lord made me” (Proverbs 8:22).
The Sefaria Midrash Rabbah, 2022 · sefaria-midrash-rabbah
Bereshit Rabbah 1:8 (Vilna numbering) · cc-by-sa
A small section that shows the machinery. A builder needs six materials, down to the reed he measures with; so the Torah used six words of precedence in Proverbs 8:22–23 — of old, from earliest time, from ancient times, from the beginning, from before, counted as two. The point is that Prov 8 is not a proof text the midrash reaches for occasionally but the passage it treats as Genesis 1:1's own commentary. Ambrose, Augustine and Bede reach for the same chapter of Proverbs by way of the Septuagint's ἔκτισέν με, 'the Lord created me', and spend the fourth century arguing about whether it makes the Son a creature. Neither bench mentions the other's use.