Course එකට ආපසු

C.I.C. Method එක

25 මිනිත්තු📖Lecture

🎯 පාඩමේ අරමුණු

මේ පාඩම ඉවර වෙද්දී ඔයාට:

  • C.I.C. Framework (Context, Instruction, Constraint) master කරන්න පුළුවන් වෙයි
  • Consistent results ලැබෙන structured prompts ලියන්න පුළුවන් වෙයි
  • Vague ideas clear prompts වලට transform කරන්නේ කොහොමද දැනගන්න පුළුවන් වෙයි
  • ඕනෑම prompting task එකකට repeatable formula එකක් ලැබෙයි

📖 Introduction: හැම වෙලේම Work කරන Simple Formula

Great prompts ලියන්න guesswork වෙන්න ඕන නැහැ. හැම වෙලේම work කරන simple formula එකක් තියෙනවා:

C.I.C. Framework එක

C = Context — Stage එක set කරන්න (කවුද, මොන situation ද)

I = Instruction — Task එක define කරන්න (මොකද කරන්න ඕනේ)

C = Constraint — Limits specify කරන්න (requirements, restrictions)

Restaurant එකක order කරනවා වගේ හිතන්න:

Restaurant Order
AI Prompt
Context: 'මම vegetarian, nuts අසාත්මිකයි'
Context: 'You are a React developer'
Instruction: 'මට pasta dish එකක් ඕන'
Instruction: 'Create a login form'
Constraint: '$15 ට අඩු, වැඩි spicy එපා'
Constraint: 'Use Tailwind CSS, include validation'

📝 C = Context (Stage එක Set කරන්න)

Context AI ට කියනවා ඒක කවුද වෙන්න ඕනේ, මොන situation එකේද ඉන්නේ කියලා.

Context කරන්නේ මොකද

  • AI use කරන්න ඕන expertise level set කරනවා
  • ගන්න ඕන perspective define කරනවා
  • Situation හෝ project type establish කරනවා

Context Template:

"You are a [role/expertise] working on [type of project/situation]."

හොඳ Context Examples:

ContextAI ට ඒකෙන් කියන්නේ
"You are a senior React developer"Professional React patterns use කරන්න
"You are a patient coding tutor"දේවල් simply explain කරන්න
"You are a Python expert"Python best practices use කරන්න
"You are working on a professional portfolio"Polished සහ impressive කරන්න

Context Action එකේදී:

Context නැතුව:

Create a navigation bar

Context එක්ක:

You are a senior frontend developer building a professional corporate website. Create a navigation bar...

Second version එකෙන් much more professional code එක produce වෙයි!


📋 I = Instruction (Task එක Define කරන්න)

Instruction එක core task එක — ඔයාට actually AI ලවා කරගන්න ඕන දේ.

හොඳ Instructions වල ලක්ෂණ:

  • Specific — Vague නැහැ, interpretation වලට open නැහැ
  • Action-oriented — Verb එකින් පටන් ගන්නවා (Create, Build, Write, Design)
  • Output ගැන clear — AI deliver කරන්න ඕන මොකක්ද?

Instruction Template:

"Create/Build/Write [specific thing] that [does what/contains what]."

Good vs Bad Instructions:

❌ Vague Instruction
✅ Specific Instruction
Make something for my website
Create a navigation bar with links to Home, About, and Contact
Help with code
Write a function that calculates the total price including 10% tax
I need a form
Create a contact form with name, email, and message fields
Fix this
Fix this JavaScript error: 'Cannot read property of undefined'

🔒 C = Constraint (Limits Specify කරන්න)

Constraints boundaries, requirements, limitations define කරනවා.

Common Constraint Types

TypePurposeExample
Technologyමොන tools use කරන්නද"Use HTML and CSS only"
Styleපෙනෙන්න ඕනේ කොහොමද"Clean, modern, minimalist"
Includeමොනවා ඕනෑම ඇතුළත් විය යුතුද"Include form validation"
Excludeමොනවා avoid කරන්නද"Don't use any frameworks"
PerformanceSpeed/size limits"Keep the file under 100 lines"

Constraint Template:

"Requirements: - Must use [technology/tool] - Should be [quality/style] - Include [specific features] - Avoid [things to exclude]"

🧩 හැම එකම එකට දාමු

Complete C.I.C. template එක මෙන්න:

Text
[CONTEXT]
You are a [role] working on [project type].
[INSTRUCTION]
Create/Build/Write [specific thing] that [does what].
[CONSTRAINTS]
Requirements:
- Must use [technology]
- Should be [style/quality]
- Include [features]
- Avoid [exclusions]

📖 Practice Examples

Example 1: Birthday Invitation

Complete Prompt:

Birthday Invitation Prompt
You are a creative graphic designer. Create a birthday invitation for a 7-year-old's unicorn-themed party. Requirements: - Use HTML and CSS only - Include: Date (Saturday, March 15, 2pm), Location (123 Rainbow Lane), RSVP phone number - Style: Colorful, fun, pink and purple theme with unicorn elements - Design for standard letter paper (8.5x11 inches)
ChatGPTClaude

Example 2: Calculator Function

Complete Prompt:

Calculator Function Prompt
You are a JavaScript developer. Create a function that calculates the total price including tax. Requirements: - Use vanilla JavaScript only - Function takes two parameters: price (number) and taxRate (percentage) - Returns the total rounded to 2 decimal places - Include 3 example usages showing different scenarios
ChatGPTClaude

Example 3: Personal Bio Page

Complete Prompt:

Personal Bio Page Prompt
You are a web developer building a personal portfolio. Create a bio section with a profile image area, name, and short description. Requirements: - Use HTML and CSS only - Must be mobile-responsive - Professional dark theme (#1a1a2e background, white text) - Profile image: 200x200px circle with placeholder - Centered layout with subtle animations on hover
ChatGPTClaude

🎯 ඔයාගේ වාරය: C.I.C. Practice කරන්න

මේ scenario එකට C.I.C. prompt එකක් ලියන්න try කරන්න:

Scenario: ඔයාට single recipe එකක් ලස්සනට display කරන webpage එකක් ඕන.

ඔයාගේම C.I.C. Prompt එක Build කරන්න

0/4

📋 C.I.C. Quick Reference Card

┌──────────────────────────────────────────────┐ │ C.I.C. FRAMEWORK │ ├──────────────────────────────────────────────┤ │ │ │ C = CONTEXT │ │ "You are a [role]..." │ │ Expertise සහ perspective set කරනවා │ │ │ │ I = INSTRUCTION │ │ "Create/Build/Write [specific thing]" │ │ Accomplish කරන්න ඕන core task එක │ │ │ │ C = CONSTRAINT │ │ "Must use... Should be... Include..." │ │ Boundaries, requirements, limits │ │ │ └──────────────────────────────────────────────┘

✅ පාඩමේ සාරාංශය

Key Takeaways

  1. C.I.C. = Context + Instruction + Constraint — Repeatable formula එක
  2. Context AI වෙන්න ඕන කවුද set කරනවා
  3. Instruction create කරන්න ඕන මොකද define කරනවා
  4. Constraints requirements සහ limits specify කරනවා
  5. C.I.C. consistently use කිරීම professional results produce කරනවා

📝 Mini Quiz

📝 ඔයාගේ Understanding Check කරන්න

1/3

What does the first 'C' in C.I.C. stand for?