Duo Chat: The UI initially displays the correct answer, which is then unexpectedly replaced by a completely unrelated answer.
Bug Summary
Screen_Recording_2024-07-02_at_12.23.15
Detailed Bug Cause/Fix directly
Please seeDetails:
- The model appears to receive two requests despite only one question being submitted.
- This results in an unrelated answer overriding the correct one in the UI.
- The issue might lead to hallucinations in the model’s responses.
- Slack discussion (GitLab internal)
Observations:
- The Rails app sends the question once, but then sends another request to the AI gateway with a different prompt related to technical documentation.
- This results in an inconsistent and incorrect response.
Investigation Findings:
- The problem persists when using a self-hosted model but not with Claude, the GitLab AI vendor.
- The discrepancy lies in an additional
aiCompletionResponse
GQL API call, indicating extra responses from the AI gateway. - The self-hosted model invokes
search_with_retry
, generating an extra request, while the GitLab AI vendor does not.
Guides:
- A video demonstrates the issue, showing two requests sent when using the UI but only one from the IDE.
- Debugging efforts are ongoing, focusing on the additional requests sent from the UI.
- Request in LangSmith
Conclusion: The issue likely stems from the self-hosted model's receiving two requests.
Edited by Mohamed Hamda