flashrag-dev 0.1.4.dev20250111__tar.gz → 0.1.4.dev20250112__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/PKG-INFO +82 -10
  2. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/README.md +81 -9
  3. flashrag_dev-0.1.4.dev20250112/flashrag/version.py +1 -0
  4. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag_dev.egg-info/PKG-INFO +82 -10
  5. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag_dev.egg-info/requires.txt +3 -0
  6. flashrag_dev-0.1.4.dev20250111/flashrag/version.py +0 -1
  7. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/LICENSE +0 -0
  8. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/__init__.py +0 -0
  9. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/config/__init__.py +0 -0
  10. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/config/basic_config.yaml +0 -0
  11. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/config/config.py +0 -0
  12. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/dataset/__init__.py +0 -0
  13. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/dataset/dataset.py +0 -0
  14. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/dataset/utils.py +0 -0
  15. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/evaluator/__init__.py +0 -0
  16. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/evaluator/_bleu.py +0 -0
  17. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/evaluator/evaluator.py +0 -0
  18. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/evaluator/metrics.py +0 -0
  19. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/evaluator/utils.py +0 -0
  20. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/generator/__init__.py +0 -0
  21. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/generator/fid.py +0 -0
  22. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/generator/generator.py +0 -0
  23. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/generator/multimodal_generator.py +0 -0
  24. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/generator/openai_generator.py +0 -0
  25. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/generator/stop_word_criteria.py +0 -0
  26. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/generator/utils.py +0 -0
  27. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/judger/__init__.py +0 -0
  28. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/judger/judger.py +0 -0
  29. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/pipeline/__init__.py +0 -0
  30. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/pipeline/active_pipeline.py +0 -0
  31. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/pipeline/branching_pipeline.py +0 -0
  32. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/pipeline/mm_pipeline.py +0 -0
  33. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/pipeline/pipeline.py +0 -0
  34. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/pipeline/replug_utils.py +0 -0
  35. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/prompt/__init__.py +0 -0
  36. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/prompt/base_prompt.py +0 -0
  37. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/prompt/mm_prompt.py +0 -0
  38. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/prompt/selfask_examplars.py +0 -0
  39. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/prompt/trace_examplars.py +0 -0
  40. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/refiner/__init__.py +0 -0
  41. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/refiner/kg_refiner.py +0 -0
  42. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/refiner/llmlingua_compressor.py +0 -0
  43. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/refiner/refiner.py +0 -0
  44. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/refiner/selective_context_compressor.py +0 -0
  45. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/retriever/__init__.py +0 -0
  46. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/retriever/__main__.py +0 -0
  47. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/retriever/encoder.py +0 -0
  48. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/retriever/index_builder.py +0 -0
  49. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/retriever/reranker.py +0 -0
  50. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/retriever/retriever.py +0 -0
  51. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/retriever/utils.py +0 -0
  52. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/utils/__init__.py +0 -0
  53. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/utils/constants.py +0 -0
  54. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/utils/pred_parse.py +0 -0
  55. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag/utils/utils.py +0 -0
  56. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag_dev.egg-info/SOURCES.txt +0 -0
  57. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag_dev.egg-info/dependency_links.txt +0 -0
  58. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/flashrag_dev.egg-info/top_level.txt +0 -0
  59. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/pyproject.toml +0 -0
  60. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/setup.cfg +0 -0
  61. {flashrag_dev-0.1.4.dev20250111 → flashrag_dev-0.1.4.dev20250112}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flashrag_dev
3
- Version: 0.1.4.dev20250111
3
+ Version: 0.1.4.dev20250112
4
4
  Summary: A library for efficient Retrieval-Augmented Generation research
5
5
  Home-page: https://github.com/RUC-NLPIR/FlashRAG
6
6
  Author: Jiajie Jin, Yutao Zhu, Chenghao Zhang, Xinyu Yang, Zhicheng Dou
@@ -32,13 +32,16 @@ License-File: LICENSE
32
32
  <a href="#sparkles-features">Features</a> |
33
33
  <a href="#rocket-quick-start">Quick-Start</a> |
34
34
  <a href="#gear-components"> Components</a> |
35
+ <a href="#computer-flashrag-ui"> FlashRAG-UI</a> |
35
36
  <a href="#robot-supporting-methods"> Supporting Methods</a> |
36
37
  <a href="#notebook-supporting-datasets--document-corpus"> Supporting Datasets</a> |
37
38
  <a href="#raised_hands-additional-faqs"> FAQs</a>
38
39
  </p>
39
40
 
40
41
  </h4>
41
- FlashRAG is a Python toolkit for the reproduction and development of Retrieval Augmented Generation (RAG) research. Our toolkit includes 36 pre-processed benchmark RAG datasets and 15 state-of-the-art RAG algorithms.
42
+
43
+
44
+ FlashRAG is a Python toolkit for the reproduction and development of Retrieval Augmented Generation (RAG) research. Our toolkit includes 36 pre-processed benchmark RAG datasets and 16 state-of-the-art RAG algorithms.
42
45
 
43
46
  <p align="center">
44
47
  <img src="asset/framework.jpg">
@@ -50,6 +53,62 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
50
53
  <a href="https://trendshift.io/repositories/10454" target="_blank"><img src="https://trendshift.io/api/badge/repositories/10454" alt="RUC-NLPIR%2FFlashRAG | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
51
54
  </p>
52
55
 
56
+ <h2 align="center">✨ Introduce FlashRAG-UI ✨</h2>
57
+ <p>With <strong>FlashRAG-UI</strong>, you can easily and quickly configure and experience the supported RAG methods through our meticulously designed visual interface, and evaluate these methods on benchmarks, making complex research work more efficient!</p>
58
+
59
+
60
+ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
61
+
62
+
63
+ <h3>🌟 Features</h3>
64
+ <ul>
65
+ <li>🚀 <strong>One-Click Configuration Loading</strong>
66
+ <ul>
67
+ <li>You can load parameters and configuration files for various RAG methods through simple clicks, selections, and inputs.</li>
68
+ <li>🖼️ Supports preview interface for intuitive parameter settings.</li>
69
+ <li>💾 Provides save functionality to easily store configurations for future use.</li>
70
+ </ul>
71
+ </li>
72
+ <li>🔍 <strong>Quick Method Experience</strong>
73
+ <ul>
74
+ <li>⚡ Quickly load corpora and index files to explore the characteristics and application scenarios of various RAG methods.</li>
75
+ <li>🔄 Supports loading and switching different components and hyperparameters, seamlessly connecting different RAG Pipelines to quickly experience their performance and differences!</li>
76
+ </ul>
77
+ </li>
78
+ <li>📊 <strong>Efficient Benchmark Reproduction</strong>
79
+ <ul>
80
+ <li>🎯 Easily reproduce the built-in baseline methods and carefully collected benchmarks on FlashRAG-UI.</li>
81
+ <li>🛠️ Use cutting-edge research tools directly without complex settings, providing a smooth experience for your research work!</li>
82
+ </ul>
83
+ </li>
84
+ </ul>
85
+
86
+ <details>
87
+ <summary>Show more</summary>
88
+ <table align="center">
89
+ <tr>
90
+ <td align="center">
91
+ <img src="./asset/demo_en1.jpg" alt="Image 1" width="505"/>
92
+ </td>
93
+ <td align="center">
94
+ <img src="./asset/demo_en2.jpg" alt="Image 2" width="505"/>
95
+ </td>
96
+ </tr>
97
+ <tr>
98
+ <td align="center">
99
+ <img src="./asset/demo_en4.png" alt="Image 3" width="500"/>
100
+ </td>
101
+ <td align="center">
102
+ <img src="./asset/demo_en3.jpg" alt="Image 4" width="500"/>
103
+ </td>
104
+ </tr>
105
+ </table>
106
+ </details>
107
+
108
+ <p>To experience FlashRAG-UI, please go to <a href="#computer-flashrag-ui">FlashRAG-UI</a>.</p>
109
+ <center><h3>🎨 Experience our meticulously designed FlashRAG-UI—both user-friendly and visually appealing</h3></center>
110
+
111
+
53
112
  ## :link: Navigation
54
113
  - [Features](#sparkles-features)
55
114
  - [Roadmap](#mag_right-roadmap)
@@ -57,6 +116,7 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
57
116
  - [Installation](#wrench-installation)
58
117
  - [Quick Start](#rocket-quick-start)
59
118
  - [Components](#gear-components)
119
+ - [FlashRAG-UI](#computer-flashrag-ui)
60
120
  - [Supporting Methods](#robot-supporting-methods)
61
121
  - [Supporting Datasets & Document Corpus](#notebook-supporting-datasets--document-corpus)
62
122
  - [Additional FAQs](#raised_hands-additional-faqs)
@@ -69,7 +129,7 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
69
129
 
70
130
  - **Comprehensive Benchmark Datasets**: A collection of 36 pre-processed RAG benchmark datasets to test and validate RAG models' performances.
71
131
 
72
- - **Pre-implemented Advanced RAG Algorithms**: Features 15 advancing RAG algorithms with reported results, based on our framework. Easily reproducing results under different settings.
132
+ - **Pre-implemented Advanced RAG Algorithms**: Features 16 advancing RAG algorithms with reported results, based on our framework. Easily reproducing results under different settings.
73
133
 
74
134
  - **Efficient Preprocessing Stage**: Simplifies the RAG workflow preparation by providing various scripts like corpus processing for retrieval, retrieval index building, and pre-retrieval of documents.
75
135
 
@@ -89,6 +149,9 @@ FlashRAG is still under development and there are many issues and room for impro
89
149
  - [ ] Enhance code adaptability and readability
90
150
 
91
151
  ## :page_with_curl: Changelog
152
+ [25/01/12] Introduce <strong>FlashRAG-UI</strong>, an easy to use interface. You can easily and quickly configure and experience the supported RAG methods and evaluate them on the benchmarks.
153
+
154
+ [25/01/11] We have added support for a new method [<u>RQRAG</u>](https://arxiv.org/abs/2404.00610) method, see it in [**reproduce_experiment**](docs/reproduce_experiment.md).
92
155
 
93
156
  [25/01/07] We have currently support the aggregation of multiple retrievers, see it in [**multi retriever usage**](https://github.com/RUC-NLPIR/FlashRAG/blob/main/docs/multi_retriever_usage.md).
94
157
 
@@ -100,15 +163,15 @@ FlashRAG is still under development and there are many issues and room for impro
100
163
 
101
164
  [24/09/24] We have released a version based on the MindSpore framework that supports Chinese hardware platforms. Please refer to [FlashRAG MindSpore](https://github.com/RUC-NLPIR/FlashRAG-MindSpore) for details.
102
165
 
166
+ <details>
167
+ <summary>Show more</summary>
168
+
103
169
  [24/09/18] Due to the complexity and limitations of installing Pyserini in certain environments, we have introduced a lightweight `BM25s` package as an alternative (faster and easier to use). The retriever based on Pyserini will be deprecated in future versions. To use retriever with `bm25s`, just set `bm25_backend` to `bm25s` in config.
104
170
 
105
171
  [24/09/09] We add support for a new method [<u>Adaptive-RAG</u>](https://aclanthology.org/2024.naacl-long.389.pdf), which can automatically select the RAG process to execute based on the type of query. See it result in [<u>result table</u>](#robot-supporting-methods).
106
172
 
107
173
  [24/08/02] We add support for a new method [<u>Spring</u>](https://arxiv.org/abs/2405.19670), significantly improve the performance of LLM by adding only a few token embeddings. See it result in [<u>result table</u>](#robot-supporting-methods).
108
174
 
109
- <details>
110
- <summary>Show more</summary>
111
-
112
175
  [24/07/17] Due to some unknown issues with HuggingFace, our original dataset link has been invalid. We have updated it. Please check the [new link](https://huggingface.co/datasets/RUC-NLPIR/FlashRAG_datasets/) if you encounter any problems.
113
176
 
114
177
  [24/07/06] We add support for a new method: [<u>Trace</u>](https://arxiv.org/abs/2406.11460), which refine text by constructing a knowledge graph. See it [<u>results</u>](#robot-supporting-methods) and [<u>details</u>](./docs/baseline_details.md).
@@ -182,9 +245,8 @@ From the official Faiss repository ([source](https://github.com/facebookresearch
182
245
  To build an index, you first need to save your corpus as a `jsonl` file with each line representing a document.
183
246
 
184
247
  ```jsonl
185
- {"id": "0", "contents": "content"}
186
- {"id": "1", "contents": "content"}
187
- ...
248
+ {"id": "0", "contents": "..."}
249
+ {"id": "1", "contents": "..."}
188
250
  ```
189
251
 
190
252
  If you want to use Wikipedia as your corpus, you can refer to our documentation [Processing Wikipedia](./docs/process-wiki.md) to convert it into an indexable format.
@@ -492,6 +554,14 @@ In each category, we have implemented corresponding common pipelines. Some pipel
492
554
  </tbody>
493
555
  </table>
494
556
 
557
+ ## :computer: FlashRAG-UI
558
+ To use FlashRAG-UI, run the following code:
559
+
560
+ ```bash
561
+ cd webui
562
+ python interface.py
563
+ ```
564
+
495
565
  ## :robot: Supporting Methods
496
566
 
497
567
  We have implemented 15 works with a consistent setting of:
@@ -525,6 +595,8 @@ It’s important to note that, to ensure consistency, we have utilized a uniform
525
595
  | [FLARE](https://arxiv.org/abs/2305.06983) | Loop | 22.5 | 55.8 | 28.0 | 33.9 | 20.7 | 20.2 | |
526
596
  | [Iter-Retgen](https://arxiv.org/abs/2305.15294), [ITRG](https://arxiv.org/abs/2310.05149) | Loop | 36.8 | 60.1 | 38.3 | 21.6 | 37.9 | 18.2 | |
527
597
  | [IRCoT](https://aclanthology.org/2023.acl-long.557.pdf) | Loop | 33.3 | 56.9 | 41.5 | 32.4 | 45.6 | 20.7 | |
598
+ | [RQRAG](https://arxiv.org/abs/2404.00610) | Loop | 32.6 | 52.5 | 33.5 | 35.8 | 46.4 | 26.2 | Use trained rqrag-llama2-7B |
599
+
528
600
 
529
601
  ## :notebook: Supporting Datasets & Document Corpus
530
602
 
@@ -589,7 +661,7 @@ Below is the list of datasets along with the corresponding sample sizes:
589
661
  Our toolkit supports jsonl format for retrieval document collections, with the following structure:
590
662
 
591
663
  ```jsonl
592
- {"id":"0", "contents": "...."}
664
+ {"id":"0", "contents": "..."}
593
665
  {"id":"1", "contents": "..."}
594
666
  ```
595
667
 
@@ -15,13 +15,16 @@
15
15
  <a href="#sparkles-features">Features</a> |
16
16
  <a href="#rocket-quick-start">Quick-Start</a> |
17
17
  <a href="#gear-components"> Components</a> |
18
+ <a href="#computer-flashrag-ui"> FlashRAG-UI</a> |
18
19
  <a href="#robot-supporting-methods"> Supporting Methods</a> |
19
20
  <a href="#notebook-supporting-datasets--document-corpus"> Supporting Datasets</a> |
20
21
  <a href="#raised_hands-additional-faqs"> FAQs</a>
21
22
  </p>
22
23
 
23
24
  </h4>
24
- FlashRAG is a Python toolkit for the reproduction and development of Retrieval Augmented Generation (RAG) research. Our toolkit includes 36 pre-processed benchmark RAG datasets and 15 state-of-the-art RAG algorithms.
25
+
26
+
27
+ FlashRAG is a Python toolkit for the reproduction and development of Retrieval Augmented Generation (RAG) research. Our toolkit includes 36 pre-processed benchmark RAG datasets and 16 state-of-the-art RAG algorithms.
25
28
 
26
29
  <p align="center">
27
30
  <img src="asset/framework.jpg">
@@ -33,6 +36,62 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
33
36
  <a href="https://trendshift.io/repositories/10454" target="_blank"><img src="https://trendshift.io/api/badge/repositories/10454" alt="RUC-NLPIR%2FFlashRAG | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
34
37
  </p>
35
38
 
39
+ <h2 align="center">✨ Introduce FlashRAG-UI ✨</h2>
40
+ <p>With <strong>FlashRAG-UI</strong>, you can easily and quickly configure and experience the supported RAG methods through our meticulously designed visual interface, and evaluate these methods on benchmarks, making complex research work more efficient!</p>
41
+
42
+
43
+ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
44
+
45
+
46
+ <h3>🌟 Features</h3>
47
+ <ul>
48
+ <li>🚀 <strong>One-Click Configuration Loading</strong>
49
+ <ul>
50
+ <li>You can load parameters and configuration files for various RAG methods through simple clicks, selections, and inputs.</li>
51
+ <li>🖼️ Supports preview interface for intuitive parameter settings.</li>
52
+ <li>💾 Provides save functionality to easily store configurations for future use.</li>
53
+ </ul>
54
+ </li>
55
+ <li>🔍 <strong>Quick Method Experience</strong>
56
+ <ul>
57
+ <li>⚡ Quickly load corpora and index files to explore the characteristics and application scenarios of various RAG methods.</li>
58
+ <li>🔄 Supports loading and switching different components and hyperparameters, seamlessly connecting different RAG Pipelines to quickly experience their performance and differences!</li>
59
+ </ul>
60
+ </li>
61
+ <li>📊 <strong>Efficient Benchmark Reproduction</strong>
62
+ <ul>
63
+ <li>🎯 Easily reproduce the built-in baseline methods and carefully collected benchmarks on FlashRAG-UI.</li>
64
+ <li>🛠️ Use cutting-edge research tools directly without complex settings, providing a smooth experience for your research work!</li>
65
+ </ul>
66
+ </li>
67
+ </ul>
68
+
69
+ <details>
70
+ <summary>Show more</summary>
71
+ <table align="center">
72
+ <tr>
73
+ <td align="center">
74
+ <img src="./asset/demo_en1.jpg" alt="Image 1" width="505"/>
75
+ </td>
76
+ <td align="center">
77
+ <img src="./asset/demo_en2.jpg" alt="Image 2" width="505"/>
78
+ </td>
79
+ </tr>
80
+ <tr>
81
+ <td align="center">
82
+ <img src="./asset/demo_en4.png" alt="Image 3" width="500"/>
83
+ </td>
84
+ <td align="center">
85
+ <img src="./asset/demo_en3.jpg" alt="Image 4" width="500"/>
86
+ </td>
87
+ </tr>
88
+ </table>
89
+ </details>
90
+
91
+ <p>To experience FlashRAG-UI, please go to <a href="#computer-flashrag-ui">FlashRAG-UI</a>.</p>
92
+ <center><h3>🎨 Experience our meticulously designed FlashRAG-UI—both user-friendly and visually appealing</h3></center>
93
+
94
+
36
95
  ## :link: Navigation
37
96
  - [Features](#sparkles-features)
38
97
  - [Roadmap](#mag_right-roadmap)
@@ -40,6 +99,7 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
40
99
  - [Installation](#wrench-installation)
41
100
  - [Quick Start](#rocket-quick-start)
42
101
  - [Components](#gear-components)
102
+ - [FlashRAG-UI](#computer-flashrag-ui)
43
103
  - [Supporting Methods](#robot-supporting-methods)
44
104
  - [Supporting Datasets & Document Corpus](#notebook-supporting-datasets--document-corpus)
45
105
  - [Additional FAQs](#raised_hands-additional-faqs)
@@ -52,7 +112,7 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
52
112
 
53
113
  - **Comprehensive Benchmark Datasets**: A collection of 36 pre-processed RAG benchmark datasets to test and validate RAG models' performances.
54
114
 
55
- - **Pre-implemented Advanced RAG Algorithms**: Features 15 advancing RAG algorithms with reported results, based on our framework. Easily reproducing results under different settings.
115
+ - **Pre-implemented Advanced RAG Algorithms**: Features 16 advancing RAG algorithms with reported results, based on our framework. Easily reproducing results under different settings.
56
116
 
57
117
  - **Efficient Preprocessing Stage**: Simplifies the RAG workflow preparation by providing various scripts like corpus processing for retrieval, retrieval index building, and pre-retrieval of documents.
58
118
 
@@ -72,6 +132,9 @@ FlashRAG is still under development and there are many issues and room for impro
72
132
  - [ ] Enhance code adaptability and readability
73
133
 
74
134
  ## :page_with_curl: Changelog
135
+ [25/01/12] Introduce <strong>FlashRAG-UI</strong>, an easy to use interface. You can easily and quickly configure and experience the supported RAG methods and evaluate them on the benchmarks.
136
+
137
+ [25/01/11] We have added support for a new method [<u>RQRAG</u>](https://arxiv.org/abs/2404.00610) method, see it in [**reproduce_experiment**](docs/reproduce_experiment.md).
75
138
 
76
139
  [25/01/07] We have currently support the aggregation of multiple retrievers, see it in [**multi retriever usage**](https://github.com/RUC-NLPIR/FlashRAG/blob/main/docs/multi_retriever_usage.md).
77
140
 
@@ -83,15 +146,15 @@ FlashRAG is still under development and there are many issues and room for impro
83
146
 
84
147
  [24/09/24] We have released a version based on the MindSpore framework that supports Chinese hardware platforms. Please refer to [FlashRAG MindSpore](https://github.com/RUC-NLPIR/FlashRAG-MindSpore) for details.
85
148
 
149
+ <details>
150
+ <summary>Show more</summary>
151
+
86
152
  [24/09/18] Due to the complexity and limitations of installing Pyserini in certain environments, we have introduced a lightweight `BM25s` package as an alternative (faster and easier to use). The retriever based on Pyserini will be deprecated in future versions. To use retriever with `bm25s`, just set `bm25_backend` to `bm25s` in config.
87
153
 
88
154
  [24/09/09] We add support for a new method [<u>Adaptive-RAG</u>](https://aclanthology.org/2024.naacl-long.389.pdf), which can automatically select the RAG process to execute based on the type of query. See it result in [<u>result table</u>](#robot-supporting-methods).
89
155
 
90
156
  [24/08/02] We add support for a new method [<u>Spring</u>](https://arxiv.org/abs/2405.19670), significantly improve the performance of LLM by adding only a few token embeddings. See it result in [<u>result table</u>](#robot-supporting-methods).
91
157
 
92
- <details>
93
- <summary>Show more</summary>
94
-
95
158
  [24/07/17] Due to some unknown issues with HuggingFace, our original dataset link has been invalid. We have updated it. Please check the [new link](https://huggingface.co/datasets/RUC-NLPIR/FlashRAG_datasets/) if you encounter any problems.
96
159
 
97
160
  [24/07/06] We add support for a new method: [<u>Trace</u>](https://arxiv.org/abs/2406.11460), which refine text by constructing a knowledge graph. See it [<u>results</u>](#robot-supporting-methods) and [<u>details</u>](./docs/baseline_details.md).
@@ -165,9 +228,8 @@ From the official Faiss repository ([source](https://github.com/facebookresearch
165
228
  To build an index, you first need to save your corpus as a `jsonl` file with each line representing a document.
166
229
 
167
230
  ```jsonl
168
- {"id": "0", "contents": "content"}
169
- {"id": "1", "contents": "content"}
170
- ...
231
+ {"id": "0", "contents": "..."}
232
+ {"id": "1", "contents": "..."}
171
233
  ```
172
234
 
173
235
  If you want to use Wikipedia as your corpus, you can refer to our documentation [Processing Wikipedia](./docs/process-wiki.md) to convert it into an indexable format.
@@ -475,6 +537,14 @@ In each category, we have implemented corresponding common pipelines. Some pipel
475
537
  </tbody>
476
538
  </table>
477
539
 
540
+ ## :computer: FlashRAG-UI
541
+ To use FlashRAG-UI, run the following code:
542
+
543
+ ```bash
544
+ cd webui
545
+ python interface.py
546
+ ```
547
+
478
548
  ## :robot: Supporting Methods
479
549
 
480
550
  We have implemented 15 works with a consistent setting of:
@@ -508,6 +578,8 @@ It’s important to note that, to ensure consistency, we have utilized a uniform
508
578
  | [FLARE](https://arxiv.org/abs/2305.06983) | Loop | 22.5 | 55.8 | 28.0 | 33.9 | 20.7 | 20.2 | |
509
579
  | [Iter-Retgen](https://arxiv.org/abs/2305.15294), [ITRG](https://arxiv.org/abs/2310.05149) | Loop | 36.8 | 60.1 | 38.3 | 21.6 | 37.9 | 18.2 | |
510
580
  | [IRCoT](https://aclanthology.org/2023.acl-long.557.pdf) | Loop | 33.3 | 56.9 | 41.5 | 32.4 | 45.6 | 20.7 | |
581
+ | [RQRAG](https://arxiv.org/abs/2404.00610) | Loop | 32.6 | 52.5 | 33.5 | 35.8 | 46.4 | 26.2 | Use trained rqrag-llama2-7B |
582
+
511
583
 
512
584
  ## :notebook: Supporting Datasets & Document Corpus
513
585
 
@@ -572,7 +644,7 @@ Below is the list of datasets along with the corresponding sample sizes:
572
644
  Our toolkit supports jsonl format for retrieval document collections, with the following structure:
573
645
 
574
646
  ```jsonl
575
- {"id":"0", "contents": "...."}
647
+ {"id":"0", "contents": "..."}
576
648
  {"id":"1", "contents": "..."}
577
649
  ```
578
650
 
@@ -0,0 +1 @@
1
+ __version__ = "0.1.4dev20250112"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flashrag-dev
3
- Version: 0.1.4.dev20250111
3
+ Version: 0.1.4.dev20250112
4
4
  Summary: A library for efficient Retrieval-Augmented Generation research
5
5
  Home-page: https://github.com/RUC-NLPIR/FlashRAG
6
6
  Author: Jiajie Jin, Yutao Zhu, Chenghao Zhang, Xinyu Yang, Zhicheng Dou
@@ -32,13 +32,16 @@ License-File: LICENSE
32
32
  <a href="#sparkles-features">Features</a> |
33
33
  <a href="#rocket-quick-start">Quick-Start</a> |
34
34
  <a href="#gear-components"> Components</a> |
35
+ <a href="#computer-flashrag-ui"> FlashRAG-UI</a> |
35
36
  <a href="#robot-supporting-methods"> Supporting Methods</a> |
36
37
  <a href="#notebook-supporting-datasets--document-corpus"> Supporting Datasets</a> |
37
38
  <a href="#raised_hands-additional-faqs"> FAQs</a>
38
39
  </p>
39
40
 
40
41
  </h4>
41
- FlashRAG is a Python toolkit for the reproduction and development of Retrieval Augmented Generation (RAG) research. Our toolkit includes 36 pre-processed benchmark RAG datasets and 15 state-of-the-art RAG algorithms.
42
+
43
+
44
+ FlashRAG is a Python toolkit for the reproduction and development of Retrieval Augmented Generation (RAG) research. Our toolkit includes 36 pre-processed benchmark RAG datasets and 16 state-of-the-art RAG algorithms.
42
45
 
43
46
  <p align="center">
44
47
  <img src="asset/framework.jpg">
@@ -50,6 +53,62 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
50
53
  <a href="https://trendshift.io/repositories/10454" target="_blank"><img src="https://trendshift.io/api/badge/repositories/10454" alt="RUC-NLPIR%2FFlashRAG | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
51
54
  </p>
52
55
 
56
+ <h2 align="center">✨ Introduce FlashRAG-UI ✨</h2>
57
+ <p>With <strong>FlashRAG-UI</strong>, you can easily and quickly configure and experience the supported RAG methods through our meticulously designed visual interface, and evaluate these methods on benchmarks, making complex research work more efficient!</p>
58
+
59
+
60
+ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
61
+
62
+
63
+ <h3>🌟 Features</h3>
64
+ <ul>
65
+ <li>🚀 <strong>One-Click Configuration Loading</strong>
66
+ <ul>
67
+ <li>You can load parameters and configuration files for various RAG methods through simple clicks, selections, and inputs.</li>
68
+ <li>🖼️ Supports preview interface for intuitive parameter settings.</li>
69
+ <li>💾 Provides save functionality to easily store configurations for future use.</li>
70
+ </ul>
71
+ </li>
72
+ <li>🔍 <strong>Quick Method Experience</strong>
73
+ <ul>
74
+ <li>⚡ Quickly load corpora and index files to explore the characteristics and application scenarios of various RAG methods.</li>
75
+ <li>🔄 Supports loading and switching different components and hyperparameters, seamlessly connecting different RAG Pipelines to quickly experience their performance and differences!</li>
76
+ </ul>
77
+ </li>
78
+ <li>📊 <strong>Efficient Benchmark Reproduction</strong>
79
+ <ul>
80
+ <li>🎯 Easily reproduce the built-in baseline methods and carefully collected benchmarks on FlashRAG-UI.</li>
81
+ <li>🛠️ Use cutting-edge research tools directly without complex settings, providing a smooth experience for your research work!</li>
82
+ </ul>
83
+ </li>
84
+ </ul>
85
+
86
+ <details>
87
+ <summary>Show more</summary>
88
+ <table align="center">
89
+ <tr>
90
+ <td align="center">
91
+ <img src="./asset/demo_en1.jpg" alt="Image 1" width="505"/>
92
+ </td>
93
+ <td align="center">
94
+ <img src="./asset/demo_en2.jpg" alt="Image 2" width="505"/>
95
+ </td>
96
+ </tr>
97
+ <tr>
98
+ <td align="center">
99
+ <img src="./asset/demo_en4.png" alt="Image 3" width="500"/>
100
+ </td>
101
+ <td align="center">
102
+ <img src="./asset/demo_en3.jpg" alt="Image 4" width="500"/>
103
+ </td>
104
+ </tr>
105
+ </table>
106
+ </details>
107
+
108
+ <p>To experience FlashRAG-UI, please go to <a href="#computer-flashrag-ui">FlashRAG-UI</a>.</p>
109
+ <center><h3>🎨 Experience our meticulously designed FlashRAG-UI—both user-friendly and visually appealing</h3></center>
110
+
111
+
53
112
  ## :link: Navigation
54
113
  - [Features](#sparkles-features)
55
114
  - [Roadmap](#mag_right-roadmap)
@@ -57,6 +116,7 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
57
116
  - [Installation](#wrench-installation)
58
117
  - [Quick Start](#rocket-quick-start)
59
118
  - [Components](#gear-components)
119
+ - [FlashRAG-UI](#computer-flashrag-ui)
60
120
  - [Supporting Methods](#robot-supporting-methods)
61
121
  - [Supporting Datasets & Document Corpus](#notebook-supporting-datasets--document-corpus)
62
122
  - [Additional FAQs](#raised_hands-additional-faqs)
@@ -69,7 +129,7 @@ With FlashRAG and provided resources, you can effortlessly reproduce existing SO
69
129
 
70
130
  - **Comprehensive Benchmark Datasets**: A collection of 36 pre-processed RAG benchmark datasets to test and validate RAG models' performances.
71
131
 
72
- - **Pre-implemented Advanced RAG Algorithms**: Features 15 advancing RAG algorithms with reported results, based on our framework. Easily reproducing results under different settings.
132
+ - **Pre-implemented Advanced RAG Algorithms**: Features 16 advancing RAG algorithms with reported results, based on our framework. Easily reproducing results under different settings.
73
133
 
74
134
  - **Efficient Preprocessing Stage**: Simplifies the RAG workflow preparation by providing various scripts like corpus processing for retrieval, retrieval index building, and pre-retrieval of documents.
75
135
 
@@ -89,6 +149,9 @@ FlashRAG is still under development and there are many issues and room for impro
89
149
  - [ ] Enhance code adaptability and readability
90
150
 
91
151
  ## :page_with_curl: Changelog
152
+ [25/01/12] Introduce <strong>FlashRAG-UI</strong>, an easy to use interface. You can easily and quickly configure and experience the supported RAG methods and evaluate them on the benchmarks.
153
+
154
+ [25/01/11] We have added support for a new method [<u>RQRAG</u>](https://arxiv.org/abs/2404.00610) method, see it in [**reproduce_experiment**](docs/reproduce_experiment.md).
92
155
 
93
156
  [25/01/07] We have currently support the aggregation of multiple retrievers, see it in [**multi retriever usage**](https://github.com/RUC-NLPIR/FlashRAG/blob/main/docs/multi_retriever_usage.md).
94
157
 
@@ -100,15 +163,15 @@ FlashRAG is still under development and there are many issues and room for impro
100
163
 
101
164
  [24/09/24] We have released a version based on the MindSpore framework that supports Chinese hardware platforms. Please refer to [FlashRAG MindSpore](https://github.com/RUC-NLPIR/FlashRAG-MindSpore) for details.
102
165
 
166
+ <details>
167
+ <summary>Show more</summary>
168
+
103
169
  [24/09/18] Due to the complexity and limitations of installing Pyserini in certain environments, we have introduced a lightweight `BM25s` package as an alternative (faster and easier to use). The retriever based on Pyserini will be deprecated in future versions. To use retriever with `bm25s`, just set `bm25_backend` to `bm25s` in config.
104
170
 
105
171
  [24/09/09] We add support for a new method [<u>Adaptive-RAG</u>](https://aclanthology.org/2024.naacl-long.389.pdf), which can automatically select the RAG process to execute based on the type of query. See it result in [<u>result table</u>](#robot-supporting-methods).
106
172
 
107
173
  [24/08/02] We add support for a new method [<u>Spring</u>](https://arxiv.org/abs/2405.19670), significantly improve the performance of LLM by adding only a few token embeddings. See it result in [<u>result table</u>](#robot-supporting-methods).
108
174
 
109
- <details>
110
- <summary>Show more</summary>
111
-
112
175
  [24/07/17] Due to some unknown issues with HuggingFace, our original dataset link has been invalid. We have updated it. Please check the [new link](https://huggingface.co/datasets/RUC-NLPIR/FlashRAG_datasets/) if you encounter any problems.
113
176
 
114
177
  [24/07/06] We add support for a new method: [<u>Trace</u>](https://arxiv.org/abs/2406.11460), which refine text by constructing a knowledge graph. See it [<u>results</u>](#robot-supporting-methods) and [<u>details</u>](./docs/baseline_details.md).
@@ -182,9 +245,8 @@ From the official Faiss repository ([source](https://github.com/facebookresearch
182
245
  To build an index, you first need to save your corpus as a `jsonl` file with each line representing a document.
183
246
 
184
247
  ```jsonl
185
- {"id": "0", "contents": "content"}
186
- {"id": "1", "contents": "content"}
187
- ...
248
+ {"id": "0", "contents": "..."}
249
+ {"id": "1", "contents": "..."}
188
250
  ```
189
251
 
190
252
  If you want to use Wikipedia as your corpus, you can refer to our documentation [Processing Wikipedia](./docs/process-wiki.md) to convert it into an indexable format.
@@ -492,6 +554,14 @@ In each category, we have implemented corresponding common pipelines. Some pipel
492
554
  </tbody>
493
555
  </table>
494
556
 
557
+ ## :computer: FlashRAG-UI
558
+ To use FlashRAG-UI, run the following code:
559
+
560
+ ```bash
561
+ cd webui
562
+ python interface.py
563
+ ```
564
+
495
565
  ## :robot: Supporting Methods
496
566
 
497
567
  We have implemented 15 works with a consistent setting of:
@@ -525,6 +595,8 @@ It’s important to note that, to ensure consistency, we have utilized a uniform
525
595
  | [FLARE](https://arxiv.org/abs/2305.06983) | Loop | 22.5 | 55.8 | 28.0 | 33.9 | 20.7 | 20.2 | |
526
596
  | [Iter-Retgen](https://arxiv.org/abs/2305.15294), [ITRG](https://arxiv.org/abs/2310.05149) | Loop | 36.8 | 60.1 | 38.3 | 21.6 | 37.9 | 18.2 | |
527
597
  | [IRCoT](https://aclanthology.org/2023.acl-long.557.pdf) | Loop | 33.3 | 56.9 | 41.5 | 32.4 | 45.6 | 20.7 | |
598
+ | [RQRAG](https://arxiv.org/abs/2404.00610) | Loop | 32.6 | 52.5 | 33.5 | 35.8 | 46.4 | 26.2 | Use trained rqrag-llama2-7B |
599
+
528
600
 
529
601
  ## :notebook: Supporting Datasets & Document Corpus
530
602
 
@@ -589,7 +661,7 @@ Below is the list of datasets along with the corresponding sample sizes:
589
661
  Our toolkit supports jsonl format for retrieval document collections, with the following structure:
590
662
 
591
663
  ```jsonl
592
- {"id":"0", "contents": "...."}
664
+ {"id":"0", "contents": "..."}
593
665
  {"id":"1", "contents": "..."}
594
666
  ```
595
667
 
@@ -16,6 +16,7 @@ bm25s[core]==0.2.0
16
16
  fschat
17
17
  streamlit
18
18
  chonkie>=0.4.0
19
+ gradio==5.9.1
19
20
 
20
21
  [core]
21
22
  datasets
@@ -36,6 +37,7 @@ bm25s[core]==0.2.0
36
37
  fschat
37
38
  streamlit
38
39
  chonkie>=0.4.0
40
+ gradio==5.9.1
39
41
 
40
42
  [full]
41
43
  datasets
@@ -56,6 +58,7 @@ bm25s[core]==0.2.0
56
58
  fschat
57
59
  streamlit
58
60
  chonkie>=0.4.0
61
+ gradio==5.9.1
59
62
  pyserini
60
63
  sentence-transformers>=3.0.1
61
64
  vllm==0.5.5
@@ -1 +0,0 @@
1
- __version__ = "0.1.4dev20250111"