Prompt engineering на собеседовании Data Scientist
Проверь себя · 1/3разбор после ответа
Как обычно называют
quantile уровня 0.25?Содержание:
Зачем prompt engineering
Right prompt → 2-10× quality на same model. Cost-effective alternative fine-tuning.
System / user / assistant
Standard message structure.
system: "You are a helpful assistant что translates English to Russian."
user: "Hello, how are you?"
assistant: "Привет, как дела?"System message — sets behavior, persona, constraints.
Few-shot
Include examples в prompt.
Translate to formal Russian:
"Hi" → "Здравствуйте"
"Bye" → "До свидания"
"Thanks" → "Спасибо"
"How are you?" → ?In-context learning. 1-5 examples often suffice.
Готовься к собесу аналитика как в Duolingo
10 минут в день — SQL, Python, A/B, метрики. 1700+ вопросов в Telegram
Chain-of-thought
«Think step by step».
Question: A train leaves NYC at 100 mph. ...
Answer: Let me think step by step.
Step 1: ...
Step 2: ...
Therefore: ...Improves reasoning accuracy 20-30% на math / logic.
Zero-shot CoT. Просто add «Let's think step by step» — works.
Self-consistency. Generate multiple CoT solutions, vote.
Structured output
Return JSON / Pydantic schema.
Return JSON {"name": str, "age": int, "interests": [str]}.
Input: "John is 30 years old and likes hiking and reading."Strict mode в OpenAI / Anthropic API — гарантирует JSON valid.
Function calling. API-level structure.
Связанные темы
- BERT vs GPT для DS
- AI agents для DS
- Few-shot learning для DS
- RAG на собесе DS
- Подготовка к собесу Data Scientist
FAQ
Это официальная информация?
Нет. Статья основана на работах Wei 2022 (CoT), Yao 2023 (ReAct), документации OpenAI / Anthropic.
Тренируйте Data Science — откройте тренажёр с 1500+ вопросами для собесов.