15 Jan 2024 | *Paulo Finardi *Leonardo Avila Marcos Piau Rodrigo Castaldoni Pablo Costa Pedro Gengo Vinicius Caridã Celio Larcher
The paper "The Chronicles of RAG: The Retriever, the Chunk and the Generator" by Paulo Finardi, Leonardo Avila, Marcos Piau, Rodrigo Castaldoni, Pablo Costa, Pedro Gengo, Vinicius Caridá, and Celio Larcher explores the implementation, optimization, and evaluation of Retrieval Augmented Generation (RAG) for Brazilian Portuguese. The authors address the challenges of integrating retrieval models, representation learning, data diversity, computational efficiency, and text generation quality. They present a comprehensive set of experiments using various retrieval techniques, including sparse and dense retrievers, and two chunking strategies (naive and sentence window). The study uses the first Harry Potter book in Brazilian Portuguese as a dataset to evaluate the performance of different Large Language Models (LLMs) such as GPT-4, GPT-4-1106-preview, GPT-3.5-turbo-1106, and Gemini Pro. The key contributions of the paper include:
1. **Data Preparation**: The dataset is created by breaking the Harry Potter book into chunks and generating questions and answers using GPT-4.
2. **Evaluation Method**: A custom scoring system based on GPT-4 is used to evaluate the quality of answers, with scores ranging from 1 (no relation) to 10 (perfect alignment).
3. **Retriever Techniques**: The paper evaluates various retrieval methods, including BM25, ADA-002, and a custom version of ADA-002, and compares their effectiveness and efficiency.
4. **Hybrid and Multi-stage Search**: The authors explore hybrid search techniques and multi-stage ranking pipelines to enhance the retrieval process.
5. **Results and Recommendations**: The study achieves a maximum relative score of 98.61%, representing a significant improvement over the baseline. The paper also discusses the impact of input size and the position of answers within the document on performance.
The paper concludes with a discussion on the best practices for implementing RAG, emphasizing the importance of data quality, query formulation, and evaluation metrics. Future work includes expanding the dataset to real-world data and further exploring segmentation and chunk construction techniques.The paper "The Chronicles of RAG: The Retriever, the Chunk and the Generator" by Paulo Finardi, Leonardo Avila, Marcos Piau, Rodrigo Castaldoni, Pablo Costa, Pedro Gengo, Vinicius Caridá, and Celio Larcher explores the implementation, optimization, and evaluation of Retrieval Augmented Generation (RAG) for Brazilian Portuguese. The authors address the challenges of integrating retrieval models, representation learning, data diversity, computational efficiency, and text generation quality. They present a comprehensive set of experiments using various retrieval techniques, including sparse and dense retrievers, and two chunking strategies (naive and sentence window). The study uses the first Harry Potter book in Brazilian Portuguese as a dataset to evaluate the performance of different Large Language Models (LLMs) such as GPT-4, GPT-4-1106-preview, GPT-3.5-turbo-1106, and Gemini Pro. The key contributions of the paper include:
1. **Data Preparation**: The dataset is created by breaking the Harry Potter book into chunks and generating questions and answers using GPT-4.
2. **Evaluation Method**: A custom scoring system based on GPT-4 is used to evaluate the quality of answers, with scores ranging from 1 (no relation) to 10 (perfect alignment).
3. **Retriever Techniques**: The paper evaluates various retrieval methods, including BM25, ADA-002, and a custom version of ADA-002, and compares their effectiveness and efficiency.
4. **Hybrid and Multi-stage Search**: The authors explore hybrid search techniques and multi-stage ranking pipelines to enhance the retrieval process.
5. **Results and Recommendations**: The study achieves a maximum relative score of 98.61%, representing a significant improvement over the baseline. The paper also discusses the impact of input size and the position of answers within the document on performance.
The paper concludes with a discussion on the best practices for implementing RAG, emphasizing the importance of data quality, query formulation, and evaluation metrics. Future work includes expanding the dataset to real-world data and further exploring segmentation and chunk construction techniques.