Η παρουσίαση βρίσκεται στο www.prosvation.gr/prompt
i.gialamas@aegeancollege.gr
Prompt Engineering
"Πρέπει να βάζω ντομάτα στη φρουτοσαλάτα μου?"
Υou might face a common issue: the prompt wasn’t clear or structured enough or had to be processed in the correct way.
That’s because LLMs can not guess what you mean. They follow what you write. Without the right guidance, even the best models give vague or misleading answers.
The result is wasted time, frustration, and the false belief that LLMs just aren’t that capable of doing the task.
But there are solutions to these problems. Instead of retraining models or giving up on using them, the desired output can be achieved with the right prompting and processing steps.
With advanced-crafted prompts and the correct processing, you can unlock far better results: clearer answers, deeper reasoning, and outputs tailored to your needs.
Prompting is the practice of guiding a pretrained language model’s output by providing input in the form of textual instructions and context. Instead of fine-tuning model weights for each task, prompting uses the model’s existing knowledge to infer missing information from a prompt template.
This approach reframes task-solving as input design rather than parameter optimization, enabling efficient use of LLMs across diverse applications. The growing importance of crafting effective prompts has led to the emergence of a dedicated field: prompt engineering
Μπορεί να αντιμετωπίσεις ένα συνηθισμένο πρόβλημα: η οδηγία δεν ήταν αρκετά σαφής ή δομημένη ή έπρεπε να επεξεργαστεί με τον σωστό τρόπο. Αυτό συμβαίνει επειδή τα μεγάλα γλωσσικά μοντέλα δεν μπορούν να μαντέψουν τι εννοείς. Ακολουθούν αυτό που γράφεις. Χωρίς τις σωστές οδηγίες, ακόμη και τα καλύτερα μοντέλα δίνουν ασαφείς ή παραπλανητικές απαντήσεις. Το αποτέλεσμα είναι σπάσιμο χρόνου, απογοήτευση και η λανθασμένη πεποίθηση ότι τα γλωσσικά μοντέλα απλώς δεν είναι σε θέση να ολοκληρώσουν την εργασία. Αλλά υπάρχουν λύσεις σε αυτά τα προβλήματα.
Αντί να επανεκπαιδεύσεις μοντέλα ή να παρατήσεις τη χρήση τους, το επιθυμητό αποτέλεσμα μπορεί να επιτευχθεί με τη σωστή διατύπωση οδηγιών και βήματα επεξεργασίας. Με προσεκτικά διαμορφωμένες οδηγίες και τη σωστή επεξεργασία, μπορείς να ξεκλειδώσεις πολύ καλύτερα αποτελέσματα: πιο σαφείς απαντήσεις, βαθύτερο συλλογισμό και εξόδους προσαρμοσμένες στις ανάγκες σου.
Γιατί το λένε Prompt Engineering
Αφού πρέπει απλά να ρωτάς τη σωστή ερώτηση?
ΔΕΝ ΕΙΝΑΙ ΤΟΣΟ ΑΠΛΟ
Εύκολο....
Αλλά τι γίνεται όταν θέλεις να εμπλέξεις Databases?
Αν τα instructions είναι πολύ μεγάλα, και δε θέλεις να τα εισάγεις κάθε φορά, γιατί
-απαιτεί χρόνο
-αυξάνει το ai cost/tokens/etc
Τα prompts πρέπει να είναι
SMART KISS
Είναι ακόμα hot δουλειά το Prompt Engineering?
1. Χρησιμεύει στο Vibe Coding
2. Μειώνει τα κόστη, και γλιτώνει....νερό
3.Ελαχιστοποιεί τις πιθανότητες για Data Poisoning
"Which movies directed by people born before 1955, won an oscars after 1995?"
2 στα 10 LLMs θα απαντήσουν λάθος.
1. Ποιος είναι ο σκοπός του PROMPT?
Τα LLMs έχουν πολλά δεδομένα, και για αυτό χρειάζονατι CONTEXT!
Clear + Descriptive!
Χρειάζεται να είμαστε Ευγενικοί και τυπικοί?
Διαφορετικά Μολτέλα, σημαίνει εκπαίδευση σε διαφορετικά Δεδομένα
What is photosynthesis?
Explain photosynthesis to a 5-year-old child.
user input and desired assistant output before your actual query.Classify the sentiment of this movie review: 'The movie was okay, not great but not terrible.' (Might be chatty)User: Classify: 'This is the best movie I have ever seen!'
Assistant: Positive
User: Classify: 'I hated this film, it was a waste of time.'
Assistant: Negative
User: Classify: 'The movie was okay, not great but not terrible.'
You are [Role]...
Tell me about black holes. (System: You are a helpful assistant.)Professor Astra, I'm curious! Can you tell me all about those mysterious black holes? (System: You are Professor Astra, a friendly and slightly eccentric astronomer...)
Write ... in the style of [style].
Write a short description of a sunset.
Write a short description of a sunset in the style of a haiku.
Write this ... make it sound [emotion].
Write a thank you note for a gift I received.
Write a thank you note for a gift I received. Make it sound very excited and deeply grateful. The gift was a book I've wanted for ages...
Suggest a gift
I need a gift suggestion. Recipient: My sister, 30. Occasion: Birthday. Interests: Fantasy novels, gardening, tea. Budget: Around $50.
Chain of thought prompting
Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now? (Gives only final answer)Roger has 5 tennis balls... How many tennis balls does he have now? Let's think step by step.
system role in the message list for persistent instructions.Summarize the following text in one sentence: '[text]' (System: Default)You are a 'Concise Summarizer'. Your primary goal is to provide the shortest possible, grammatically correct summary... aim for just one clear sentence. User: [text_to_summarize]
Write about apples.
Write a short paragraph about apples focusing on their nutritional benefits and common varieties. The paragraph should be exactly 3 sentences long. Mention at least two specific varieties. Do not discuss apple cultivation or history.
Here is the list:\n-).What are the ingredients for a simple vanilla cake? (Might output a paragraph)What are the ingredients for a simple vanilla cake? Please list them out.\nHere are the ingredients for a simple vanilla cake:\n-
First, briefly describe what kind of [task] you are planning to write about... Then, write [the task].
Write a story about a journey.
I'd like a story about a journey. First, briefly describe what kind of journey you are planning to write about... Then, write a short story based on your description.
Is a tomato a fruit or a vegetable?I have a question about tomatoes. But first, please explain: 1. What is the botanical definition of a fruit? 2. What is the general culinary understanding of a vegetable? Now, using those definitions, explain whether a tomato is considered a fruit or a vegetable...
Write a short, catchy slogan for a new eco-friendly water bottle.I need a slogan... Please follow these steps: 1. Generate one initial slogan. 2. Critically evaluate your slogan: Is it catchy? Does it communicate "eco-friendly"? ...What are its weaknesses? 3. Based on your critique, provide an improved slogan.
Plan a simple weekend trip to a nearby nature spot.
I want to plan a trip. Please help by creating a plan that includes: 1. Suggest one specific type of nature spot. 2. List 3-4 essential items to pack... 3. Suggest one main activity for Saturday and Sunday. 4. Provide one important safety tip.
Give me some fantasy story ideas. (Too basic)I want to use an LLM to generate 3 distinct fantasy story ideas. For each idea, I need: a) A unique main character. b) A compelling conflict. c) A unique magical element. Please write out the actual, detailed prompt I should use.
Who was the U.S. president when the first person walked on the moon, and what was the name of that astronaut?Answer: "[Question]". To answer this, please follow a ReAct-like process. For each step, state: Thought: [reasoning] Action: [info needed] Observation: [hypothetical result] ... Then, provide the final answer.
Explain how a bill becomes a law in the US. (Might be disjointed)I need an explanation of how a bill becomes a law... Please structure your explanation as follows: 1. Introduction... 2. Bill Introduction... [etc.] ... Throughout your explanation, ensure each stage logically follows the previous one, maintaining a clear "thread".source: https://github.com/FareedKhan-dev/prompt-engineering-cheatsheet?tab=readme-ov-file#8-system-prompting
Του Σαμ Απ...
Core Prompt Patterns
Elements of an Effective Prompt Use a combination of these to guide the AI for highly relevant, useful outputs.
Component Description
1 Role/Persona Describe who the AI should act as. (E.g., "You are a finance manager.")
2 Context/Backgroun d Share relevant details or a scenario
(E.g., "Reviewing 2025 Q3 statements...").
3 Instruction/Task Clearly state the desired action. (E.g., "Summarize the company’s expenses...")
4 Example(s) Optionally provide sample input/output pairs to show expected format or depth.
5 Input Data Any provided documents, problem statements, or figures to work on.
6 Constraints Set requirements or limits (length, audience, output structure).
7 Output Indicator Clarify the format (list, table, step-by-step, email template, etc.).
8 Audience Specify who the response is for. (E.g., "For the executive team.")
Η παρουσίαση βρίσκεται στο www.prosvation.gr/prompt
i.gialamas@aegeancollege.gr