0% found this document useful (0 votes)
17 views10 pages

AI Fundamentals: LLMs & Prompt Strategies

Uploaded by

jamilur reza
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views10 pages

AI Fundamentals: LLMs & Prompt Strategies

Uploaded by

jamilur reza
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

12/07/2025

AI FUNDAMENTALS

P R ES EN TE D B Y

K HA IR A HA MMED

INSTRUCTOR KH A IR AH AM M E D

AI E ngineer (Brain Statio n 23)


Mar 2024 - Presen t

CE O (Xinotri x )
Dec 2024 - Presen t

Freela nc e Data Scientis t (Fiv err)


Dec 2020 - Mar 2025

1
12/07/2025

AGENDA OVERVIEW

01 05
I N TR O TO L L M TYP ES OF P R O M P T
EN GI N EER I N G

02 06
P R OM P T EN GI NE ER IN G TOK EN S M A N A GEM EN T
S TR A TEGI ES

03
TOK EN S 07
S TEP S TO I TER A TE

04
C O N TEX T WI N D OWS

INTRODUCTION TO LLMS AND AI

In cr edibl y s oph is t ica t ed


a u t oco mpl e t e sy st em s t h a t
u n der st a n d a n d g en e ra t e
h u ma n - l ik e t e x t

2
12/07/2025

INTRODUCTION TO LLMS AND AI


FUNDAMENTALS

WHAT ARE TOKENS?

S i m p l e Ex p l a n a t i o n: To k e n s ar e t h e " u n it s" t h a t L L M s u s e t o u n de rs t a n d
t e x t , l ik e pu z z l e pie c e s o f l an gu a ge

To ke n E xa m p l e s :
" H e ll o " = 1 t o k e n
" a r t if ic ial in t e l l ig e n c e " = 2 t o k e n s
" do n ' t " = 2 t o k e n s ( " do n " + " ' t " )

R u l e o f Thu mb : 1 t o k e n ≈ 0 .7 5 wo rd s in E n gl ish .

C oun t T ok en s : h t t ps:/ / pl a t f o r m. o pe nai. c o m/t o k en iz e r

3
12/07/2025

CONTEXT WINDOWS

W h at is a C o n t e x t W in do w ? M a x im u m a mo u n t o f t e x t ( in
t o k e n s) a n L L M c an wo rk w it h at o n e t ime

C ur r e nt S i z es (b a s ed o n m od el s ):
GPT: 32 , 00 0 - 1 2 8 K t o k e n s
C la u d e 3 . 5 : 2 0 0, 0 0 0 t o k e n s
Ge min i 2 . 5 Pro : 1 M t o k e n s

R e a l - W or l d C o mp a r i s on:
4 ,0 0 0 t o k e n s ≈ 3 pa ge s o f t e xt
3 2 ,0 0 0 t o k e n s ≈ 24 pa g e s o f t e x t

WHY CONTEXT WINDOWS MATTER

E ma i l S up p or t :
• S ma l l w in do w: O n l y b rie f e ma ils
• L a r ge win do w: E n t ire e ma il t h r e ad s + c o mpa n y k n o wl e dge

D o cum en t P r o ce s s i n g :
• S ma l l w in do w: M u s t br e a k in t o c h u n k s
• L a r ge win do w: A n al y z e e n t ir e r e po r t s a t o n c e

C onv e r s a t i on s :
• L imit e d win do w: F o r ge t s e a r l ie r pa r t s
• E xt e n de d win do w: M a in t a in s fu ll c o n t e x t

4
12/07/2025

TOKEN MANAGEMENT STRATEGIES

I n p ut O p t i mi z a t i o n

❌ B a d: " Ple a se a n a l y z e t h is do c u m e n t an d pr o v ide a c o mp re h e n siv e


su mma ry wit h a l l t h e impo r t an t de t ail s a n d k e y po in t s. . . "

✅ Go o d: " S u mma r iz e k e y po in t s fr o m t h is do c u me n t :"

R e s p o ns e L en g t h
Pr o m pt : " R e sp o n d in e x a c t l y 3 bu l l e t po in t s" Re su l t : Pr e dic t a bl e t o k e n
u s ag e f o r c o st c o n t r o l

C ont e xt P r i o r i t iz a t i on
S t ru c t u r e y o u r in pu t :
1 . M o st impo rt a n t c o n t e xt f irs t
2 . Cu rr e n t qu e st io n / t a sk
3 . A ddit io n a l c o n t e x t if spa c e a l lo ws

PROMPT ENGINEERING

W ha t i s P r o mp t i n g ?
Pr o m pt in g is t h e pr o c e s s o f
pr o v idin g s pe c ific in st ru c t io n s t o a
Ge n e ra t iv e A I ( Ge n A I ) t o o l t o
r e c e iv e n e w in fo rma t io n o r ge n e r at e
a de sir e d o u t c o me . Th e s e
in st r u c t io n s ar e c al l e d pr o m pt s.

A g o o d pr o mp t c l e a r l y de fin e s t h e
t a sk a n d p ro v ide s n e c e s sa ry
c o n t e xt , r e fe r e n c e s, a n d c o n s t r a in t s
t o g u ide t h e A I ' s r e spo n se .

5
12/07/2025

PROMPT
ENGINEERING

Prompt Type
• System Prompt
• User Prompt

PROMPT ENGINEERING (EXAMPLE)


# T as k
A c t as an ex perie n ce d e m ail m ark et in g c opywrite r # R e fe re n ce s
f or a s u s t ain a bl e fa s h ion bra n d. Su bjec t l in e of pre viou s e m ail : “ S u m m e r’ s Sof t e s t
Y ou r t as k is t o writ e a prom ot io n al e m a il . Drop is Co m in g 🌿 ”
Form a t t h e ou t pu t as a pe rs u as ive an d en ga gin g Cu s to m er f e edb ac k h igh l ig h t s :
m a rk e t in g e m ail in p la in t e xt ( n o HT M L) , w ith : - Love f or co m f ort an d s k in -f rie n dl in es s
- Ca tc h y s u b je c t l in e - R e qu e s t s f or m ore s t yl in g t ips
- E n g ag in g pre vie w t ex t E xam pl e C TA t h a t work ed we l l in th e pas t : “ S ee
- Com pel l in g body ( with CTA ) W h at ’ s I n s ide ”

E v a l ua t io n Wa y s :
# Con te xt
E n s u re t h e e m ail :
Th e e m ail is part of a s u m m er cam paig n t it l e d
✓ Hig h l ig h t s u rg e n cy an d ec o-f rie n dl y va l u e
“ B re at h e Ea s y – Org an ic Lin en E dit” .
✓ Ha s a c l ea r CTA
Ta rge t au d ie n c e : E c o-c on s c iou s m il l e n n ial s ag ed 25–
✓ M a t ch e s t h e bran d t on e
35, m os tl y wo m en .
✓ Fe e ls pe rs on a l an d n on - s pam m y
Th e g oal is t o prom ot e a 3-d ay f la s h s al e ( 20% of f )
on b re at h a bl e, orga n ic l in e n we ar.
I te ra t io n Wa y s
Th e bran d t on e is warm , m odern , a n d
I f t h e ton e fe e l s t oo g e n e ric , in f u s e m ore
c on ve rs at ion al .
pe rs on al it y an d b ra n d-s pec if ic l an g u a ge .
Th is is t h e s e c on d e m a il in t h e c am pa ign — f irs t on e
was a te as er.

6
12/07/2025

SU B J E CT L I NE :
I t 's h e re ! Y ou r lin e n obs es sion s t art s n ow ( 3 days on ly ) 🌾

P RE V I EW TE X T:
20% of f ou r dre am y org an ic l in e n c ol l ec t ion – pl u s s t yl in g s ec ret s in s ide

E M A I L B O DY :
He y be au t if u l ,
R e m e m be r t h at "s of te s t dro p" we t ea s e d? W e ll , it' s f in al l y h e re, an d h o n es tl y? W e' re h a vin g a h ard t im e k ee pin g t h e s e pie c es in s t ock .
T h e Bre at h e E as y Orga n ic Lin e n E dit is LI V E – an d we 're ce l e brat in g wit h 20% of f f or t h e n e xt 3 da ys on l y.
He re 's wh y ou r com m u n it y c an ' t s t op ravin g abou t t h is c ol l e ct ion :
✨ Sk in - l ovin g org an ic l in en t h at ge t s s oft e r wit h eve ry was h ( s e riou s l y, it' s l ik e bu t te r by was h t h re e )
✨ B re at h a bl e we ave s t h at k ee p yo u cool du rin g t h os e s t ic k y s u m m er days
✨ T im el e s s c u t s t h at work f ro m f arm e rs m ark et t o rooft op drin k s
ST Y LI NG S EC RE T #1: Laye r ou r l in en bu t ton - down ove r a t an k a n d t ie it at t h e wais t – in s t an t c h ic with z e ro e ff ort .
ST Y LI NG S EC RE T #2: T h e wide- l eg l in en pan t s ? Th e y're n ot ju s t f or we e k e n ds. Pa ir t h e m wit h h ee l s an d a f it t ed t op f or t h at ef f ortl e s s
of f ice l ook e ve ryon e 's as k in g abou t .
A n d be c au s e you as k e d f or m ore s t yl in g in s po, we' ve t u ck e d s om e e xc lu s ive ou t f it f orm u l as in s ide t h e c ol l e ct ion pa ge ( you 'l l l ove wh at
we did wit h th a t ve rs at il e m idi dre s s ) .
R e ady t o brea th e e as y t h is s u m m er?

[ S HO P THE L I NE N E DI T - 20% O FF]

T h is f l as h s al e e n ds Friday at m idn ig h t, an d k n owin g h ow m u ch you l oved o u r l a s t l in en drop, we don 't e xpe c t t h e s e t o s t ick a ro u n d
l on g .

Se n din g you al l th e bre ez y s u m m e r vibes , Sara h & t h e te am


P.S . Ou r c u s t om e rs t el l u s t h is l in en col l e ct ion is a g am e -c h an ge r fo r s e n s it ive s k in – f in a ll y, s t yl e th a t l ove s you b ack . Bu t wit h on l y 72
h ou rs le f t on t h is de al , do n 't s l e ep on it ! 💚

PROMPT ENGINEERING (IMAGE)

7
12/07/2025

PROMPT ENGINEERING EXAMPLE (IMAGE)

Cre at e a l an d s ca pe -s t yl e dig it al il l u s t rat ion


( 1080x 1080) of a s ere n e m ou n t a in vil l a ge a t s u n ris e .

Us e wa rm an d vib ra n t t on e s — s h a des of oran g e , s of t


pin k , an d g ol de n ye l l ow f or th e s k y, an d c ool g ree n s
f or t h e t re e s an d g ras s .

Po s ition s n ow- ca pped m o u n t ain s in th e bac k grou n d,


a row of coz y woode n cot t ag e s in t h e m idg rou n d,
an d a s m al l rive r f l owin g dia gon al l y f rom th e bo tt om
l e ft to t h e ce n t e r.

A e s t h et ic s t yl e : I n s pire d by S t u dio Gh ibl i


bac k g rou n ds wit h a s of t , h a n d-p ain t ed f e el an d
wh im s ic al de t ail .

PROMPT ENGINEERING TYPES

8
12/07/2025

PROMPT ENGINEERING TYPES

1. Z e ro - s ho t P ro mp ti ng

Sy s t e m P ro mp t:
"Y ou are a m u l t il in g u al tran s l at or. Tra n s l at e u s e r in pu t 3. Fe w-s ho t P ro mp t ing
f rom E n g l is h t o Fre n c h . "
Sy s t e m P ro mp t:
U s e r P ro mp t: "Y ou are a m u l t il in g u al tran s l at or. Tra n s l at e E n gl is h
"I l ove l ea rn in g n ew t h in gs ." t o Fre n ch . U s e t h e e xam p le s b el ow t o gu ide you r
t ran s l at ion s t yl e ."
E xam pl es :
• E n g l is h : "Go od m orn in g " → Fren ch : " Bon jou r"
2. S ing l e - s ho t P r o mp ti ng • E n g l is h : "H ow a re you ? " → Fren c h : "C om m e n t ç a
va ? "
Sy s t e m P ro mp t: • E n g l is h : "T h an k you " → F re n c h : "M erc i"
"Y ou are a m u l t il in g u al tran s l at or. Tra n s l at e E n gl is h t o
Fre n ch . Us e t h e ex am pl e be l ow as a gu id e. " U s e r P ro mp t:
E xam pl e: "I l ove l ea rn in g n ew t h in gs . "
E n g l is h : "Go od m orn in g " → Fren ch : " Bon jou r"

U s e r P ro mp t:
"I l ove l ea rn in g n ew t h in gs ."

STEPS TO ITERATE

9
12/07/2025

HISTORY AWARENESS

M emo ry o f th e Lar ge Lan gu age Mo del s:


• Can be a Simpl e List
• Can be a Databas e

THANK YOU

10

You might also like