Podcast
Questions and Answers
Questions are hidden until you start the quiz
Flashcards
Token Limit
Token Limit
The maximum number of tokens ChatGPT can use in a conversation.
Output Tokens
Output Tokens
The number of tokens used for the response generated by ChatGPT.
History Management
History Management
ChatGPT retains conversation history up to its token limit.
Creative Prompt Engineering
Creative Prompt Engineering
Signup and view all the flashcards
Chunked Output
Chunked Output
Signup and view all the flashcards
Review Process
Review Process
Signup and view all the flashcards
Refining Prompts
Refining Prompts
Signup and view all the flashcards
Fact-checking
Fact-checking
Signup and view all the flashcards
Prompt Engineering
Prompt Engineering
Signup and view all the flashcards
Importance of Prompt Engineering
Importance of Prompt Engineering
Signup and view all the flashcards
Basic Components of an Effective Prompt
Basic Components of an Effective Prompt
Signup and view all the flashcards
Instruction in Prompting
Instruction in Prompting
Signup and view all the flashcards
Context in Prompting
Context in Prompting
Signup and view all the flashcards
Examples in Prompting
Examples in Prompting
Signup and view all the flashcards
Constraints in Prompting
Constraints in Prompting
Signup and view all the flashcards
Document Summarization
Document Summarization
Signup and view all the flashcards
ChatGPT
ChatGPT
Signup and view all the flashcards
Capabilities
Capabilities
Signup and view all the flashcards
Input Limitations
Input Limitations
Signup and view all the flashcards
Token Limit for GPT-4
Token Limit for GPT-4
Signup and view all the flashcards
Document Uploads Limitations
Document Uploads Limitations
Signup and view all the flashcards
Virtual Reference System
Virtual Reference System
Signup and view all the flashcards
Maximum Output Tokens
Maximum Output Tokens
Signup and view all the flashcards
Model Balance
Model Balance
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.