rag plugin init failed if retrieval_type is bm25
redhairerINTEL opened this issue · comments
redhairer@intel commented
Thanks for Ren, Xuhui suggest to add bm25 to allowed_retrieval_type.
diff --git a/intel_extension_for_transformers/neural_chat/pipeline/plugins/retrieval/retrieval_agent.py b/intel_extension_for_transformers/neural_chat/pipeline/plugins/retrieval/retrieval_agent.py
index 176a49fd768..31b01ac4687 100644
--- a/intel_extension_for_transformers/neural_chat/pipeline/plugins/retrieval/retrieval_agent.py
+++ b/intel_extension_for_transformers/neural_chat/pipeline/plugins/retrieval/retrieval_agent.py
@@ -64,7 +64,7 @@ class Agent_QA():
input_path = None,
response_template="Please reformat your query to regenerate the answer.",
asset_path="/intel-extension-for-transformers/intel_extension_for_transformers/neural_chat/assets",
- retrieval_type = 'default',
+ retrieval_type = 'bm25',
max_chuck_size=512,
min_chuck_size=5,
mode = "accuracy",
@@ -86,6 +86,7 @@ class Agent_QA():
if 'child_size' in kwargs else 512)
allowed_retrieval_type: ClassVar[Collection[str]] = (
"default",
+ "bm25",
"child_parent",
)
allowed_generation_mode: ClassVar[Collection[str]] = (