AutoRAG 0.2.7__tar.gz → 0.2.9__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 (450) hide show
  1. {autorag-0.2.7 → autorag-0.2.9}/AutoRAG.egg-info/PKG-INFO +3 -3
  2. {autorag-0.2.7 → autorag-0.2.9}/AutoRAG.egg-info/SOURCES.txt +4 -0
  3. {autorag-0.2.7 → autorag-0.2.9}/PKG-INFO +3 -3
  4. {autorag-0.2.7 → autorag-0.2.9}/README.md +2 -2
  5. autorag-0.2.9/autorag/VERSION +1 -0
  6. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/qacreation/base.py +26 -14
  7. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/generation.py +26 -6
  8. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/retrieval.py +5 -1
  9. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/retrieval_contents.py +2 -1
  10. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/flag_embedding.py +2 -2
  11. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/promptmaker/__init__.py +1 -0
  12. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/promptmaker/base.py +10 -1
  13. autorag-0.2.9/autorag/nodes/promptmaker/window_replacement.py +46 -0
  14. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/queryexpansion/base.py +3 -0
  15. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/queryexpansion/query_decompose.py +1 -1
  16. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/queryexpansion/run.py +3 -2
  17. {autorag-0.2.7 → autorag-0.2.9}/autorag/support.py +1 -0
  18. {autorag-0.2.7 → autorag-0.2.9}/autorag/utils/util.py +32 -2
  19. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.promptmaker.rst +8 -0
  20. {autorag-0.2.7 → autorag-0.2.9}/docs/source/data_creation/tutorial.md +10 -1
  21. {autorag-0.2.7 → autorag-0.2.9}/docs/source/local_model.md +15 -9
  22. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/koreranker.md +5 -1
  23. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/monot5.md +4 -0
  24. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/tart.md +5 -0
  25. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/prompt_maker/prompt_maker.md +1 -0
  26. autorag-0.2.9/docs/source/nodes/prompt_maker/window_replacement.md +33 -0
  27. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/query_expansion/query_decompose.md +52 -0
  28. {autorag-0.2.7 → autorag-0.2.9}/sample_config/config_korean.yaml +14 -16
  29. {autorag-0.2.7 → autorag-0.2.9}/sample_config/full.yaml +3 -0
  30. {autorag-0.2.7 → autorag-0.2.9}/sample_config/simple_local.yaml +2 -2
  31. autorag-0.2.9/sample_config/simple_ollama.yaml +49 -0
  32. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/data/qacreation/test_base_qacreation.py +26 -0
  33. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/evaluate/metric/test_generation_metric.py +0 -1
  34. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/evaluate/metric/test_retrieval_metric.py +10 -0
  35. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passageaugmenter/test_run_passage_augmenter.py +1 -0
  36. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagecompressor/test_run_passage_compressor_node.py +1 -0
  37. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagefilter/test_passage_filter_run.py +1 -0
  38. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_passage_reranker_run.py +1 -0
  39. autorag-0.2.9/tests/autorag/nodes/promptmaker/test_prompt_maker_base.py +28 -0
  40. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/promptmaker/test_prompt_maker_run.py +1 -0
  41. autorag-0.2.9/tests/autorag/nodes/promptmaker/test_window_replacement.py +40 -0
  42. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/queryexpansion/test_query_expansion_run.py +1 -0
  43. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_run_retrieval_node.py +1 -0
  44. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/utils/test_util.py +25 -1
  45. autorag-0.2.7/autorag/VERSION +0 -1
  46. autorag-0.2.7/tests/autorag/nodes/promptmaker/test_prompt_maker_base.py +0 -13
  47. {autorag-0.2.7 → autorag-0.2.9}/.github/FUNDING.yml +0 -0
  48. {autorag-0.2.7 → autorag-0.2.9}/.github/dependabot.yml +0 -0
  49. {autorag-0.2.7 → autorag-0.2.9}/.github/workflows/publish.yml +0 -0
  50. {autorag-0.2.7 → autorag-0.2.9}/.github/workflows/sphinx.yml +0 -0
  51. {autorag-0.2.7 → autorag-0.2.9}/.github/workflows/test.yml +0 -0
  52. {autorag-0.2.7 → autorag-0.2.9}/.gitignore +0 -0
  53. {autorag-0.2.7 → autorag-0.2.9}/AutoRAG.egg-info/dependency_links.txt +0 -0
  54. {autorag-0.2.7 → autorag-0.2.9}/AutoRAG.egg-info/entry_points.txt +0 -0
  55. {autorag-0.2.7 → autorag-0.2.9}/AutoRAG.egg-info/requires.txt +0 -0
  56. {autorag-0.2.7 → autorag-0.2.9}/AutoRAG.egg-info/top_level.txt +0 -0
  57. {autorag-0.2.7 → autorag-0.2.9}/CODE_OF_CONDUCT.md +0 -0
  58. {autorag-0.2.7 → autorag-0.2.9}/CONTRIBUTING.md +0 -0
  59. {autorag-0.2.7 → autorag-0.2.9}/LICENSE +0 -0
  60. {autorag-0.2.7 → autorag-0.2.9}/autorag/__init__.py +0 -0
  61. {autorag-0.2.7 → autorag-0.2.9}/autorag/cli.py +0 -0
  62. {autorag-0.2.7 → autorag-0.2.9}/autorag/dashboard.py +0 -0
  63. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/__init__.py +0 -0
  64. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/corpus/__init__.py +0 -0
  65. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/corpus/langchain.py +0 -0
  66. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/corpus/llama_index.py +0 -0
  67. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/qacreation/__init__.py +0 -0
  68. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/qacreation/llama_index.py +0 -0
  69. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/qacreation/llama_index_default_prompt.txt +0 -0
  70. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/qacreation/ragas.py +0 -0
  71. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/qacreation/simple.py +0 -0
  72. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/utils/__init__.py +0 -0
  73. {autorag-0.2.7 → autorag-0.2.9}/autorag/data/utils/util.py +0 -0
  74. {autorag-0.2.7 → autorag-0.2.9}/autorag/deploy.py +0 -0
  75. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/__init__.py +0 -0
  76. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/generation.py +0 -0
  77. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/__init__.py +0 -0
  78. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/g_eval_prompts/coh_detailed.txt +0 -0
  79. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/g_eval_prompts/con_detailed.txt +0 -0
  80. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/g_eval_prompts/flu_detailed.txt +0 -0
  81. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/g_eval_prompts/rel_detailed.txt +0 -0
  82. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/metric/util.py +0 -0
  83. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/retrieval.py +0 -0
  84. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/retrieval_contents.py +0 -0
  85. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluation/util.py +0 -0
  86. {autorag-0.2.7 → autorag-0.2.9}/autorag/evaluator.py +0 -0
  87. {autorag-0.2.7 → autorag-0.2.9}/autorag/node_line.py +0 -0
  88. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/__init__.py +0 -0
  89. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/generator/__init__.py +0 -0
  90. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/generator/base.py +0 -0
  91. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/generator/llama_index_llm.py +0 -0
  92. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/generator/openai_llm.py +0 -0
  93. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/generator/run.py +0 -0
  94. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/generator/vllm.py +0 -0
  95. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passageaugmenter/__init__.py +0 -0
  96. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passageaugmenter/base.py +0 -0
  97. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passageaugmenter/pass_passage_augmenter.py +0 -0
  98. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passageaugmenter/prev_next_augmenter.py +0 -0
  99. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passageaugmenter/run.py +0 -0
  100. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagecompressor/__init__.py +0 -0
  101. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagecompressor/base.py +0 -0
  102. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagecompressor/longllmlingua.py +0 -0
  103. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagecompressor/pass_compressor.py +0 -0
  104. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagecompressor/refine.py +0 -0
  105. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagecompressor/run.py +0 -0
  106. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagecompressor/tree_summarize.py +0 -0
  107. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/__init__.py +0 -0
  108. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/base.py +0 -0
  109. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/pass_passage_filter.py +0 -0
  110. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/percentile_cutoff.py +0 -0
  111. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/recency.py +0 -0
  112. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/run.py +0 -0
  113. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/similarity_percentile_cutoff.py +0 -0
  114. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/similarity_threshold_cutoff.py +0 -0
  115. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagefilter/threshold_cutoff.py +0 -0
  116. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/__init__.py +0 -0
  117. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/base.py +0 -0
  118. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/cohere.py +0 -0
  119. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/colbert.py +0 -0
  120. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/flag_embedding_llm.py +0 -0
  121. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/jina.py +0 -0
  122. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/koreranker.py +0 -0
  123. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/monot5.py +0 -0
  124. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/pass_reranker.py +0 -0
  125. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/rankgpt.py +0 -0
  126. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/run.py +0 -0
  127. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/sentence_transformer.py +0 -0
  128. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/tart/__init__.py +0 -0
  129. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/tart/modeling_enc_t5.py +0 -0
  130. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/tart/tart.py +0 -0
  131. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/tart/tokenization_enc_t5.py +0 -0
  132. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/time_reranker.py +0 -0
  133. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/passagereranker/upr.py +0 -0
  134. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/promptmaker/fstring.py +0 -0
  135. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/promptmaker/long_context_reorder.py +0 -0
  136. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/promptmaker/run.py +0 -0
  137. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/queryexpansion/__init__.py +0 -0
  138. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/queryexpansion/hyde.py +0 -0
  139. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/queryexpansion/multi_query_expansion.py +0 -0
  140. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/queryexpansion/pass_query_expansion.py +0 -0
  141. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/__init__.py +0 -0
  142. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/base.py +0 -0
  143. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/bm25.py +0 -0
  144. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/hybrid_cc.py +0 -0
  145. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/hybrid_dbsf.py +0 -0
  146. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/hybrid_rrf.py +0 -0
  147. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/hybrid_rsf.py +0 -0
  148. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/run.py +0 -0
  149. {autorag-0.2.7 → autorag-0.2.9}/autorag/nodes/retrieval/vectordb.py +0 -0
  150. {autorag-0.2.7 → autorag-0.2.9}/autorag/schema/__init__.py +0 -0
  151. {autorag-0.2.7 → autorag-0.2.9}/autorag/schema/module.py +0 -0
  152. {autorag-0.2.7 → autorag-0.2.9}/autorag/schema/node.py +0 -0
  153. {autorag-0.2.7 → autorag-0.2.9}/autorag/strategy.py +0 -0
  154. {autorag-0.2.7 → autorag-0.2.9}/autorag/utils/__init__.py +0 -0
  155. {autorag-0.2.7 → autorag-0.2.9}/autorag/utils/preprocess.py +0 -0
  156. {autorag-0.2.7 → autorag-0.2.9}/autorag/web.py +0 -0
  157. {autorag-0.2.7 → autorag-0.2.9}/docs/Makefile +0 -0
  158. {autorag-0.2.7 → autorag-0.2.9}/docs/make.bat +0 -0
  159. {autorag-0.2.7 → autorag-0.2.9}/docs/requirements.txt +0 -0
  160. {autorag-0.2.7 → autorag-0.2.9}/docs/source/CNAME +0 -0
  161. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/data_creation.png +0 -0
  162. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/data_folder.png +0 -0
  163. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/dcg.png +0 -0
  164. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/f1_score.png +0 -0
  165. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/map.png +0 -0
  166. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/mrr.png +0 -0
  167. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/ndcg.png +0 -0
  168. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/ndcg_formula.png +0 -0
  169. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/node_folder.png +0 -0
  170. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/node_line_folder.png +0 -0
  171. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/node_line_summary.png +0 -0
  172. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/node_lines.png +0 -0
  173. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/node_summary.png +0 -0
  174. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/normal_distribution.png +0 -0
  175. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/project_folder_example.png +0 -0
  176. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/project_folders.png +0 -0
  177. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/resources_folder.png +0 -0
  178. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/roadmap/RAG_paradigms.png +0 -0
  179. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/roadmap/advanced_RAG.png +0 -0
  180. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/roadmap/cycle.png +0 -0
  181. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/roadmap/merger.png +0 -0
  182. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/roadmap/node_line_modular.png +0 -0
  183. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/roadmap/policy.png +0 -0
  184. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/samsung_sundae.jpeg +0 -0
  185. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/score_fusion.png +0 -0
  186. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/trial_folder.png +0 -0
  187. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/trial_json.png +0 -0
  188. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/trial_summary.png +0 -0
  189. {autorag-0.2.7 → autorag-0.2.9}/docs/source/_static/web_interface.png +0 -0
  190. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.data.corpus.rst +0 -0
  191. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.data.qacreation.rst +0 -0
  192. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.data.rst +0 -0
  193. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.data.utils.rst +0 -0
  194. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.evaluation.metric.rst +0 -0
  195. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.evaluation.rst +0 -0
  196. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.generator.rst +0 -0
  197. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.passageaugmenter.rst +0 -0
  198. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.passagecompressor.rst +0 -0
  199. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.passagefilter.rst +0 -0
  200. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.passagereranker.rst +0 -0
  201. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.passagereranker.tart.rst +0 -0
  202. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.queryexpansion.rst +0 -0
  203. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.retrieval.rst +0 -0
  204. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.nodes.rst +0 -0
  205. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.rst +0 -0
  206. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.schema.rst +0 -0
  207. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/autorag.utils.rst +0 -0
  208. {autorag-0.2.7 → autorag-0.2.9}/docs/source/api_spec/modules.rst +0 -0
  209. {autorag-0.2.7 → autorag-0.2.9}/docs/source/conf.py +0 -0
  210. {autorag-0.2.7 → autorag-0.2.9}/docs/source/data_creation/data_format.md +0 -0
  211. {autorag-0.2.7 → autorag-0.2.9}/docs/source/data_creation/ragas.md +0 -0
  212. {autorag-0.2.7 → autorag-0.2.9}/docs/source/deploy/api_endpoint.md +0 -0
  213. {autorag-0.2.7 → autorag-0.2.9}/docs/source/deploy/web.md +0 -0
  214. {autorag-0.2.7 → autorag-0.2.9}/docs/source/evaluate_metrics/generation.md +0 -0
  215. {autorag-0.2.7 → autorag-0.2.9}/docs/source/evaluate_metrics/retrieval.md +0 -0
  216. {autorag-0.2.7 → autorag-0.2.9}/docs/source/evaluate_metrics/retrieval_contents.md +0 -0
  217. {autorag-0.2.7 → autorag-0.2.9}/docs/source/index.rst +0 -0
  218. {autorag-0.2.7 → autorag-0.2.9}/docs/source/install.md +0 -0
  219. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/generator/generator.md +0 -0
  220. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/generator/llama_index_llm.md +0 -0
  221. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/generator/openai_llm.md +0 -0
  222. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/generator/vllm.md +0 -0
  223. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/index.md +0 -0
  224. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_augmenter/passage_augmenter.md +0 -0
  225. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_augmenter/prev_next_augmenter.md +0 -0
  226. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_compressor/longllmlingua.md +0 -0
  227. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_compressor/passage_compressor.md +0 -0
  228. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_compressor/refine.md +0 -0
  229. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_compressor/tree_summarize.md +0 -0
  230. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_filter/passage_filter.md +0 -0
  231. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_filter/percentile_cutoff.md +0 -0
  232. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_filter/recency_filter.md +0 -0
  233. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_filter/similarity_percentile_cutoff.md +0 -0
  234. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_filter/similarity_threshold_cutoff.md +0 -0
  235. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_filter/threshold_cutoff.md +0 -0
  236. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/cohere.md +0 -0
  237. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/colbert.md +0 -0
  238. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/flag_embedding_llm_reranker.md +0 -0
  239. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/flag_embedding_reranker.md +0 -0
  240. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/jina_reranker.md +0 -0
  241. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/passage_reranker.md +0 -0
  242. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/rankgpt.md +0 -0
  243. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/sentence_transformer_reranker.md +0 -0
  244. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/time_reranker.md +0 -0
  245. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/passage_reranker/upr.md +0 -0
  246. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/prompt_maker/fstring.md +0 -0
  247. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/prompt_maker/long_context_reorder.md +0 -0
  248. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/query_expansion/hyde.md +0 -0
  249. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/query_expansion/multi_query_expansion.md +0 -0
  250. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/query_expansion/query_expansion.md +0 -0
  251. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/retrieval/bm25.md +0 -0
  252. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/retrieval/hybrid_cc.md +0 -0
  253. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/retrieval/hybrid_dbsf.md +0 -0
  254. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/retrieval/hybrid_rrf.md +0 -0
  255. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/retrieval/hybrid_rsf.md +0 -0
  256. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/retrieval/retrieval.md +0 -0
  257. {autorag-0.2.7 → autorag-0.2.9}/docs/source/nodes/retrieval/vectordb.md +0 -0
  258. {autorag-0.2.7 → autorag-0.2.9}/docs/source/optimization/custom_config.md +0 -0
  259. {autorag-0.2.7 → autorag-0.2.9}/docs/source/optimization/folder_structure.md +0 -0
  260. {autorag-0.2.7 → autorag-0.2.9}/docs/source/optimization/optimization.md +0 -0
  261. {autorag-0.2.7 → autorag-0.2.9}/docs/source/optimization/sample_full_config.yaml +0 -0
  262. {autorag-0.2.7 → autorag-0.2.9}/docs/source/optimization/strategies.md +0 -0
  263. {autorag-0.2.7 → autorag-0.2.9}/docs/source/roadmap/modular_rag.md +0 -0
  264. {autorag-0.2.7 → autorag-0.2.9}/docs/source/structure.md +0 -0
  265. {autorag-0.2.7 → autorag-0.2.9}/docs/source/troubleshooting.md +0 -0
  266. {autorag-0.2.7 → autorag-0.2.9}/docs/source/tutorial.md +0 -0
  267. {autorag-0.2.7 → autorag-0.2.9}/pyproject.toml +0 -0
  268. {autorag-0.2.7 → autorag-0.2.9}/requirements.txt +0 -0
  269. {autorag-0.2.7 → autorag-0.2.9}/sample_config/compact_local.yaml +0 -0
  270. {autorag-0.2.7 → autorag-0.2.9}/sample_config/compact_openai.yaml +0 -0
  271. {autorag-0.2.7 → autorag-0.2.9}/sample_config/extracted_sample.yaml +0 -0
  272. {autorag-0.2.7 → autorag-0.2.9}/sample_config/simple_openai.yaml +0 -0
  273. {autorag-0.2.7 → autorag-0.2.9}/sample_dataset/README.md +0 -0
  274. {autorag-0.2.7 → autorag-0.2.9}/sample_dataset/eli5/load_eli5_dataset.py +0 -0
  275. {autorag-0.2.7 → autorag-0.2.9}/sample_dataset/hotpotqa/load_hotpotqa_dataset.py +0 -0
  276. {autorag-0.2.7 → autorag-0.2.9}/sample_dataset/msmarco/load_msmarco_dataset.py +0 -0
  277. {autorag-0.2.7 → autorag-0.2.9}/sample_dataset/triviaqa/load_triviaqa_dataset.py +0 -0
  278. {autorag-0.2.7 → autorag-0.2.9}/setup.cfg +0 -0
  279. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/data/corpus/test_base.py +0 -0
  280. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/data/corpus/test_langchain.py +0 -0
  281. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/data/corpus/test_llama_index_corpus.py +0 -0
  282. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/data/qacreation/test_llama_index_qacreation.py +0 -0
  283. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/data/qacreation/test_ragas_qa_creation.py +0 -0
  284. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/data/qacreation/test_simple.py +0 -0
  285. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/evaluate/metric/test_retrieval_contents_metric.py +0 -0
  286. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/evaluate/test_evaluate_util.py +0 -0
  287. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/evaluate/test_generation_evaluate.py +0 -0
  288. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/evaluate/test_retrieval_contents_evaluate.py +0 -0
  289. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/evaluate/test_retrieval_evaluate.py +0 -0
  290. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/generator/test_generator_base.py +0 -0
  291. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/generator/test_llama_index_llm.py +0 -0
  292. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/generator/test_openai.py +0 -0
  293. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/generator/test_run_generator_node.py +0 -0
  294. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/generator/test_vllm.py +0 -0
  295. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passageaugmenter/test_base_passage_augmenter.py +0 -0
  296. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passageaugmenter/test_pass_passage_augmenter.py +0 -0
  297. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passageaugmenter/test_prev_next_augmenter.py +0 -0
  298. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagecompressor/test_base_passage_compressor.py +0 -0
  299. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagecompressor/test_longllmlingua.py +0 -0
  300. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagecompressor/test_pass_compressor.py +0 -0
  301. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagecompressor/test_refine.py +0 -0
  302. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagecompressor/test_tree_summarize.py +0 -0
  303. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagefilter/test_pass_passage_filter.py +0 -0
  304. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagefilter/test_passage_filter_base.py +0 -0
  305. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagefilter/test_percentile_cutoff.py +0 -0
  306. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagefilter/test_recency_filter.py +0 -0
  307. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagefilter/test_similarity_percentile_cutoff.py +0 -0
  308. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagefilter/test_similarity_threshold_cutoff.py +0 -0
  309. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagefilter/test_threshold_cutoff.py +0 -0
  310. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_cohere_reranker.py +0 -0
  311. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_colbert_reranker.py +0 -0
  312. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_flag_embedding.py +0 -0
  313. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_flag_embedding_llm.py +0 -0
  314. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_jina_reranker.py +0 -0
  315. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_koreranker.py +0 -0
  316. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_monot5.py +0 -0
  317. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_pass_reranker.py +0 -0
  318. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_passage_reranker_base.py +0 -0
  319. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_rankgpt.py +0 -0
  320. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_sentence_transformer.py +0 -0
  321. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_tart.py +0 -0
  322. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_time_reranker.py +0 -0
  323. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/passagereranker/test_upr.py +0 -0
  324. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/promptmaker/test_fstring.py +0 -0
  325. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/promptmaker/test_long_context_reorder.py +0 -0
  326. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/queryexpansion/test_hyde.py +0 -0
  327. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/queryexpansion/test_multi_query_expansion.py +0 -0
  328. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/queryexpansion/test_pass_query_expansion.py +0 -0
  329. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/queryexpansion/test_query_decompose.py +0 -0
  330. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/queryexpansion/test_query_expansion_base.py +0 -0
  331. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_bm25.py +0 -0
  332. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_hybrid_base.py +0 -0
  333. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_hybrid_cc.py +0 -0
  334. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_hybrid_dbsf.py +0 -0
  335. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_hybrid_rrf.py +0 -0
  336. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_hybrid_rsf.py +0 -0
  337. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_retrieval_base.py +0 -0
  338. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/nodes/retrieval/test_vectordb.py +0 -0
  339. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/schema/test_module_schema.py +0 -0
  340. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/schema/test_node_schema.py +0 -0
  341. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/test_cli.py +0 -0
  342. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/test_dashboard.py +0 -0
  343. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/test_deploy.py +0 -0
  344. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/test_evaluator.py +0 -0
  345. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/test_strategy.py +0 -0
  346. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/test_support.py +0 -0
  347. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/test_web.py +0 -0
  348. {autorag-0.2.7 → autorag-0.2.9}/tests/autorag/utils/test_preprocess.py +0 -0
  349. {autorag-0.2.7 → autorag-0.2.9}/tests/conftest.py +0 -0
  350. {autorag-0.2.7 → autorag-0.2.9}/tests/delete_tests.py +0 -0
  351. {autorag-0.2.7 → autorag-0.2.9}/tests/mock.py +0 -0
  352. {autorag-0.2.7 → autorag-0.2.9}/tests/requirements.txt +0 -0
  353. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/README.md +0 -0
  354. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/corpus_data_sample.parquet +0 -0
  355. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/data_creation/raw_dir/sample1.txt +0 -0
  356. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/data_creation/raw_dir/sample2.txt +0 -0
  357. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/data_creation/raw_dir/sample3.txt +0 -0
  358. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/full.yaml +0 -0
  359. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/qa_data_sample.parquet +0 -0
  360. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/qa_gen_prompts/prompt1.txt +0 -0
  361. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/qa_gen_prompts/prompt2.txt +0 -0
  362. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/qa_gen_prompts/prompt3.txt +0 -0
  363. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/qa_test_data_sample.parquet +0 -0
  364. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/config.yaml +0 -0
  365. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/generator/0.parquet +0 -0
  366. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/generator/1.parquet +0 -0
  367. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/generator/2.parquet +0 -0
  368. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/generator/3.parquet +0 -0
  369. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/generator/4.parquet +0 -0
  370. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/generator/5.parquet +0 -0
  371. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/generator/best_5.parquet +0 -0
  372. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/generator/summary.csv +0 -0
  373. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/0.parquet +0 -0
  374. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/1.parquet +0 -0
  375. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/best_0.parquet +0 -0
  376. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/summary.csv +0 -0
  377. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/post_retrieve_node_line/summary.csv +0 -0
  378. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
  379. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
  380. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
  381. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
  382. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
  383. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/pre_retrieve_node_line/summary.csv +0 -0
  384. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/0.parquet +0 -0
  385. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/best_0.parquet +0 -0
  386. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/summary.csv +0 -0
  387. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/0.parquet +0 -0
  388. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/1.parquet +0 -0
  389. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
  390. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/summary.csv +0 -0
  391. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/retrieval/0.parquet +0 -0
  392. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/retrieval/1.parquet +0 -0
  393. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/retrieval/best_0.parquet +0 -0
  394. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/retrieval/summary.csv +0 -0
  395. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/retrieve_node_line/summary.csv +0 -0
  396. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/0/summary.csv +0 -0
  397. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/config.yaml +0 -0
  398. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
  399. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
  400. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
  401. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
  402. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
  403. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/pre_retrieve_node_line/summary.csv +0 -0
  404. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/passage_filter/0.parquet +0 -0
  405. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/0.parquet +0 -0
  406. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/1.parquet +0 -0
  407. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
  408. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/summary.csv +0 -0
  409. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/retrieval/0.parquet +0 -0
  410. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/retrieval/1.parquet +0 -0
  411. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/retrieval/best_0.parquet +0 -0
  412. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/1/retrieve_node_line/retrieval/summary.csv +0 -0
  413. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/config.yaml +0 -0
  414. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/post_retrieve_node_line/prompt_maker/0.parquet +0 -0
  415. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
  416. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
  417. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
  418. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
  419. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
  420. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/pre_retrieve_node_line/summary.csv +0 -0
  421. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/0.parquet +0 -0
  422. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/best_0.parquet +0 -0
  423. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/summary.csv +0 -0
  424. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/0.parquet +0 -0
  425. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/1.parquet +0 -0
  426. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
  427. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/summary.csv +0 -0
  428. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/retrieval/0.parquet +0 -0
  429. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/retrieval/1.parquet +0 -0
  430. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/retrieval/best_0.parquet +0 -0
  431. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/retrieval/summary.csv +0 -0
  432. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/2/retrieve_node_line/summary.csv +0 -0
  433. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/3/config.yaml +0 -0
  434. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/best.yaml +0 -0
  435. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/data/corpus.parquet +0 -0
  436. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/data/qa.parquet +0 -0
  437. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/resources/bm25_porter_stemmer.pkl +0 -0
  438. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/data_level0.bin +0 -0
  439. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/header.bin +0 -0
  440. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/length.bin +0 -0
  441. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/link_lists.bin +0 -0
  442. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/resources/chroma/chroma.sqlite3 +0 -0
  443. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/result_project/trial.json +0 -0
  444. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/sample_contents_nqa.csv +0 -0
  445. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/sample_project/data/corpus.parquet +0 -0
  446. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/sample_project/data/qa.parquet +0 -0
  447. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/sample_project/resources/bm25_gpt2.pkl +0 -0
  448. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/sample_project/resources/bm25_porter_stemmer.pkl +0 -0
  449. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/simple.yaml +0 -0
  450. {autorag-0.2.7 → autorag-0.2.9}/tests/resources/test_bm25_retrieval.pkl +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AutoRAG
3
- Version: 0.2.7
3
+ Version: 0.2.9
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
@@ -505,11 +505,11 @@ autorag run_web --trial_path your/path/to/trial_path
505
505
 
506
506
  <img width="1491" alt="web_interface" src="https://github.com/Marker-Inc-Korea/AutoRAG/assets/96727832/f6b00353-f6bb-4d8f-8740-1c264c0acbb8">
507
507
 
508
- # Star History
508
+ # Star History
509
509
 
510
510
  [![Star History Chart](https://api.star-history.com/svg?repos=Marker-Inc-Korea/AutoRAG&type=Date)](https://star-history.com/#Marker-Inc-Korea/AutoRAG&Date)
511
511
 
512
- # Contributors
512
+ # Contributors
513
513
 
514
514
  Thanks go to these wonderful people:
515
515
 
@@ -104,6 +104,7 @@ autorag/nodes/promptmaker/base.py
104
104
  autorag/nodes/promptmaker/fstring.py
105
105
  autorag/nodes/promptmaker/long_context_reorder.py
106
106
  autorag/nodes/promptmaker/run.py
107
+ autorag/nodes/promptmaker/window_replacement.py
107
108
  autorag/nodes/queryexpansion/__init__.py
108
109
  autorag/nodes/queryexpansion/base.py
109
110
  autorag/nodes/queryexpansion/hyde.py
@@ -227,6 +228,7 @@ docs/source/nodes/passage_reranker/upr.md
227
228
  docs/source/nodes/prompt_maker/fstring.md
228
229
  docs/source/nodes/prompt_maker/long_context_reorder.md
229
230
  docs/source/nodes/prompt_maker/prompt_maker.md
231
+ docs/source/nodes/prompt_maker/window_replacement.md
230
232
  docs/source/nodes/query_expansion/hyde.md
231
233
  docs/source/nodes/query_expansion/multi_query_expansion.md
232
234
  docs/source/nodes/query_expansion/query_decompose.md
@@ -250,6 +252,7 @@ sample_config/config_korean.yaml
250
252
  sample_config/extracted_sample.yaml
251
253
  sample_config/full.yaml
252
254
  sample_config/simple_local.yaml
255
+ sample_config/simple_ollama.yaml
253
256
  sample_config/simple_openai.yaml
254
257
  sample_dataset/README.md
255
258
  sample_dataset/eli5/load_eli5_dataset.py
@@ -323,6 +326,7 @@ tests/autorag/nodes/promptmaker/test_fstring.py
323
326
  tests/autorag/nodes/promptmaker/test_long_context_reorder.py
324
327
  tests/autorag/nodes/promptmaker/test_prompt_maker_base.py
325
328
  tests/autorag/nodes/promptmaker/test_prompt_maker_run.py
329
+ tests/autorag/nodes/promptmaker/test_window_replacement.py
326
330
  tests/autorag/nodes/queryexpansion/test_hyde.py
327
331
  tests/autorag/nodes/queryexpansion/test_multi_query_expansion.py
328
332
  tests/autorag/nodes/queryexpansion/test_pass_query_expansion.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AutoRAG
3
- Version: 0.2.7
3
+ Version: 0.2.9
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
@@ -505,11 +505,11 @@ autorag run_web --trial_path your/path/to/trial_path
505
505
 
506
506
  <img width="1491" alt="web_interface" src="https://github.com/Marker-Inc-Korea/AutoRAG/assets/96727832/f6b00353-f6bb-4d8f-8740-1c264c0acbb8">
507
507
 
508
- # Star History
508
+ # Star History
509
509
 
510
510
  [![Star History Chart](https://api.star-history.com/svg?repos=Marker-Inc-Korea/AutoRAG&type=Date)](https://star-history.com/#Marker-Inc-Korea/AutoRAG&Date)
511
511
 
512
- # Contributors
512
+ # Contributors
513
513
 
514
514
  Thanks go to these wonderful people:
515
515
 
@@ -234,11 +234,11 @@ autorag run_web --trial_path your/path/to/trial_path
234
234
 
235
235
  <img width="1491" alt="web_interface" src="https://github.com/Marker-Inc-Korea/AutoRAG/assets/96727832/f6b00353-f6bb-4d8f-8740-1c264c0acbb8">
236
236
 
237
- # Star History
237
+ # Star History
238
238
 
239
239
  [![Star History Chart](https://api.star-history.com/svg?repos=Marker-Inc-Korea/AutoRAG&type=Date)](https://star-history.com/#Marker-Inc-Korea/AutoRAG&Date)
240
240
 
241
- # Contributors
241
+ # Contributors
242
242
 
243
243
  Thanks go to these wonderful people:
244
244
 
@@ -0,0 +1 @@
1
+ 0.2.9
@@ -3,6 +3,7 @@ import uuid
3
3
  from typing import Callable, Optional
4
4
 
5
5
  import pandas as pd
6
+ from tqdm import tqdm
6
7
 
7
8
  from autorag.utils.util import save_parquet_safe
8
9
 
@@ -15,6 +16,7 @@ def make_single_content_qa(corpus_df: pd.DataFrame,
15
16
  output_filepath: Optional[str] = None,
16
17
  upsert: bool = False,
17
18
  random_state: int = 42,
19
+ cache_batch: int = 32,
18
20
  **kwargs) -> pd.DataFrame:
19
21
  """
20
22
  Make single content (single-hop, single-document) QA dataset using given qa_creation_func.
@@ -32,6 +34,9 @@ def make_single_content_qa(corpus_df: pd.DataFrame,
32
34
  :param upsert: If true, the function will overwrite the existing file if it exists.
33
35
  Default is False.
34
36
  :param random_state: The random state for sampling corpus from the given corpus_df.
37
+ :param cache_batch: The number of batches to use for caching the generated QA dataset.
38
+ When the cache_batch size data is generated, the dataset will save to the designated output_filepath.
39
+ If the cache_batch size is too small, the process time will be longer.
35
40
  :param kwargs: The keyword arguments for qa_creation_func.
36
41
  :return: QA dataset dataframe.
37
42
  You can save this as parquet file to use at AutoRAG.
@@ -44,24 +49,31 @@ def make_single_content_qa(corpus_df: pd.DataFrame,
44
49
  sampled_corpus = corpus_df.sample(n=content_size, random_state=random_state)
45
50
  sampled_corpus = sampled_corpus.reset_index(drop=True)
46
51
 
47
- qa = qa_creation_func(contents=sampled_corpus['contents'].tolist(), **kwargs)
48
- qa_data = pd.DataFrame({
49
- 'qid': [str(uuid.uuid4()) for _ in range(len(qa))],
50
- 'qa': qa,
51
- 'retrieval_gt': sampled_corpus['doc_id'].tolist(),
52
- })
53
- qa_data = qa_data.explode('qa', ignore_index=True)
54
-
55
52
  def make_query_generation_gt(row):
56
53
  return row['qa']['query'], row['qa']['generation_gt']
57
54
 
58
- qa_data[['query', 'generation_gt']] = qa_data.apply(make_query_generation_gt, axis=1, result_type='expand')
59
- qa_data = qa_data.drop(columns=['qa'])
55
+ qa_data = pd.DataFrame()
56
+ for idx, i in tqdm(enumerate(range(0, len(sampled_corpus), cache_batch))):
57
+ qa = qa_creation_func(contents=sampled_corpus['contents'].tolist()[i:i + cache_batch], **kwargs)
58
+
59
+ temp_qa_data = pd.DataFrame({
60
+ 'qa': qa,
61
+ 'retrieval_gt': sampled_corpus['doc_id'].tolist()[i:i + cache_batch],
62
+ })
63
+ temp_qa_data = temp_qa_data.explode('qa', ignore_index=True)
64
+ temp_qa_data['qid'] = [str(uuid.uuid4()) for _ in range(len(temp_qa_data))]
65
+ temp_qa_data[['query', 'generation_gt']] = temp_qa_data.apply(make_query_generation_gt, axis=1,
66
+ result_type='expand')
67
+ temp_qa_data = temp_qa_data.drop(columns=['qa'])
60
68
 
61
- qa_data['retrieval_gt'] = qa_data['retrieval_gt'].apply(lambda x: [[x]])
62
- qa_data['generation_gt'] = qa_data['generation_gt'].apply(lambda x: [x])
69
+ temp_qa_data['retrieval_gt'] = temp_qa_data['retrieval_gt'].apply(lambda x: [[x]])
70
+ temp_qa_data['generation_gt'] = temp_qa_data['generation_gt'].apply(lambda x: [x])
63
71
 
64
- if output_filepath is not None:
65
- save_parquet_safe(qa_data, output_filepath, upsert=upsert)
72
+ if idx == 0:
73
+ qa_data = temp_qa_data
74
+ else:
75
+ qa_data = pd.concat([qa_data, temp_qa_data], ignore_index=True)
76
+ if output_filepath is not None:
77
+ save_parquet_safe(qa_data, output_filepath, upsert=upsert)
66
78
 
67
79
  return qa_data
@@ -6,7 +6,7 @@ from typing import List, Optional
6
6
 
7
7
  import evaluate
8
8
  import pandas as pd
9
- import sacrebleu
9
+ from sacrebleu.metrics.bleu import BLEU
10
10
  import torch
11
11
  from llama_index.core.embeddings import BaseEmbedding
12
12
  from llama_index.embeddings.openai import OpenAIEmbedding
@@ -16,11 +16,12 @@ from rouge_score.rouge_scorer import RougeScorer
16
16
 
17
17
  from autorag import embedding_models
18
18
  from autorag.evaluation.metric.util import calculate_cosine_similarity
19
- from autorag.utils.util import process_batch, openai_truncate_by_token
19
+ from autorag.utils.util import process_batch, openai_truncate_by_token, convert_inputs_to_list
20
20
 
21
21
 
22
22
  def generation_metric(func):
23
23
  @functools.wraps(func)
24
+ @convert_inputs_to_list
24
25
  def wrapper(generation_gt: List[List[str]], generations: List[str], **kwargs) -> List[float]:
25
26
  """
26
27
  Compute generation metric.
@@ -39,6 +40,7 @@ def generation_metric(func):
39
40
  return wrapper
40
41
 
41
42
 
43
+ @convert_inputs_to_list
42
44
  def huggingface_evaluate(instance, key: str,
43
45
  generation_gt: List[List[str]], generations: List[str],
44
46
  **kwargs) -> List[float]:
@@ -62,14 +64,28 @@ def huggingface_evaluate(instance, key: str,
62
64
  return result
63
65
 
64
66
 
65
- @generation_metric
66
- def bleu(gt: List[str], pred: str, **kwargs) -> float:
67
+ @convert_inputs_to_list
68
+ def bleu(generation_gt: List[List[str]], generations: [str], tokenize: str|None = None, smooth_method: str = 'exp', smooth_value: Optional[float] = None, max_ngram_order: int = 4, trg_lang: str = '', **kwargs) -> List[float]:
67
69
  """
68
- Compute bleu score for generation.
70
+ Computes the BLEU metric given pred and ground-truth.
71
+
72
+ :param tokenize: The tokenizer to use. If None, defaults to language-specific tokenizers with '13a' as the fallback default. check #https://github.com/mjpost/sacrebleu/blob/master/sacrebleu/metrics/bleu.py
73
+ :param smooth_method: The smoothing method to use ('floor', 'add-k', 'exp' or 'none').
74
+ :param smooth_value: The smoothing value for `floor` and `add-k` methods. `None` falls back to default value.
75
+ :param max_ngram_order: If given, it overrides the maximum n-gram order (default: 4) when computing precisions.
76
+ :param trg_lang: An optional language code to raise potential tokenizer warnings.
77
+ :param generation_gt: A list of ground truth.
78
+ Must be 2-d list of string.
79
+ Because it can be a multiple ground truth.
80
+ :param generations: A list of generations that LLM generated.
69
81
  """
70
- return sacrebleu.sentence_bleu(pred, gt, **kwargs).score
82
+ bleu = BLEU(tokenize=tokenize, smooth_method=smooth_method, smooth_value=smooth_value, max_ngram_order=max_ngram_order, trg_lang=trg_lang, **kwargs)
83
+
84
+ result = list(map(lambda x: bleu.sentence_score(x[0], x[1]).score, zip(generations, generation_gt)))
85
+ return result
71
86
 
72
87
 
88
+ @convert_inputs_to_list
73
89
  def meteor(generation_gt: List[List[str]], generations: List[str],
74
90
  alpha: float = 0.9,
75
91
  beta: float = 3.0,
@@ -97,6 +113,7 @@ def meteor(generation_gt: List[List[str]], generations: List[str],
97
113
  return result
98
114
 
99
115
 
116
+ @convert_inputs_to_list
100
117
  def rouge(generation_gt: List[List[str]], generations: List[str],
101
118
  rouge_type: Optional[str] = 'rougeL',
102
119
  use_stemmer: bool = False,
@@ -141,6 +158,7 @@ def rouge(generation_gt: List[List[str]], generations: List[str],
141
158
  return result
142
159
 
143
160
 
161
+ @convert_inputs_to_list
144
162
  def sem_score(generation_gt: List[List[str]], generations: List[str],
145
163
  embedding_model: Optional[BaseEmbedding] = None,
146
164
  batch: int = 128) -> List[float]:
@@ -194,6 +212,7 @@ def sem_score(generation_gt: List[List[str]], generations: List[str],
194
212
  return result
195
213
 
196
214
 
215
+ @convert_inputs_to_list
197
216
  def g_eval(generation_gt: List[List[str]], generations: List[str],
198
217
  metrics: Optional[List[str]] = None,
199
218
  model: str = 'gpt-4-0125-preview',
@@ -283,6 +302,7 @@ async def async_g_eval(generation_gt: List[str], pred: str,
283
302
  return sum(g_eval_scores) / len(g_eval_scores)
284
303
 
285
304
 
305
+ @convert_inputs_to_list
286
306
  def bert_score(generation_gt: List[List[str]], generations: List[str],
287
307
  lang: str = 'en',
288
308
  batch: int = 128,
@@ -1,11 +1,15 @@
1
1
  import functools
2
2
  import itertools
3
- import math
4
3
  from typing import List
5
4
 
5
+ import math
6
+
7
+ from autorag.utils.util import convert_inputs_to_list
8
+
6
9
 
7
10
  def retrieval_metric(func):
8
11
  @functools.wraps(func)
12
+ @convert_inputs_to_list
9
13
  def wrapper(retrieval_gt: List[List[List[str]]], pred_ids: List[List[str]]) -> List[float]:
10
14
  results = []
11
15
  for gt, pred in zip(retrieval_gt, pred_ids):
@@ -9,11 +9,12 @@ from typing import List
9
9
 
10
10
  import numpy as np
11
11
 
12
- from autorag.utils.util import normalize_string
12
+ from autorag.utils.util import normalize_string, convert_inputs_to_list
13
13
 
14
14
 
15
15
  def retrieval_contents_metric(func):
16
16
  @functools.wraps(func)
17
+ @convert_inputs_to_list
17
18
  def wrapper(gt_contents: List[List[str]], pred_contents: List[List[str]]) -> List[float]:
18
19
  results = []
19
20
  for gt, pred in zip(gt_contents, pred_contents):
@@ -1,4 +1,4 @@
1
- from typing import List, Tuple
1
+ from typing import List, Tuple, Iterable
2
2
 
3
3
  import pandas as pd
4
4
  import torch
@@ -58,7 +58,7 @@ def flag_embedding_run_model(input_texts, model, batch_size: int):
58
58
  for batch_texts in tqdm(batch_input_texts):
59
59
  with torch.no_grad():
60
60
  pred_scores = model.compute_score(sentence_pairs=batch_texts)
61
- if batch_size == 1:
61
+ if batch_size == 1 or not isinstance(pred_scores, Iterable):
62
62
  results.append(pred_scores)
63
63
  else:
64
64
  results.extend(pred_scores)
@@ -1,2 +1,3 @@
1
1
  from .fstring import fstring
2
2
  from .long_context_reorder import long_context_reorder
3
+ from .window_replacement import window_replacement
@@ -1,11 +1,12 @@
1
1
  import functools
2
2
  import logging
3
+ import os
3
4
  from pathlib import Path
4
5
  from typing import List, Union
5
6
 
6
7
  import pandas as pd
7
8
 
8
- from autorag.utils import result_to_dataframe
9
+ from autorag.utils import result_to_dataframe, fetch_contents
9
10
 
10
11
  logger = logging.getLogger("AutoRAG")
11
12
 
@@ -31,6 +32,14 @@ def prompt_maker_node(func):
31
32
  assert "retrieve_scores" in previous_result.columns, "previous_result must have retrieve_scores column."
32
33
  retrieve_scores = previous_result["retrieve_scores"].tolist()
33
34
  return func(prompt, query, retrieved_contents, retrieve_scores)
35
+ elif func.__name__ == 'window_replacement':
36
+ retrieved_ids = previous_result["retrieved_ids"].tolist()
37
+ # load corpus
38
+ data_dir = os.path.join(project_dir, "data")
39
+ corpus_data = pd.read_parquet(os.path.join(data_dir, "corpus.parquet"), engine='pyarrow')
40
+ # get metadata from corpus
41
+ retrieved_metadata = fetch_contents(corpus_data, retrieved_ids, column_name='metadata')
42
+ return func(prompt, query, retrieved_contents, retrieved_metadata)
34
43
  else:
35
44
  raise NotImplementedError(f"Module {func.__name__} is not implemented or not supported.")
36
45
 
@@ -0,0 +1,46 @@
1
+ import logging
2
+ from typing import List, Dict
3
+
4
+ from autorag.nodes.promptmaker.base import prompt_maker_node
5
+
6
+ logger = logging.getLogger("AutoRAG")
7
+
8
+
9
+ @prompt_maker_node
10
+ def window_replacement(prompt: str, queries: List[str],
11
+ retrieved_contents: List[List[str]],
12
+ retrieved_metadata: List[List[Dict]]) -> List[str]:
13
+ """
14
+ Replace retrieved_contents with window to create a Prompt
15
+ (only available for corpus chunked with Sentence window method)
16
+ You must type a prompt or prompt list at config yaml file like this:
17
+
18
+ .. Code:: yaml
19
+ nodes:
20
+ - node_type: prompt_maker
21
+ modules:
22
+ - module_type: window_replacement
23
+ prompt: [Answer this question: {query} \n\n {retrieved_contents},
24
+ Read the passages carefully and answer this question: {query} \n\n Passages: {retrieved_contents}]
25
+
26
+ :param prompt: A prompt string.
27
+ :param queries: List of query strings.
28
+ :param retrieved_contents: List of retrieved contents.
29
+ :param retrieved_metadata: List of retrieved metadata.
30
+ :return: Prompts that made by window_replacement.
31
+ """
32
+
33
+ def window_replacement_row(_prompt: str, _query: str, _retrieved_contents, _retrieved_metadata: List[Dict]) -> str:
34
+ window_list = []
35
+ for content, metadata in zip(_retrieved_contents, _retrieved_metadata):
36
+ if 'window' in metadata:
37
+ window_list.append(metadata['window'])
38
+ else:
39
+ window_list.append(content)
40
+ logger.info("Only available for corpus chunked with Sentence window method."
41
+ "window_replacement will not proceed.")
42
+ contents_str = "\n\n".join(window_list)
43
+ return _prompt.format(query=_query, retrieved_contents=contents_str)
44
+
45
+ return list(map(lambda x: window_replacement_row(prompt, x[0], x[1], x[2]),
46
+ zip(queries, retrieved_contents, retrieved_metadata)))
@@ -42,6 +42,9 @@ def query_expansion_node(func):
42
42
  prompt=prompt,
43
43
  generator_func=generator_callable,
44
44
  generator_params=generator_param)
45
+ # delete empty string in the nested expanded queries list
46
+ expanded_queries = [list(map(lambda x: x.strip(), sublist)) for sublist in expanded_queries]
47
+ expanded_queries = [list(filter(lambda x: bool(x), sublist)) for sublist in expanded_queries]
45
48
  return expanded_queries
46
49
 
47
50
  return wrapper
@@ -47,7 +47,7 @@ decompose_prompt = """Decompose a question in self-contained sub-questions. Use
47
47
 
48
48
  Question: {question}
49
49
 
50
- Decompositions:"
50
+ Decompositions:
51
51
  """
52
52
 
53
53
 
@@ -68,7 +68,7 @@ def run_query_expansion_node(modules: List[Callable],
68
68
  # Run evaluation when there are more than one module.
69
69
  if len(modules) > 1:
70
70
  # pop general keys from strategies (e.g. metrics, speed_threshold)
71
- general_key = ['metrics', 'speed_threshold']
71
+ general_key = ['metrics', 'speed_threshold', 'strategy']
72
72
  general_strategy = dict(filter(lambda x: x[0] in general_key, strategies.items()))
73
73
  extra_strategy = dict(filter(lambda x: x[0] not in general_key, strategies.items()))
74
74
 
@@ -93,7 +93,8 @@ def run_query_expansion_node(modules: List[Callable],
93
93
  # run evaluation
94
94
  evaluation_results = list(map(lambda result: evaluate_one_query_expansion_node(
95
95
  retrieval_callables, retrieval_params, result['queries'].tolist(), retrieval_gt,
96
- general_strategy['metrics'], project_dir, previous_result, strategies.get('strategy', 'mean')), results))
96
+ general_strategy['metrics'], project_dir, previous_result, general_strategy.get('strategy', 'mean')),
97
+ results))
97
98
 
98
99
  evaluation_df = pd.DataFrame({
99
100
  'filename': filenames,
@@ -58,6 +58,7 @@ def get_support_modules(module_name: str) -> Callable:
58
58
  # prompt_maker
59
59
  'fstring': ('autorag.nodes.promptmaker', 'fstring'),
60
60
  'long_context_reorder': ('autorag.nodes.promptmaker', 'long_context_reorder'),
61
+ 'window_replacement': ('autorag.nodes.promptmaker', 'window_replacement'),
61
62
  # generator
62
63
  'llama_index_llm': ('autorag.nodes.generator', 'llama_index_llm'),
63
64
  'vllm': ('autorag.nodes.generator', 'vllm'),
@@ -8,13 +8,16 @@ import logging
8
8
  import os
9
9
  import re
10
10
  import string
11
- import unicodedata
12
11
  from copy import deepcopy
13
- from typing import List, Callable, Dict, Optional, Any, Collection
12
+ from typing import List, Callable, Dict, Optional, Any, Collection, Iterable
14
13
 
14
+ import numpy as np
15
15
  import pandas as pd
16
16
  import tiktoken
17
+ import unicodedata
17
18
  from llama_index.embeddings.openai import OpenAIEmbedding
19
+ from pydantic import BaseModel as BM
20
+ from pydantic.v1 import BaseModel
18
21
 
19
22
  logger = logging.getLogger("AutoRAG")
20
23
 
@@ -454,3 +457,30 @@ def embedding_query_content(queries: List[str], contents_list: List[List[str]],
454
457
  content_embeddings_flatten = embedding_model.get_text_embedding_batch(flatten_contents)
455
458
  content_embeddings = reconstruct_list(content_embeddings_flatten, content_lengths)
456
459
  return query_embeddings, content_embeddings
460
+
461
+
462
+ def to_list(item):
463
+ """Recursively convert collections to Python lists."""
464
+ if isinstance(item, np.ndarray):
465
+ # Convert numpy array to list and recursively process each element
466
+ return [to_list(sub_item) for sub_item in item.tolist()]
467
+ elif isinstance(item, pd.Series):
468
+ # Convert pandas Series to list and recursively process each element
469
+ return [to_list(sub_item) for sub_item in item.tolist()]
470
+ elif isinstance(item, Iterable) and not isinstance(item, (str, bytes, BaseModel, BM)):
471
+ # Recursively process each element in other iterables
472
+ return [to_list(sub_item) for sub_item in item]
473
+ else:
474
+ return item
475
+
476
+
477
+ def convert_inputs_to_list(func):
478
+ """Decorator to convert all function inputs to Python lists."""
479
+
480
+ @functools.wraps(func)
481
+ def wrapper(*args, **kwargs):
482
+ new_args = [to_list(arg) for arg in args]
483
+ new_kwargs = {k: to_list(v) for k, v in kwargs.items()}
484
+ return func(*new_args, **new_kwargs)
485
+
486
+ return wrapper
@@ -36,6 +36,14 @@ autorag.nodes.promptmaker.run module
36
36
  :undoc-members:
37
37
  :show-inheritance:
38
38
 
39
+ autorag.nodes.promptmaker.window\_replacement module
40
+ ----------------------------------------------------
41
+
42
+ .. automodule:: autorag.nodes.promptmaker.window_replacement
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
39
47
  Module contents
40
48
  ---------------
41
49
 
@@ -80,7 +80,7 @@ from autorag.data.qacreation import generate_qa_llama_index, make_single_content
80
80
  corpus_df = pd.read_parquet('path/to/corpus.parquet')
81
81
  llm = OpenAI(model='gpt-3.5-turbo', temperature=1.0)
82
82
  qa_df = make_single_content_qa(corpus_df, 50, generate_qa_llama_index, llm=llm, question_num_per_content=1,
83
- output_filepath='path/to/qa.parquet')
83
+ output_filepath='path/to/qa.parquet', cache_batch=64)
84
84
  ```
85
85
 
86
86
  `generate_qa_llama_index` is a function designed to generate **questions** and its **generation_gt** per content.
@@ -94,6 +94,15 @@ Which means it uses only one passage per question for answering the question.
94
94
  Passage is chunked units from raw data.
95
95
  ```
96
96
 
97
+ ```{admonition} Auto-save feature
98
+ From AutoRAG v0.2.9, the auto-save feature added!
99
+ Now, you don't have to afraid that something wrong while the data generation.
100
+ The data will save automatically to the input `output_filepath`.
101
+
102
+ You can set how often you want to save the result to the file.
103
+ Just adjust `cache_batch` parameter. Default is 32.
104
+ ```
105
+
97
106
  ## Use custom prompt
98
107
 
99
108
  You can use custom prompt to generate qa data.
@@ -25,10 +25,14 @@ myst:
25
25
 
26
26
  Most of the modules that using LLM model can take `llm` parameter to specify the LLM model.
27
27
 
28
+ - [llama_index_llm](nodes/generator/llama_index_llm.md)
29
+
30
+ The following modules can use generator module, which including `llama_index_llm`.
31
+
28
32
  - [hyde](nodes/query_expansion/hyde.md)
29
33
  - [query_decompose](nodes/query_expansion/query_decompose.md)
34
+ - [multi_query_expansion](nodes/query_expansion/multi_query_expansion.md)
30
35
  - [tree_summarize](nodes/passage_compressor/tree_summarize.md)
31
- - [llama_index_llm](nodes/generator/llama_index_llm.md)
32
36
 
33
37
  ### Supporting LLM models
34
38
 
@@ -114,7 +118,8 @@ To change the embedding model, you can change the `embedding_model` parameter to
114
118
  | [cointegrated/rubert-tiny2](https://huggingface.co/cointegrated/rubert-tiny2) | huggingface_cointegrated_rubert_tiny2 |
115
119
  | [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) | huggingface_all_mpnet_base_v2 |
116
120
 
117
- For example, if you want to use OpenAI curie embedding model, you can set `embedding_model` parameter to `openai_curie`.
121
+ For example, if you want to use OpenAI text embedding large model, you can set `embedding_model` parameter
122
+ to `openai_embed_3_large`.
118
123
 
119
124
  ```yaml
120
125
  nodes:
@@ -126,11 +131,6 @@ nodes:
126
131
  embedding_model: openai
127
132
  ```
128
133
 
129
- ```{attention}
130
- You can't pass embedding model parameters at the config yaml file like LLM models.
131
- Because the embedding model is initialized at the beginning of the AutoRAG program.
132
- ```
133
-
134
134
  ### Add your embedding models
135
135
 
136
136
  You can add more embedding models for AutoRAG.
@@ -141,13 +141,19 @@ execute the following code.
141
141
 
142
142
  ```python
143
143
  import autorag
144
+ from autorag import LazyInit
144
145
  from llama_index.embeddings.huggingface import HuggingFaceEmbedding
145
146
 
146
- autorag.generator_models['kosimcse'] = HuggingFaceEmbedding("BM-K/KoSimCSE-roberta-multitask")
147
+ autorag.embedding_models['kosimcse'] = LazyInit(HuggingFaceEmbedding, model_name="BM-K/KoSimCSE-roberta-multitask")
147
148
  ```
148
149
 
149
150
  Then you can use `kosimcse` at config yaml file.
150
151
 
151
152
  ```{caution}
152
- When you add new LLM model, you should add instance of the `BaseEmbedding` class from LlamaIndex.
153
+ When you add new embedding model, you should use `LazyInit` class from autorag. The additional parameters have to be keyword parameter in the `LazyInit` initialization.
153
154
  ```
155
+
156
+ ## Use vllm
157
+
158
+ You can use vllm to use local LLM. For more information, please check out [vllm](nodes/generator/vllm.md) generator
159
+ module docs.
@@ -12,7 +12,11 @@ More details can be found [here](https://huggingface.co/Dongjin-kr/ko-reranker).
12
12
 
13
13
 
14
14
  ## **Module Parameters**
15
- - **Not Applicable (N/A):** There are no direct module parameters specified for the `ko-reranker` module.
15
+
16
+ (Optional) `batch`
17
+
18
+ - Specify batch size of the query to the Ko-reranker model.
19
+ - default is 64.
16
20
 
17
21
  ## **Example config.yaml**
18
22
  ```yaml
@@ -17,6 +17,10 @@ given query.
17
17
  allowing for flexible integration of different monoT5 variants.
18
18
  - default is `castorini/monot5-3b-msmarco-10k`
19
19
 
20
+ - (Optional) `batch`
21
+ - Specify batch size of the query to the TART model.
22
+ - default is 64.
23
+
20
24
  ## **Example config.yaml**
21
25
 
22
26
  ```yaml
@@ -14,6 +14,11 @@ The `TART` module is a reranker based on [TART](https://arxiv.org/pdf/2211.09260
14
14
  - Specifies instructions for the reranking process.
15
15
  - default is `Find passage to answer given question`
16
16
 
17
+ (Optional) `batch`
18
+
19
+ - Specify batch size of the query to the TART model.
20
+ - default is 64.
21
+
17
22
  ## **Example config.yaml**
18
23
  ```yaml
19
24
  modules:
@@ -68,4 +68,5 @@ maxdepth: 1
68
68
  ---
69
69
  fstring.md
70
70
  long_context_reorder.md
71
+ window_replacement.md
71
72
  ```