Meta-İstem Oluşturma Nedir
Başka istemler üreten istemler: LLM'lerin özyinelemeli gücü.
Meta-İstem Oluşturma Nedir, CoddyKit'te ücretsiz bir AI Prompt Engineering dersidir. Bu, 4 dersinin 1. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, AI Prompt Engineering öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. AI Prompt Engineering kursu toplamda 4 dersten oluşur.
Meta-İstemleme Tanımı
Meta-istemleme, çıktısı başka istemler olan istemler yazma uygulamasıdır. Bir görevi doğrudan çözmek yerine meta-istem, modele daha sonra görevi çözecek talimatları generate etmesini söyler. Bu, sıradan istemlemenin üzerinde bir soyutlama katmanıdır.
Birinci Düzey İstemleme ve Meta-İstemleme
Birinci düzey istemleme ile meta-istemleme arasındaki ayrım şöyledir: birinci düzey istemler görev çıktıları (özetler, kod, analiz) üretir. Meta-istemler ise daha sonra gerçek göreve uygulanabilecek istemler, değerlendirme ölçütleri veya sistem talimatları üretir.
import anthropic
client = anthropic.Anthropic(api_key='YOUR_API_KEY')
# FIRST-ORDER prompt (produces a task output directly)
first_order = 'Write a customer service response for a user whose order was delayed.'
# META-PROMPT (produces a prompt that can then solve similar tasks)
meta_prompt = (
'Design a system prompt for a customer service AI agent '
'that handles order delay complaints. The agent should '
'be empathetic, solution-focused, and proactively offer '
'compensation when appropriate. Output only the system prompt.'
)
response = client.messages.create(
model='claude-opus-4-5', max_tokens=800,
messages=[{'role': 'user', 'content': meta_prompt}]
)
generated_system_prompt = response.content[0].text
print('Generated system prompt:')
print(generated_system_prompt[:300], '...')Kullanım Alanı 1: Sistem İstemleri Generate Etme
Meta-istemlemenin en güçlü kullanımlarından biri, belirli roller veya uygulamalar için sistem istemleri generate etmektir. Bir sistem istemini manuel olarak hazırlamak yerine, kullanım alanının açıklamasını vererek modelden bir tane create etmesini isteyebilirsiniz.
META_SYSTEM_PROMPT_GENERATOR = '''You are a prompt engineer specializing in system prompts.
Given a description of an AI assistant role, generate a comprehensive system prompt.
The system prompt you generate must:
1. Define the assistant\'s persona and expertise
2. Specify its primary objectives
3. List behavioral rules (what it should and should not do)
4. Define output format preferences
5. Include appropriate disclaimers for the domain
6. Be between 200-400 words
Output only the system prompt — no explanation, no preamble.'''
def generate_system_prompt(role_description):
response = client.messages.create(
model='claude-opus-4-5', max_tokens=600,
system=META_SYSTEM_PROMPT_GENERATOR,
messages=[{'role': 'user', 'content':
f'Generate a system prompt for: {role_description}'}]
)
return response.content[0].text
# Example: generate a system prompt for a coding tutor
result = generate_system_prompt(
'A Python coding tutor for absolute beginners aged 12-16, '
'who explains concepts using simple analogies and emojis'
)
print(result[:400], '...')Kullanım Alanı 2: Değerlendirme Ölçütleri Create Etme
Meta-istemleme bir görev için değerlendirme rubrikleri generate edebilir. Neyin 'iyi' olduğunu manuel olarak tanımlamak yerine, modelden belirli bir hedef için değerlendirme ölçütleri generate etmesini isteyin.
META_CRITERIA_GENERATOR = '''You are an evaluation framework designer.
Given a task description, create a detailed evaluation rubric.
For each criterion:
- Name: concise label
- Weight: percentage (all weights sum to 100)
- Description: what to look for
- Scoring: 1-5 scale with what each score means
Output as a JSON array.'''
def generate_eval_criteria(task_description):
import json
response = client.messages.create(
model='claude-opus-4-5', max_tokens=1000,
system=META_CRITERIA_GENERATOR,
messages=[{'role': 'user', 'content':
f'Create evaluation criteria for: {task_description}'}]
)
return json.loads(response.content[0].text)
criteria = generate_eval_criteria(
'AI-generated summaries of financial earnings reports'
)
for c in criteria[:3]:
print(f'{c["name"]} ({c["weight"]}%): {c["description"][:50]}')Kullanım Alanı 3: İstem Şablonu Design
Meta-istemleme, yaygın görevler için yeniden kullanılabilir istem şablonları generate edebilir. Meta-istem, görevin açıklamasını alır ve {variable} yer tutucularına sahip parametreli bir şablon çıkarır.
META_TEMPLATE_DESIGNER = '''You are a prompt template engineer.
Given a task type, design a prompt template with {variable} placeholders.
Requirements:
- Identify all input variables and use {variable_name} syntax
- Include clear instruction structure
- Specify desired output format
- Add any necessary constraints or rules
- Output: JSON with keys: template (string), variables (list of variable descriptions)'''
def design_prompt_template(task_type):
import json
response = client.messages.create(
model='claude-opus-4-5', max_tokens=800,
system=META_TEMPLATE_DESIGNER,
messages=[{'role': 'user', 'content':
f'Design a prompt template for: {task_type}'}]
)
return json.loads(response.content[0].text)
template = design_prompt_template('extracting action items from meeting notes')
print('Template:', template['template'][:200], '...')
print('Variables:', template['variables'][:3])Persona Generate Etmek için Meta-İstemleme
Meta-istemleme, çeşitli yapay zekâ persona tanımları generate edebilir. Bu, rol yapma uygulamaları, sohbet robotu yapılandırmaları ve farklı personalar altında yapay zekâ davranışını test etmek için kullanışlıdır.
META_PERSONA_GENERATOR = '''Generate {num_personas} distinct AI assistant personas for the following application.
Each persona should have:
- Name
- Personality traits (3-5 adjectives)
- Communication style description
- Expertise areas
- Signature phrases or patterns
- Things this persona would never say
Make personas meaningfully different from each other.
Output as a JSON array.'''
def generate_personas(application, num_personas=3):
import json
response = client.messages.create(
model='claude-opus-4-5', max_tokens=1500,
messages=[{'role': 'user', 'content':
META_PERSONA_GENERATOR.format(num_personas=num_personas) +
f'\n\nApplication: {application}'}]
)
return json.loads(response.content[0].text)
personas = generate_personas('a fitness and wellness coaching app')
for p in personas:
print(f'{p["name"]}: {p["personality_traits"]}')Meta-İstem Zincirleme
Meta-istemleme zincirlendiğinde en güçlü hâline gelir: Bir meta-istemin çıktısı bir sonrakine aktarılır. Bu, üst düzey gereksinimlerden gelişmiş yapay zekâ sistemleri oluşturabilen bir istem generation pipeline'ı meydana getirir.
def meta_prompt_pipeline(application_description):
print('Step 1: Generating system prompt...')
system_prompt = generate_system_prompt(application_description)
print('Step 2: Generating evaluation criteria...')
criteria = generate_eval_criteria(
f'Responses from an AI assistant that: {application_description}'
)
print('Step 3: Generating test cases...')
test_cases_meta = (
f'Generate 5 diverse test user messages for an AI assistant '
f'that {application_description}. '
f'Include edge cases and difficult requests. Return as JSON list.'
)
test_response = client.messages.create(
model='claude-opus-4-5', max_tokens=800,
messages=[{'role': 'user', 'content': test_cases_meta}]
)
import json
test_cases = json.loads(test_response.content[0].text)
return {
'system_prompt': system_prompt,
'eval_criteria': criteria,
'test_cases': test_cases
}
result = meta_prompt_pipeline('helps junior developers understand error messages')
print('Pipeline output keys:', list(result.keys()))Meta-İstem Kalite Kontrolü
Generate edilen istemler kullanılmadan önce doğrulanmalıdır. Kalite kontrolleri uygulayın: Generate edilen istem gerekli tüm unsurları içeriyor mu? Yaygın tuzaklardan kaçınıyor mu? Otomatik kontroller ve bir inceleme adımı kullanın.
def validate_generated_system_prompt(system_prompt):
checks = {
'Has persona definition': any(w in system_prompt.lower() for w in
['you are', 'your role', 'you\'re', 'act as']),
'Has behavioral rules': any(w in system_prompt.lower() for w in
['do not', 'never', 'always', 'must', 'should']),
'Has output format': any(w in system_prompt.lower() for w in
['format', 'output', 'structure', 'respond with']),
'Length appropriate': 100 < len(system_prompt.split()) < 600,
'No explicit profanity': True, # add real check in production
'Has domain scope': len(system_prompt) > 50
}
passed = sum(checks.values())
print(f'Validation: {passed}/{len(checks)} checks passed')
for check, result in checks.items():
status = 'PASS' if result else 'FAIL'
print(f' [{status}] {check}')
return all(checks.values())
# Validate a generated prompt
test_prompt = 'You are a helpful customer service assistant. Always be polite.'
validate_generated_system_prompt(test_prompt)Meta-İstemlemenin Sınırlamaları
Meta-istemleme güçlüdür, ancak uygulayıcıların anlaması gereken önemli sınırlamaları vardır. Generate edilen istemler production kullanımından önce insan incelemesi gerektirir.
meta_prompting_limitations = {
'Quality variance': (
'Generated prompts vary in quality. '
'Always evaluate and iterate — do not use raw output in production.'
),
'Domain knowledge gaps': (
'The model may generate plausible-sounding prompts that '
'miss critical domain-specific requirements. '
'Domain experts must review generated criteria and rules.'
),
'Hallucinated instructions': (
'Generated prompts may include instructions that sound right '
'but are incorrect (e.g., citing wrong regulations, wrong APIs). '
'Verify all factual claims in generated prompts.'
),
'Misalignment with intent': (
'A generated system prompt may technically fulfill the meta-prompt '
'but not capture the actual product requirements. '
'User testing is still required.'
),
'Compounding errors': (
'In meta-prompt chains, errors in early stages compound. '
'Validate outputs at each step before passing to the next.'
)
}
for limitation, description in meta_prompting_limitations.items():
print(f'{limitation}: {description[:80]}...')İstem Eleştirisi için Meta-İstemleme
Meta-istemleme, istem generate etmenin ötesinde mevcut istemleri eleştirebilir. Modelden bir istemi incelemesini ve zayıflıkları belirlemesini isteyin: eksik kısıtlamalar, belirsiz talimatlar veya eksik çıktı format özellikleri.
CRITIQUE_META_PROMPT = '''You are an expert prompt engineer.
Review the following prompt and identify weaknesses.
Prompt to review:
{prompt_to_review}
For each weakness:
1. Weakness: what is missing or unclear
2. Impact: what problems this causes in practice
3. Fix: exact suggested replacement text
Also provide:
- Overall quality score: 1-10
- Top 3 improvements ordered by impact
Be specific — quote the relevant part of the prompt.'''
def critique_existing_prompt(prompt_text):
import anthropic
client = anthropic.Anthropic(api_key='YOUR_API_KEY')
response = client.messages.create(
model='claude-opus-4-5', max_tokens=1000,
messages=[{'role': 'user', 'content':
CRITIQUE_META_PROMPT.format(prompt_to_review=prompt_text)}]
)
return response.content[0].text
# Example usage
weak_prompt = 'Summarize the article.'
critique = critique_existing_prompt(weak_prompt)
print(critique[:300], '...')Meta-İstemleme ve Manuel İstem Mühendisliği
Meta-istemleme ile manuel istem mühendisliğinin güçlü yönleri farklıdır. Her birini ne zaman kullanacağınızı bilmek, nasıl kullanacağınızı bilmek kadar önemlidir.
WHEN_TO_USE = {
'Meta-prompting is better when': [
'You need many prompt variants quickly (A/B testing)',
'The use case is well-defined and the requirements are clear',
'You need to scale prompt creation across many categories',
'You want to explore the design space of possible prompts',
'You have evaluation criteria to filter generated prompts'
],
'Manual prompt engineering is better when': [
'Deep domain expertise is required (medical, legal, safety-critical)',
'The prompt controls a high-stakes production system',
'Iterative refinement and human judgment are essential',
'The requirements are nuanced and hard to express to a meta-prompt',
'You need guaranteed correctness (not just plausible)'
]
}
for mode, reasons in WHEN_TO_USE.items():
print(f'\n{mode}:')
for r in reasons[:3]:
print(f' - {r}')Kısa Kontrol
Bir meta-istemi normal bir istemden ayıran temel özellik nedir?
Meta-İstemleme Özeti
Meta-istemleme, istem mühendisliğine güçlü bir soyutlama katmanı ekler:
- Tanım: çıktı olarak başka istemler üreten istemler
- Kullanım alanları: sistem istemi generation, değerlendirme ölçütleri, şablon Design, persona generation
- Meta-istem zincirleme: eksiksiz yapay zekâ uygulaması yapılandırmaları oluşturmak için meta-istemleri zincirleyin
- Kalite kontrolü: Generate edilen istemleri production kullanımından önce her zaman doğrulayın
- Sınırlamalar: alan uzmanlığı boşlukları, uydurulmuş talimatlar ve zincirlerde biriken hatalar
- En uygun olduğu alanlar: istem create etmeyi ölçeklendirme, design alanını keşfetme, test takımları generate etme
Sıkça Sorulan Sorular
“Meta-İstem Oluşturma Nedir” dersi ücretsiz mi?
Evet — “Meta-İstem Oluşturma Nedir” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve AI Prompt Engineering kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. AI Prompt Engineering kursu toplamda 4 dersten oluşur.
“Meta-İstem Oluşturma Nedir” dersinde ne öğreneceğim?
Başka istemler üreten istemler: LLM'lerin özyinelemeli gücü. AI Prompt Engineering ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
AI Prompt Engineering öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te AI Prompt Engineering, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 1. dersidir.
“Meta-İstem Oluşturma Nedir” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu AI Prompt Engineering dersinde kod yazıp çalıştırabilir miyim?
Evet. Her AI Prompt Engineering dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Meta-İstem Oluşturma Nedir
- İstem Üreten İstemler
- Kendini İyileştiren İstem Sistemleri
- Kendini İyileştirmede Değerlendirme ve Seçim