llama_index
llama_index copied to clipboard
set response mode to `tree_summarize` got error `ValueError: A single term is larger than the allowed chunk size.`
If response mode is default everything is fine.
llm setting
llm = ChatOpenAI(temperature=0.3, model_name=MODEL)
llm_predictor = LLMPredictor(llm=llm)
prompt helper setting
max_input_size = 4096
num_output = 1500
max_chunk_overlap = 20
prompt_helper = PromptHelper(max_input_size, num_output, max_chunk_overlap)
index setting
# build
index = GPTSimpleVectorIndex(documents)
index.save_to_disk(path)
# load
index = GPTSimpleVectorIndex.load_from_disk(path, llm_predictor=llm_predictor)
query setting
response = index.query(
question,
llm_predictor=llm_predictor,
similarity_top_k=top_k,
text_qa_template=QA_TEMPLATE_MEDICAL,
refine_template=REFINE_TEMPLATE_MEDICAL,
prompt_helper=prompt_helper,
response_mode=response_mode)
thanks for flagging. any chance you have some sample data (that you're willing to share) to help me repro? feel free to DM me as well
same problem , how do u fix it
@shadowlinyf
http://jpk.pku.edu.cn/course/zgddwx/script/chapter15.pdf you can try this @jerryjliu
http://jpk.pku.edu.cn/course/zgddwx/script/chapter15.pdf you can try this @jerryjliu
thanks! will try to take a look tomororw (PT)
Hi, @shadowlinyf! I'm here to help the LlamaIndex team manage their backlog and I wanted to let you know that we are marking this issue as stale.
Based on my understanding, you reported an issue regarding the tree_summarize
response mode, where a ValueError
occurs when a single term is larger than the allowed chunk size. There have been some discussions in the comments, with jerryjliu asking for sample data to reproduce the issue and neove also encountering the same problem. mingxin-yang has kindly provided a link to some sample data, which jerryjliu will look into.
Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LlamaIndex repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.
Thank you for your contribution and we appreciate your understanding. Let us know if you have any further questions or concerns.