Open swaroop11 opened 3 months ago
Hi @swaroop11 , if you'd like to ask for a series of questions, a recommended design would be:
while True:
problem = input("Please enter your question: ")
if problem == "":
break
assistant.reset()
ragproxyagent.initiate_chat(assistant, message=ragproxyagent.message_generator, problem=problem)
Hi @thinkall, I checked your suggestion but it giving the same issue.
If human_input_mode="ALWAYS"
then RAG is performed only once and agent tries to answer all the future questions using that context only. Ideally it should pull new context for each input query. So the issue is not solved
ragproxyagent = RetrieveUserProxyAgent( name="ragproxyagent", human_input_mode="ALWAYS", max_consecutive_auto_reply=2, retrieve_config={ "task": "qa", "custom_text_split_function": text_splitter.split_text, "docs_path": "context_file.txt", }, code_execution_config=False, )
If
human_input_mode="ALWAYS"
then RAG is performed only once and agent tries to answer all the future questions using that context only. Ideally it should pull new context for each input query. So the issue is not solved
hey there @swaroop11 autogen is a bit wierd because it didnt start with rag, and i do think it "inherited" some idiosyncracies there, for example the importance of a good system prompt.
check out this demo on huggingface to see a good example for that. hope this helps : https://huggingface.co/spaces/thinkall/autogen-demos
Hi @thinkall, I checked your suggestion but it giving the same issue. If
human_input_mode="ALWAYS"
then RAG is performed only once and agent tries to answer all the future questions using that context only. Ideally it should pull new context for each input query. So the issue is not solved
ragproxyagent = RetrieveUserProxyAgent( name="ragproxyagent", human_input_mode="ALWAYS", max_consecutive_auto_reply=2, retrieve_config={ "task": "qa", "custom_text_split_function": text_splitter.split_text, "docs_path": "context_file.txt", }, code_execution_config=False, )
Hi @swaroop11 , When you set human_input_mode="ALWAYS", for each question, when assistant replied, you will be prompted to input your reply (human_input); after the interaction finished, you'll be prompted to input the next question and start a new round of chat.
Describe the bug
I have created a .py file with below code which uses
RetrieveUserProxyAgent
andRetrieveUserProxyAgent
agents. I have kept all the settings to default only and initiated the chat with theragproxyagent
. For the first question it correctly pulls context and provide answer, but from next query onwards it just say "UPDATE CONTEXT" and generates no response.Ideally, it should pull new context for every next query user is asking and generate response based on that, but not doing that.
Steps to reproduce