A latent variable is an unobserved intermediate variable whose possible values influence an observed outcome. In retrieval-augmented generation, retrieved documents act as latent variables: the system combines their generation probabilities rather than trusting a single result. section 4.2
Combining retrieved documents
For a question about the 2008 financial crisis, a retriever may rank a Lehman Brothers article first while lower-ranked documents discuss subprime mortgages, mortgage-backed securities, and regulatory failures. Marginalizing over the top five documents lets supporting evidence from several documents contribute to the final answer, reducing the risk of missing the most relevant result. section 4.2
The marginalization equation represents the answer probability as a weighted sum over candidate documents, using retriever confidence and document-conditioned generation probability. section 4.2



