Virtual Help icon Virtual Help

  • Chat with library staff now
  • Contact your library
Skip to Main Content

Prompt Engineering/Creation: Module 2 of 6

Crafting effective prompts is key to getting accurate and useful responses from Generative AI. This page offers strategies for writing clear, targeted prompts that help AI tools better understand your questions or requests. You'll also find tips on refining prompts and examples to improve the quality of AI-generated content.

 

What is a Prompt?

Prompt Engineering

Prompt Engineering involves the process of crafting clear and precise prompts to optimize the performance of generative AI tools like ChatGPT, which rely on Large Language Models (LLMs). By typing questions or requests in an input field, users communicate with these models, and the quality of the AI's responses depends heavily on the clarity of the prompt. Developing effective prompts is an iterative process, requiring refinement and experimentation to produce accurate, high-quality outputs. As this practice has evolved, it has become a key area of focus, known as Prompt Engineering, enabling users to fully harness the potential of AI.

Problem Formulation & Components of Effective Prompting

A carefully crafted prompt can help you unlock a wealth of information to support your research projects, however without a well-formulated problem most prompts will fall short in producing the right outputs.

Writing effective prompts can feel overwhelming at first with tons of guidelines and techniques that seem specific to different contexts and tools. Though there is no magical one-size-fits-all formula, certain fundamental components can be applied and adapted to most use cases.

Text to Text Prompts

While generative AI tools may not be the best for straightforward information retrieval, they can be used as search assistants to support the research process to brainstorm, explore and refine ideas.

Text-based generative chatbots like Copilot, Gemini or ChatGPT can be used in the first stages of research to help you with topic exploration, narrowing down ideas and gathering background information.

Brainstorming & Narrowing Down Topics

An information need is the gap between what you know and what you need to know to solve a problem or answer a question. Providing context in your prompt is crucial because it helps clarify your specific requirements and guides the AI in generating relevant responses.

Prompt: "I'm writing a research paper for [course] and I need help coming up with a topic. I'm interested in topics related to [subject]. Provide a list of 10 topic ideas related to that."

Example: "I'm writing a research paper for Architectural History and I need help coming up with a topic. I'm interested in topics related to the Renaissance. Provide a list of 10 topic ideas related to that."


By framing your request with additional details, such as the intended audience or the depth of information required, you enable the AI to tailor its output more effectively. This context not only enhances the relevance of the information provided but also saves time by reducing the need for follow-up queries.

Once you have a list of topics generated by AI, the next step is to select one that truly captures your interest. Choosing a topic you are passionate about or curious about will make your research more engaging and enjoyable. After selecting your main topic, it's important to narrow it down by asking for sub-topics. This helps to focus your inquiry and makes the information more manageable.

Prompt: "I like the topic of gardens and landscapes in Renaissance architecture. Suggest some sub-topics to explore further."


Note: If you don't see any that interest you, ask it to suggest more related topics until you find one that you want to use.

Writing Research Questions

After selecting one of the AI-generated sub-topics, the next step is to formulate potential research questions that will guide your exploration and inquiry. Research questions are essential because they help to clarify what you want to investigate and provide a framework for your research.

Example: "Provide some research questions for the topic of Renaissance gardens and urban planning."


Note: You can get feedback on research questions you have in mind by asking it to act as a research expert and provide constructive feedback on your question.

Example: "Act as a research expert. Provide some feedback on the following research question: How did the location and design of gardens reflect the social hierarchies and cultural values of the Renaissance? Provide some suggestions for improving the research question."

Identifying Keywords

Once you have chosen your research question, ask for some keywords to use when searching library databases.

Prompt: "Please provide a list of keywords and phrases that would be useful for searching library databases regarding the research question: [insert your topic]?"

Example: "Please provide a list of keywords and phrases that would be useful for searching library databases regarding the research question: 'How did the location and design of gardens reflect the social hierarchies and cultural values of the Renaissance?'"


The AI will analyze your question and generate relevant keywords and phrases to create an effective search strategy for library databases. This foundational list can then be expanded by asking for additional related terms or synonyms, broadening your search scope and ensuring comprehensive coverage of your topic.

Note: Some databases and professions use standardized language for indexing research, such as the MESH terms for medical research. When using AI to generate a list of keywords, be sure to mention this context so the suggestions align with the terminology used in your field, making your search results more accurate and relevant.

Once you have a solid list of keywords, use them to conduct searches in library databases, academic search engines, or tools like Google Scholar. Start with broad searches using general keywords, then narrow down your results by incorporating more specific phrases or combinations of keywords. The aim is to locate scholarly articles, journals, and other resources that discuss your topic from different angles. Remember, the more precise your keywords, the more relevant your search results will be, so don’t hesitate to experiment with variations of your keywords.

To further refine your searches, you can ask for assistance in creating Boolean search strings. These strings allow you to combine keywords using operators like AND, OR, and NOT to create more targeted queries. For instance, if you're researching how the location and design of gardens reflect the social hierarchies and cultural values of the Renaissance, you might construct a search string like:

  • "Renaissance gardens" AND "social hierarchy"
    This string will return results that include both the concept of Renaissance gardens and social hierarchies.
  • "garden design" AND "cultural values" AND Renaissance
    This search will focus on the intersection of garden design, cultural values, and the Renaissance period.
  • "location of gardens" OR "design of gardens" AND "social hierarchies"
    This string broadens the search to include either the location or design of gardens while still focusing on social hierarchies.

Using these Boolean operators can help you filter out irrelevant information and focus your search on the most pertinent studies and articles, making your research process more efficient and effective.

Here are some tips to keep in mind when crafting effective prompts that LLMs can handle well for text-based tasks:

  • Use simple and natural language Use straightforward language and a conversational tone.
  • Be clear and specific Provide a clear, descriptive, and specific task or request you need the AI tool to complete.
  • Context matters Relevant contextual information can help the AI tool understand the task fully.
  • Add examples, rules, or constraints as needed Provide some examples of what you expect, or rules or constraints for the AI tool to follow, which can lead to better results.
  • Include outcome indicators Provide specific instructions or expectations in your prompts to guide the LLM in generating focused and relevant content. This helps ensure the response aligns with your needs and produces more effective results.

    For example, this prompt:

    • Write about Renaissance gardens.

    Can be rewritten as:

    • Help me plan an essay on Renaissance gardens by outlining the key features and cultural significance, with a focus on symmetry and symbolism.

    This provides a clear structure and purpose for the response.

  • Test and refine Try with different words and structures, and refine them based on the results you get.
  • Always verify AI tools like ChatGPT can sometimes provide incorrect or made-up information. So it is essential to verify or fact-check the responses.

Attributions

Information on this page was adapted, with permission from "Using Generative Artificial Intelligence for Research- opens in a new window" by Sheridan Library & Learning Services.


Sheridan logo

Text to Image Prompts

A picture is worth a thousand words but what do you do when you need words to describe a picture that you are visualizing?

Below are the suggested steps for crafting an image prompt. You don't necessarily need to follow or use all the steps but experiment with the strategies and your own words to produce the images you want. Be sure to check with your instructor if they permit using AI-generated images in your assignment.

Steps

  1. State the medium of the image (e.g., illustration, photograph, or painting)
    an illustration
  2. Describe the content or subject You may also include a short description of the action, state, and/or mood.
    an illustration of a college student
  3. Add details (e.g. surroundings, background, colour scheme)
    an illustration of a college student wearing a blue backpack and waiting on a subway platform

Additional Steps to Consider

  1. Define the art style or genre (e.g., realistic appearance, pop art, hi-lo)
    a minimalistic illustration of a college student wearing a blue backpack and waiting on a subway platform
  2. Identify the image composition (e.g., resolution, lighting style, aspect ratio, camera view)
    a minimalistic illustration of a college student wearing a blue backpack and waiting on a subway platform in a 1:1 aspect ratio

Result

result of ai image generation This image is generated in Adobe Firefly using the last prompt mentioned.
  • Keep it SimplePrompts can be written in natural language. However, you may want to use phrases and keywords separated by commas to keep things simple.
    For example, this prompt:
    • a minimalistic illustration of a college student wearing a blue backpack and waiting on a subway platform in a 1:1 aspect ratio
    Can be rewritten as:
    • minimalistic illustration, college student, with a blue backpack, waiting on a subway platform, 1:1 aspect ratio
  • Be SpecificTry to be specific in your description.
    For example, instead of stating:
    • "a landscape painting,"
    You could try:
    • "forest painting"
    • "waterfall painting"
    Note that concrete language (e.g., a cloudy day) produces more predictable results while abstract language (e.g., a moody day) generates more varied results.
  • Keep Prompts Short Using between 3 to 5 descriptive elements is recommended if you are new to using AI image generators.
  • Remember Limitations Understand the parameters of each AI tool.
    For example, in Midjourney, you need to enter /imagine before your prompt. Also, --no handles negative prompts in Midjourney (e.g., --no trees excludes trees in images generated).
  • Experiment with different words to see how they impact the images generated.
  • CiteAcknowledge the use of AI when you use an AI-generated image in your own work.
  • Avoid Copyrighted References When creating AI prompts, avoid referencing copyrighted artistic works (such as "in the style of Studio Ghibli") in your descriptions. This practice helps ensure ethical use of AI tools by respecting the intellectual property rights of creators.

It takes time and practice to craft and experiment with text to image prompts that get you the best results. You could try using a tool like ChatGPT to describe the image you want and get ideas for a prompt to use in an image generator. There are also online resources to browse AI-generated images and corresponding prompts:

Try Image Prompting

How good are your prompting skills? Try it with this Say What You See - opens in a new tab activity from Google Arts and Culture Experiments.


Try Image Prompting- Opens in a new tab