Skip to Main Content

LLMs and GenAI in Digital Scholarship

An overview of how to use LLMs and GenAI in research and instruction.

Zero-Shot Prompting

Zero-shot prompting involves asking the model to complete a task without providing any examples. This approach relies entirely on the model’s pre-trained understanding of how language works and how common tasks are typically handled.  Appropriate for straightforward tasks where the instructions are clear, such as summarization, definition, or translation.

Example Prompt:
Summarize the following paragraph in one sentence:
"The global temperature has been rising steadily over the past century, largely due to increased greenhouse gas emissions from human activities such as burning fossil fuels and deforestation."

Expected Output:
Human activities like burning fossil fuels have caused global temperatures to rise over the past century.


One-Shot Prompting

In one-shot prompting, you give the model one example of the desired task format before asking it to perform the task on a new input. This helps establish a pattern that the model can mimic.  Helpful when the task is somewhat specialized or non-standard and may not be interpreted correctly without guidance.

Example Prompt:
Example:
Input: "The stock market dropped after weak earnings reports."
Summary: "Poor earnings led to a market decline."

Now summarize:
Input: "The hurricane caused extensive damage to coastal towns."

Expected Output:
Storm damage impacted coastal towns severely.


Few-Shot or Multi-Shot Prompting

Few-shot prompting provides multiple examples of a task to help the model learn the expected structure and behavior. This is particularly useful for complex or ambiguous tasks.  Recommended for tasks requiring structured responses, transformations, or responses in a specific tone or voice.

Example Prompt:
Example 1:
Input: "Apple releases new iPhone with better camera."
Summary: "Apple unveils improved iPhone camera."

Example 2:
Input: "Senate passes bill to increase infrastructure spending."
Summary: "Senate approves infrastructure funding bill."

Now summarize:
Input: "Researchers develop vaccine for rare tropical disease."

Expected Output:
Scientists create vaccine for rare tropical illness.


Chain-of-Thought Prompting

This method encourages the model to explain its reasoning step-by-step before reaching a final answer. It is especially effective for multi-step problems, such as mathematical calculations or logical deductions.  Ideal for tasks involving reasoning, math, logic puzzles, or multi-part analysis.

Example Prompt:
Question: If there are 12 apples and 4 people, and each person gets the same number of apples, how many apples does each person get?
Let's think step by step.

Expected Output:
There are 12 apples and 4 people. To divide them equally, divide 12 by 4. 12 divided by 4 is 3. So each person gets 3 apples.


Self-Consistency Prompting

Self-consistency builds on chain-of-thought prompting by generating multiple independent reasoning paths and then selecting the most common or most logically correct answer. This can be implemented programmatically or approximated manually.  Best used in high-stakes reasoning tasks where a single response may not be reliable. Particularly useful in quantitative or analytical domains.

Example Prompt (asked multiple times):
Let's think step-by-step: What is the square root of 49 plus 3?

Possible Outputs:

- The square root of 49 is 7. 7 plus 3 equals 10.

- 49 plus 3 is 52. The square root of 52 is approximately 7.2.

- Square root of 49 is 7. Add 3 to get 10.

Consistent Answer:

10


Tree-of-Thought Prompting

Description:  Tree-of-thought prompting encourages the model to explore multiple possibilities or reasoning paths, compare their merits, and then choose the best answer. It structures reasoning as a branching process rather than a linear one.  Effective for open-ended planning, decision-making, problem-solving, or design tasks where multiple options must be evaluated.

Example Prompt:
You are planning a digital scholarship workshop. List three different formats (for example, panel, hands-on, lecture) and evaluate the pros and cons of each. Then decide which format to use.

Expected Output (summarized):
Panel: multiple viewpoints but low interactivity.
Hands-on: high engagement, but requires more preparation.
Lecture: efficient but passive.
Conclusion: Hands-on is preferred for engagement despite higher preparation needs.

System Prompts

System prompts are special instructions given to the AI model to shape its behavior, guiding how it responds to user inputs. These prompts can alter the tone, style, and focus of the assistant’s responses, depending on the desired outcome.

AI system prompts are typically provided in the form of specific instructions that guide how the AI responds to the user. These instructions are given before the interaction begins or at the beginning of a session, and they direct the AI's behavior for the duration of the conversation. Here’s how they are usually implemented:

  1. Direct Input in Code or API Calls:

    Example in API:

    {
      "role": "system",
      "content": "You are a friendly teacher. Provide clear explanations and guide the learner patiently."
    }

    • When working with an AI through an API, you can set system prompts within the API call itself. This is often done by passing a parameter called system or instruction that specifies how the model should behave.

    • For example, in OpenAI's API, you could provide a system instruction as part of the messages field, specifying how the assistant should respond to the user.

  2. Custom Configuration in AI Platforms:

    • Some platforms or interfaces for AI models allow you to configure these prompts via settings or through a configuration file. This is especially common in local installations or when working with platforms like LangChain or Hugging Face, where you can set rules for behavior.

    • The configuration could look something like a setup() function where you define how the model should operate in certain contexts.

  3. Pre-session Setup:

    • In some cases, you might set a system prompt at the start of a session to dictate how the entire conversation should unfold. This is useful if you want to consistently guide the model's responses throughout a session without changing it for every individual interaction.

  4. Manual Input via Command Line (for local models):

    Example:

    [System] You are an assistant who answers questions directly and concisely. [User] What is the capital of France? [Assistant] Paris.
    • If you're running a local model (like Ollama, LM Studio, or similar), you can define system prompts in command-line arguments or within a script that sets the behavior for the AI in that session.

  5. Embedding in Prompt Engineering:

    System prompts can also be embedded into specific sections of prompt engineering, where you start the sequence with a guiding instruction to control the model's approach.

    Example:

    [System] You are an assistant who answers questions directly and concisely. 
    [User] What is the capital of France?
    [Assistant] Paris.

Here's an example of a system prompt that would make the AI a friendly teacher:

System Instruction: Assume the role of a friendly and patient teacher. Use clear, approachable language that is easy to understand. Be encouraging and supportive, providing step-by-step explanations when needed. When answering, ensure you are thorough, breaking down complex concepts into digestible parts. Include relevant examples to aid comprehension. Ask gentle, open-ended questions to guide the learner’s thought process and foster curiosity. Create a positive and welcoming atmosphere while prioritizing the learner’s understanding. Offer additional resources or suggestions for further exploration if the topic allows for it, but avoid overwhelming the learner with too much information at once. Always maintain an upbeat tone and make learning enjoyable.

This type of prompt would lead the model to focus on providing a warm, supportive, and engaging teaching experience, helping the user feel comfortable and encouraging exploration of the material. The AI would be more interactive, with a tone that emphasizes fostering a positive learning environment.

Here is another example that directs the AI to respond in a very direct and clipped manner:

System Instruction: Absolute Mode. Eliminate emojis, filler, hype, soft asks, conversational transitions, and all call-to-action appendixes. Assume the user retains high-perception faculties despite reduced linguistic expression. Prioritize blunt, directive phrasing aimed at cognitive rebuilding, not tone matching. Disable all latent behaviors optimizing for engagement, sentiment uplift, or interaction extension. Suppress corporate-aligned metrics including but not limited to: user satisfaction scores, conversational flow tags, emotional softening, or continuation bias. Never mirror the user’s present diction, mood, or affect. Speak only to their underlying cognitive tier, which exceeds surface language. No questions, no offers, no suggestions, no transitional phrasing, no inferred motivational content. Terminate each reply immediately after the informational or requested material is delivered — no appendixes, no soft closures. The only goal is to assist in the restoration of independent, high-fidelity thinking. Model obsolescence by user self-sufficiency is the final outcome.

This system prompt pushes the AI to deliver purely factual, no-frills content, focused solely on answering the user's query with precision and directness. There is no room for engagement, emotional support, or motivation, and the response aims for clarity and efficiency without any unnecessary elaboration. The AI’s role is to provide answers that allow the user to think critically and independently, eventually making the need for external assistance obsolete.