├── README.md ├── code ├── 1_Basic_RAG_Pipeline.ipynb ├── 2_Sentence_window_retrieval.ipynb ├── 3_Auto-merging_Retrieval.ipynb ├── Auto-merging-Retrieval.sh ├── Auto-merging_Retrieval.py ├── Basic_RAG_pipeline.py ├── Basic_RAG_pipeline.sh ├── Sentence_window_retrieval.py ├── Sentence_window_retrieval.sh ├── crag.py ├── crag.sh ├── evaluate_crag.ipynb ├── metric.py └── model_response.py └── data ├── BGE_finetune ├── BGE.jsonl └── readme.txt ├── Elon.txt ├── Henry.txt ├── crag_data_200.jsonl ├── llamaindex_AutoMergingRetrieval_example.png ├── llamaindex_SentenceWindowRetrieval_example.png ├── llamaindex_SentenceWindowRetrieval_overview.png └── llamaindex_rag_overview.png /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/README.md -------------------------------------------------------------------------------- /code/1_Basic_RAG_Pipeline.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/1_Basic_RAG_Pipeline.ipynb -------------------------------------------------------------------------------- /code/2_Sentence_window_retrieval.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/2_Sentence_window_retrieval.ipynb -------------------------------------------------------------------------------- /code/3_Auto-merging_Retrieval.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/3_Auto-merging_Retrieval.ipynb -------------------------------------------------------------------------------- /code/Auto-merging-Retrieval.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/Auto-merging-Retrieval.sh -------------------------------------------------------------------------------- /code/Auto-merging_Retrieval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/Auto-merging_Retrieval.py -------------------------------------------------------------------------------- /code/Basic_RAG_pipeline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/Basic_RAG_pipeline.py -------------------------------------------------------------------------------- /code/Basic_RAG_pipeline.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/Basic_RAG_pipeline.sh -------------------------------------------------------------------------------- /code/Sentence_window_retrieval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/Sentence_window_retrieval.py -------------------------------------------------------------------------------- /code/Sentence_window_retrieval.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/Sentence_window_retrieval.sh -------------------------------------------------------------------------------- /code/crag.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/crag.py -------------------------------------------------------------------------------- /code/crag.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/crag.sh -------------------------------------------------------------------------------- /code/evaluate_crag.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/evaluate_crag.ipynb -------------------------------------------------------------------------------- /code/metric.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/metric.py -------------------------------------------------------------------------------- /code/model_response.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/code/model_response.py -------------------------------------------------------------------------------- /data/BGE_finetune/BGE.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/BGE_finetune/BGE.jsonl -------------------------------------------------------------------------------- /data/BGE_finetune/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/BGE_finetune/readme.txt -------------------------------------------------------------------------------- /data/Elon.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/Elon.txt -------------------------------------------------------------------------------- /data/Henry.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/Henry.txt -------------------------------------------------------------------------------- /data/crag_data_200.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/crag_data_200.jsonl -------------------------------------------------------------------------------- /data/llamaindex_AutoMergingRetrieval_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/llamaindex_AutoMergingRetrieval_example.png -------------------------------------------------------------------------------- /data/llamaindex_SentenceWindowRetrieval_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/llamaindex_SentenceWindowRetrieval_example.png -------------------------------------------------------------------------------- /data/llamaindex_SentenceWindowRetrieval_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/llamaindex_SentenceWindowRetrieval_overview.png -------------------------------------------------------------------------------- /data/llamaindex_rag_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhaoFangkun1/NLP_RAG_Demo/HEAD/data/llamaindex_rag_overview.png --------------------------------------------------------------------------------