Generations were formulated by a certain generation of ancestors of this surname. For example, in the Qing Dynasty, Kangxi formulated generations such as Yin, Hong, Yong, Mian, Yi, Zai, Pu, Yu, Heng, Qi, Tao, Lu, Zeng and Qi for future generations, and the names of future generations can be based on this.
There are many surnames of Yan. Depending on where they belong, their ancestors left different generations. China has a long history, but few families have passed down for more than 2 generations. -even the so-called Confucius' family now is actually just a name.