AskReference
ExplanationIntermediate

In the PizzaMate example, why did the LLM correctly identify the Morellino as the Tuscan wine even though the retrieved chunks did not explicitly state it?

The LLM identified the Morellino as the Tuscan wine because of its pre-trained general knowledge about Italian wines. The retrieved chunks mentioned several wines but did not explicitly state that Morellino was from Tuscany; the model used its existing knowledge to bridge that gap.

In the PizzaMate example, the retrieved chunks contained menu items including wines and Margherita pizzas, but none of them stated that the Morellino was the only Tuscan wine. The LLM was able to answer correctly because it relied on its pre-trained knowledge, which includes the origins of Italian wines. With context mentioning multiple wines, the model inferred that Morellino was the Tuscan wine the user wanted. This illustrates a key benefit of RAG: combining the general reasoning and factual knowledge embedded in the LLM with the custom, document-specific context provided by the retrieval system.

Key points

  • No retrieved chunk explicitly stated that Morellino was from Tuscany.
  • The LLM used its pre-trained general knowledge about Italian wine origins.
  • The context mentioned several wines, and the model inferred the correct one.
  • This demonstrates how RAG pairs LLM reasoning with retrieved custom knowledge.
Source:AI Agents and Applications· Writing the right prompt· p. 111–115

Related questions

Cover of AI Agents and Applications

AI Agents and Applications

Andrea De Mauro

MEAP Edition Version 7 · Manning Publications

View this ebook