flashrag-dev 0.1.4.dev20250112__tar.gz → 0.1.4.dev20250117__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.dev20250112 → flashrag_dev-0.1.4.dev20250117}/PKG-INFO +43 -62
  2. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/README.md +42 -61
  3. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/refiner/refiner.py +1 -1
  4. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/retriever/utils.py +9 -1
  5. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/utils/pred_parse.py +1 -1
  6. flashrag_dev-0.1.4.dev20250117/flashrag/version.py +1 -0
  7. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag_dev.egg-info/PKG-INFO +43 -62
  8. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag_dev.egg-info/requires.txt +6 -3
  9. flashrag_dev-0.1.4.dev20250112/flashrag/version.py +0 -1
  10. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/LICENSE +0 -0
  11. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/__init__.py +0 -0
  12. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/config/__init__.py +0 -0
  13. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/config/basic_config.yaml +0 -0
  14. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/config/config.py +0 -0
  15. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/dataset/__init__.py +0 -0
  16. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/dataset/dataset.py +0 -0
  17. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/dataset/utils.py +0 -0
  18. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/evaluator/__init__.py +0 -0
  19. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/evaluator/_bleu.py +0 -0
  20. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/evaluator/evaluator.py +0 -0
  21. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/evaluator/metrics.py +0 -0
  22. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/evaluator/utils.py +0 -0
  23. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/generator/__init__.py +0 -0
  24. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/generator/fid.py +0 -0
  25. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/generator/generator.py +0 -0
  26. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/generator/multimodal_generator.py +0 -0
  27. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/generator/openai_generator.py +0 -0
  28. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/generator/stop_word_criteria.py +0 -0
  29. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/generator/utils.py +0 -0
  30. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/judger/__init__.py +0 -0
  31. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/judger/judger.py +0 -0
  32. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/pipeline/__init__.py +0 -0
  33. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/pipeline/active_pipeline.py +0 -0
  34. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/pipeline/branching_pipeline.py +0 -0
  35. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/pipeline/mm_pipeline.py +0 -0
  36. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/pipeline/pipeline.py +0 -0
  37. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/pipeline/replug_utils.py +0 -0
  38. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/prompt/__init__.py +0 -0
  39. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/prompt/base_prompt.py +0 -0
  40. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/prompt/mm_prompt.py +0 -0
  41. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/prompt/selfask_examplars.py +0 -0
  42. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/prompt/trace_examplars.py +0 -0
  43. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/refiner/__init__.py +0 -0
  44. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/refiner/kg_refiner.py +0 -0
  45. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/refiner/llmlingua_compressor.py +0 -0
  46. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/refiner/selective_context_compressor.py +0 -0
  47. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/retriever/__init__.py +0 -0
  48. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/retriever/__main__.py +0 -0
  49. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/retriever/encoder.py +0 -0
  50. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/retriever/index_builder.py +0 -0
  51. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/retriever/reranker.py +0 -0
  52. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/retriever/retriever.py +0 -0
  53. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/utils/__init__.py +0 -0
  54. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/utils/constants.py +0 -0
  55. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag/utils/utils.py +0 -0
  56. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag_dev.egg-info/SOURCES.txt +0 -0
  57. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag_dev.egg-info/dependency_links.txt +0 -0
  58. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/flashrag_dev.egg-info/top_level.txt +0 -0
  59. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/pyproject.toml +0 -0
  60. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/setup.cfg +0 -0
  61. {flashrag_dev-0.1.4.dev20250112 → flashrag_dev-0.1.4.dev20250117}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flashrag_dev
3
- Version: 0.1.4.dev20250112
3
+ Version: 0.1.4.dev20250117
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,7 +32,7 @@ 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
+ <a href="#art-flashrag-ui"> FlashRAG-UI</a> |
36
36
  <a href="#robot-supporting-methods"> Supporting Methods</a> |
37
37
  <a href="#notebook-supporting-datasets--document-corpus"> Supporting Datasets</a> |
38
38
  <a href="#raised_hands-additional-faqs"> FAQs</a>
@@ -47,68 +47,14 @@ FlashRAG is a Python toolkit for the reproduction and development of Retrieval A
47
47
  <img src="asset/framework.jpg">
48
48
  </p>
49
49
 
50
- With FlashRAG and provided resources, you can effortlessly reproduce existing SOTA works in the RAG domain or implement your custom RAG processes and components.
50
+ With FlashRAG and provided resources, you can effortlessly reproduce existing SOTA works in the RAG domain or implement your custom RAG processes and components. Besides, we provide an easy-to-use UI:
51
+
52
+ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
51
53
 
52
54
  <p>
53
55
  <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>
54
56
  </p>
55
57
 
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
-
112
58
  ## :link: Navigation
113
59
  - [Features](#sparkles-features)
114
60
  - [Roadmap](#mag_right-roadmap)
@@ -116,7 +62,7 @@ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
116
62
  - [Installation](#wrench-installation)
117
63
  - [Quick Start](#rocket-quick-start)
118
64
  - [Components](#gear-components)
119
- - [FlashRAG-UI](#computer-flashrag-ui)
65
+ - [FlashRAG-UI](#art-flashrag-ui)
120
66
  - [Supporting Methods](#robot-supporting-methods)
121
67
  - [Supporting Datasets & Document Corpus](#notebook-supporting-datasets--document-corpus)
122
68
  - [Additional FAQs](#raised_hands-additional-faqs)
@@ -554,9 +500,44 @@ In each category, we have implemented corresponding common pipelines. Some pipel
554
500
  </tbody>
555
501
  </table>
556
502
 
557
- ## :computer: FlashRAG-UI
558
- To use FlashRAG-UI, run the following code:
503
+ ## :art: FlashRAG-UI
504
+ <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>
505
+
506
+ ### :star2: Features
507
+ - **One-Click Configuration Loading**
508
+ - You can load parameters and configuration files for various RAG methods through simple clicks, selections, and inputs.</li>
509
+ - Supports preview interface for intuitive parameter settings.</li>
510
+ - Provides save functionality to easily store configurations for future use.</li>
511
+ - **Quick Method Experience**
512
+ - Quickly load corpora and index files to explore the characteristics and application scenarios of various RAG methods.</li>
513
+ - Supports loading and switching different components and hyperparameters, seamlessly connecting different RAG Pipelines to quickly experience their performance and differences!</li>
514
+ - **Efficient Benchmark Reproduction**
515
+ - Easily reproduce the built-in baseline methods and carefully collected benchmarks on FlashRAG-UI.</li>
516
+ - Use cutting-edge research tools directly without complex settings, providing a smooth experience for your research work!</li>
517
+
518
+ <details>
519
+ <summary>Show more</summary>
520
+ <table align="center">
521
+ <tr>
522
+ <td align="center">
523
+ <img src="./asset/demo_en1.jpg" alt="Image 1" width="505"/>
524
+ </td>
525
+ <td align="center">
526
+ <img src="./asset/demo_en2.jpg" alt="Image 2" width="505"/>
527
+ </td>
528
+ </tr>
529
+ <tr>
530
+ <td align="center">
531
+ <img src="./asset/demo_en4.png" alt="Image 3" width="500"/>
532
+ </td>
533
+ <td align="center">
534
+ <img src="./asset/demo_en3.jpg" alt="Image 4" width="500"/>
535
+ </td>
536
+ </tr>
537
+ </table>
538
+ </details>
559
539
 
540
+ #### Experience our meticulously designed FlashRAG-UI—both user-friendly and visually appealing:
560
541
  ```bash
561
542
  cd webui
562
543
  python interface.py
@@ -15,7 +15,7 @@
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
+ <a href="#art-flashrag-ui"> FlashRAG-UI</a> |
19
19
  <a href="#robot-supporting-methods"> Supporting Methods</a> |
20
20
  <a href="#notebook-supporting-datasets--document-corpus"> Supporting Datasets</a> |
21
21
  <a href="#raised_hands-additional-faqs"> FAQs</a>
@@ -30,68 +30,14 @@ FlashRAG is a Python toolkit for the reproduction and development of Retrieval A
30
30
  <img src="asset/framework.jpg">
31
31
  </p>
32
32
 
33
- With FlashRAG and provided resources, you can effortlessly reproduce existing SOTA works in the RAG domain or implement your custom RAG processes and components.
33
+ With FlashRAG and provided resources, you can effortlessly reproduce existing SOTA works in the RAG domain or implement your custom RAG processes and components. Besides, we provide an easy-to-use UI:
34
+
35
+ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
34
36
 
35
37
  <p>
36
38
  <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>
37
39
  </p>
38
40
 
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
-
95
41
  ## :link: Navigation
96
42
  - [Features](#sparkles-features)
97
43
  - [Roadmap](#mag_right-roadmap)
@@ -99,7 +45,7 @@ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
99
45
  - [Installation](#wrench-installation)
100
46
  - [Quick Start](#rocket-quick-start)
101
47
  - [Components](#gear-components)
102
- - [FlashRAG-UI](#computer-flashrag-ui)
48
+ - [FlashRAG-UI](#art-flashrag-ui)
103
49
  - [Supporting Methods](#robot-supporting-methods)
104
50
  - [Supporting Datasets & Document Corpus](#notebook-supporting-datasets--document-corpus)
105
51
  - [Additional FAQs](#raised_hands-additional-faqs)
@@ -537,9 +483,44 @@ In each category, we have implemented corresponding common pipelines. Some pipel
537
483
  </tbody>
538
484
  </table>
539
485
 
540
- ## :computer: FlashRAG-UI
541
- To use FlashRAG-UI, run the following code:
486
+ ## :art: FlashRAG-UI
487
+ <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>
488
+
489
+ ### :star2: Features
490
+ - **One-Click Configuration Loading**
491
+ - You can load parameters and configuration files for various RAG methods through simple clicks, selections, and inputs.</li>
492
+ - Supports preview interface for intuitive parameter settings.</li>
493
+ - Provides save functionality to easily store configurations for future use.</li>
494
+ - **Quick Method Experience**
495
+ - Quickly load corpora and index files to explore the characteristics and application scenarios of various RAG methods.</li>
496
+ - Supports loading and switching different components and hyperparameters, seamlessly connecting different RAG Pipelines to quickly experience their performance and differences!</li>
497
+ - **Efficient Benchmark Reproduction**
498
+ - Easily reproduce the built-in baseline methods and carefully collected benchmarks on FlashRAG-UI.</li>
499
+ - Use cutting-edge research tools directly without complex settings, providing a smooth experience for your research work!</li>
500
+
501
+ <details>
502
+ <summary>Show more</summary>
503
+ <table align="center">
504
+ <tr>
505
+ <td align="center">
506
+ <img src="./asset/demo_en1.jpg" alt="Image 1" width="505"/>
507
+ </td>
508
+ <td align="center">
509
+ <img src="./asset/demo_en2.jpg" alt="Image 2" width="505"/>
510
+ </td>
511
+ </tr>
512
+ <tr>
513
+ <td align="center">
514
+ <img src="./asset/demo_en4.png" alt="Image 3" width="500"/>
515
+ </td>
516
+ <td align="center">
517
+ <img src="./asset/demo_en3.jpg" alt="Image 4" width="500"/>
518
+ </td>
519
+ </tr>
520
+ </table>
521
+ </details>
542
522
 
523
+ #### Experience our meticulously designed FlashRAG-UI—both user-friendly and visually appealing:
543
524
  ```bash
544
525
  cd webui
545
526
  python interface.py
@@ -73,7 +73,6 @@ class LLMLinguaRefiner(BaseRefiner):
73
73
  output = []
74
74
  for item in tqdm(dataset, desc="Refining process: "):
75
75
  question = item.question
76
- retrieval_result = item.retrieval_result
77
76
  # TODO: suit more cases
78
77
  if self.input_prompt_flag:
79
78
  input_prompt = item.prompt
@@ -88,6 +87,7 @@ class LLMLinguaRefiner(BaseRefiner):
88
87
  **self.compress_config,
89
88
  )
90
89
  else:
90
+ retrieval_result = item.retrieval_result
91
91
  docs = self.format_reference(retrieval_result).split("\n")
92
92
  docs = [i for i in docs if i != ""]
93
93
  item_output = self.refiner.compress_prompt(
@@ -5,6 +5,7 @@ from typing import Dict, Any, Union, List, Dict
5
5
  import numpy as np
6
6
  import datasets
7
7
  import re
8
+ import langid
8
9
  from transformers import AutoTokenizer, AutoModel, AutoConfig
9
10
 
10
11
  def convert_numpy(obj: Union[Dict, list, np.ndarray, np.generic]) -> Any:
@@ -27,7 +28,14 @@ def judge_zh(input_str: str):
27
28
  assert isinstance(input_str, str), input_str
28
29
  if len(input_str) == 0:
29
30
  return False
30
- return bool(re.search(r'[\u4e00-\u9fff]', input_str))
31
+ detect_result = langid.classify(input_str)
32
+ if detect_result[0] == 'zh':
33
+ return True
34
+ else:
35
+ return False
36
+ #return bool(re.search(r'[\u4e00-\u9fff]', input_str))
37
+
38
+
31
39
  def convert_numpy(obj: Union[Dict, list, np.ndarray, np.generic]) -> Any:
32
40
  """Recursively convert numpy objects in nested dictionaries or lists to native Python types."""
33
41
  if isinstance(obj, dict):
@@ -13,7 +13,7 @@ def selfask_pred_parse(dataset):
13
13
  answer = line.split(FINAL_ANSWER_PREFIX)[1].strip()
14
14
  break
15
15
  item.update_output('raw_pred', pred)
16
- item.update_output('pred', pred)
16
+ item.update_output('pred', answer)
17
17
 
18
18
  return dataset
19
19
 
@@ -0,0 +1 @@
1
+ __version__ = "0.1.4dev20250117"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flashrag-dev
3
- Version: 0.1.4.dev20250112
3
+ Version: 0.1.4.dev20250117
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,7 +32,7 @@ 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
+ <a href="#art-flashrag-ui"> FlashRAG-UI</a> |
36
36
  <a href="#robot-supporting-methods"> Supporting Methods</a> |
37
37
  <a href="#notebook-supporting-datasets--document-corpus"> Supporting Datasets</a> |
38
38
  <a href="#raised_hands-additional-faqs"> FAQs</a>
@@ -47,68 +47,14 @@ FlashRAG is a Python toolkit for the reproduction and development of Retrieval A
47
47
  <img src="asset/framework.jpg">
48
48
  </p>
49
49
 
50
- With FlashRAG and provided resources, you can effortlessly reproduce existing SOTA works in the RAG domain or implement your custom RAG processes and components.
50
+ With FlashRAG and provided resources, you can effortlessly reproduce existing SOTA works in the RAG domain or implement your custom RAG processes and components. Besides, we provide an easy-to-use UI:
51
+
52
+ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
51
53
 
52
54
  <p>
53
55
  <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>
54
56
  </p>
55
57
 
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
-
112
58
  ## :link: Navigation
113
59
  - [Features](#sparkles-features)
114
60
  - [Roadmap](#mag_right-roadmap)
@@ -116,7 +62,7 @@ https://github.com/user-attachments/assets/8ca00873-5df2-48a7-b853-89e7b18bc6e9
116
62
  - [Installation](#wrench-installation)
117
63
  - [Quick Start](#rocket-quick-start)
118
64
  - [Components](#gear-components)
119
- - [FlashRAG-UI](#computer-flashrag-ui)
65
+ - [FlashRAG-UI](#art-flashrag-ui)
120
66
  - [Supporting Methods](#robot-supporting-methods)
121
67
  - [Supporting Datasets & Document Corpus](#notebook-supporting-datasets--document-corpus)
122
68
  - [Additional FAQs](#raised_hands-additional-faqs)
@@ -554,9 +500,44 @@ In each category, we have implemented corresponding common pipelines. Some pipel
554
500
  </tbody>
555
501
  </table>
556
502
 
557
- ## :computer: FlashRAG-UI
558
- To use FlashRAG-UI, run the following code:
503
+ ## :art: FlashRAG-UI
504
+ <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>
505
+
506
+ ### :star2: Features
507
+ - **One-Click Configuration Loading**
508
+ - You can load parameters and configuration files for various RAG methods through simple clicks, selections, and inputs.</li>
509
+ - Supports preview interface for intuitive parameter settings.</li>
510
+ - Provides save functionality to easily store configurations for future use.</li>
511
+ - **Quick Method Experience**
512
+ - Quickly load corpora and index files to explore the characteristics and application scenarios of various RAG methods.</li>
513
+ - Supports loading and switching different components and hyperparameters, seamlessly connecting different RAG Pipelines to quickly experience their performance and differences!</li>
514
+ - **Efficient Benchmark Reproduction**
515
+ - Easily reproduce the built-in baseline methods and carefully collected benchmarks on FlashRAG-UI.</li>
516
+ - Use cutting-edge research tools directly without complex settings, providing a smooth experience for your research work!</li>
517
+
518
+ <details>
519
+ <summary>Show more</summary>
520
+ <table align="center">
521
+ <tr>
522
+ <td align="center">
523
+ <img src="./asset/demo_en1.jpg" alt="Image 1" width="505"/>
524
+ </td>
525
+ <td align="center">
526
+ <img src="./asset/demo_en2.jpg" alt="Image 2" width="505"/>
527
+ </td>
528
+ </tr>
529
+ <tr>
530
+ <td align="center">
531
+ <img src="./asset/demo_en4.png" alt="Image 3" width="500"/>
532
+ </td>
533
+ <td align="center">
534
+ <img src="./asset/demo_en3.jpg" alt="Image 4" width="500"/>
535
+ </td>
536
+ </tr>
537
+ </table>
538
+ </details>
559
539
 
540
+ #### Experience our meticulously designed FlashRAG-UI—both user-friendly and visually appealing:
560
541
  ```bash
561
542
  cd webui
562
543
  python interface.py
@@ -2,6 +2,7 @@ datasets
2
2
  base58
3
3
  nltk
4
4
  numpy
5
+ langid
5
6
  openai
6
7
  peft
7
8
  PyYAML
@@ -16,13 +17,14 @@ bm25s[core]==0.2.0
16
17
  fschat
17
18
  streamlit
18
19
  chonkie>=0.4.0
19
- gradio==5.9.1
20
+ gradio==5.11.0
20
21
 
21
22
  [core]
22
23
  datasets
23
24
  base58
24
25
  nltk
25
26
  numpy
27
+ langid
26
28
  openai
27
29
  peft
28
30
  PyYAML
@@ -37,13 +39,14 @@ bm25s[core]==0.2.0
37
39
  fschat
38
40
  streamlit
39
41
  chonkie>=0.4.0
40
- gradio==5.9.1
42
+ gradio==5.11.0
41
43
 
42
44
  [full]
43
45
  datasets
44
46
  base58
45
47
  nltk
46
48
  numpy
49
+ langid
47
50
  openai
48
51
  peft
49
52
  PyYAML
@@ -58,7 +61,7 @@ bm25s[core]==0.2.0
58
61
  fschat
59
62
  streamlit
60
63
  chonkie>=0.4.0
61
- gradio==5.9.1
64
+ gradio==5.11.0
62
65
  pyserini
63
66
  sentence-transformers>=3.0.1
64
67
  vllm==0.5.5
@@ -1 +0,0 @@
1
- __version__ = "0.1.4dev20250112"