The given limit is of the form of a Riemann sum.
$$ \lim_{n \to \infty} \frac{1}{n} \sum_{i=1}^n \frac{1}{e^{i/n}} = \lim_{n \to \infty} \frac{1}{n} \sum_{i=1}^n e^{-i/n} $$
This can be interpreted as the definite integral of the function \( f(x) = e^{-x} \) over the interval \( [0, 1] \).
The Riemann sum is given by \( \lim_{n \to \infty} \frac{b - a}{n} \sum_{i=1}^n f(a + i \frac{b - a}{n}) \).
Comparing this with the given limit, we have \( a = 0 \), \( b - a = 1 \), so \( b = 1 \), and \( f(x) = e^{-x} \).
Thus, the limit is equal to the definite integral:
$$ \int_0^1 e^{-x} dx $$
Evaluating the integral:
$$ \int_0^1 e^{-x} dx = [-e^{-x}]_0^1 = -e^{-1} - (-e^{-0}) = -e^{-1} - (-1) = 1 - e^{-1} $$