web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Copilot Studio
Unanswered

knowledge

(0) ShareShare
ReportReport
Posted on by
I'm testing the agent with AI and when I add the service now knowledge, it loops, could you help me?
Categories:
Captura de Tela 2...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Suggested answer
    VASANTH KUMAR BALMADI Profile Picture
    266 on at
    knowledge

    Hi,

    The looping behavior you’re encountering with the ServiceNow knowledge integration could result from how the agent is interpreting and re-querying responses. Here are some steps to resolve the issue:

    1. Review Knowledge Source Configuration

    • Ensure the ServiceNow knowledge source is properly configured, and that the agent queries are limited to the intended dataset or knowledge base.
    • Verify the API credentials and scope to prevent redundant queries.

    2. Add Response Validation

    • Ensure the agent processes empty or incomplete responses correctly. If the ServiceNow API returns no results or an error, configure fallback logic to stop repetitive querying.
    • Example:
      if response == null or response.error:
      return "I couldn’t find the information you’re looking for. Please rephrase your question."

    3. Implement Retry Logic

    • Limit the number of query retries by maintaining a counter for attempts. Stop querying after a specific threshold (e.g., 2-3 retries).

    4. Refine User Prompts

    • Ambiguous or broad user queries can cause the agent to loop. Clarify the prompt if the agent doesn’t find relevant information.

    5. Use Query History to Detect Loops

    • Track previous queries within the same session. If the agent repeats the same query more than once without user intervention, provide a default response instead of re-querying.

    6. Monitor Logs

    • Check Copilot Studio logs and ServiceNow API logs to identify if the issue lies in query construction or response handling.

    7. Fallback to Human Support

    • If the looping persists and no resolution is found, configure the agent to escalate the issue to a human support channel.

    Example Solution Logic:

    if query_attempts > 3:
    return "I couldn’t fetch the information right now. Let me connect you with support for further assistance."

    Conclusion:

    These steps should help address looping issues. If you’ve already tried these solutions and the problem persists, there may be an underlying API or configuration issue in ServiceNow that requires further investigation.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 274 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 257 Super User 2025 Season 2

#3
Sam_Fawzi Profile Picture

Sam_Fawzi 82 Super User 2025 Season 2

Last 30 days Overall leaderboard