├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── embedding_data ├── 2wiki │ ├── eval_content_dense.npy │ ├── eval_dense.npy │ ├── eval_passages.jsonl │ ├── index.faiss │ └── index_meta.faiss ├── multihop_rag │ ├── eval_content_dense.npy │ ├── eval_passages.jsonl │ ├── eval_query_dense.npy │ ├── index.faiss │ └── index_meta.faiss └── musique │ ├── eval_content_dense.npy │ ├── eval_dense.npy │ ├── eval_passages.jsonl │ ├── index.faiss │ └── index_meta.faiss ├── eval_data ├── 2wiki_dev_processed.jsonl ├── multihop_rag_dev_processed.jsonl └── musique_dev_processed.jsonl ├── evaluation.py ├── init_multihop_rag.py ├── init_train_vectors.py ├── metrics.py ├── passage_retrieval.py ├── pics ├── TreeHop_architecture.png ├── TreeHop_iteration.png └── main_experiment.png ├── requirements.txt ├── src ├── __init__.py ├── beir_utils.py ├── bge_m3 │ ├── __init__.py │ ├── config.py │ └── model.py ├── contriever.py ├── data.py ├── dist_utils.py ├── evaluation.py ├── finetuning_data.py ├── inbatch.py ├── index.py ├── language_models │ ├── __init__.py │ ├── aoai.py │ ├── base.py │ ├── cloudgpt │ │ ├── __init__.py │ │ └── cloudgpt_aoai.py │ ├── deepseek.py │ ├── llama.py │ └── utils.py ├── moco.py ├── normalize_text.py ├── options.py ├── rouge.py ├── slurm.py └── utils.py ├── train_data └── 2wiki_train_processed.jsonl ├── training.py ├── tree_hop ├── __init__.py ├── dataset.py ├── graph.py └── model.py └── utils.py /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/.gitattributes -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/README.md -------------------------------------------------------------------------------- /embedding_data/2wiki/eval_content_dense.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/2wiki/eval_content_dense.npy -------------------------------------------------------------------------------- /embedding_data/2wiki/eval_dense.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/2wiki/eval_dense.npy -------------------------------------------------------------------------------- /embedding_data/2wiki/eval_passages.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/2wiki/eval_passages.jsonl -------------------------------------------------------------------------------- /embedding_data/2wiki/index.faiss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/2wiki/index.faiss -------------------------------------------------------------------------------- /embedding_data/2wiki/index_meta.faiss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/2wiki/index_meta.faiss -------------------------------------------------------------------------------- /embedding_data/multihop_rag/eval_content_dense.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/multihop_rag/eval_content_dense.npy -------------------------------------------------------------------------------- /embedding_data/multihop_rag/eval_passages.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/multihop_rag/eval_passages.jsonl -------------------------------------------------------------------------------- /embedding_data/multihop_rag/eval_query_dense.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/multihop_rag/eval_query_dense.npy -------------------------------------------------------------------------------- /embedding_data/multihop_rag/index.faiss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/multihop_rag/index.faiss -------------------------------------------------------------------------------- /embedding_data/multihop_rag/index_meta.faiss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/multihop_rag/index_meta.faiss -------------------------------------------------------------------------------- /embedding_data/musique/eval_content_dense.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/musique/eval_content_dense.npy -------------------------------------------------------------------------------- /embedding_data/musique/eval_dense.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/musique/eval_dense.npy -------------------------------------------------------------------------------- /embedding_data/musique/eval_passages.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/musique/eval_passages.jsonl -------------------------------------------------------------------------------- /embedding_data/musique/index.faiss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/musique/index.faiss -------------------------------------------------------------------------------- /embedding_data/musique/index_meta.faiss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/embedding_data/musique/index_meta.faiss -------------------------------------------------------------------------------- /eval_data/2wiki_dev_processed.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/eval_data/2wiki_dev_processed.jsonl -------------------------------------------------------------------------------- /eval_data/multihop_rag_dev_processed.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/eval_data/multihop_rag_dev_processed.jsonl -------------------------------------------------------------------------------- /eval_data/musique_dev_processed.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/eval_data/musique_dev_processed.jsonl -------------------------------------------------------------------------------- /evaluation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/evaluation.py -------------------------------------------------------------------------------- /init_multihop_rag.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/init_multihop_rag.py -------------------------------------------------------------------------------- /init_train_vectors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/init_train_vectors.py -------------------------------------------------------------------------------- /metrics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/metrics.py -------------------------------------------------------------------------------- /passage_retrieval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/passage_retrieval.py -------------------------------------------------------------------------------- /pics/TreeHop_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/pics/TreeHop_architecture.png -------------------------------------------------------------------------------- /pics/TreeHop_iteration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/pics/TreeHop_iteration.png -------------------------------------------------------------------------------- /pics/main_experiment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/pics/main_experiment.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/requirements.txt -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/__init__.py -------------------------------------------------------------------------------- /src/beir_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/beir_utils.py -------------------------------------------------------------------------------- /src/bge_m3/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/bge_m3/__init__.py -------------------------------------------------------------------------------- /src/bge_m3/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/bge_m3/config.py -------------------------------------------------------------------------------- /src/bge_m3/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/bge_m3/model.py -------------------------------------------------------------------------------- /src/contriever.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/contriever.py -------------------------------------------------------------------------------- /src/data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/data.py -------------------------------------------------------------------------------- /src/dist_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/dist_utils.py -------------------------------------------------------------------------------- /src/evaluation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/evaluation.py -------------------------------------------------------------------------------- /src/finetuning_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/finetuning_data.py -------------------------------------------------------------------------------- /src/inbatch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/inbatch.py -------------------------------------------------------------------------------- /src/index.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/index.py -------------------------------------------------------------------------------- /src/language_models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/language_models/__init__.py -------------------------------------------------------------------------------- /src/language_models/aoai.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/language_models/aoai.py -------------------------------------------------------------------------------- /src/language_models/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/language_models/base.py -------------------------------------------------------------------------------- /src/language_models/cloudgpt/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/language_models/cloudgpt/__init__.py -------------------------------------------------------------------------------- /src/language_models/cloudgpt/cloudgpt_aoai.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/language_models/cloudgpt/cloudgpt_aoai.py -------------------------------------------------------------------------------- /src/language_models/deepseek.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/language_models/deepseek.py -------------------------------------------------------------------------------- /src/language_models/llama.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/language_models/llama.py -------------------------------------------------------------------------------- /src/language_models/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/language_models/utils.py -------------------------------------------------------------------------------- /src/moco.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/moco.py -------------------------------------------------------------------------------- /src/normalize_text.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/normalize_text.py -------------------------------------------------------------------------------- /src/options.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/options.py -------------------------------------------------------------------------------- /src/rouge.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/rouge.py -------------------------------------------------------------------------------- /src/slurm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/slurm.py -------------------------------------------------------------------------------- /src/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/src/utils.py -------------------------------------------------------------------------------- /train_data/2wiki_train_processed.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/train_data/2wiki_train_processed.jsonl -------------------------------------------------------------------------------- /training.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/training.py -------------------------------------------------------------------------------- /tree_hop/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/tree_hop/__init__.py -------------------------------------------------------------------------------- /tree_hop/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/tree_hop/dataset.py -------------------------------------------------------------------------------- /tree_hop/graph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/tree_hop/graph.py -------------------------------------------------------------------------------- /tree_hop/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/tree_hop/model.py -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/allen-li1231/treehop-rag/HEAD/utils.py --------------------------------------------------------------------------------