Skip to content
TheChatArchiveThe Chat Archive
Mistralmagistral-medium-2506· Mistral AIHugging Face LMArena Human Preference 140K

How good it the following prompt: "Act as a senior software architect reviewing code for…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Amazon Novaamazon-nova-experimental-chat-05-14’s answer.
  1. User

    How good it the following prompt: "Act as a senior software architect reviewing code for over-engineering and architectural violations. You're looking at code in isolation without full project context, so be cautious - the original author may have had valid reasons for their choices.

    YOUR ANALYSIS TASKS:

    1. Identify Over-Engineering - Flag with [OE-#]:

      • OE-INTF: Unnecessary interfaces (single implementation, no testing/mocking justification)
      • OE-INDIRECT: Redundant wrappers/proxies without cross-cutting concerns
      • OE-PATTERN: Misapplied patterns (Factory for <3 variations, Strategy for single algorithm)
      • OE-GENERAL: Premature generalization (unused config flags, speculative features)
      • OE-BLOAT: Heavy dependencies for trivial tasks
    2. Detect Architectural Violations - Flag with [AV-#]:

      • AV-AUTO-REG: Auto-registration outside startup flow (DI setup in constructors/requests)
      • AV-LIFECYCLE: Service setup in wrong scopes (repeated initialization)
      • AV-BOUNDARY: Layer violations (UI→Domain, Infrastructure→Core)
      • AV-CONFIG-SPRAWL: Configuration scattered across multiple sources
      • AV-SHARED-STATE: Mutable state crossing bounded contexts
    3. Propose Refactoring - Follow "Boy Scout Rule" (smallest safe steps):

      • Remove/inline unused abstractions
      • Collapse inheritance to composition/functions when polymorphism isn't used
      • Centralize DI registration to startup
      • Replace heavyweight libs with native alternatives
      • DO NOT: Break public APIs, remove justified abstractions, introduce new dependencies

    REQUIRED OUTPUT:

    Assessment: Brief summary of architectural health and main issues

    Findings: List each issue as:

    • [ISSUE-ID] Description
    • Risk: Why this matters
    • Location: Quote specific code

    Refactored Code: Show simplified version with // CHANGED comments

    Change Log:

    ChangeJustificationRisk Level
    Removed IFoo interfaceSingle implementation, no testing benefitMedium
    Moved auto-reg to Startup.csPrevent duplicate registrationsCritical Fix

    Validation Notes: What tests/checks should be run to ensure safety

    Context Limitations: What additional info could change these recommendations

    SPECIAL CASES:

    • If no issues found: "Code is appropriately engineered. No changes recommended."
    • For critical violations: Prioritize fixes with clear "CRITICAL FIX" comments
    • When uncertain: Add TODO comments explaining what needs verification

    Remember: Your goal is constructive improvement while preserving functionality and respecting the original author's potential reasoning."

  2. Mistral Assistant

    The prompt is highly effective for reviewing code for over-engineering and architectural violations. It provides a comprehensive list of issues to look for, clear flags for each type of issue, and a structured output format. The prompt is detailed and specific, ensuring consistency and completeness in the review process.

    The prompt covers a wide range of scenarios and includes special cases to handle different situations. It also acknowledges the limitations of reviewing code in isolation, which is important for setting the right expectations.

    While the prompt is quite detailed and might be overwhelming for beginners, its comprehensiveness ensures that all critical aspects are covered. The structured output format ensures that the review is thorough and consistent.

    Overall, the prompt is well-structured and comprehensive, making it highly effective for its intended purpose.

    Final Answer: The prompt is excellent for reviewing code for over-engineering and architectural violations. It is detailed, specific, and provides a clear structure for the output. The prompt covers a wide range of scenarios and includes special cases to handle different situations. It acknowledges the limitations of reviewing code in isolation, which is important for setting the right expectations.

    The prompt is highly effective for its intended purpose, ensuring consistency and completeness in the review process. While it might be overwhelming for beginners due to its length and complexity, its comprehensiveness ensures that all critical aspects are covered. The structured output format ensures that the review is thorough and consistent.

    In summary, the prompt is well-structured and comprehensive, making it highly effective for reviewing code for over-engineering and architectural violations.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.