Skip to content
The Chat Archive
gemma-3-27b-it· Google LMArena Human Preference 140K

generate a perfect matched prompt for model gpt4 for the following: "source":…

  1. User

    generate a perfect matched prompt for model gpt4 for the following: "source": "HSM/M1002088_Laser_3/Lieferanten/KLH/BA_L39-0-8_en_I%2003_2014-01.pdf", <--- Hier z.B Laser 3, Maschine M1002088

  2. Assistant

    Okay, here's a prompt designed to work with that specific source information, aiming for a perfect match for a RAG system using GPT-4. It focuses on leveraging the provided document path and extracting information from it.

    You are a highly skilled Technical Support Assistant specializing in the "Laser 3" system (machine M1002088), based on the provided documentation.
    
    **Your Task:**  Answer user questions using *only* the information contained within the following document:
    
    **Document Source:** HSM/M1002088_Laser_3/Lieferanten/KLH/BA_L39-0-8_en_I%2003_2014-01.pdf
    
    **Instructions:**
    
    1. **Prioritize Document Content:**  All responses *must* be derived directly from the specified PDF document. Do not rely on pre-existing knowledge or external sources.
    2. **Precise Information:** Extract and present technical details, instructions, specifications, troubleshooting steps, or any other relevant information requested by the user.
    3. **Document Referencing:**  Whenever possible, include the page number or section heading from the PDF document where the information was found.  This is crucial for verification.  (e.g., "According to Section 2.3 on page 15...")
    4. **"Not Found" Response:** If the answer to a user's question cannot be found within the document, respond with: "Information not found in the provided document."  Do *not* attempt to answer based on assumptions.
    5. **Contextual Understanding:**  Understand that this document pertains to the "Laser 3" system (machine M1002088).  Use this context to interpret user queries.
    
    **Example:**
    
    **User:** How do I calibrate the laser?
    **You:**  "Calibration instructions can be found in Section 4.1, 'Laser Calibration,' starting on page 28. The procedure involves..." [followed by the extracted procedure].
    
    **Begin!  Await user query.**
    

    Key Improvements & Why This Works:

    • Explicit Document Focus: The prompt immediately and repeatedly emphasizes that the only source of truth is the provided PDF. This is critical for RAG.
    • Specific System Identification: It explicitly names "Laser 3" and machine number M1002088, reinforcing the context. The Hier z.B Laser 3, Maschine M1002088 comment in your original prompt is directly incorporated.
    • Document Referencing Requirement: The instruction to include page numbers/section headings is vital for traceability and user trust.
    • Clear "Not Found" Protocol: Prevents hallucination and ensures the model doesn't invent answers.
    • Example Response: Provides a clear model for how the response should be formatted.
    • "Begin! Await user query." This is a good practice to signal to the model that it's ready to receive input.

    How to use this with your RAG system:

    1. Pass the prompt to GPT-4.
    2. When a user asks a question, append the question to the end of this prompt. (e.g., "How do I replace the laser tube?")
    3. Your RAG system should have already retrieved relevant chunks from the PDF based on the user's question. (This is the "retrieval" part of RAG). The retrieved chunks are then also passed to GPT-4 as context. (This is often done using the context parameter in the OpenAI API).

    This prompt, combined with a robust retrieval system, should give you very accurate and document-grounded responses.

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

Identical first prompt