03 Prompt Management
Workshop source
Workshop material is maintained in the public langfuse/langfuse-workshop repository. Use the repository for the runnable app, checkpoint branches, and local setup.
Learner guide: 03 Prompt Management
Instructor notes
- The teaching point is the trace-to-prompt loop: every generation should link to the prompt version that produced it.
- Prefer the UI path first because it mirrors how non-engineers will edit prompts later.
- Keep the local
SYSTEM_PROMPTas a resilience fallback, not as the source of truth once the prompt is published.
Demo rhythm
- Create
dad-it-support-agentas a text prompt and label itproduction. - Fetch it with
LangfuseClient. - Swap the hardcoded system message for the fetched text, keeping
SYSTEM_PROMPTas the fallback. - Pass
langfusePromptintoobserveOpenAI. - Open a generation and show the Prompt badge.
Watch for
- Prompt name/label mismatches between
.envand Langfuse. - Learners forgetting that the SDK fetches the
productionlabel by default. - The Prompt badge proves linking, not usage. A transcript still sending the local
SYSTEM_PROMPTpasses every verify step while prompt edits in the UI change nothing — if an edit seems to have no effect, check the generation input.
Was this page helpful?