jasmine95dn / kaping_prompt_zero-shot

This contains script that reimplements KAPING framework (Knowledge-Augmented Language Model Prompting for Zero-Shot Knowledge Graph Question Answering, Baek et al. 2023)
18 stars 2 forks source link

About 'hop_size' #1

Closed Cannizza-zzk closed 8 months ago

Cannizza-zzk commented 8 months ago

Hello! I'm truly impressed by the work you've done.

I have a quick question regarding the 'hop_size'. I would like to know what 'hop_size' means in the paper and how it affects the retrieval experiment.

jasmine95dn commented 8 months ago

Hi! This is actually my re-implementation based on how I understood the description from the paper, and I didn't work with them to build this code. But as far as I understood from the paper, 'hop_size' refers to the number of neighborhood from the root node. If you do 1-hop retrieval, the 1-hop neighborhood should be the nodes that have direct relations to the root node; for 2-hop retrieval, 2-hop neighborhood are the nodes that have direct relations to the 1-hop neighborhood of the root node. You can see under this example. I didn't try that in my code, but you can try it yourself, in case further question, you can try to contact the authors :)

Cannizza-zzk commented 8 months ago

Thank you so much for your detailed and helpful response. I truly admire the work that you do and am grateful for the time and effort you put into assisting me. Wishing you all the best in your endeavors!