UCPCOG AI Academy Week Two PDF
Document Details
Uploaded by PeacefulTan244
Tags
Summary
This document is a presentation on prompt engineering for use with AI tools such as ChatGPT, focusing on its use in local government tasks.
Full Transcript
UCPCOG AI Academy Week Two Introduction to Prompt Engineering 1. Understand what prompt engineering is and how it influences AI outputs. 2. Learn the basic components of an Week 2: effective prompt: instruction, context, examples, a...
UCPCOG AI Academy Week Two Introduction to Prompt Engineering 1. Understand what prompt engineering is and how it influences AI outputs. 2. Learn the basic components of an Week 2: effective prompt: instruction, context, examples, and constraints. Learning Objectives 3. Explore ChatGPT’s capabilities and its use in local government tasks. 4. Practice creating and refining prompts through a hands-on document summarization exercise. Definition: The process of designing inputs (prompts) to guide AI systems in generating accurate and relevant outputs. What is Importance: Prompt Well-crafted prompts help AI produce better Engineering? and more targeted results. Role: Ensures that the AI focuses on relevant information and generates aligned outputs. Policy & Document Creation: Accurate prompts ensure well-structured policy drafts, HR policies, press releases, job descriptions, etc. Why is Prompt Document Summarization: Aids in distilling lengthy documents into Engineering actionable summaries. Important in Data Analysis: Local Helps in extracting key insights from complex datasets. Government? Professional Services: Crafting announcements, RFPs, or press releases is more efficient with clear prompts. Instruction: Directly tell the AI what you want it to do. Context: Provide background Basic information relevant to the Components task. of an Effective Examples: Give specific Prompt examples to guide the AI. Constraints: Set parameters like word limits or required formats. Objective Create a detailed new member orientation packet for newly elected county Prompt commissioners for _________ county. The Example packet should introduce those members to the county, include essential policies, and an overview of any recent strategic plan. Context Expectation Prompt Decision Cycle ChatGPT Version User Account Attach File Chat History Type Your Text Here Submit Button Overview of ChatGPT What is ChatGPT? A language model that generates human-like text based on prompts. GovAI Main User Page Help Bot Roles Attach Files Chat History Enter Text Capabilities: Text generation, data summarization, question-answering, basic data analysis. Capabilities of ChatGPT ABC 1. Struggles with context over long conversations. 2. Can produce inaccurate results if prompts are unclear. Input Limitations ChatGPT Subscriber Plus / Teams Token Limits GPT-4 (also referred to as GPT-4 8k or "GPT-4o"): Token Limit: 32,000 tokens Approximate Words: ~24,000 to 25,000 words Approximate Pages: ~100 pages (assuming ~250 Input double spaced words per page) This model is balanced for general tasks that don’t require Limitations extensive memory or very long inputs. Cont’d. Document Uploads | Bypass Limits 1. When you upload a large document (e.g., a 100-page Document PDF), ChatGPT processes it in chunks. Input 2. It doesn’t load the entire document into memory at once; instead, it indexes the document and can search it based on specific queries. 3. Essentially, it creates a kind of "virtual reference No system" to pull relevant information as needed. Limitations ChatGPT Subscriber Plus / Teams Output Token Limits The maximum output tokens for ChatGPT (GPT-4 Turbo) is the remainder of your 32,000 tokens for each response. Breakdown: If you use 28,000 tokens of input, you are left with Output 4,000 tokens roughly translates to 3,000 words. Limitations This equates to approximately 12 pages of text (assuming 250 words per page). How This Affects a Long Chat As the conversation progresses, ChatGPT keeps track of the history up to the context window limit. If the conversation exceeds the token limit, the oldest parts of the chat are "forgotten" or dropped to make room for new inputs and outputs. Creative Prompt Engineering Prompt engineering techniques can be used to create long output replies Bypassing Design your prompt with the end goal in mind, instruct Output ChatGPT to break down the replies into manageable sized chunks Limitations Instruct it to “ask for permission to continue if it needs more space to reply.” Tell ChatGPT to continue this process until its task is complete. Prompt Example: Create a 10,000 Word Document I want to create a 10,000 word document on government procurement in North Carolina. You will create an outline of Bypassing the procurement document, and then write the content based on the outline you create. Output You will break the document down into manageable chunks Limitations so that your output is not truncated, and you will ask me for permission to continue your work when you run out of space to reply. Before you move on to the next item in the Cont’d. procurement document outline, you will ask me to review your work. Once I approve your work, you will move onto the next item in the procurement document outline. You will continue this until you have completed all content from the procurement document outline, there are 10,000 words, and I approve the final results. Go step by step, confirm you understand my instructions, and ask any clarifying questions. Accuracy Concerns: Refine prompts, fact-check outputs, use Hallucinations multi-turn conversations. Citations Citations Ask for citations and a reference list to check sources. Security Data Sensitivity: Avoid inputting sensitive info, use secure AI tools, human oversight. Trust Bias: Use diverse data, prompt inclusivity, audit AI responses. Structured Example 1 (Instruction + Context): Examples of Summarize the city's annual report focusing on budget allocations and Prompts in major achievements. Government Structured Example 2 (Instruction + Constraint): Examples of Provide a 100-word summary of the Prompts in transportation section of this public report. Government Example of a 63 page NCDOT report compressed into a 100 word summary to create an easy fact sheet. The whole process took 30 seconds. Structured Examples of Example 3 (Instruction + Examples): Here are three examples of department Prompts in goals. Create a summary of common Government themes and potential challenges. Quick Outline of An Executive Summary Document Sample Prompt for Hands-On Exercise Example: 'Summarize the Wilson County Comprehensive Plan into a 500 word executive summary. Focus on key initiatives, major achievements, and budget allocations.' Hands-On Exercise: Document Summarization 1. Instruct ChatGPT or GovAI to identify three key findings from the the Wilson County Comprehensive Plan survey results, community meetings, and key issues report. 2. Ask ChatGPT or GovAI to identify the next steps for implementation listed in the report, and to brainstorm five action item ideas on each step. How did prompt structure affect the quality of the summary? Debrief on What refinements improved Hands-On the response? Exercise How can similar techniques be applied to other tasks like reviews or updates? Prompt Engineering is key to getting relevant AI responses. Key ChatGPT can be used in various local government Takeaways tasks. Practice refining prompts to improve outputs over time.