AutoRAG 0.1.3__tar.gz → 0.1.4__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 (403) hide show
  1. {autorag-0.1.3 → autorag-0.1.4}/.github/workflows/test.yml +4 -1
  2. {autorag-0.1.3 → autorag-0.1.4}/AutoRAG.egg-info/PKG-INFO +1 -3
  3. {autorag-0.1.3 → autorag-0.1.4}/AutoRAG.egg-info/SOURCES.txt +9 -0
  4. autorag-0.1.4/CODE_OF_CONDUCT.md +41 -0
  5. autorag-0.1.4/CONTRIBUTING.md +134 -0
  6. {autorag-0.1.3 → autorag-0.1.4}/PKG-INFO +1 -3
  7. {autorag-0.1.3 → autorag-0.1.4}/README.md +0 -2
  8. autorag-0.1.4/autorag/VERSION +1 -0
  9. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/qacreation/base.py +8 -0
  10. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/qacreation/llama_index.py +11 -4
  11. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/generation.py +33 -19
  12. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagecompressor/__init__.py +1 -0
  13. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagecompressor/base.py +1 -1
  14. autorag-0.1.4/autorag/nodes/passagecompressor/refine.py +61 -0
  15. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagefilter/__init__.py +1 -0
  16. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagefilter/base.py +11 -3
  17. autorag-0.1.4/autorag/nodes/passagefilter/recency.py +58 -0
  18. autorag-0.1.4/autorag/nodes/passagereranker/colbert.py +86 -0
  19. autorag-0.1.4/autorag/nodes/passagereranker/flag_embedding.py +59 -0
  20. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/flag_embedding_llm.py +14 -11
  21. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/monot5.py +43 -64
  22. autorag-0.1.4/autorag/nodes/passagereranker/sentence_transformer.py +61 -0
  23. autorag-0.1.4/autorag/nodes/passagereranker/tart/tart.py +78 -0
  24. {autorag-0.1.3 → autorag-0.1.4}/autorag/support.py +3 -1
  25. {autorag-0.1.3 → autorag-0.1.4}/autorag/utils/util.py +40 -0
  26. {autorag-0.1.3 → autorag-0.1.4}/dev_requirements.txt +1 -0
  27. {autorag-0.1.3 → autorag-0.1.4}/docs/requirements.txt +1 -0
  28. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.passagecompressor.rst +8 -0
  29. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.passagefilter.rst +8 -0
  30. {autorag-0.1.3 → autorag-0.1.4}/docs/source/conf.py +2 -0
  31. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_compressor/passage_compressor.md +1 -0
  32. autorag-0.1.4/docs/source/nodes/passage_compressor/refine.md +31 -0
  33. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_filter/passage_filter.md +1 -0
  34. autorag-0.1.4/docs/source/nodes/passage_filter/recency_filter.md +33 -0
  35. {autorag-0.1.3 → autorag-0.1.4}/sample_config/full.yaml +5 -0
  36. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/data/qacreation/test_base_qacreation.py +19 -4
  37. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/data/qacreation/test_llama_index_qacreation.py +20 -8
  38. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/data/qacreation/test_simple.py +2 -0
  39. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/evaluate/test_generation_evaluate.py +32 -0
  40. autorag-0.1.4/tests/autorag/nodes/passagecompressor/test_base_passage_compressor.py +27 -0
  41. autorag-0.1.4/tests/autorag/nodes/passagecompressor/test_refine.py +54 -0
  42. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagecompressor/test_tree_summarize.py +2 -25
  43. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagefilter/test_passage_filter_base.py +24 -0
  44. autorag-0.1.4/tests/autorag/nodes/passagefilter/test_recency_filter.py +76 -0
  45. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/promptmaker/test_prompt_maker_run.py +8 -0
  46. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/test_evaluator.py +14 -0
  47. autorag-0.1.3/autorag/VERSION +0 -1
  48. autorag-0.1.3/autorag/nodes/passagereranker/colbert.py +0 -77
  49. autorag-0.1.3/autorag/nodes/passagereranker/flag_embedding.py +0 -78
  50. autorag-0.1.3/autorag/nodes/passagereranker/sentence_transformer.py +0 -79
  51. autorag-0.1.3/autorag/nodes/passagereranker/tart/tart.py +0 -93
  52. {autorag-0.1.3 → autorag-0.1.4}/.github/dependabot.yml +0 -0
  53. {autorag-0.1.3 → autorag-0.1.4}/.github/workflows/sphinx.yml +0 -0
  54. {autorag-0.1.3 → autorag-0.1.4}/.gitignore +0 -0
  55. {autorag-0.1.3 → autorag-0.1.4}/AutoRAG.egg-info/dependency_links.txt +0 -0
  56. {autorag-0.1.3 → autorag-0.1.4}/AutoRAG.egg-info/entry_points.txt +0 -0
  57. {autorag-0.1.3 → autorag-0.1.4}/AutoRAG.egg-info/requires.txt +0 -0
  58. {autorag-0.1.3 → autorag-0.1.4}/AutoRAG.egg-info/top_level.txt +0 -0
  59. {autorag-0.1.3 → autorag-0.1.4}/LICENSE +0 -0
  60. {autorag-0.1.3 → autorag-0.1.4}/autorag/__init__.py +0 -0
  61. {autorag-0.1.3 → autorag-0.1.4}/autorag/cli.py +0 -0
  62. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/__init__.py +0 -0
  63. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/corpus/__init__.py +0 -0
  64. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/corpus/langchain.py +0 -0
  65. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/corpus/llama_index.py +0 -0
  66. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/qacreation/__init__.py +0 -0
  67. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/qacreation/llama_index_default_prompt.txt +0 -0
  68. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/qacreation/ragas.py +0 -0
  69. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/qacreation/simple.py +0 -0
  70. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/utils/__init__.py +0 -0
  71. {autorag-0.1.3 → autorag-0.1.4}/autorag/data/utils/util.py +0 -0
  72. {autorag-0.1.3 → autorag-0.1.4}/autorag/deploy.py +0 -0
  73. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/__init__.py +0 -0
  74. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/generation.py +0 -0
  75. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/__init__.py +0 -0
  76. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/g_eval_prompts/coh_detailed.txt +0 -0
  77. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/g_eval_prompts/con_detailed.txt +0 -0
  78. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/g_eval_prompts/flu_detailed.txt +0 -0
  79. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/g_eval_prompts/rel_detailed.txt +0 -0
  80. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/retrieval.py +0 -0
  81. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/retrieval_contents.py +0 -0
  82. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/metric/util.py +0 -0
  83. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/retrieval.py +0 -0
  84. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/retrieval_contents.py +0 -0
  85. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluate/util.py +0 -0
  86. {autorag-0.1.3 → autorag-0.1.4}/autorag/evaluator.py +0 -0
  87. {autorag-0.1.3 → autorag-0.1.4}/autorag/node_line.py +0 -0
  88. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/__init__.py +0 -0
  89. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/generator/__init__.py +0 -0
  90. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/generator/base.py +0 -0
  91. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/generator/llama_index_llm.py +0 -0
  92. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/generator/run.py +0 -0
  93. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/generator/vllm.py +0 -0
  94. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagecompressor/pass_compressor.py +0 -0
  95. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagecompressor/run.py +0 -0
  96. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagecompressor/tree_summarize.py +0 -0
  97. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagefilter/pass_passage_filter.py +0 -0
  98. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagefilter/percentile_cutoff.py +0 -0
  99. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagefilter/run.py +0 -0
  100. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagefilter/threshold_cutoff.py +0 -0
  101. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/__init__.py +0 -0
  102. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/base.py +0 -0
  103. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/cohere.py +0 -0
  104. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/jina.py +0 -0
  105. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/koreranker.py +0 -0
  106. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/pass_reranker.py +0 -0
  107. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/rankgpt.py +0 -0
  108. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/run.py +0 -0
  109. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/tart/__init__.py +0 -0
  110. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/tart/modeling_enc_t5.py +0 -0
  111. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/tart/tokenization_enc_t5.py +0 -0
  112. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/time_reranker.py +0 -0
  113. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/passagereranker/upr.py +0 -0
  114. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/promptmaker/__init__.py +0 -0
  115. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/promptmaker/base.py +0 -0
  116. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/promptmaker/fstring.py +0 -0
  117. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/promptmaker/long_context_reorder.py +0 -0
  118. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/promptmaker/run.py +0 -0
  119. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/queryexpansion/__init__.py +0 -0
  120. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/queryexpansion/base.py +0 -0
  121. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/queryexpansion/hyde.py +0 -0
  122. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/queryexpansion/pass_query_expansion.py +0 -0
  123. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/queryexpansion/query_decompose.py +0 -0
  124. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/queryexpansion/run.py +0 -0
  125. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/__init__.py +0 -0
  126. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/base.py +0 -0
  127. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/bm25.py +0 -0
  128. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/hybrid_cc.py +0 -0
  129. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/hybrid_dbsf.py +0 -0
  130. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/hybrid_rrf.py +0 -0
  131. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/hybrid_rsf.py +0 -0
  132. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/run.py +0 -0
  133. {autorag-0.1.3 → autorag-0.1.4}/autorag/nodes/retrieval/vectordb.py +0 -0
  134. {autorag-0.1.3 → autorag-0.1.4}/autorag/schema/__init__.py +0 -0
  135. {autorag-0.1.3 → autorag-0.1.4}/autorag/schema/module.py +0 -0
  136. {autorag-0.1.3 → autorag-0.1.4}/autorag/schema/node.py +0 -0
  137. {autorag-0.1.3 → autorag-0.1.4}/autorag/strategy.py +0 -0
  138. {autorag-0.1.3 → autorag-0.1.4}/autorag/utils/__init__.py +0 -0
  139. {autorag-0.1.3 → autorag-0.1.4}/autorag/utils/preprocess.py +0 -0
  140. {autorag-0.1.3 → autorag-0.1.4}/autorag/web.py +0 -0
  141. {autorag-0.1.3 → autorag-0.1.4}/docs/Makefile +0 -0
  142. {autorag-0.1.3 → autorag-0.1.4}/docs/make.bat +0 -0
  143. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/data_creation.png +0 -0
  144. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/data_folder.png +0 -0
  145. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/node_folder.png +0 -0
  146. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/node_line_folder.png +0 -0
  147. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/node_line_summary.png +0 -0
  148. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/node_lines.png +0 -0
  149. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/node_summary.png +0 -0
  150. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/project_folder_example.png +0 -0
  151. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/project_folders.png +0 -0
  152. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/resources_folder.png +0 -0
  153. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/roadmap/RAG_paradigms.png +0 -0
  154. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/roadmap/advanced_RAG.png +0 -0
  155. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/roadmap/cycle.png +0 -0
  156. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/roadmap/merger.png +0 -0
  157. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/roadmap/node_line_modular.png +0 -0
  158. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/roadmap/policy.png +0 -0
  159. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/samsung_sundae.jpeg +0 -0
  160. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/trial_folder.png +0 -0
  161. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/trial_json.png +0 -0
  162. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/trial_summary.png +0 -0
  163. {autorag-0.1.3 → autorag-0.1.4}/docs/source/_static/web_interface.png +0 -0
  164. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.data.corpus.rst +0 -0
  165. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.data.qacreation.rst +0 -0
  166. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.data.rst +0 -0
  167. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.data.utils.rst +0 -0
  168. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.evaluate.metric.rst +0 -0
  169. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.evaluate.rst +0 -0
  170. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.generator.rst +0 -0
  171. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.passagereranker.rst +0 -0
  172. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.passagereranker.tart.rst +0 -0
  173. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.promptmaker.rst +0 -0
  174. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.queryexpansion.rst +0 -0
  175. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.retrieval.rst +0 -0
  176. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.nodes.rst +0 -0
  177. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.rst +0 -0
  178. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.schema.rst +0 -0
  179. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/autorag.utils.rst +0 -0
  180. {autorag-0.1.3 → autorag-0.1.4}/docs/source/api_spec/modules.rst +0 -0
  181. {autorag-0.1.3 → autorag-0.1.4}/docs/source/data_creation/data_format.md +0 -0
  182. {autorag-0.1.3 → autorag-0.1.4}/docs/source/data_creation/ragas.md +0 -0
  183. {autorag-0.1.3 → autorag-0.1.4}/docs/source/data_creation/tutorial.md +0 -0
  184. {autorag-0.1.3 → autorag-0.1.4}/docs/source/deploy/api_endpoint.md +0 -0
  185. {autorag-0.1.3 → autorag-0.1.4}/docs/source/deploy/web.md +0 -0
  186. {autorag-0.1.3 → autorag-0.1.4}/docs/source/index.rst +0 -0
  187. {autorag-0.1.3 → autorag-0.1.4}/docs/source/install.md +0 -0
  188. {autorag-0.1.3 → autorag-0.1.4}/docs/source/local_model.md +0 -0
  189. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/generator/generator.md +0 -0
  190. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/generator/llama_index_llm.md +0 -0
  191. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/generator/vllm.md +0 -0
  192. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/index.md +0 -0
  193. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_compressor/tree_summarize.md +0 -0
  194. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_filter/similarity_percentile_cutoff.md +0 -0
  195. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_filter/similarity_threshold_cutoff.md +0 -0
  196. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/cohere.md +0 -0
  197. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/colbert.md +0 -0
  198. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/flag_embedding_llm_reranker.md +0 -0
  199. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/flag_embedding_reranker.md +0 -0
  200. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/jina_reranker.md +0 -0
  201. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/koreranker.md +0 -0
  202. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/monot5.md +0 -0
  203. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/passage_reranker.md +1 -1
  204. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/rankgpt.md +0 -0
  205. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/sentence_transformer_reranker.md +0 -0
  206. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/tart.md +0 -0
  207. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/time_reranker.md +0 -0
  208. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/passage_reranker/upr.md +0 -0
  209. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/prompt_maker/fstring.md +0 -0
  210. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/prompt_maker/long_context_reorder.md +0 -0
  211. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/prompt_maker/prompt_maker.md +0 -0
  212. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/query_expansion/hyde.md +0 -0
  213. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/query_expansion/query_decompose.md +0 -0
  214. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/query_expansion/query_expansion.md +0 -0
  215. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/retrieval/bm25.md +0 -0
  216. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/retrieval/hybrid_cc.md +0 -0
  217. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/retrieval/hybrid_dbsf.md +0 -0
  218. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/retrieval/hybrid_rrf.md +0 -0
  219. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/retrieval/hybrid_rsf.md +0 -0
  220. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/retrieval/retrieval.md +0 -0
  221. {autorag-0.1.3 → autorag-0.1.4}/docs/source/nodes/retrieval/vectordb.md +0 -0
  222. {autorag-0.1.3 → autorag-0.1.4}/docs/source/optimization/custom_config.md +0 -0
  223. {autorag-0.1.3 → autorag-0.1.4}/docs/source/optimization/folder_structure.md +0 -0
  224. {autorag-0.1.3 → autorag-0.1.4}/docs/source/optimization/optimization.md +0 -0
  225. {autorag-0.1.3 → autorag-0.1.4}/docs/source/optimization/sample_full_config.yaml +0 -0
  226. {autorag-0.1.3 → autorag-0.1.4}/docs/source/roadmap/modular_rag.md +0 -0
  227. {autorag-0.1.3 → autorag-0.1.4}/docs/source/structure.md +0 -0
  228. {autorag-0.1.3 → autorag-0.1.4}/docs/source/troubleshooting.md +0 -0
  229. {autorag-0.1.3 → autorag-0.1.4}/docs/source/tutorial.md +0 -0
  230. {autorag-0.1.3 → autorag-0.1.4}/pyproject.toml +0 -0
  231. {autorag-0.1.3 → autorag-0.1.4}/requirements.txt +0 -0
  232. {autorag-0.1.3 → autorag-0.1.4}/sample_config/compact_local.yaml +0 -0
  233. {autorag-0.1.3 → autorag-0.1.4}/sample_config/compact_openai.yaml +0 -0
  234. {autorag-0.1.3 → autorag-0.1.4}/sample_config/config_korean.yaml +0 -0
  235. {autorag-0.1.3 → autorag-0.1.4}/sample_config/extracted_sample.yaml +0 -0
  236. {autorag-0.1.3 → autorag-0.1.4}/sample_config/simple_local.yaml +0 -0
  237. {autorag-0.1.3 → autorag-0.1.4}/sample_config/simple_openai.yaml +0 -0
  238. {autorag-0.1.3 → autorag-0.1.4}/sample_dataset/README.md +0 -0
  239. {autorag-0.1.3 → autorag-0.1.4}/sample_dataset/eli5/load_eli5_dataset.py +0 -0
  240. {autorag-0.1.3 → autorag-0.1.4}/sample_dataset/msmarco/load_msmarco_dataset.py +0 -0
  241. {autorag-0.1.3 → autorag-0.1.4}/sample_dataset/triviaqa/load_triviaqa_dataset.py +0 -0
  242. {autorag-0.1.3 → autorag-0.1.4}/setup.cfg +0 -0
  243. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/data/corpus/test_base.py +0 -0
  244. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/data/corpus/test_langchain.py +0 -0
  245. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/data/corpus/test_llama_index_corpus.py +0 -0
  246. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/data/qacreation/test_ragas_qa_creation.py +0 -0
  247. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/evaluate/metric/test_generation_metric.py +0 -0
  248. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/evaluate/metric/test_retrieval_contents_metric.py +0 -0
  249. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/evaluate/metric/test_retrieval_metric.py +0 -0
  250. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/evaluate/test_evaluate_util.py +0 -0
  251. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/evaluate/test_retrieval_contents_evaluate.py +0 -0
  252. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/evaluate/test_retrieval_evaluate.py +0 -0
  253. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/generator/test_generator_base.py +0 -0
  254. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/generator/test_llama_index_llm.py +0 -0
  255. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/generator/test_run_generator_node.py +0 -0
  256. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/generator/test_vllm.py +0 -0
  257. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagecompressor/test_pass_compressor.py +0 -0
  258. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagecompressor/test_run_passage_compressor_node.py +0 -0
  259. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagefilter/test_pass_passage_filter.py +0 -0
  260. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagefilter/test_passage_filter_run.py +0 -0
  261. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagefilter/test_percentile_cutoff.py +0 -0
  262. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagefilter/test_threshold_cutoff.py +0 -0
  263. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_cohere_reranker.py +0 -0
  264. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_colbert_reranker.py +0 -0
  265. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_flag_embedding.py +0 -0
  266. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_flag_embedding_llm.py +0 -0
  267. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_jina_reranker.py +0 -0
  268. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_koreranker.py +0 -0
  269. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_monot5.py +0 -0
  270. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_pass_reranker.py +0 -0
  271. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_passage_reranker_base.py +0 -0
  272. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_passage_reranker_run.py +0 -0
  273. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_rankgpt.py +0 -0
  274. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_sentence_transformer.py +0 -0
  275. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_tart.py +0 -0
  276. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_time_reranker.py +0 -0
  277. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/passagereranker/test_upr.py +0 -0
  278. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/promptmaker/test_fstring.py +0 -0
  279. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/promptmaker/test_long_context_reorder.py +0 -0
  280. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/promptmaker/test_prompt_maker_base.py +0 -0
  281. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/queryexpansion/test_hyde.py +0 -0
  282. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/queryexpansion/test_pass_query_expansion.py +0 -0
  283. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/queryexpansion/test_query_decompose.py +0 -0
  284. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/queryexpansion/test_query_expansion_base.py +0 -0
  285. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/queryexpansion/test_query_expansion_run.py +0 -0
  286. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_bm25.py +0 -0
  287. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_hybrid_base.py +0 -0
  288. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_hybrid_cc.py +0 -0
  289. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_hybrid_dbsf.py +0 -0
  290. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_hybrid_rrf.py +0 -0
  291. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_hybrid_rsf.py +0 -0
  292. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_retrieval_base.py +0 -0
  293. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_run_retrieval_node.py +0 -0
  294. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/nodes/retrieval/test_vectordb.py +0 -0
  295. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/schema/test_module_schema.py +0 -0
  296. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/schema/test_node_schema.py +0 -0
  297. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/test_cli.py +0 -0
  298. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/test_deploy.py +0 -0
  299. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/test_strategy.py +0 -0
  300. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/test_support.py +0 -0
  301. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/test_web.py +0 -0
  302. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/utils/test_preprocess.py +0 -0
  303. {autorag-0.1.3 → autorag-0.1.4}/tests/autorag/utils/test_util.py +0 -0
  304. {autorag-0.1.3 → autorag-0.1.4}/tests/conftest.py +0 -0
  305. {autorag-0.1.3 → autorag-0.1.4}/tests/delete_tests.py +0 -0
  306. {autorag-0.1.3 → autorag-0.1.4}/tests/mock.py +0 -0
  307. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/README.md +0 -0
  308. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/corpus_data_sample.parquet +0 -0
  309. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/data_creation/raw_dir/sample1.txt +0 -0
  310. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/data_creation/raw_dir/sample2.txt +0 -0
  311. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/data_creation/raw_dir/sample3.txt +0 -0
  312. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/full.yaml +0 -0
  313. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/qa_data_sample.parquet +0 -0
  314. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/qa_gen_prompts/prompt1.txt +0 -0
  315. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/qa_gen_prompts/prompt2.txt +0 -0
  316. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/qa_gen_prompts/prompt3.txt +0 -0
  317. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/qa_test_data_sample.parquet +0 -0
  318. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/config.yaml +0 -0
  319. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/generator/0.parquet +0 -0
  320. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/generator/1.parquet +0 -0
  321. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/generator/2.parquet +0 -0
  322. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/generator/3.parquet +0 -0
  323. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/generator/4.parquet +0 -0
  324. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/generator/5.parquet +0 -0
  325. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/generator/best_5.parquet +0 -0
  326. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/generator/summary.csv +0 -0
  327. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/0.parquet +0 -0
  328. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/1.parquet +0 -0
  329. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/best_0.parquet +0 -0
  330. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/summary.csv +0 -0
  331. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/post_retrieve_node_line/summary.csv +0 -0
  332. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
  333. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
  334. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
  335. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
  336. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
  337. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/pre_retrieve_node_line/summary.csv +0 -0
  338. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/0.parquet +0 -0
  339. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/best_0.parquet +0 -0
  340. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/summary.csv +0 -0
  341. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/0.parquet +0 -0
  342. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/1.parquet +0 -0
  343. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
  344. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/summary.csv +0 -0
  345. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/retrieval/0.parquet +0 -0
  346. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/retrieval/1.parquet +0 -0
  347. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/retrieval/best_0.parquet +0 -0
  348. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/retrieval/summary.csv +0 -0
  349. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/retrieve_node_line/summary.csv +0 -0
  350. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/0/summary.csv +0 -0
  351. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/config.yaml +0 -0
  352. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
  353. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
  354. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
  355. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
  356. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
  357. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/pre_retrieve_node_line/summary.csv +0 -0
  358. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/passage_compressor/0.parquet +0 -0
  359. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/0.parquet +0 -0
  360. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/1.parquet +0 -0
  361. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
  362. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/summary.csv +0 -0
  363. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/retrieval/0.parquet +0 -0
  364. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/retrieval/1.parquet +0 -0
  365. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/retrieval/best_0.parquet +0 -0
  366. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/1/retrieve_node_line/retrieval/summary.csv +0 -0
  367. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/config.yaml +0 -0
  368. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/post_retrieve_node_line/prompt_maker/0.parquet +0 -0
  369. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
  370. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
  371. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
  372. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
  373. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
  374. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/pre_retrieve_node_line/summary.csv +0 -0
  375. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/0.parquet +0 -0
  376. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/best_0.parquet +0 -0
  377. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/summary.csv +0 -0
  378. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/0.parquet +0 -0
  379. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/1.parquet +0 -0
  380. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
  381. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/summary.csv +0 -0
  382. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/retrieval/0.parquet +0 -0
  383. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/retrieval/1.parquet +0 -0
  384. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/retrieval/best_0.parquet +0 -0
  385. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/retrieval/summary.csv +0 -0
  386. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/2/retrieve_node_line/summary.csv +0 -0
  387. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/3/config.yaml +0 -0
  388. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/best.yaml +0 -0
  389. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/data/corpus.parquet +0 -0
  390. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/data/qa.parquet +0 -0
  391. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/resources/bm25.pkl +0 -0
  392. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/data_level0.bin +0 -0
  393. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/header.bin +0 -0
  394. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/length.bin +0 -0
  395. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/link_lists.bin +0 -0
  396. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/resources/chroma/chroma.sqlite3 +0 -0
  397. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/result_project/trial.json +0 -0
  398. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/sample_contents_nqa.csv +0 -0
  399. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/sample_project/data/corpus.parquet +0 -0
  400. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/sample_project/data/qa.parquet +0 -0
  401. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/sample_project/resources/bm25.pkl +0 -0
  402. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/simple.yaml +0 -0
  403. {autorag-0.1.3 → autorag-0.1.4}/tests/resources/test_bm25_retrieval.pkl +0 -0
@@ -7,6 +7,9 @@ on:
7
7
  pull_request:
8
8
  branches:
9
9
  - main
10
+ pull_request_target:
11
+ branches:
12
+ - main
10
13
 
11
14
  env:
12
15
  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -29,7 +32,7 @@ jobs:
29
32
  pip install -e .
30
33
  - name: Install dependencies
31
34
  run: |
32
- pip install pytest pytest-xdist
35
+ pip install pytest pytest-xdist pytest-asyncio
33
36
  - name: delete tests package
34
37
  run: python3 tests/delete_tests.py
35
38
  - name: Run tests
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AutoRAG
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Automatically Evaluate RAG pipelines with your own data. Find optimal structure for new RAG product.
5
5
  Author-email: Marker-Inc <vkehfdl1@gmail.com>
6
6
  License: Apache License
@@ -500,8 +500,6 @@ node_lines:
500
500
  You can check our all supporting Nodes & modules
501
501
  at [here](https://edai.notion.site/Supporting-Nodes-modules-0ebc7810649f4e41aead472a92976be4?pvs=4)
502
502
 
503
-
504
-
505
503
  # 🛣Roadmap
506
504
 
507
505
  - [ ] Policy Module for modular RAG pipeline
@@ -1,4 +1,6 @@
1
1
  .gitignore
2
+ CODE_OF_CONDUCT.md
3
+ CONTRIBUTING.md
2
4
  LICENSE
3
5
  README.md
4
6
  dev_requirements.txt
@@ -57,12 +59,14 @@ autorag/nodes/generator/vllm.py
57
59
  autorag/nodes/passagecompressor/__init__.py
58
60
  autorag/nodes/passagecompressor/base.py
59
61
  autorag/nodes/passagecompressor/pass_compressor.py
62
+ autorag/nodes/passagecompressor/refine.py
60
63
  autorag/nodes/passagecompressor/run.py
61
64
  autorag/nodes/passagecompressor/tree_summarize.py
62
65
  autorag/nodes/passagefilter/__init__.py
63
66
  autorag/nodes/passagefilter/base.py
64
67
  autorag/nodes/passagefilter/pass_passage_filter.py
65
68
  autorag/nodes/passagefilter/percentile_cutoff.py
69
+ autorag/nodes/passagefilter/recency.py
66
70
  autorag/nodes/passagefilter/run.py
67
71
  autorag/nodes/passagefilter/threshold_cutoff.py
68
72
  autorag/nodes/passagereranker/__init__.py
@@ -170,8 +174,10 @@ docs/source/nodes/generator/generator.md
170
174
  docs/source/nodes/generator/llama_index_llm.md
171
175
  docs/source/nodes/generator/vllm.md
172
176
  docs/source/nodes/passage_compressor/passage_compressor.md
177
+ docs/source/nodes/passage_compressor/refine.md
173
178
  docs/source/nodes/passage_compressor/tree_summarize.md
174
179
  docs/source/nodes/passage_filter/passage_filter.md
180
+ docs/source/nodes/passage_filter/recency_filter.md
175
181
  docs/source/nodes/passage_filter/similarity_percentile_cutoff.md
176
182
  docs/source/nodes/passage_filter/similarity_threshold_cutoff.md
177
183
  docs/source/nodes/passage_reranker/cohere.md
@@ -243,13 +249,16 @@ tests/autorag/nodes/generator/test_generator_base.py
243
249
  tests/autorag/nodes/generator/test_llama_index_llm.py
244
250
  tests/autorag/nodes/generator/test_run_generator_node.py
245
251
  tests/autorag/nodes/generator/test_vllm.py
252
+ tests/autorag/nodes/passagecompressor/test_base_passage_compressor.py
246
253
  tests/autorag/nodes/passagecompressor/test_pass_compressor.py
254
+ tests/autorag/nodes/passagecompressor/test_refine.py
247
255
  tests/autorag/nodes/passagecompressor/test_run_passage_compressor_node.py
248
256
  tests/autorag/nodes/passagecompressor/test_tree_summarize.py
249
257
  tests/autorag/nodes/passagefilter/test_pass_passage_filter.py
250
258
  tests/autorag/nodes/passagefilter/test_passage_filter_base.py
251
259
  tests/autorag/nodes/passagefilter/test_passage_filter_run.py
252
260
  tests/autorag/nodes/passagefilter/test_percentile_cutoff.py
261
+ tests/autorag/nodes/passagefilter/test_recency_filter.py
253
262
  tests/autorag/nodes/passagefilter/test_threshold_cutoff.py
254
263
  tests/autorag/nodes/passagereranker/test_cohere_reranker.py
255
264
  tests/autorag/nodes/passagereranker/test_colbert_reranker.py
@@ -0,0 +1,41 @@
1
+ # Code of Conduct
2
+
3
+ ## Request from out side
4
+
5
+ We, the contributors and maintainers, commit to ensuring that everyone's participation in our project and community is free from harassment, regardless of age, body size, disability, ethnicity, gender identity and expression, experience level, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual orientation. This is done in the spirit of creating a friendly and open environment.
6
+
7
+ ## Our Standards
8
+
9
+ The following are some instances of actions that support the development of a pleasant environment:
10
+
11
+ * Speaking in an open and accepting manner 
12
+ * Respecting the opinions and experiences of others 
13
+ * Taking constructive criticism in stride
14
+ * Putting the good of the community first 
15
+ * Demonstrating empathy for other community members
16
+
17
+ Example of participant behavior that is undesirable include:
18
+
19
+ * Public or private harassment
20
+ *The publication of another person's private information, such as a physical or electronic address, without that person's express consent 
21
+ * The use of sexualized language or imagery and unwanted sexual attention or advances 
22
+ * Trolling, offensive or derogatory remarks, and personal or political attacks 
23
+
24
+ ## Our Responsibilities
25
+
26
+ Project maintainers are expected to take appropriate and equitable remedial action in response to any instances of undesirable behavior, as well as to clarify the standards of acceptable behavior.
27
+
28
+ The right and obligation of project maintainers is to delete, modify, or reject comments, commits, code, wiki edits, issues, and other contributions that do not follow this code of conduct. They also have the authority to temporarily or permanently ban any contributor for any other actions they believe to be improper, threatening, offensive, or harmful.
29
+
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+ ## Enforcement
36
+
37
+ Reports of abusive, harassing, or otherwise inappropriate behavior can be sent to jeffrey@markr.ai' or 'vkehfdl1@gmail.com, the project team's email address. After each complaint is examined and looked into, a response that is judged essential and fitting for the situation will be given. The project team has a duty to keep the identity of the incident reported discreet. Specific enforcement policies may have additional information posted separately.
38
+
39
+ Project maintainers may be subject to temporary or permanent consequences, as decided by other project leadership members, for failing to abide by and enforce the Code of Conduct in good faith.
40
+
41
+
@@ -0,0 +1,134 @@
1
+ # Getting Started
2
+
3
+ Thank you so much for your consideration of contributing to AutoRAG open source project, and a big welcome! Users in our community are the ones who make it a reality—people just like you.
4
+
5
+ By reading and adhering to these principles, we can ensure that the contribution process is simple and efficient for all parties. Additionally, it conveys your agreement to honour the developers' time as they oversee and work on these open-source projects. We will respect you in return by taking care of your problem, evaluating your changes, and assisting you in completing your pull requests.
6
+
7
+
8
+ - View the [README](https://github.com/Marker-Inc-Korea/AutoRAG/blob/main/README.md) or [watch this video](https://youtu.be/2ojK8xjyXAU?si=nJz-IgrXFaMiyyW5) to get your development environment up and running.
9
+ - Learn how to [format pull requests](#submitting-a-pull-request).
10
+ - Read how to [rebase/merge upstream branches](#configuring-remotes).
11
+ - Follow our [code of conduct](CODE_OF_CONDUCT.md).
12
+ - [Find an issue to work on](https://github.com/Marker-Inc-Korea/AutoRAG/issues) and start smashing!
13
+
14
+ # Contributing Guidelines [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/Marker-Inc-Korea/AutoRAG/issues))
15
+
16
+ When contributing to this repository, please first discuss the change you wish to make via an issue.
17
+
18
+ Remember that this is an inclusive community, committed to creating a safe, positive environment. See the whole [Code of Conduct](CODE_OF_CONDUCT.md) and please follow it in all your interactions with the project.
19
+
20
+
21
+ ## Submitting or Requesting an Issue/Enhancement
22
+
23
+ ### The best ways to report issues or make requests for improvements are as follows:
24
+ - Please explore the issue tracker before submitting an issue. There may already be an issue for your issue, and the conversation may have made remedies readily apparent.
25
+ - When creating the problem, include the screenshots also.
26
+
27
+ ### Best Practices for getting assigned to work on an Issue/Enhancement:
28
+ - If you would like to work on an issue, inform in the issue ticket by commenting on it.
29
+ - Please be sure that you are able to reproduce the issue, before working on it. If not, please ask for clarification by commenting or asking the issue creator.
30
+
31
+ **Note:** Please do not work on an issue which is already being worked on by another contributor. We don't encourage creating multiple pull requests for the same issue. Also, please allow the assigned person at least 2 days to work on the issue (The time might vary depending on the difficulty). If there is no progress after the deadline, please comment on the issue asking the contributor whether he/she is still working on it. If there is no reply, then feel free to work on the issue.
32
+
33
+
34
+ ## Submitting a Pull Request
35
+
36
+ ### Best Practices to send Pull Requests:
37
+ - Fork the [project](https://github.com/Marker-Inc-Korea/AutoRAG) on GitHub
38
+ - Clone the project locally into your system.
39
+ ```
40
+ git clone https://github.com/Marker-Inc-Korea/AutoRAG.git
41
+ ```
42
+ - Make sure you are in the `main` branch.
43
+ ```
44
+ git checkout main
45
+ ```
46
+ - Create a new branch with a meaningful name before adding and committing your changes.
47
+ ```
48
+ git checkout -b branch-name
49
+ ```
50
+ - Add the files you changed. (avoid using `git add .`)
51
+ ```
52
+ git add file-name
53
+ ```
54
+ - Commit the added files
55
+ ```
56
+ git commit
57
+ ```
58
+ - If you forgot to add some changes, you can edit your previous commit message.
59
+ ```
60
+ git commit --amend
61
+ ```
62
+ - Squash multiple commits to a single commit. (example: squash last two commits done on this branch into one)
63
+ ```
64
+ git rebase --interactive HEAD~2
65
+ ```
66
+ - Push this branch to your remote repository on GitHub.
67
+ ```
68
+ git push origin branch-name
69
+ ```
70
+ - If any of the squashed commits have already been pushed to your remote repository, you need to do a force push.
71
+ ```
72
+ git push origin remote-branch-name --force
73
+ ```
74
+ - Follow the Pull request template and submit a pull request with a motive for your change and the method you used to achieve it to be merged with the `main` branch.
75
+ - If you can, please submit the pull request with the fix or improvements including tests.
76
+ - During review, if you are requested to make changes, rebase your branch and squash the multiple commits into one. Once you push these changes the pull request will edit automatically.
77
+
78
+
79
+ ## Configuring remotes
80
+ When a repository is cloned, it has a default remote called `origin` that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you should add another remote called `upstream`.
81
+
82
+ 1. Set the `upstream`.
83
+ ```
84
+ git remote add upstream https://github.com/Marker-Inc-Korea/AutoRAG.git
85
+ ```
86
+ 2. Use `git remote -v` to check the status. The output must be something like this:
87
+ ```
88
+ > origin https://github.com/your-username/AutoRAG.git (fetch)
89
+ > origin https://github.com/your-username/AutoRAG.git (push)
90
+ > upstream https://github.com/Marker-Inc-Korea/AutoRAG.git (fetch)
91
+ > upstream https://github.com/Marker-Inc-Korea/AutoRAG.git (push)
92
+ ```
93
+ 3. To update your local copy with remote changes, run the following: (This will give you an exact copy of the current remote. You should not have any local changes on your main branch, if you do, use rebase instead).
94
+ ```
95
+ git fetch upstream
96
+ git checkout main
97
+ git merge upstream/main
98
+ ```
99
+ 4. Push these merged changes to the main branch on your fork. Ensure to pull in upstream changes regularly to keep your forked repository up to date.
100
+ ```
101
+ git push origin main
102
+ ```
103
+ 5. Switch to the branch you are using for some piece of work.
104
+ ```
105
+ git checkout branch-name
106
+ ```
107
+ 6. Rebase your branch, which means, take in all latest changes and replay your work in the branch on top of this - this produces cleaner versions/history.
108
+ ```
109
+ git rebase main
110
+ ```
111
+ 7. Push the final changes when you're ready.
112
+ ```
113
+ git push origin branch-name
114
+ ```
115
+
116
+ ## After your Pull Request is merged
117
+ After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository.
118
+
119
+ 1. Delete the remote branch on GitHub.
120
+ ```
121
+ git push origin --delete branch-name
122
+ ```
123
+ 2. Checkout the main branch.
124
+ ```
125
+ git checkout main
126
+ ```
127
+ 3. Delete the local branch.
128
+ ```
129
+ git branch -D branch-name
130
+ ```
131
+ 4. Update your main branch with the latest upstream version.
132
+ ```
133
+ git pull upstream main
134
+ ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AutoRAG
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: Automatically Evaluate RAG pipelines with your own data. Find optimal structure for new RAG product.
5
5
  Author-email: Marker-Inc <vkehfdl1@gmail.com>
6
6
  License: Apache License
@@ -500,8 +500,6 @@ node_lines:
500
500
  You can check our all supporting Nodes & modules
501
501
  at [here](https://edai.notion.site/Supporting-Nodes-modules-0ebc7810649f4e41aead472a92976be4?pvs=4)
502
502
 
503
-
504
-
505
503
  # 🛣Roadmap
506
504
 
507
505
  - [ ] Policy Module for modular RAG pipeline
@@ -240,8 +240,6 @@ node_lines:
240
240
  You can check our all supporting Nodes & modules
241
241
  at [here](https://edai.notion.site/Supporting-Nodes-modules-0ebc7810649f4e41aead472a92976be4?pvs=4)
242
242
 
243
-
244
-
245
243
  # 🛣Roadmap
246
244
 
247
245
  - [ ] Policy Module for modular RAG pipeline
@@ -0,0 +1 @@
1
+ 0.1.4
@@ -1,3 +1,4 @@
1
+ import logging
1
2
  import uuid
2
3
  from typing import Callable, Optional
3
4
 
@@ -5,6 +6,8 @@ import pandas as pd
5
6
 
6
7
  from autorag.utils.util import save_parquet_safe
7
8
 
9
+ logger = logging.getLogger("AutoRAG")
10
+
8
11
 
9
12
  def make_single_content_qa(corpus_df: pd.DataFrame,
10
13
  content_size: int,
@@ -33,6 +36,11 @@ def make_single_content_qa(corpus_df: pd.DataFrame,
33
36
  :return: QA dataset dataframe.
34
37
  You can save this as parquet file to use at AutoRAG.
35
38
  """
39
+ assert content_size > 0, "content_size must be greater than 0."
40
+ if content_size > len(corpus_df):
41
+ logger.warning(f"content_size {content_size} is larger than the corpus size {len(corpus_df)}. "
42
+ "Setting content_size to the corpus size.")
43
+ content_size = len(corpus_df)
36
44
  sampled_corpus = corpus_df.sample(n=content_size, random_state=random_state)
37
45
  sampled_corpus = sampled_corpus.reset_index(drop=True)
38
46
 
@@ -3,6 +3,7 @@ import os.path
3
3
  import random
4
4
  from typing import Optional, List, Dict, Any
5
5
 
6
+ import pandas as pd
6
7
  from llama_index.core.service_context_elements.llm_predictor import LLMPredictorType
7
8
 
8
9
  from autorag.utils.util import process_batch
@@ -89,14 +90,20 @@ def generate_qa_llama_index_by_ratio(
89
90
  prompts = list(map(lambda path: open(path, 'r').read(), prompts_ratio.keys()))
90
91
  assert all([validate_llama_index_prompt(prompt) for prompt in prompts])
91
92
 
93
+ content_indices = list(range(len(contents)))
92
94
  random.seed(random_state)
93
- random.shuffle(contents)
95
+ random.shuffle(content_indices)
96
+
97
+ slice_content_indices: List[List[str]] = distribute_list_by_ratio(content_indices, list(prompts_ratio.values()))
98
+ temp_df = pd.DataFrame({'idx': slice_content_indices, 'prompt': prompts})
99
+ temp_df = temp_df.explode('idx', ignore_index=True)
100
+ temp_df = temp_df.sort_values(by='idx', ascending=True)
101
+
102
+ final_df = pd.DataFrame({'content': contents, 'prompt': temp_df['prompt'].tolist()})
94
103
 
95
- slice_contents: List[List[str]] = distribute_list_by_ratio(contents, list(prompts_ratio.values()))
96
104
  tasks = [
97
105
  async_qa_gen_llama_index(content, llm, prompt, question_num_per_content, max_retries)
98
- for prompt, type_contents in zip(prompts, slice_contents)
99
- for content in type_contents
106
+ for content, prompt in zip(final_df['content'].tolist(), final_df['prompt'].tolist())
100
107
  ]
101
108
 
102
109
  loops = asyncio.get_event_loop()
@@ -10,7 +10,7 @@ import sacrebleu
10
10
  import torch
11
11
  from llama_index.core.embeddings import BaseEmbedding
12
12
  from llama_index.embeddings.openai import OpenAIEmbedding
13
- from openai import OpenAI
13
+ from openai import AsyncOpenAI
14
14
  from rouge_score import tokenizers
15
15
  from rouge_score.rouge_scorer import RougeScorer
16
16
 
@@ -194,25 +194,39 @@ def sem_score(generation_gt: List[List[str]], generations: List[str],
194
194
  return result
195
195
 
196
196
 
197
- @generation_metric
198
- def g_eval(generation_gt: List[str], pred: str,
197
+ def g_eval(generation_gt: List[List[str]], generations: List[str],
199
198
  metrics: Optional[List[str]] = None,
200
199
  model: str = 'gpt-4-0125-preview',
201
- ) -> float:
200
+ batch_size: int = 8) -> List[float]:
202
201
  """
203
- Calculate G-Eval score.
204
- G-eval is a metric that uses high-performance LLM model to evaluate generation performance.
205
- It evaluates the generation result by coherence, consistency, fluency, and relevance.
206
- It uses only 'openai' model, and we recommend to use gpt-4 for evaluation accuracy.
202
+ Calculate G-Eval score.
203
+ G-eval is a metric that uses high-performance LLM model to evaluate generation performance.
204
+ It evaluates the generation result by coherence, consistency, fluency, and relevance.
205
+ It uses only 'openai' model, and we recommend to use gpt-4 for evaluation accuracy.
207
206
 
208
- :param generation_gt: A list of ground truth.
209
- :param pred: Model generation.
210
- :param metrics: A list of metrics to use for evaluation.
211
- Default is all metrics, which is ['coherence', 'consistency', 'fluency', 'relevance'].
212
- :param model: OpenAI model name.
213
- Default is 'gpt-4-0125-preview'.
214
- :return: G-Eval score.
207
+ :param generation_gt: A list of ground truth.
208
+ Must be 2-d list of string.
209
+ Because it can be a multiple ground truth.
210
+ It will get the max of g_eval score.
211
+ :param generations: A list of generations that LLM generated.
212
+ :param metrics: A list of metrics to use for evaluation.
213
+ Default is all metrics, which is ['coherence', 'consistency', 'fluency', 'relevance'].
214
+ :param model: OpenAI model name.
215
+ Default is 'gpt-4-0125-preview'.
216
+ :param batch_size: The batch size for processing.
217
+ Default is 8.
218
+ :return: G-Eval score.
215
219
  """
220
+ loop = asyncio.get_event_loop()
221
+ tasks = [async_g_eval(gt, pred, metrics, model) for gt, pred in zip(generation_gt, generations)]
222
+ result = loop.run_until_complete(process_batch(tasks, batch_size=batch_size))
223
+ return result
224
+
225
+
226
+ async def async_g_eval(generation_gt: List[str], pred: str,
227
+ metrics: Optional[List[str]] = None,
228
+ model: str = 'gpt-4-0125-preview',
229
+ ) -> float:
216
230
  available_metrics = ['coherence', 'consistency', 'fluency', 'relevance']
217
231
  if metrics is None:
218
232
  metrics = available_metrics
@@ -229,13 +243,13 @@ def g_eval(generation_gt: List[str], pred: str,
229
243
  "relevance": open(os.path.join(prompt_path, "rel_detailed.txt")).read(),
230
244
  }
231
245
 
232
- client = OpenAI()
246
+ client = AsyncOpenAI()
233
247
 
234
- def g_eval_score(prompt: str, gen_gt: List[str], pred: str):
248
+ async def g_eval_score(prompt: str, gen_gt: List[str], pred: str):
235
249
  scores = []
236
250
  for gt in gen_gt:
237
251
  input_prompt = prompt.replace('{{Document}}', gt).replace('{{Summary}}', pred)
238
- response = client.chat.completions.create(
252
+ response = await client.chat.completions.create(
239
253
  model=model,
240
254
  messages=[
241
255
  {"role": "system", "content": input_prompt}
@@ -265,7 +279,7 @@ def g_eval(generation_gt: List[str], pred: str,
265
279
 
266
280
  return int(max(target_tokens, key=target_tokens.get))
267
281
 
268
- g_eval_scores = list(map(lambda x: g_eval_score(g_eval_prompts[x], generation_gt, pred), metrics))
282
+ g_eval_scores = await asyncio.gather(*(g_eval_score(g_eval_prompts[x], generation_gt, pred) for x in metrics))
269
283
  return sum(g_eval_scores) / len(g_eval_scores)
270
284
 
271
285
 
@@ -1,2 +1,3 @@
1
1
  from .pass_compressor import pass_compressor
2
+ from .refine import refine
2
3
  from .tree_summarize import tree_summarize
@@ -26,7 +26,7 @@ def passage_compressor_node(func):
26
26
  retrieved_ids = previous_result['retrieved_ids'].tolist()
27
27
  retrieve_scores = previous_result['retrieve_scores'].tolist()
28
28
 
29
- if func.__name__ == 'tree_summarize':
29
+ if func.__name__ in ['tree_summarize', 'refine']:
30
30
  param_list = ['prompt', 'chat_prompt', 'context_window', 'num_output', 'batch']
31
31
  param_dict = dict(filter(lambda x: x[0] in param_list, kwargs.items()))
32
32
  kwargs_dict = dict(filter(lambda x: x[0] not in param_list, kwargs.items()))
@@ -0,0 +1,61 @@
1
+ import asyncio
2
+ from typing import List, Optional
3
+
4
+ from llama_index.core import PromptTemplate
5
+ from llama_index.core.prompts import PromptType
6
+ from llama_index.core.prompts.utils import is_chat_model
7
+ from llama_index.core.response_synthesizers import Refine
8
+ from llama_index.core.service_context_elements.llm_predictor import LLMPredictorType
9
+
10
+ from autorag.nodes.passagecompressor.base import passage_compressor_node
11
+ from autorag.utils.util import process_batch
12
+
13
+
14
+ @passage_compressor_node
15
+ def refine(queries: List[str],
16
+ contents: List[List[str]],
17
+ scores,
18
+ ids,
19
+ llm: LLMPredictorType,
20
+ prompt: Optional[str] = None,
21
+ chat_prompt: Optional[str] = None,
22
+ batch: int = 16,
23
+ ) -> List[str]:
24
+ """
25
+ Refine a response to a query across text chunks.
26
+ This function is a wrapper for llama_index.response_synthesizers.Refine.
27
+ For more information, visit https://docs.llamaindex.ai/en/stable/examples/response_synthesizers/refine/.
28
+
29
+ :param queries: The queries for retrieved passages.
30
+ :param contents: The contents of retrieved passages.
31
+ :param scores: The scores of retrieved passages.
32
+ Do not use in this function, so you can pass an empty list.
33
+ :param ids: The ids of retrieved passages.
34
+ Do not use in this function, so you can pass an empty list.
35
+ :param llm: The llm instance that will be used to summarize.
36
+ :param prompt: The prompt template for refine.
37
+ If you want to use chat prompt, you should pass chat_prompt instead.
38
+ At prompt, you must specify where to put 'context_msg' and 'query_str'.
39
+ Default is None. When it is None, it will use llama index default prompt.
40
+ :param chat_prompt: The chat prompt template for refine.
41
+ If you want to use normal prompt, you should pass prompt instead.
42
+ At prompt, you must specify where to put 'context_msg' and 'query_str'.
43
+ Default is None. When it is None, it will use llama index default chat prompt.
44
+ :param batch: The batch size for llm.
45
+ Set low if you face some errors.
46
+ Default is 16.
47
+ :return: The list of compressed texts.
48
+ """
49
+ if prompt is not None and not is_chat_model(llm):
50
+ refine_template = PromptTemplate(prompt, prompt_type=PromptType.REFINE)
51
+ elif chat_prompt is not None and is_chat_model(llm):
52
+ refine_template = PromptTemplate(chat_prompt, prompt_type=PromptType.REFINE)
53
+ else:
54
+ refine_template = None
55
+ summarizer = Refine(llm=llm,
56
+ refine_template=refine_template,
57
+ verbose=True)
58
+ tasks = [summarizer.aget_response(query, content) for query, content in zip(queries, contents)]
59
+ loop = asyncio.get_event_loop()
60
+ results = loop.run_until_complete(process_batch(tasks, batch_size=batch))
61
+ return results
@@ -1,3 +1,4 @@
1
1
  from .percentile_cutoff import similarity_percentile_cutoff
2
2
  from .pass_passage_filter import pass_passage_filter
3
+ from .recency import recency_filter
3
4
  from .threshold_cutoff import similarity_threshold_cutoff
@@ -1,10 +1,11 @@
1
1
  import functools
2
+ import os
2
3
  from pathlib import Path
3
4
  from typing import Union, Tuple, List
4
5
 
5
6
  import pandas as pd
6
7
 
7
- from autorag.utils import result_to_dataframe, validate_qa_dataset
8
+ from autorag.utils import result_to_dataframe, validate_qa_dataset, fetch_contents
8
9
 
9
10
 
10
11
  # same with passage filter from now
@@ -33,8 +34,15 @@ def passage_filter_node(func):
33
34
  assert "retrieved_ids" in previous_result.columns, "previous_result must have retrieved_ids column."
34
35
  ids = previous_result["retrieved_ids"].tolist()
35
36
 
36
- filtered_contents, filtered_ids, filtered_scores = func(queries=queries, contents_list=contents,
37
- scores_list=scores, ids_list=ids, *args, **kwargs)
37
+ if func.__name__ == 'recency_filter':
38
+ corpus_df = pd.read_parquet(os.path.join(project_dir, "data", "corpus.parquet"))
39
+ metadatas = fetch_contents(corpus_df, ids, column_name='metadata')
40
+ times = [[time['last_modified_datetime'] for time in time_list] for time_list in metadatas]
41
+ filtered_contents, filtered_ids, filtered_scores \
42
+ = func(contents_list=contents, scores_list=scores, ids_list=ids, time_list=times, *args, **kwargs)
43
+ else:
44
+ filtered_contents, filtered_ids, filtered_scores = func(queries=queries, contents_list=contents,
45
+ scores_list=scores, ids_list=ids, *args, **kwargs)
38
46
 
39
47
  return filtered_contents, filtered_ids, filtered_scores
40
48
 
@@ -0,0 +1,58 @@
1
+ import logging
2
+ from datetime import datetime
3
+ from typing import List, Tuple
4
+
5
+ from autorag.nodes.passagefilter.base import passage_filter_node
6
+
7
+ logger = logging.getLogger("AutoRAG")
8
+
9
+
10
+ @passage_filter_node
11
+ def recency_filter(contents_list: List[List[str]],
12
+ scores_list: List[List[float]], ids_list: List[List[str]],
13
+ time_list: List[List[datetime]],
14
+ threshold: str,
15
+ ) -> Tuple[List[List[str]], List[List[str]], List[List[float]]]:
16
+ """
17
+ Filter out the contents that are below the threshold datetime.
18
+ If all contents are filtered, keep the only one recency content.
19
+ If the threshold date format is incorrect, return the original contents.
20
+
21
+ :param contents_list: The list of lists of contents to filter
22
+ :param scores_list: The list of lists of scores retrieved
23
+ :param ids_list: The list of lists of ids retrieved
24
+ :param time_list: The list of lists of datetime retrieved
25
+ :param threshold: The threshold to cut off
26
+ :return: Tuple of lists containing the filtered contents, ids, and scores
27
+ """
28
+
29
+ def sort_row(contents, scores, ids, time, _datetime_threshold):
30
+ combined = list(zip(contents, scores, ids, time))
31
+ combined_filtered = [item for item in combined if item[3] >= _datetime_threshold]
32
+
33
+ if combined_filtered:
34
+ remain_contents, remain_scores, remain_ids, _ = zip(*combined_filtered)
35
+ else:
36
+ combined.sort(key=lambda x: x[3], reverse=True)
37
+ remain_contents, remain_scores, remain_ids, _ = zip(*combined[:1])
38
+
39
+ return list(remain_contents), list(remain_ids), list(remain_scores)
40
+
41
+ def parse_threshold(threshold_str):
42
+ for fmt in ("%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M", "%Y-%m-%d"):
43
+ try:
44
+ return datetime.strptime(threshold_str, fmt)
45
+ except ValueError:
46
+ continue
47
+ logger.info("threshold date format is incorrect, "
48
+ "should be YYYY-MM-DD or YYYY-MM-DD HH:MM:SS or YYYY-MM-DD HH:MM")
49
+ return None
50
+
51
+ datetime_threshold = parse_threshold(threshold)
52
+ if datetime_threshold is None:
53
+ return contents_list, ids_list, scores_list
54
+
55
+ remain_contents_list, remain_ids_list, remain_scores_list = zip(
56
+ *map(sort_row, contents_list, scores_list, ids_list, time_list, [datetime_threshold] * len(contents_list)))
57
+
58
+ return remain_contents_list, remain_ids_list, remain_scores_list