Basic Prompt Engineering

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Questions are hidden until you start the quiz

Flashcards

Token Limit

The maximum number of tokens ChatGPT can use in a conversation.

Output Tokens

The number of tokens used for the response generated by ChatGPT.

History Management

ChatGPT retains conversation history up to its token limit.

Creative Prompt Engineering

Techniques to design prompts that elicit detailed outputs.

Signup and view all the flashcards

Chunked Output

Breaking down responses into smaller, manageable segments.

Signup and view all the flashcards

Review Process

Method where ChatGPT asks for confirmation before progressing.

Signup and view all the flashcards

Refining Prompts

Improving prompt wording to get better and more accurate responses.

Signup and view all the flashcards

Fact-checking

Verifying information provided by ChatGPT for accuracy.

Signup and view all the flashcards

Prompt Engineering

The process of designing inputs to guide AI in generating outputs.

Signup and view all the flashcards

Importance of Prompt Engineering

Well-crafted prompts help AI produce better and more targeted results.

Signup and view all the flashcards

Basic Components of an Effective Prompt

Instruction, context, examples, and constraints that guide AI outputs.

Signup and view all the flashcards

Instruction in Prompting

Directly telling the AI what you want it to do.

Signup and view all the flashcards

Context in Prompting

Providing background information relevant to the task.

Signup and view all the flashcards

Examples in Prompting

Giving specific examples to guide the AI.

Signup and view all the flashcards

Constraints in Prompting

Setting parameters like word limits or required formats.

Signup and view all the flashcards

Document Summarization

Aiding in distilling lengthy documents into actionable summaries.

Signup and view all the flashcards

ChatGPT

A language model that generates human-like text based on prompts.

Signup and view all the flashcards

Capabilities

Includes text generation, data summarization, question-answering, and basic data analysis.

Signup and view all the flashcards

Input Limitations

Struggles with context over long conversations and can produce inaccurate results if prompts are unclear.

Signup and view all the flashcards

Token Limit for GPT-4

32,000 tokens approximately equal to 24,000 to 25,000 words or 100 pages.

Signup and view all the flashcards

Document Uploads Limitations

Processes large documents in chunks instead of loading all at once.

Signup and view all the flashcards

Virtual Reference System

Indexes uploaded documents to search specific queries without loading all content.

Signup and view all the flashcards

Maximum Output Tokens

The output is limited to the remaining tokens from the user's 32,000 tokens after input.

Signup and view all the flashcards

Model Balance

Balanced for general tasks that don’t need extensive memory or very long inputs.

Signup and view all the flashcards

Study Notes

UCPCOG AI Academy - Week Two

  • The course is titled UCPCOG AI Academy, Week Two, Introduction to Prompt Engineering.
  • Learning Objectives for Week Two include: understanding prompt engineering, basic prompt components (instruction, context, examples, and constraints), exploring ChatGPT's capabilities in local government, practicing prompt creation through a hands-on document summarization exercise.

What is Prompt Engineering?

  • Definition: The process of designing inputs (prompts) to guide AI systems to produce accurate and relevant outputs.
  • Importance: Well-crafted prompts help AI produce better and more targeted results.
  • Role: Ensuring AI focuses on relevant information and generates aligned outputs.

Why is Prompt Engineering Important in Local Government?

  • Applying prompt engineering is crucial for effective use in local government tasks involving:
    • Policy and document creation (e.g., policy drafts, HR policies, press releases, job descriptions)
    • Document summarization (lengthy documents into summaries)
    • Data analysis (extracting key insights from complex data sets)
    • Professional services (crafting announcements, RFPs, press releases)

10 Essential Steps for the Perfect Prompt

  • Define Objective: State the prompt's purpose (e.g., analyze a report, tell me key findings)
  • Provide Context: Give background information relevant to the prompt (e.g., details about the report to be evaluated)
  • Set Constraints: Define limits, output requirements, and complexity (e.g., specific word count, format, complexity of analysis)
  • Use Direct Language: Give clear instructions (e.g., write a press release)
  • Iterate and Refine: Analyze responses and try different phrasing or prompt formats
  • Creative Prompting: Innovate how you ask the questions
  • Cite Relevant Sources: Ask for citations and ensure validity
  • Persona: Have the AI adopt a specific role/character (e.g., Act as a legal professional)
  • Don't Quit: Understand that learning the AI takes time and effort
  • Knowledge Library: Utilize available data and examples (documents) to make the AI learn faster.

Prompt Example

  • Objective: Create a detailed new member orientation packet for newly elected county commissioners.
  • Context: The packet should introduce the commissioners to the county, essential policies, and a recent strategic plan overview.

Prompt Decision Cycle

  • A visual shows a cycle: Idea -> Prompt -> ChatGPT Analysis & Reply -> Refinement -> Response OK?/Regenerate Response -> Use Response

Overview of ChatGPT

  • ChatGPT is a language model for generating human-like text from prompts.

Capabilities of ChatGPT

  • Capabilities include text generation, data summarization, question-answering, and basic data analysis.

Input Limitations

  • Struggles with context over long conversations
  • Produces inaccurate results with unclear prompts
  • Content outside context window is ignored by the AI

Input Limitations Continued

  • Token limitations (GPT-4; token limitations affect the maximum amount of input and output)
  • Processing large documents is handled in chunks and there are no limitations on the size of the input document.

Output Limitations

  • The maximum output tokens for ChatGPT
    • If using 28,000 of input tokens, approximately 3,000 words remain. This translates to 12 pages of text, assuming 250 words per page.
  • As conversation progresses, ChatGPT keeps track of its conversation up to the context window, if exceeding this limit, oldest conversation data may be dropped.

Bypassing Output Limitations

  • Prompt engineering techniques for longer output replies include structuring prompts to break down replies into manageable chunks, ask permission to continue if more space is needed, tell the AI to continue until its task is complete.

Document Input No Limitations

  • When uploading large documents (e.g., 100-page PDFs), ChatGPT processes in chunks and does not load the entire document into memory. It indexes the document and allows searching based on specific queries.

Hallucinations

  • Refine prompts, fact-check outputs, use multi-turn conversations.

Citations

  • Ask for citations and a reference list to check sources.

Security

  • Avoid inputting sensitive information, use secure tools for AI input, and require human oversight.

Trust

  • Use diverse data, prompt inclusivity, and audit AI responses.

Structured Examples of Prompts in Government

  • Example 1 (Instruction + context):
    • Summarize the city's annual report, focusing on budget allocations and major achievements.
  • Example 2 (Instruction + Constraint):
    • Provide a 100-word summary of the transportation section in a public report.
  • Example 3 (Instruction + Examples):
    • Summarize common themes and potential challenges in three examples of department goals.

Hands-On Exercise: Document Summarization

  • Instruct the AI (ChatGPT or GovAI) to identify three key findings.
  • Identify next steps for implementation.
  • Brainstorm five action item ideas.

Debrief on Hands-On Exercise

  • Evaluate prompt structure's effect on summary quality, analyze effectiveness and refinement.
  • Discuss potential application of these techniques to other tasks such as reviews, or updating materials, and improvements for other responses.

Key Takeaways

  • Prompt Engineering is essential for getting relevant AI responses, ChatGPT can be used in various local government tasks, practice refining prompts to improve outputs over time.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

UCPCOG AI Academy Week Two PDF

More Like This

ChatGPT Quiz
3 questions

ChatGPT Quiz

AccessibleEpiphany avatar
AccessibleEpiphany
Excel Formulas with ChatGPT Quiz
3 questions
Avatar e a Versatilidade do ChatGPT
10 questions
Capacités et limites de ChatGPT
12 questions
Use Quizgecko on...
Browser
Browser