Closed wanghang-github closed 1 year ago
Your K might be too high which results in too many tokens when you're trying to answer the question.
Try reducing K or reducing the chunk size
Yes, you are right.When I use top_k is 5 or 3 ,the errror was solve. but I hope to analyze the answer I want through more text, so I use map-reduce here. How should I complete my analysis task without changing the chunk_size and top_k conditions?
You can make a custom map prompt and ask for a shorter summary of the answer. Or else do map reduce again on the output from the first one
I want to use RetrievalQA chain to achieve a QA about PDF,how I don't know why my response always be split although it‘s total tokens just 1800 or 2500 such as
so I want to use a map_reduce,but it give me a error
and my code is
`
top_matches = vector_db.similarity_search_with_score(query=question, k=int(top_k))
top_matches_contexts = " "
print("top_matches",top_matches)
`