Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Prompt Engineering

Prompt Engineering

Prompt Engineering

Karahan Yavuz Kara

February 24, 2025
Tweet

Other Decks in Programming

Transcript

  1. What does Prompt Engineering mean? -A fancy way of guiding

    a LLM to produce the desired output.
  2. Large Language Models(LLMs) Artificial intelligence model trained on massive amounts

    of text data to understand, generate, and manipulate human language. Definition GPT (Generative Pre-trained Transformer) PaLM (Pathways Language Model) Claude – Developed by Anthropic, LLaMA (Large Language Model Meta AI) Popular LLMs
  3. Prompt Construction Techniques 🔹"Write three different Instagram bios for a

    restaurant." 🔹 "Write a React code snippet where clicking a button triggers an alert." 1. Direct Instruction 🔹"I’m an entrepreneur opening a new coffee shop. My Instagram bio should reflect our love for high-quality coffee and our cozy atmosphere. Suggest three different bios." 2. Contextual Prompting 🔹 "Here are two tweet examples: 1️⃣ 'Coffee wakes us up in the morning, but the real magic happens when it’s shared with friends. ☕✨' 2️⃣ 'The best ideas are born over a cup of coffee. What will you create today? 🚀 #coffee' 🔹 Generate two more tweets in a similar style." 3. Few-shot Prompting
  4. Clearly state what you want as the output, with enough

    detail but in a simple way. President of OpenAI Greg Brockman (2025 feb)
  5. Prompt Injection is a type of attack where a user

    manipulates a language model by injecting misleading or malicious instructions into the input prompt. This technique exploits the model's tendency to follow prompts literally, potentially overriding its original behavior or security constraints.
  6. What are tokens? A token is the smallest unit of

    text that a language model processes. A token ID is a unique numerical identifier assigned to a specific token within a language model's vocabulary.
  7. "temperature" parameter controls the randomness and creativity of the generated

    text. Adjusting this parameter influences the model's selection of words, thereby affecting the diversity and predictability of its output Temperature
  8. I Like The It When That Trains Frogs 0. 05

    0. 3 0. 3 0. 15 0. 15 0. 05 probabilities of the next word if you are working with a low temperatured llm the results will not be much creative
  9. Yes, prompt engineering is a real skill, but its importance

    depends on the context in which you're using LLMs. Prompt engineering is a skill, but its importance may diminish over time as AI systems become more context-aware. However, for now, those who understand how to structure queries effectively will always have an edge in extracting the best results.