Zero-Shot Prompting

التعليمات بدون أمثلة

Beginnerai-ml1 min read
zero-shotzero shot

Definition

Giving an LLM a task without any examples, relying on the model's training to understand what's expected.

إعطاء النموذج اللغوي الكبير مهمة دون أي أمثلة، مع الاعتماد على تدريب النموذج لفهم المطلوب.

Why It Matters

Zero-shot is the starting point for every new prompt. It tells you what the model can do without hints. If zero-shot quality is good enough, ship it. If not, add examples (few-shot) or reasoning (CoT) before investing in fine-tuning.

التعليمات بدون أمثلة هي نقطة البداية لكل تعليمة جديدة. تُخبرك بما يمكن للنموذج فعله بدون تلميحات. إذا كانت جودة التعليمات بدون أمثلة كافية، أطلقها. إذا لم تكن، أضف أمثلة (أمثلة قليلة) أو تفكيراً (CoT) قبل الاستثمار في الضبط الدقيق.

Full Definition

Zero-shot prompting means asking an LLM to perform a task with only a task description and no examples. 'Classify this review as positive or negative: [review text]' — no examples provided. This works well when the task is common (the model has seen many examples during training) and when the output format is simple. Zero-shot prompting is the simplest approach but often produces inconsistent output format or tone. Adding even 2–3 examples (few-shot) significantly improves reliability.
التعليمات بدون أمثلة تعني طلب مهمة من النموذج اللغوي الكبير بوصف المهمة فقط دون أمثلة. 'صنّف هذه المراجعة كإيجابية أو سلبية: [نص المراجعة]' — لا أمثلة مُقدَّمة. يعمل هذا بشكل جيد عندما تكون المهمة شائعة (رأى النموذج أمثلة كثيرة أثناء التدريب) وعندما يكون تنسيق المخرجات بسيطاً. التعليمات بدون أمثلة هي أبسط نهج لكنها غالباً تُنتج تنسيق مخرجات أو أسلوباً غير متسقين. إضافة 2–3 أمثلة فقط (أمثلة قليلة) يُحسّن الموثوقية بشكل ملحوظ.

Example Usage

Zero-shot: 'Extract the company name from this email: [email text]' — simple, no examples needed. When this produces inconsistent results (sometimes 'Apple Inc.', sometimes just 'Apple', sometimes 'the company'), switch to few-shot by adding examples showing the exact format you want.

بدون أمثلة: 'استخرج اسم الشركة من هذا البريد: [نص البريد]' — بسيط، لا حاجة لأمثلة. عندما يُنتج هذا نتائج غير متسقة (أحياناً 'Apple Inc.'، وأحياناً 'Apple' فقط، وأحياناً 'الشركة')، انتقل إلى أمثلة قليلة بإضافة أمثلة تُظهر التنسيق الدقيق الذي تريده.

Knowledge Graph

Avoid these mistakes when using Zero-Shot Prompting:

1

Assuming zero-shot will always work for complex tasks — complex output formatting almost always needs few-shot

2

Not testing zero-shot first before adding examples — sometimes zero-shot is sufficient and simpler

Sign in to unlock guided AI explanations from AI Teacher.

Generate a Prompt

Copy this prompt and use it directly with any AI model — no setup needed.

Ready-to-Use Prompt
Help me build a project using Zero-Shot Prompting.

Explain:
1. What is Zero-Shot Prompting and why it matters
2. The core architecture and required tools
3. Step-by-step implementation plan
4. Common mistakes to avoid: Assuming zero-shot will always work for complex tasks — complex output formatting almost always needs few-shot, Not testing zero-shot first before adding examples — sometimes zero-shot is sufficient and simpler
5. Best practices and production tips

Official Resources