The terms rishonim and acharonim are in the morning davening, in the second paragraph after the Shema. To what do these terms refer, as used there?
We use those terms to refer to a sages of different time periods, in this sequence:
Zugot, Tannaim, Amoraim, Savoraim, Geonim, Rishonim, Acharonim
(see, for example, http://www.henkrijstenberg.com/wp-content/uploads/2017/01/JODENDOM-TIJDSLIJN-JOODSE-GESCHIEDENIS.pdf).
It seems the terms rishon and acharon are also used generically, to refer to those father back in time and those more contemporary in time, whatever the time period.
In what sense are the terms Rishonim and Acharonim used in the morning davening?
To answer that question, I think we need to know when these two terms came to have the current meaning, referring to sages in the first and second part of the last 1,000 years, or so.
Also, to answer that question, we we need to know when that paragraph entered the morning davening.