Systematic techniques for getting consistent, high-quality outputs from LLMs — in Turkish and multilingual contexts.
12 min readUse a consistent format: System → Context → Task → Format. For Turkish, explicitly set language in the system prompt to avoid code-switching.
Sistem: Sen Türkçe konuşan bir müşteri destek asistanısın.
Yalnızca Türkçe yanıt ver.
Görev: {görev}
Format: JSON 3–5 high-quality examples in the prompt outperform zero-shot for classification and extraction. Match examples to your exact output format.
Add "Let's think step by step" or "Adım adım düşünelim" before complex tasks. This alone can improve accuracy by 20–40% on Turkish reasoning tasks.
Use temp=0 for extraction/classification, temp=0.7 for creative tasks. Avoid top_p<0.9 on Turkish — it truncates the long-tail vocabulary.
Parse model output with Zod/Pydantic. Never trust raw LLM output in production. Retry with a corrective prompt on parse failure.