Quay lại Blog
Hướng dẫn

Prompt Engineering cơ bản — Viết prompt AI hiệu quả

Halcion Team2026-03-0410 phút

Prompt Engineering là gì?

Prompt Engineering là kỹ năng viết câu lệnh (prompt) để AI tạo ra kết quả mong muốn. Đây là kỹ năng quan trọng nhất khi làm việc với AI image/video generation.

Prompt tốt = kết quả tốt. Prompt tệ = kết quả ngẫu nhiên.

Cấu trúc prompt cơ bản

Công thức SCAM

Subject + Context + Aesthetic + Modifiers
  • Subject: Chủ thể chính — "a cat", "a modern house", "a smartphone"
  • Context: Bối cảnh — "in a garden", "on a desk", "at sunset"
  • Aesthetic: Phong cách — "photorealistic", "watercolor", "cyberpunk"
  • Modifiers: Chi tiết thêm — "8k", "dramatic lighting", "shallow depth of field"

Ví dụ áp dụng

Tệ: "một con mèo"

Tốt: "A fluffy orange cat sitting on a windowsill, golden hour sunlight streaming through, photorealistic, shallow depth of field, warm tones"

10 kỹ thuật prompt nâng cao

1. Chỉ định camera và lens

"Shot on Canon EOS R5, 85mm f/1.4, bokeh background"
"Drone aerial view, wide angle lens, 4K"
"Macro photography, extreme close-up, ring light"

2. Mô tả ánh sáng chi tiết

"Rembrandt lighting, dramatic shadows"
"Soft diffused natural light, overcast day"
"Neon lights reflecting on wet streets"
"Golden hour, long shadows, warm tones"

3. Tham chiếu nghệ sĩ/phong cách

"In the style of Studio Ghibli"
"Wes Anderson color palette"
"Art Deco poster style, 1920s"

4. Negative prompt

Chỉ ra những gì bạn KHÔNG muốn:

Negative: "blurry, low quality, distorted hands, extra fingers, watermark, text"

5. Chỉ định tỷ lệ và composition

"Rule of thirds, subject on left third"
"Symmetrical composition, centered"
"Leading lines, perspective depth"

6. Mô tả materials và textures

"Brushed aluminum surface, subtle reflections"
"Soft cashmere fabric, detailed texture"
"Wet asphalt, rain puddles, reflections"

7. Mood và atmosphere

"Cozy, warm, inviting atmosphere"
"Mysterious, foggy, ethereal"
"Energetic, vibrant, dynamic"

8. Color palette

"Muted earth tones, desaturated"
"Vibrant complementary colors, orange and teal"
"Monochrome, black and white, high contrast"

9. Thời gian và mùa

"Cherry blossom season, spring morning"
"Winter twilight, blue hour, snow"
"Autumn forest, golden leaves falling"

10. Kết hợp multiple concepts

"A steampunk coffee shop interior, Victorian era meets industrial design, brass pipes, wooden furniture, warm ambient lighting, detailed, 8K"

Sai lầm phổ biến

1. Prompt quá ngắn

"Một ngôi nhà" → AI không biết bạn muốn kiểu nhà gì, ở đâu, phong cách nào.

2. Prompt quá dài và mâu thuẫn

"A minimalist room with lots of decorations and plants everywhere, empty and full of furniture" → AI bị confused.

3. Dùng từ mơ hồ

"Đẹp", "tốt", "hay" — không giúp AI hiểu. Thay bằng từ cụ thể: "sharp focus", "vivid colors", "professional lighting".

4. Quên negative prompt

Không nói AI bạn không muốn gì → có thể nhận watermark, chữ, tay thừa.

5. Copy-paste prompt người khác

Prompt hoạt động tốt trên model này có thể cho kết quả khác trên model khác. Luôn test và tinh chỉnh.

Prompt templates cho từng use case

Ảnh sản phẩm

[Product name] on [surface], [background type], product photography, studio lighting, [angle], sharp focus, high resolution

Ảnh quảng cáo

[Product] in [lifestyle context], [target audience vibe], [brand mood], advertising photography, [lighting style]

Ảnh chân dung

Portrait of [description], [lighting style], [camera specs], [background], [mood], professional headshot

Landscape

[Location/scene], [time of day], [weather], [season], [photography style], [camera settings], cinematic

Kết luận

Prompt engineering là kỹ năng practice — càng viết nhiều prompt, bạn càng hiểu AI "nghĩ" thế nào. Bắt đầu với công thức SCAM, thử nghiệm các kỹ thuật nâng cao, và xây dựng thư viện prompt riêng cho từng use case. Halcion lưu lại lịch sử prompt, giúp bạn dễ dàng tìm lại và reuse prompt hiệu quả.

Sẵn sàng thử Halcion AI?

Bắt đầu miễn phí. Không cần thẻ tín dụng.

Đăng ký miễn phí