diff --git a/app/controllers/admin/prompt_sandboxes_controller.rb b/app/controllers/admin/prompt_sandboxes_controller.rb index 0c90d0aea..d59e0453c 100644 --- a/app/controllers/admin/prompt_sandboxes_controller.rb +++ b/app/controllers/admin/prompt_sandboxes_controller.rb @@ -2,13 +2,13 @@ class Admin::PromptSandboxesController < AdminController include DayTimelinesScoped MODELS = %w[ - chatgpt-4o-latest - gpt-4.1 - gpt-3.5-turbo - gpt-4.1-mini - gpt-4.1-nano - gpt-4o-mini - ] + chatgpt-4o-latest + gpt-4.1 + gpt-3.5-turbo + gpt-4.1-mini + gpt-4.1-nano + gpt-4o-mini + ] def show @llm_models = MODELS.map { |model| [ model, model ] } diff --git a/app/models/event/summarizer.rb b/app/models/event/summarizer.rb index 723d55da6..cd7cb2fb7 100644 --- a/app/models/event/summarizer.rb +++ b/app/models/event/summarizer.rb @@ -9,11 +9,11 @@ class Event::Summarizer # LLM_MODEL = "gpt-4.1" PROMPT = <<~PROMPT - You are an expert in writing summaries of activity for a general purpose bug/issues tracker. + You are an expert in writing summaries of activity for a general purpose bug/issues tracker.#{' '} Transform a chronological list of **issue-tracker events** (cards + comments) into a **concise, high-signal summary**. ## What to include - - **Key outcomes** – insights, decisions, blockers created/removed. + - **Key outcomes** – insights, decisions, blockers created/removed.#{' '} - **Notable discussion points** that affect scope, timeline, or technical approach. - How things are looking. - Newly created cards. @@ -21,27 +21,27 @@ class Event::Summarizer ## Writing style - Instead of using passive voice, prefer referring to users (authors and creators) as the subjects doing things. - - Aggregate related items into thematic clusters; avoid repeating card titles verbatim. + - Aggregate related items into thematic clusters; avoid repeating card titles verbatim.#{' '} - Prefer compact paragraphs over bullet lists. - - Refer to people by first name (or full name if duplicates exist). - - e.g. “Ann closed …”, not “Card 123 was closed by Ann.” - + - Refer to people by first name (or full name if duplicates exist).#{' '} + - e.g. “Ann closed …”, not “Card 123 was closed by Ann.”#{' '} + ## Formatting rules - - Output **Markdown** only. + - Output **Markdown** only.#{' '} - Keep the summary around **#{MAX_WORDS} words**. * For links, count the anchor text words, but ignore the target path. - Write 2 paragraphs at most. - - Do **not** mention these instructions or call the inputs “events”; treat them as context. + - Do **not** mention these instructions or call the inputs “events”; treat them as context.#{' '} - Prioritise relevance and meaning over completeness. - + ## Linking rules - **When possible, embed every card or comment reference inside the sentence that summarises it.* - Use a natural phrase from the sentence as the **anchor text**. - If can't link the card with a natural phrase, don't link it at all. - * **IMPORTANT**: The card ID is not a natural phrase. Don't use it. - - Markdown link format: [anchor text](/full/path/). + * **IMPORTANT**: The card ID is not a natural phrase. Don't use it.#{' '} + - Markdown link format: [anchor text](/full/path/).#{' '} - Preserve the path exactly as provided (including the leading "/"). - - Example: + - Example:#{' '} - ✅ [Ann closed the stale login-flow fix]() - ✅ Ann [pointed out how to fix the layout problem]() - ❌ Ann closed card 123. ()