(cid:80)

Lcont =

log

1
2

esim(ζ(z),ξ(h))/ι
h′ esim(ζ(z),ξ(h′))/ι

+

log

1
2

esim(ζ(z),ξ(h))/ι
z′ esim(ζ(z′),ξ(h))/ι

(11)

(cid:80)

Where ζ,ξ are learnable linear projection layers.z is the av-
erage representations of the graph from Encoder,h is the mean
of decoder representations.z′,h′ represent the corresponding
negative samples respectively.
In the given text, ’h” and
’z” represent negative samples. By introducing a contrastive
learning objective, the model can learn to generate diverse
and reasonable replies better, rather than just the one seen in
the training data. This helps to mitigate the risk of overfitting
and improves the model’s generalization ability in real-world
scenarios.
Retrieval-AugmentedGenerationforLargeLanguageModels-ASurvey