Skip to content

Remove prompt indentation

Mark Chao requested to merge ai-prompt-remove-indent into master

What does this MR do and why?

Remove unnecessary prompt indentations, by using squiggly heredoc.

May improve result since Claude prompts typically ends with "\n\nAssistant", and indentation breaks this.

How to set up and validate locally

Gitlab::Llm::Templates::CategorizeQuestion.new(User.first, {question: "What's my name?"}).to_prompt

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mark Chao

Merge request reports