Skip to content

Fix: Duplicate Responses in 'generate' mode #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

schmichri
Copy link
Contributor

@schmichri schmichri commented Jun 10, 2025

In generate mode NLWeb returns the same answer twice.
See issue #190

@microsoft-github-policy-service agree company="iunera"

@chelseacarter29
Copy link
Collaborator

Can you share where you are seeing the duplicates?

@schmichri
Copy link
Contributor Author

Can you share where you are seeing the duplicates?

See issue #190

@jennifermarsman jennifermarsman requested a review from Copilot June 11, 2025 14:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the issue of duplicate responses in generate mode by sending only one answer message per synthesis.

  • Removed the initial answer message dispatch before processing URLs.
  • Added a conditional branch to send the answer when no URLs are present.
Comments suppressed due to low confidence (1)

code/core/generate_answer.py:220

  • Consider adding an explanatory comment clarifying why the answer message is only sent when no URLs exist, to improve code maintainability.
# Send message with just the answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants