Skip to content

This is an implementation of the paper: Searching for Best Practices in Retrieval-Augmented Generation

License

Notifications You must be signed in to change notification settings

FudanDNN-NLP/RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAGGA

Introduction

This is an implementation of the paper:

Searching for Best Practices in Retrieval-Augmented Generation

workflow

Installation

Create conda environment

conda create --name RAGGA python=3.10 pytorch torchvision pytorch-cuda -c nvidia -c pytorch -y
conda activate RAGGA
git clone https://github.com/FudanDNN-NLP/RAG.git
cd RAG/opencompass
pip install -e .

Install Java for Linux

wget https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz
mkdir ~/java
tar -zxf openjdk-11.0.1_linux-x64_bin.tar.gz -C ~/java

Add the following statements into ~/.bashrc:

export JAVA_HOME=~/java/openjdk-11.0.1
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export JVM_PATH=$JAVA_HOME/lib/server/libjvm.so

Then run source ~/.bashrc to activate the environment variable changes to the current user.

Reproducibility

You can run the evaluation of best practices and efficiency practices in the paper by:

cd RAG/opencompass
bash eval.sh

Citation

If you use this code in your work, please cite our paper:

@inproceedings{Wang2024SearchingFB,
  title={Searching for Best Practices in Retrieval-Augmented Generation},
  author={Xiaohua Wang and Zhenghua Wang and Xuan Gao and Feiran Zhang and Yixin Wu and Zhibo Xu and Tianyuan Shi and Zhengyuan Wang and Shizheng Li and Qi Qian and Ruicheng Yin and Changze Lv and Xiaoqing Zheng and Xuanjing Huang},
  year={2024},
  url={https://api.semanticscholar.org/CorpusID:270870251}
}

About

This is an implementation of the paper: Searching for Best Practices in Retrieval-Augmented Generation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published