Skip to content

AI Doing too many searches. Sometimes get stuck in an infinite searching loop #32

@Tomayachi

Description

@Tomayachi

I'm having fun with this and I'm glad I was able to get it working with limited issues, however as explained in the title, my AI is often searching way too many times for each prompt that I give it, and sometimes seems to get stuck in an infinite searching loop.

I'm using this LLM from huggingface: https://huggingface.co/HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive
and I've using the K-M version. I have a 7900xtx with 24 gigs of VRAM running LMstudio on Linux.

I've tried adding these critical rules without success. and I tried asking the AI to stop doing this and it suggested I mention the limit directly in the prompt, but that didn't work etiher. It seems if I manually stop the AI while its in the middle of doing the infinite searches, and then turn off the search tool and ask again, it gives me an answer that is using some of the info it gained from the previous searches, so this has been my workaround so far, but I'd like to be able to hard limit the # of searches.

CRITICAL RULE 3: DO NOT use the full-web-search tool more than 5 times when creating your response to my prompt

CRITICAL RULE 4: DO NOT use the get-single-web-page-content tool more than 2 times when creating your response to my prompt

CRITICAL RULE 5: ALWAYS keep your internet searches related to the current prompt

I also added this code as well, although I admit I'm not exact sure what it does.

{
  "mcpServers": {
    "web-search": {
      "command": "node",
      "args": ["/path/to/web-search-mcp/dist/index.js"],
      "env": {
        "MAX_CONTENT_LENGTH": "8000",
        "BROWSER_HEADLESS": "true",
        "MAX_BROWSERS": "3",
        "BROWSER_FALLBACK_THRESHOLD": "3"
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions