AutoRAG 0.2.8__tar.gz → 0.2.10__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.
- {autorag-0.2.8 → autorag-0.2.10}/AutoRAG.egg-info/PKG-INFO +1 -1
- {autorag-0.2.8 → autorag-0.2.10}/AutoRAG.egg-info/SOURCES.txt +4 -7
- {autorag-0.2.8 → autorag-0.2.10}/PKG-INFO +1 -1
- autorag-0.2.10/autorag/VERSION +1 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/qacreation/base.py +26 -14
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/generation.py +18 -5
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/promptmaker/__init__.py +1 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/promptmaker/base.py +10 -1
- autorag-0.2.10/autorag/nodes/promptmaker/window_replacement.py +46 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/retrieval/__init__.py +0 -2
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/retrieval/base.py +3 -4
- autorag-0.2.10/autorag/nodes/retrieval/hybrid_cc.py +137 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/retrieval/hybrid_rrf.py +14 -5
- autorag-0.2.10/autorag/nodes/retrieval/run.py +285 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/support.py +1 -2
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.promptmaker.rst +8 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.retrieval.rst +0 -16
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/data_creation/tutorial.md +10 -1
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/evaluate_metrics/generation.md +16 -5
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/local_model.md +15 -9
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/koreranker.md +5 -1
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/monot5.md +4 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/tart.md +5 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/prompt_maker/prompt_maker.md +1 -0
- autorag-0.2.10/docs/source/nodes/prompt_maker/window_replacement.md +33 -0
- autorag-0.2.10/docs/source/nodes/retrieval/hybrid_cc.md +59 -0
- autorag-0.2.10/docs/source/nodes/retrieval/hybrid_rrf.md +34 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/retrieval/retrieval.md +5 -10
- {autorag-0.2.8 → autorag-0.2.10}/sample_config/compact_local.yaml +1 -7
- autorag-0.2.10/sample_config/compact_openai.yaml +59 -0
- {autorag-0.2.8 → autorag-0.2.10}/sample_config/config_korean.yaml +14 -16
- {autorag-0.2.8 → autorag-0.2.10}/sample_config/full.yaml +7 -19
- {autorag-0.2.8 → autorag-0.2.10}/sample_config/simple_local.yaml +2 -2
- autorag-0.2.10/sample_config/simple_ollama.yaml +32 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/data/qacreation/test_base_qacreation.py +26 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/evaluate/metric/test_generation_metric.py +0 -1
- autorag-0.2.10/tests/autorag/nodes/promptmaker/test_prompt_maker_base.py +28 -0
- autorag-0.2.10/tests/autorag/nodes/promptmaker/test_window_replacement.py +40 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/retrieval/test_hybrid_base.py +18 -1
- autorag-0.2.10/tests/autorag/nodes/retrieval/test_hybrid_cc.py +54 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/retrieval/test_hybrid_rrf.py +3 -3
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/retrieval/test_run_retrieval_node.py +17 -38
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/test_evaluator.py +9 -13
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/full.yaml +4 -7
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/3/config.yaml +1 -2
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/simple.yaml +1 -2
- autorag-0.2.8/autorag/VERSION +0 -1
- autorag-0.2.8/autorag/nodes/retrieval/hybrid_cc.py +0 -63
- autorag-0.2.8/autorag/nodes/retrieval/hybrid_dbsf.py +0 -70
- autorag-0.2.8/autorag/nodes/retrieval/hybrid_rsf.py +0 -96
- autorag-0.2.8/autorag/nodes/retrieval/run.py +0 -217
- autorag-0.2.8/docs/source/nodes/retrieval/hybrid_cc.md +0 -44
- autorag-0.2.8/docs/source/nodes/retrieval/hybrid_dbsf.md +0 -131
- autorag-0.2.8/docs/source/nodes/retrieval/hybrid_rrf.md +0 -40
- autorag-0.2.8/docs/source/nodes/retrieval/hybrid_rsf.md +0 -134
- autorag-0.2.8/docs/source/optimization/sample_full_config.yaml +0 -78
- autorag-0.2.8/sample_config/compact_openai.yaml +0 -65
- autorag-0.2.8/tests/autorag/nodes/promptmaker/test_prompt_maker_base.py +0 -13
- autorag-0.2.8/tests/autorag/nodes/retrieval/test_hybrid_cc.py +0 -33
- autorag-0.2.8/tests/autorag/nodes/retrieval/test_hybrid_dbsf.py +0 -20
- autorag-0.2.8/tests/autorag/nodes/retrieval/test_hybrid_rsf.py +0 -20
- {autorag-0.2.8 → autorag-0.2.10}/.github/FUNDING.yml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/.github/dependabot.yml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/.github/workflows/publish.yml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/.github/workflows/sphinx.yml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/.github/workflows/test.yml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/.gitignore +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/AutoRAG.egg-info/dependency_links.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/AutoRAG.egg-info/entry_points.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/AutoRAG.egg-info/requires.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/AutoRAG.egg-info/top_level.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/CODE_OF_CONDUCT.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/CONTRIBUTING.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/LICENSE +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/README.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/cli.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/dashboard.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/corpus/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/corpus/langchain.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/corpus/llama_index.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/qacreation/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/qacreation/llama_index.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/qacreation/llama_index_default_prompt.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/qacreation/ragas.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/qacreation/simple.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/utils/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/data/utils/util.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/deploy.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/generation.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/g_eval_prompts/coh_detailed.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/g_eval_prompts/con_detailed.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/g_eval_prompts/flu_detailed.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/g_eval_prompts/rel_detailed.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/retrieval.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/retrieval_contents.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/metric/util.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/retrieval.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/retrieval_contents.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluation/util.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/evaluator.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/node_line.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/generator/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/generator/base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/generator/llama_index_llm.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/generator/openai_llm.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/generator/run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/generator/vllm.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passageaugmenter/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passageaugmenter/base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passageaugmenter/pass_passage_augmenter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passageaugmenter/prev_next_augmenter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passageaugmenter/run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagecompressor/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagecompressor/base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagecompressor/longllmlingua.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagecompressor/pass_compressor.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagecompressor/refine.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagecompressor/run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagecompressor/tree_summarize.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/pass_passage_filter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/percentile_cutoff.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/recency.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/similarity_percentile_cutoff.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/similarity_threshold_cutoff.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagefilter/threshold_cutoff.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/cohere.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/colbert.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/flag_embedding.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/flag_embedding_llm.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/jina.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/koreranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/monot5.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/pass_reranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/rankgpt.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/sentence_transformer.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/tart/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/tart/modeling_enc_t5.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/tart/tart.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/tart/tokenization_enc_t5.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/time_reranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/passagereranker/upr.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/promptmaker/fstring.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/promptmaker/long_context_reorder.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/promptmaker/run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/queryexpansion/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/queryexpansion/base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/queryexpansion/hyde.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/queryexpansion/multi_query_expansion.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/queryexpansion/pass_query_expansion.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/queryexpansion/query_decompose.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/queryexpansion/run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/retrieval/bm25.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/nodes/retrieval/vectordb.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/schema/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/schema/module.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/schema/node.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/strategy.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/utils/__init__.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/utils/preprocess.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/utils/util.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/autorag/web.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/Makefile +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/make.bat +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/requirements.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/CNAME +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/data_creation.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/data_folder.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/dcg.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/f1_score.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/map.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/mrr.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/ndcg.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/ndcg_formula.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/node_folder.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/node_line_folder.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/node_line_summary.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/node_lines.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/node_summary.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/normal_distribution.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/project_folder_example.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/project_folders.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/resources_folder.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/roadmap/RAG_paradigms.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/roadmap/advanced_RAG.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/roadmap/cycle.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/roadmap/merger.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/roadmap/node_line_modular.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/roadmap/policy.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/samsung_sundae.jpeg +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/score_fusion.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/trial_folder.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/trial_json.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/trial_summary.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/_static/web_interface.png +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.data.corpus.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.data.qacreation.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.data.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.data.utils.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.evaluation.metric.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.evaluation.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.generator.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.passageaugmenter.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.passagecompressor.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.passagefilter.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.passagereranker.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.passagereranker.tart.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.queryexpansion.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.nodes.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.schema.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/autorag.utils.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/api_spec/modules.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/conf.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/data_creation/data_format.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/data_creation/ragas.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/deploy/api_endpoint.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/deploy/web.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/evaluate_metrics/retrieval.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/evaluate_metrics/retrieval_contents.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/index.rst +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/install.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/generator/generator.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/generator/llama_index_llm.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/generator/openai_llm.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/generator/vllm.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/index.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_augmenter/passage_augmenter.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_augmenter/prev_next_augmenter.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_compressor/longllmlingua.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_compressor/passage_compressor.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_compressor/refine.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_compressor/tree_summarize.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_filter/passage_filter.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_filter/percentile_cutoff.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_filter/recency_filter.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_filter/similarity_percentile_cutoff.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_filter/similarity_threshold_cutoff.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_filter/threshold_cutoff.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/cohere.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/colbert.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/flag_embedding_llm_reranker.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/flag_embedding_reranker.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/jina_reranker.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/passage_reranker.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/rankgpt.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/sentence_transformer_reranker.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/time_reranker.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/passage_reranker/upr.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/prompt_maker/fstring.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/prompt_maker/long_context_reorder.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/query_expansion/hyde.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/query_expansion/multi_query_expansion.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/query_expansion/query_decompose.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/query_expansion/query_expansion.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/retrieval/bm25.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/nodes/retrieval/vectordb.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/optimization/custom_config.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/optimization/folder_structure.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/optimization/optimization.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/optimization/strategies.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/roadmap/modular_rag.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/structure.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/troubleshooting.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/docs/source/tutorial.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/pyproject.toml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/requirements.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/sample_config/extracted_sample.yaml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/sample_config/simple_openai.yaml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/sample_dataset/README.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/sample_dataset/eli5/load_eli5_dataset.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/sample_dataset/hotpotqa/load_hotpotqa_dataset.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/sample_dataset/msmarco/load_msmarco_dataset.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/sample_dataset/triviaqa/load_triviaqa_dataset.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/setup.cfg +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/data/corpus/test_base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/data/corpus/test_langchain.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/data/corpus/test_llama_index_corpus.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/data/qacreation/test_llama_index_qacreation.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/data/qacreation/test_ragas_qa_creation.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/data/qacreation/test_simple.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/evaluate/metric/test_retrieval_contents_metric.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/evaluate/metric/test_retrieval_metric.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/evaluate/test_evaluate_util.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/evaluate/test_generation_evaluate.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/evaluate/test_retrieval_contents_evaluate.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/evaluate/test_retrieval_evaluate.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/generator/test_generator_base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/generator/test_llama_index_llm.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/generator/test_openai.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/generator/test_run_generator_node.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/generator/test_vllm.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passageaugmenter/test_base_passage_augmenter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passageaugmenter/test_pass_passage_augmenter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passageaugmenter/test_prev_next_augmenter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passageaugmenter/test_run_passage_augmenter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagecompressor/test_base_passage_compressor.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagecompressor/test_longllmlingua.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagecompressor/test_pass_compressor.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagecompressor/test_refine.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagecompressor/test_run_passage_compressor_node.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagecompressor/test_tree_summarize.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagefilter/test_pass_passage_filter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagefilter/test_passage_filter_base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagefilter/test_passage_filter_run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagefilter/test_percentile_cutoff.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagefilter/test_recency_filter.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagefilter/test_similarity_percentile_cutoff.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagefilter/test_similarity_threshold_cutoff.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagefilter/test_threshold_cutoff.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_cohere_reranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_colbert_reranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_flag_embedding.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_flag_embedding_llm.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_jina_reranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_koreranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_monot5.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_pass_reranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_passage_reranker_base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_passage_reranker_run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_rankgpt.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_sentence_transformer.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_tart.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_time_reranker.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/passagereranker/test_upr.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/promptmaker/test_fstring.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/promptmaker/test_long_context_reorder.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/promptmaker/test_prompt_maker_run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/queryexpansion/test_hyde.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/queryexpansion/test_multi_query_expansion.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/queryexpansion/test_pass_query_expansion.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/queryexpansion/test_query_decompose.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/queryexpansion/test_query_expansion_base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/queryexpansion/test_query_expansion_run.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/retrieval/test_bm25.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/retrieval/test_retrieval_base.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/nodes/retrieval/test_vectordb.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/schema/test_module_schema.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/schema/test_node_schema.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/test_cli.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/test_dashboard.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/test_deploy.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/test_strategy.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/test_support.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/test_web.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/utils/test_preprocess.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/autorag/utils/test_util.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/conftest.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/delete_tests.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/mock.py +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/requirements.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/README.md +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/corpus_data_sample.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/data_creation/raw_dir/sample1.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/data_creation/raw_dir/sample2.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/data_creation/raw_dir/sample3.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/qa_data_sample.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/qa_gen_prompts/prompt1.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/qa_gen_prompts/prompt2.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/qa_gen_prompts/prompt3.txt +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/qa_test_data_sample.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/config.yaml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/generator/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/generator/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/generator/2.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/generator/3.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/generator/4.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/generator/5.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/generator/best_5.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/generator/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/prompt_maker/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/post_retrieve_node_line/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/pre_retrieve_node_line/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/passage_compressor/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/passage_reranker/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/retrieval/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/retrieval/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/retrieval/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/retrieval/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/retrieve_node_line/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/0/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/config.yaml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/pre_retrieve_node_line/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/passage_filter/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/passage_reranker/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/retrieval/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/retrieval/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/retrieval/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/1/retrieve_node_line/retrieval/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/config.yaml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/post_retrieve_node_line/prompt_maker/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/2.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/pre_retrieve_node_line/query_expansion/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/pre_retrieve_node_line/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/passage_compressor/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/passage_reranker/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/retrieval/0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/retrieval/1.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/retrieval/best_0.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/retrieval/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/2/retrieve_node_line/summary.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/best.yaml +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/data/corpus.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/data/qa.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/resources/bm25_porter_stemmer.pkl +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/data_level0.bin +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/header.bin +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/length.bin +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/resources/chroma/6595d304-5270-4d9f-a267-c191366804ce/link_lists.bin +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/resources/chroma/chroma.sqlite3 +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/result_project/trial.json +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/sample_contents_nqa.csv +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/sample_project/data/corpus.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/sample_project/data/qa.parquet +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/sample_project/resources/bm25_gpt2.pkl +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/sample_project/resources/bm25_porter_stemmer.pkl +0 -0
- {autorag-0.2.8 → autorag-0.2.10}/tests/resources/test_bm25_retrieval.pkl +0 -0
|
@@ -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
|
|
@@ -115,9 +116,7 @@ autorag/nodes/retrieval/__init__.py
|
|
|
115
116
|
autorag/nodes/retrieval/base.py
|
|
116
117
|
autorag/nodes/retrieval/bm25.py
|
|
117
118
|
autorag/nodes/retrieval/hybrid_cc.py
|
|
118
|
-
autorag/nodes/retrieval/hybrid_dbsf.py
|
|
119
119
|
autorag/nodes/retrieval/hybrid_rrf.py
|
|
120
|
-
autorag/nodes/retrieval/hybrid_rsf.py
|
|
121
120
|
autorag/nodes/retrieval/run.py
|
|
122
121
|
autorag/nodes/retrieval/vectordb.py
|
|
123
122
|
autorag/schema/__init__.py
|
|
@@ -227,21 +226,19 @@ docs/source/nodes/passage_reranker/upr.md
|
|
|
227
226
|
docs/source/nodes/prompt_maker/fstring.md
|
|
228
227
|
docs/source/nodes/prompt_maker/long_context_reorder.md
|
|
229
228
|
docs/source/nodes/prompt_maker/prompt_maker.md
|
|
229
|
+
docs/source/nodes/prompt_maker/window_replacement.md
|
|
230
230
|
docs/source/nodes/query_expansion/hyde.md
|
|
231
231
|
docs/source/nodes/query_expansion/multi_query_expansion.md
|
|
232
232
|
docs/source/nodes/query_expansion/query_decompose.md
|
|
233
233
|
docs/source/nodes/query_expansion/query_expansion.md
|
|
234
234
|
docs/source/nodes/retrieval/bm25.md
|
|
235
235
|
docs/source/nodes/retrieval/hybrid_cc.md
|
|
236
|
-
docs/source/nodes/retrieval/hybrid_dbsf.md
|
|
237
236
|
docs/source/nodes/retrieval/hybrid_rrf.md
|
|
238
|
-
docs/source/nodes/retrieval/hybrid_rsf.md
|
|
239
237
|
docs/source/nodes/retrieval/retrieval.md
|
|
240
238
|
docs/source/nodes/retrieval/vectordb.md
|
|
241
239
|
docs/source/optimization/custom_config.md
|
|
242
240
|
docs/source/optimization/folder_structure.md
|
|
243
241
|
docs/source/optimization/optimization.md
|
|
244
|
-
docs/source/optimization/sample_full_config.yaml
|
|
245
242
|
docs/source/optimization/strategies.md
|
|
246
243
|
docs/source/roadmap/modular_rag.md
|
|
247
244
|
sample_config/compact_local.yaml
|
|
@@ -250,6 +247,7 @@ sample_config/config_korean.yaml
|
|
|
250
247
|
sample_config/extracted_sample.yaml
|
|
251
248
|
sample_config/full.yaml
|
|
252
249
|
sample_config/simple_local.yaml
|
|
250
|
+
sample_config/simple_ollama.yaml
|
|
253
251
|
sample_config/simple_openai.yaml
|
|
254
252
|
sample_dataset/README.md
|
|
255
253
|
sample_dataset/eli5/load_eli5_dataset.py
|
|
@@ -323,6 +321,7 @@ tests/autorag/nodes/promptmaker/test_fstring.py
|
|
|
323
321
|
tests/autorag/nodes/promptmaker/test_long_context_reorder.py
|
|
324
322
|
tests/autorag/nodes/promptmaker/test_prompt_maker_base.py
|
|
325
323
|
tests/autorag/nodes/promptmaker/test_prompt_maker_run.py
|
|
324
|
+
tests/autorag/nodes/promptmaker/test_window_replacement.py
|
|
326
325
|
tests/autorag/nodes/queryexpansion/test_hyde.py
|
|
327
326
|
tests/autorag/nodes/queryexpansion/test_multi_query_expansion.py
|
|
328
327
|
tests/autorag/nodes/queryexpansion/test_pass_query_expansion.py
|
|
@@ -332,9 +331,7 @@ tests/autorag/nodes/queryexpansion/test_query_expansion_run.py
|
|
|
332
331
|
tests/autorag/nodes/retrieval/test_bm25.py
|
|
333
332
|
tests/autorag/nodes/retrieval/test_hybrid_base.py
|
|
334
333
|
tests/autorag/nodes/retrieval/test_hybrid_cc.py
|
|
335
|
-
tests/autorag/nodes/retrieval/test_hybrid_dbsf.py
|
|
336
334
|
tests/autorag/nodes/retrieval/test_hybrid_rrf.py
|
|
337
|
-
tests/autorag/nodes/retrieval/test_hybrid_rsf.py
|
|
338
335
|
tests/autorag/nodes/retrieval/test_retrieval_base.py
|
|
339
336
|
tests/autorag/nodes/retrieval/test_run_retrieval_node.py
|
|
340
337
|
tests/autorag/nodes/retrieval/test_vectordb.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.10
|
|
@@ -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
|
|
59
|
-
|
|
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
|
-
|
|
62
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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
|
|
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
|
|
@@ -64,12 +64,25 @@ def huggingface_evaluate(instance, key: str,
|
|
|
64
64
|
return result
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
@
|
|
68
|
-
def bleu(
|
|
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]:
|
|
69
69
|
"""
|
|
70
|
-
|
|
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.
|
|
71
81
|
"""
|
|
72
|
-
|
|
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
|
|
73
86
|
|
|
74
87
|
|
|
75
88
|
@convert_inputs_to_list
|
|
@@ -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)))
|
|
@@ -32,7 +32,6 @@ def retrieval_node(func):
|
|
|
32
32
|
project_dir: Union[str, Path],
|
|
33
33
|
previous_result: pd.DataFrame,
|
|
34
34
|
**kwargs) -> Tuple[List[List[str]], List[List[str]], List[List[float]]]:
|
|
35
|
-
logger.info(f"Running retrieval node - {func.__name__} module...")
|
|
36
35
|
validate_qa_dataset(previous_result)
|
|
37
36
|
resources_dir = os.path.join(project_dir, "resources")
|
|
38
37
|
data_dir = os.path.join(project_dir, "data")
|
|
@@ -75,10 +74,10 @@ def retrieval_node(func):
|
|
|
75
74
|
del embedding_model
|
|
76
75
|
if torch.cuda.is_available():
|
|
77
76
|
torch.cuda.empty_cache()
|
|
78
|
-
elif func.__name__ in ["hybrid_rrf", "hybrid_cc"
|
|
79
|
-
if 'ids' in kwargs and 'scores' in kwargs:
|
|
77
|
+
elif func.__name__ in ["hybrid_rrf", "hybrid_cc"]:
|
|
78
|
+
if 'ids' in kwargs and 'scores' in kwargs: # ordinary run_evaluate
|
|
80
79
|
ids, scores = func(**kwargs)
|
|
81
|
-
else:
|
|
80
|
+
else: # => for Runner.run
|
|
82
81
|
if not ('target_modules' in kwargs and 'target_module_params' in kwargs):
|
|
83
82
|
raise ValueError(
|
|
84
83
|
f"If there are no ids and scores specified, target_modules and target_module_params must be specified for using {func.__name__}.")
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
from typing import Tuple, List
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
import pandas as pd
|
|
5
|
+
|
|
6
|
+
from autorag.nodes.retrieval import retrieval_node
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def normalize_mm(scores: List[str], fixed_min_value: float = 0):
|
|
10
|
+
arr = np.array(scores)
|
|
11
|
+
max_value = np.max(arr)
|
|
12
|
+
min_value = np.min(arr)
|
|
13
|
+
norm_score = (arr - min_value) / (max_value - min_value)
|
|
14
|
+
return norm_score
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def normalize_tmm(scores: List[str], fixed_min_value: float):
|
|
18
|
+
arr = np.array(scores)
|
|
19
|
+
max_value = np.max(arr)
|
|
20
|
+
norm_score = (arr - fixed_min_value) / (max_value - fixed_min_value)
|
|
21
|
+
return norm_score
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def normalize_z(scores: List[str], fixed_min_value: float = 0):
|
|
25
|
+
arr = np.array(scores)
|
|
26
|
+
mean_value = np.mean(arr)
|
|
27
|
+
std_value = np.std(arr)
|
|
28
|
+
norm_score = (arr - mean_value) / std_value
|
|
29
|
+
return norm_score
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def normalize_dbsf(scores: List[str], fixed_min_value: float = 0):
|
|
33
|
+
arr = np.array(scores)
|
|
34
|
+
mean_value = np.mean(arr)
|
|
35
|
+
std_value = np.std(arr)
|
|
36
|
+
min_value = mean_value - 3 * std_value
|
|
37
|
+
max_value = mean_value + 3 * std_value
|
|
38
|
+
norm_score = (arr - min_value) / (max_value - min_value)
|
|
39
|
+
return norm_score
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
normalize_method_dict = {
|
|
43
|
+
'mm': normalize_mm,
|
|
44
|
+
'tmm': normalize_tmm,
|
|
45
|
+
'z': normalize_z,
|
|
46
|
+
'dbsf': normalize_dbsf,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@retrieval_node
|
|
51
|
+
def hybrid_cc(
|
|
52
|
+
ids: Tuple,
|
|
53
|
+
scores: Tuple,
|
|
54
|
+
top_k: int,
|
|
55
|
+
weight: float,
|
|
56
|
+
normalize_method: str = 'mm',
|
|
57
|
+
semantic_theoretical_min_value: float = -1.0,
|
|
58
|
+
lexical_theoretical_min_value: float = 0.0,
|
|
59
|
+
) -> Tuple[List[List[str]], List[List[float]]]:
|
|
60
|
+
"""
|
|
61
|
+
Hybrid CC function.
|
|
62
|
+
CC (convex combination) is a method to fuse lexical and semantic retrieval results.
|
|
63
|
+
It is a method that first normalizes the scores of each retrieval result,
|
|
64
|
+
and then combines them with the given weights.
|
|
65
|
+
It is uniquer than other retrieval modules, because it does not really execute retrieval,
|
|
66
|
+
but just fuse the results of other retrieval functions.
|
|
67
|
+
So you have to run more than two retrieval modules before running this function.
|
|
68
|
+
And collect ids and scores result from each retrieval module.
|
|
69
|
+
Make it as tuple and input it to this function.
|
|
70
|
+
|
|
71
|
+
:param ids: The tuple of ids that you want to fuse.
|
|
72
|
+
The length of this must be the same as the length of scores.
|
|
73
|
+
The semantic retrieval ids must be the first index.
|
|
74
|
+
:param scores: The retrieve scores that you want to fuse.
|
|
75
|
+
The length of this must be the same as the length of ids.
|
|
76
|
+
The semantic retrieval scores must be the first index.
|
|
77
|
+
:param top_k: The number of passages to be retrieved.
|
|
78
|
+
:param normalize_method: The normalization method to use.
|
|
79
|
+
There are some normalization method that you can use at the hybrid cc method.
|
|
80
|
+
AutoRAG support following.
|
|
81
|
+
- `mm`: Min-max scaling
|
|
82
|
+
- `tmm`: Theoretical min-max scaling
|
|
83
|
+
- `z`: z-score normalization
|
|
84
|
+
- `dbsf`: 3-sigma normalization
|
|
85
|
+
:param weight: The weight value. If the weight is 1.0, it means the
|
|
86
|
+
weight to the semantic module will be 1.0 and weight to the lexical module will be 0.0.
|
|
87
|
+
:param semantic_theoretical_min_value: This value used by `tmm` normalization method. You can set the
|
|
88
|
+
theoretical minimum value by yourself. Default is -1.
|
|
89
|
+
:param lexical_theoretical_min_value: This value used by `tmm` normalization method. You can set the
|
|
90
|
+
theoretical minimum value by yourself. Default is 0.
|
|
91
|
+
:return: The tuple of ids and fused scores that fused by CC. Plus, the third element is selected weight value.
|
|
92
|
+
"""
|
|
93
|
+
assert len(ids) == len(scores), "The length of ids and scores must be the same."
|
|
94
|
+
assert len(ids) > 1, "You must input more than one retrieval results."
|
|
95
|
+
assert top_k > 0, "top_k must be greater than 0."
|
|
96
|
+
assert weight >= 0, "The weight must be greater than 0."
|
|
97
|
+
assert weight <= 1, "The weight must be less than 1."
|
|
98
|
+
|
|
99
|
+
df = pd.DataFrame({
|
|
100
|
+
'semantic_ids': ids[0],
|
|
101
|
+
'lexical_ids': ids[1],
|
|
102
|
+
'semantic_score': scores[0],
|
|
103
|
+
'lexical_score': scores[1],
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
def cc_pure_apply(row):
|
|
107
|
+
return fuse_per_query(row['semantic_ids'], row['lexical_ids'],
|
|
108
|
+
row['semantic_score'], row['lexical_score'],
|
|
109
|
+
normalize_method=normalize_method,
|
|
110
|
+
weight=weight, top_k=top_k,
|
|
111
|
+
semantic_theoretical_min_value=semantic_theoretical_min_value,
|
|
112
|
+
lexical_theoretical_min_value=lexical_theoretical_min_value)
|
|
113
|
+
|
|
114
|
+
# fixed weight
|
|
115
|
+
df[['cc_id', 'cc_score']] = df.apply(lambda row: cc_pure_apply(row), axis=1,
|
|
116
|
+
result_type='expand')
|
|
117
|
+
return df['cc_id'].tolist(), df['cc_score'].tolist()
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def fuse_per_query(semantic_ids: List[str], lexical_ids: List[str],
|
|
121
|
+
semantic_scores: List[float], lexical_scores: List[float],
|
|
122
|
+
normalize_method: str,
|
|
123
|
+
weight: float,
|
|
124
|
+
top_k: int,
|
|
125
|
+
semantic_theoretical_min_value: float,
|
|
126
|
+
lexical_theoretical_min_value: float):
|
|
127
|
+
normalize_func = normalize_method_dict[normalize_method]
|
|
128
|
+
norm_semantic_scores = normalize_func(semantic_scores, semantic_theoretical_min_value)
|
|
129
|
+
norm_lexical_scores = normalize_func(lexical_scores, lexical_theoretical_min_value)
|
|
130
|
+
ids = [semantic_ids, lexical_ids]
|
|
131
|
+
scores = [norm_semantic_scores, norm_lexical_scores]
|
|
132
|
+
df = pd.concat([pd.Series(dict(zip(_id, score))) for _id, score in zip(ids, scores)], axis=1)
|
|
133
|
+
df.columns = ['semantic', 'lexical']
|
|
134
|
+
df = df.fillna(0)
|
|
135
|
+
df['weighted_sum'] = df.mul((weight, 1.0 - weight)).sum(axis=1)
|
|
136
|
+
df = df.sort_values(by='weighted_sum', ascending=False)
|
|
137
|
+
return df.index.tolist()[:top_k], df['weighted_sum'][:top_k].tolist()
|
|
@@ -10,7 +10,8 @@ def hybrid_rrf(
|
|
|
10
10
|
ids: Tuple,
|
|
11
11
|
scores: Tuple,
|
|
12
12
|
top_k: int,
|
|
13
|
-
|
|
13
|
+
weight: int = 60,
|
|
14
|
+
rrf_k: int = -1, ) -> Tuple[List[List[str]], List[List[float]]]:
|
|
14
15
|
"""
|
|
15
16
|
Hybrid RRF function.
|
|
16
17
|
RRF (Rank Reciprocal Fusion) is a method to fuse multiple retrieval results.
|
|
@@ -27,15 +28,23 @@ def hybrid_rrf(
|
|
|
27
28
|
:param scores: The retrieve scores that you want to fuse.
|
|
28
29
|
The length of this must be the same as the length of ids.
|
|
29
30
|
:param top_k: The number of passages to be retrieved.
|
|
30
|
-
:param
|
|
31
|
+
:param weight: Hyperparameter for RRF.
|
|
32
|
+
It was originally rrf_k value.
|
|
31
33
|
Default is 60.
|
|
32
34
|
For more information, please visit our documentation.
|
|
35
|
+
:param rrf_k: (Deprecated) Hyperparameter for RRF.
|
|
36
|
+
It was originally rrf_k value. Will remove at further version.
|
|
33
37
|
:return: The tuple of ids and fused scores that fused by RRF.
|
|
34
38
|
"""
|
|
35
39
|
assert len(ids) == len(scores), "The length of ids and scores must be the same."
|
|
36
40
|
assert len(ids) > 1, "You must input more than one retrieval results."
|
|
37
41
|
assert top_k > 0, "top_k must be greater than 0."
|
|
38
|
-
assert
|
|
42
|
+
assert weight > 0, "rrf_k must be greater than 0."
|
|
43
|
+
|
|
44
|
+
if rrf_k != -1:
|
|
45
|
+
weight = int(rrf_k)
|
|
46
|
+
else:
|
|
47
|
+
weight = int(weight)
|
|
39
48
|
|
|
40
49
|
id_df = pd.DataFrame({f'id_{i}': id_list for i, id_list in enumerate(ids)})
|
|
41
50
|
score_df = pd.DataFrame({f'score_{i}': score_list for i, score_list in enumerate(scores)})
|
|
@@ -44,9 +53,9 @@ def hybrid_rrf(
|
|
|
44
53
|
def rrf_pure_apply(row):
|
|
45
54
|
ids_tuple = tuple(row[[f'id_{i}' for i in range(len(ids))]].values)
|
|
46
55
|
scores_tuple = tuple(row[[f'score_{i}' for i in range(len(scores))]].values)
|
|
47
|
-
return pd.Series(rrf_pure(ids_tuple, scores_tuple,
|
|
56
|
+
return pd.Series(rrf_pure(ids_tuple, scores_tuple, weight, top_k))
|
|
48
57
|
|
|
49
|
-
df[['rrf_id', 'rrf_score']] = df.
|
|
58
|
+
df[['rrf_id', 'rrf_score']] = df.apply(rrf_pure_apply, axis=1)
|
|
50
59
|
return df['rrf_id'].tolist(), df['rrf_score'].tolist()
|
|
51
60
|
|
|
52
61
|
|