Build AI Apps with Python: System Prompts and Personas | Episode 2
3views
1likes
011:51
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Control AI personality with one line of code! In this episode, we use system prompts to make Claude respond as
a pirate, a chef, and a tutor — all answering the same question with completely different styles.
System prompts are the most powerful parameter in the Claude API. One line changes how the AI thinks, speaks,
and formats its answers. Same code structure, same question — three completely different responses.
Student code: https://github.com/GoCelesteAI/build-ai-apps-python/tree/main/episode02
Every keystroke is shown on screen with 3-second pauses so you can follow along at your own pace.
What You'll Learn:
• The system parameter in messages.create()
• Writing system prompts that define AI personality
• Building a pirate persona — "Speak like a pirate in every response"
• Building a chef persona — "Relate everything to cooking and food"
• Building a tutor persona — "Give clear, step-by-step advice"
• Reusing a question variable across multiple API calls
• Using max_tokens to control response length
• Running Python scripts with :!python %
Timestamps:
0:00 - Introduction
0:12 - What are System Prompts? (Preview)
0:44 - Creating system_prompts.py
0:58 - Imports and setup
1:50 - Question variable — same question for all personas
2:25 - Pirate persona — system prompt
3:20 - Pirate persona — max_tokens=100
3:58 - First run — pirate response!
4:55 - Chef persona — cooking analogies
6:20 - Tutor persona — step-by-step advice
7:58 - Run all three — comparing responses
9:25 - Code review
9:55 - Recap: 3 Key Takeaways
10:27 - End Screen
Key Takeaways:
1. The system parameter shapes AI personality — one line changes everything
2. Same code structure works for any persona — only the system prompt changes
3. max_tokens controls response length — lower values give shorter answers
This is Episode 2 of Build AI Apps with Python in Neovim — 32 episodes from API basics to production
deployment, covering tool use, RAG, AI agents, and more.
Taught by CelesteAI. Like & subscribe for more tutorials!
Tags
python ai tutorial, claude api system prompts, anthropic sdk, system prompt tutorial, ai personas, claude api
python, python ai beginner, ai personality, pirate chatbot, ai tutorial 2026, llm system prompt, generative ai
python, build ai apps python, neovim tutorial, claude sonnet, max tokens, messages create, screenkey, code
along, ai development, prompt engineering, chatbot personas
Tags
python ai tutorialclaude api system promptsanthropic sdksystem prompt tutorialai personasclaude api pythonpython ai beginnerai personalitypirate chatbotai tutorial 2026llm system promptgenerative ai pythonbuild ai apps pythonneovim tutorialclaude sonnet