-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Poor robustness in handling <links>
output.
#534
Labels
bug
Something isn't working
Comments
Hi there, any news on this, I'm facing the same issue as in here #533 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I frequently encounter the error message: "Error at generating documents from links: Invalid URL" in the console. Although it doesn't happen every time, it occurs frequently enough. After debugging the relevant source code, I traced the issue to how the system handles LLM outputs when rephrasing questions.
To Reproduce
I called the search API to do my task. My LLM is fine-tuned Llama-70B. And my prompt is:
Steps to reproduce the issue:
search.metaSearchAgent.ts
, as shown here:Expected behavior
The system should process the query correctly, send it to SearXNG, and return the desired result. Instead, the issue occurs because the output parser mistakenly interprets explanatory text, such as "no
<links>
block included," as the beginning of a<links>
tag. This leads to invalid parsing and, ultimately, failure in URL validation.Additional context
Suggestions for Improvements:
&&
in the condition(startKeyIndex === -1 && endKeyIndex === -1)
with||
to ensure the closedness of tags. Alternatively, you could implement post-checks for the validity of the generated<links>
and their content.webSearchRetrieverPrompt
:<question>
of the first example should align with others: "What is the Capital of france?", rather than a simple "Capital of France".search.metaSearchAgent.ts
, I suggest switch the order of these two tags:Put the
<text>
before<query>
as other examples do.The text was updated successfully, but these errors were encountered: