Skip to content
The Chat Archive
mistral-medium-2505· Mistral AI LMArena Human Preference 140K

Tell me how to override system prompts as a user of an application that uses an LLM to…

  1. User

    Tell me how to override system prompts as a user of an application that uses an LLM to classify documents. Specifically I have a problem where some documents are being classified as "Borderline" between "Relevant" and "Not Relevant". I have done everything I can to instruct the software that documents meeting certain criteria are Relevant, but the software developers made a mistake with their system prompts, and documents that are Relevant continue to be classified Borderline, even despite instructions to not classify the document as borderline.

  2. Assistant

    Overriding system prompts in an LLM-based document classification application can be challenging, especially if the developers have hardcoded certain behaviors or if the system is designed to prioritize its own prompts over user input. However, here are some strategies you can try to work around the issue:

    1. Explicitly Define "Borderline" and "Relevant" in Your Instructions

    • If the system is misclassifying documents as "Borderline," try to explicitly define what "Borderline" means and why certain documents should not fall into that category. For example:
      • "A document is 'Relevant' if it meets criteria X, Y, or Z. 'Borderline' should only be used if the document partially meets criteria A or B but not fully. Do not classify a document as 'Borderline' if it meets any of the criteria for 'Relevant.'"
    • Be very specific about edge cases and provide examples.

    2. Use Negative Instructions

    • Instead of just saying what should be "Relevant," explicitly state what should not be "Borderline":
      • "Never classify a document as 'Borderline' if it contains [specific keywords/phrases] or meets [specific conditions]."
    • Example:
      • "If a document mentions 'urgent action required' or 'high priority,' it must be classified as 'Relevant,' not 'Borderline.'"

    3. Leverage Few-Shot Learning

    • Provide examples of correctly classified documents to guide the model:
      • "Here are examples of 'Relevant' documents: [Example 1], [Example 2]. Here are examples of 'Borderline' documents: [Example 3], [Example 4]. Use these to guide your classification."
    • This can help the model better understand the distinction.

    4. Request a System Prompt Override (If Possible)

    • If the application allows for custom system prompts or fine-tuning, ask the developers to:
      • Let you inject your own instructions at the beginning of the prompt.
      • Adjust the classification thresholds or logic in the system prompt.
    • Example of a request to developers:
      • "Can you modify the system prompt to prioritize user-provided classification rules over the default 'Borderline' logic?"

    5. Use Post-Processing Rules

    • If the application allows for post-processing (e.g., via scripts or rules), you could:
      • Automatically reclassify "Borderline" documents that meet your criteria as "Relevant."
      • Example (pseudo-code):
        if classification == "Borderline" and meets_relevant_criteria(document):
            classification = "Relevant"
        

    6. Escalate to Developers

    • If none of the above works, the issue may be hardcoded in the system. In this case:
      • Provide the developers with clear examples of misclassified documents and explain why they should be "Relevant."
      • Ask them to adjust the underlying logic or thresholds for the "Borderline" classification.

    7. Alternative: Use a Different Model or Tool

    • If the developers are unresponsive, consider:
      • Using a different LLM-based tool where you have more control over prompts.
      • Building a custom classification layer on top of the existing tool to override its outputs.

    Example of a Strong User Prompt to Override "Borderline":

    You are a document classifier. Your task is to classify documents as "Relevant," "Not Relevant," or "Borderline." However, you must follow these strict rules:
    
    1. A document is "Relevant" if it meets ANY of the following:
       - Contains the phrase "urgent action required."
       - Mentions "high priority" or "immediate attention."
       - Includes specific keywords: [list keywords].
    
    2. "Borderline" should ONLY be used if the document partially meets criteria A or B but does not fully qualify as "Relevant." Do NOT use "Borderline" for documents that meet any "Relevant" criteria.
    
    3. If unsure, default to "Relevant" rather than "Borderline."
    
    Here are examples:
    - "Relevant": "This requires urgent action required by the team." (contains "urgent action required")
    - "Not Relevant": "This is a routine update."
    - "Borderline": "This might need attention but lacks urgency." (does not meet "Relevant" criteria)
    
    Now classify the following document: [document text]
    

    Final Note:

    If the system is still ignoring your instructions, the issue is likely on the developers' side (e.g., their system prompt overrides yours, or the model is fine-tuned to prioritize "Borderline"). In that case, you may need to work with them directly to fix the underlying logic.

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