Skip to content

Custom Models: Duo Chat response must not contain instructions from the prompt

Overview

Can be tested here: https://staging-ref.gitlab.com/idrozdov/gitlab-shell

  • A simple hello
Click to expand screenshot

Screenshot_2024-10-08_at_19.05.12

  • How do I change my password in GitLab? request followed by a simple hello:
Click to expand screenshot

Screenshot_2024-10-08_at_19.04.50

Expected behavior

A simple greeting back, ideally with the information about the questions that a user can ask, like:

Hello! I'm GitLab Duo Chat, an AI assistant created by GitLab to help with questions about GitLab and DevSecOps. How can I assist you today? Whether you have questions about GitLab features, CI/CD pipelines, or any other aspect of software development and DevOps, I'm here to help. Feel free to ask anything!

Your feedback is important to us. After our interaction, please don't hesitate to let me know how I did or if there's anything we can improve. How may I help you?

Potential solution

The prompt can be likely fixed by updating the system prompt for Mistral: https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/blob/main/ai_gateway/prompts/definitions/chat/react/system_mistral.jinja

Edited by Igor Drozdov