Example 9 Find the minimum value of the real number $\lambda$ such that for any integer $n \geqslant 2$ and positive real numbers $a_{1}, a_{2}, \cdots, a_{n}$ satisfying $\sum_{i=1}^{n} a_{i}=n$, we always have
$$
\sum_{i=1}^{n} \frac{1}{a_{i}}-\lambda \prod_{i=1}^{n} \frac{1}{a_{i}} \leqslant n-\lambda .
$$
【Analysis】When positive numbers $a_{1}, a_{2}, \cdots, a_{n}$ are not all equal, $\sum_{i=1}^{n} \frac{1}{a_{i}}>n$ and $\prod_{i=1}^{n} \frac{1}{a_{i}}>1$ are obvious. Therefore, $\lambda$ must be a positive number. Hereafter, let $\lambda>0$.
The following proof requires the conclusion:
The sequence $\left\{\left(1+\frac{1}{n}\right)^{n}\right\}$ is strictly monotonically increasing and converges to e.
First, we prove that when $\lambda \geqslant \mathrm{e}$, equation (1) always holds.
Without loss of generality, let $a_{n-1}=\min _{1 \leqslant i \leqslant n} a_{i}, a_{n}=\max _{1 \leqslant i \leqslant n} a_{i}$.
Then $\sum_{i=1}^{n} \frac{1}{a_{i}}-\lambda \prod_{i=1}^{n} \frac{1}{a_{i}}$
$$
=\sum_{i=1}^{n-2} \frac{1}{a_{i}}+\frac{1}{a_{n-1} a_{n}}\left(n-\sum_{i=1}^{n-2} a_{i}-\lambda \prod_{i=1}^{n-2} \frac{1}{a_{i}}\right) .
$$

By the AM-GM inequality, and noting that
e $>\left(1+\frac{1}{n-1}\right)^{n-1}$,
we get $\sum_{i=1}^{n-2} a_{i}+\lambda \prod_{i=1}^{n-2} \frac{1}{a_{i}} \geqslant(n-1) \sqrt[n-1]{\lambda}$
$\geqslant(n-1) \sqrt[n-1]{\mathrm{e}}>(n-1)\left(1+\frac{1}{n-1}\right)=n$.
Therefore, $n-\sum_{i=1}^{n-2} a_{i}-\lambda \prod_{i=1}^{n-2} \frac{1}{a_{i}}\lambda(n$ depends on the conclusion).
Let $a_{1}=a_{2}=\cdots=a_{n-2}=\sqrt[n-2]{\lambda}n-(n-2) \frac{n-1}{n-2}-\lambda \frac{1}{\lambda}=0$.
Meanwhile, $a_{n-1}+a_{n}=n-\sum_{i=1}^{n-2} a_{i}$ is clearly positive.
Therefore, keeping $a_{n-1}+a_{n}$ unchanged.
Let $a_{n-1} \rightarrow 0^{+}$, which makes the right side of equation (2) tend to infinity, i.e., there exists a set of positive real numbers $a_{1}, a_{2}, \cdots, a_{n}$, such that
$$
\sum_{i=1}^{n} \frac{1}{a_{i}}-\lambda \prod_{i=1}^{n} \frac{1}{a_{i}}>n-\lambda .
$$

This does not meet the requirement.
In summary, $\lambda_{\min }=\mathrm{e}$.
Rewriting the left side of inequality (1) in the form of the right side of equation (2) is an important preparatory step. Whether proving the inequality always holds when $\lambda \geqslant \mathrm{e}$ or showing that the inequality does not always hold when $\lambda<\mathrm{e}$, it involves fixing $n-2$ quantities and making local adjustments to the remaining two quantities. Among them, determining the sign of the coefficient $n-\sum_{i=1}^{n-2} a_{i}-\lambda \prod_{i=1}^{n-2} \frac{1}{a_{i}}$ of $\frac{1}{a_{n-1} a_{n}}$ is the key to the argument.