Prompt Migration: collaboration issue to for Code Generations
Overview
Within Prompt Migration to AI Gateway (&14259 - closed) prompts are migrated from GitLab Rails to AI Gateway
groupcustom models decided to start with moving Code Suggestions prompts for custom models.
Related MRs:
- feat(agents): change prompt lookup for agent re... (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!1095 - merged)
- feat(agents): code completions for custom model... (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!1063 - merged)
- feat(agents): execute code generations via agent (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!1096 - merged)
- Draft: feat(agents): code-generations for anthr... (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!1099 - closed)
How to migrate a prompt for Code Generations
-
feat(agents): execute code generations via agent (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!1096 - merged) is merged and it means that the prompt definition should be located in
ai_gateway/prompts/definitions/<feature-section>/<feature>/<model>.yml, for example,ai_gateway/prompts/definitions/code_suggestions/generations/mistral.ymlfor Code Generations powered by Mistral model orai_gateway/prompts/definitions/code_suggestions/generations/base.ymlpowered by Anthropic model. - In order to test the behavior, enable
ai_custom_models_prompts_migrationfeature flag - Define the prompt in
ai_gateway/prompts/definitions/code_suggestions/generations/<model-name>.ymlfile. Currently, the following fields are supported:prefix(content above cursor),instruction(prompt),languageandfile_name. - Verify that LLM received the correct prompt anyway.
Other models
- Define prompt definition, for example
ai_gateway/prompts/definitions/code_suggestions/generations/mixtral.yml. - Enable
ai_custom_models_prompts_migrationintroduced in !161018 (merged) - Verify that LLM received the correct prompt.
Merging the work
- Define the prompt in AI Gateway
- Enable
ai_custom_models_prompts_migrationand verify it works
Feature.enable(:ai_custom_models_prompts_migration)
- Perform the evaluations according to the steps defined in the issues like: Migrate Code Generation Prompts: Mistral-7B-v0.1 (#470819 - closed)
- Merge the AI Gateway MR
Edited by Julie Huang