Skip to content

Slack App: Repeated action #18

Closed
Closed

Description

@20001LastOrder

During my testing on the React loop, it seems that the bot can be stuck in a loop (e.g. calling the same action with the same argument until it reaches the maximum number of actions).

Suggestion: I think the duplicated action can be determined with a simple rule-based approach. Once we detect the duplicated action, we can either stop the loop or use something like Reflexion (Paper).

Activity

  1. changed the title [-]React: Repeated action[/-] [+]Slack App: Repeated action[/+] on Jul 7, 2023
  2. YujingYang666777 commented on Jul 20, 2023

    @YujingYang666777
    Contributor

    assigned to Yujing

  3. YujingYang666777 commented on Jul 25, 2023

    @YujingYang666777
    Contributor

    Description:
    The LLM sometimes produces duplicated actions, including the same commands and queries. This is not helpful for it to find the resources. Here is one example action: TaskAction(name='UserInput', args={'query': 'Determining the next command to use.'})

    Steps to Reproduce:
    ask a few questions and it may reproduce. This can only be seen from the backend.

    Actual Results:
    in the backend, it should give different action

    Expected Results:
    in the backend, it sometimes give the same command and query

    Additional Information:
    N/A

    Reproducibility:
    It can be reproducible sometimes

    Possible Solutions:
    Before executing the command, we always check whether it is the same command as the previous one. If it is the same one, we return a prompt to tell it to change a command or query word

    Related Issues:
    N/A

    Steps Taken So Far:
    A simple rule-based approach, as described in the possible solution section, is implemented and committed.

    Environment:
    N/A

  4. YujingYang666777 commented on Aug 22, 2023

    @YujingYang666777
    Contributor

    resolved in the pull request #69

  5. amirfz commented on Aug 22, 2023

    @amirfz
    Contributor

    waiting for @johnnykfeng since he said he still sees repeated action

  6. johnnykfeng commented on Aug 22, 2023

    @johnnykfeng
    Contributor

    This was from last night's testing.
    I'm using code from August 16th commit: 5ad07e8041545737bfe6826cabe84cf3f8282901

    image

  7. amirfz commented on Aug 22, 2023

    @amirfz
    Contributor

    @YujingYang666777 @20001LastOrder was the issue solved after August 16?
    @johnnykfeng could you merge in from main and test again?

  8. amirfz commented on Sep 7, 2023

    @amirfz
    Contributor

    this is still not resolved completely - @YujingYang666777 is exploring

  9. oshoma commented on Sep 12, 2023

    @oshoma
    Collaborator

    Do we have any sort of server-side cache in place already?

    If we had a cache of { tool: toolName, query: queryText, t: timestamp } then we could avoid reissuing queries for recent items in the cache. And flush the cache after some reasonable amount of time. Redis is one nice way to do this sort of thing.

  10. amirfz commented on Sep 12, 2023

    @amirfz
    Contributor

    this is the core of the idea we're exploring and @YujingYang666777 and @ChenKua are doing some experiments. but I think we need to take a step back and revisit our multi agent frameworks and come up with a more robust system for knowledge tracking within the agent ecosystem to have better foundations for problems like this going forward. I'm trying to put something together so that we can discuss it

  11. oshoma commented on Sep 12, 2023

    @oshoma
    Collaborator

    OK - something to look at sounds good. I tried to follow the discussion in today's mtg but didn't have enough context.

    I can imagine that the query will sometimes be subtly different, but (from a human standpoint) the same idea being tried again. That wouldn't work with a simple cache. So you could cache a vectorization of the query instead. But I'm sure you've thought of that already.

    @YujingYang666777 and @ChenKua, for the experiments, do you have a list of what you have tried so far, and results? And/or code we can look at?

  12. YujingYang666777 commented on Sep 13, 2023

    @YujingYang666777
    Contributor

    I haven't tried the cache. Previously, I added a class named Reflection, that checks if the current action is the same as the previous action and asks it to generate a new one. Currently, it still suffers from the duplicate action issue. Since we have two tools, search and context search, it sometimes turns from search to context search, and gets back again.

    We can use the cache to save actions in all steps, but since we only have two tools to select from, I am not sure how much it can improve it. Now I am adding more information for the context search tool and checking some multi-agent systems to see if we can get some idea from that.

  13. locked and limited conversation to collaborators on Apr 2, 2024
  14. converted this issue into a discussion #320 on Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions