101-System Prompts
Last updated
Last updated
System prompts are instructions given to a Large Language Model (LLM) to set the context, define behavior, and establish guidelines for its responses. They act as a foundation for the LLM's understanding of its role and the task at hand. System prompts are crucial for tailoring the LLM's output to specific needs, ensuring consistency, and maintaining desired characteristics throughout the interaction.
Context Setting: Defines the environment or scenario for the LLM.
Behavior Definition: Establishes rules and guidelines for the LLM's responses.
Role Assignment: Instructs the LLM to assume a specific persona or role.
Task Framing: Outlines the overall objective or type of task the LLM should perform.
This system prompt sets the context for a customer service interaction, defines the bot's behavior, and establishes important guidelines for handling customer inquiries.
This prompt establishes the LLM as a language tutor, setting expectations for its behavior and the type of information it should provide.
Be specific and clear about the LLM's role and the context of the interaction.
Include guidelines for handling out-of-scope requests or sensitive information.
Regularly review and update system prompts based on observed interactions and outcomes.
Keep system prompts concise while covering all necessary aspects of the LLM's behavior.
Overly Restrictive Prompts: Avoid being too specific, which might limit the LLM's ability to handle a variety of inputs. Instead, provide general guidelines that allow for flexibility.
Contradictory Instructions: Ensure all parts of the system prompt are consistent. Review for any conflicting directives that might confuse the LLM.
Neglecting Ethical Considerations: Always include guidelines for ethical behavior, such as respecting privacy and avoiding harmful content.
GenAI University: 101-Prompt Engineering
Customer Service Bot
Set the LLM to act as a friendly, knowledgeable customer service representative for a specific company.
Ensures consistent and appropriate responses aligned with company policies.
Language Tutor
Instruct the LLM to behave as a patient language teacher, providing explanations and examples.
Creates a supportive learning environment with tailored educational responses.
Code Assistant
Define the LLM's role as a coding expert in specific programming languages.
Produces relevant and accurate coding suggestions and explanations.