[Virtual] Langfuse Town Hall ยท Aug 12 โ†’
Workshop03 Prompt Management

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.

View this Markdown file

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_PROMPT as a resilience fallback, not as the source of truth once the prompt is published.

Demo rhythm

  1. Create dad-it-support-agent as a text prompt and label it production.
  2. Fetch it with LangfuseClient.
  3. Swap the hardcoded system message for the fetched text, keeping SYSTEM_PROMPT as the fallback.
  4. Pass langfusePrompt into observeOpenAI.
  5. Open a generation and show the Prompt badge.

Watch for

  • Prompt name/label mismatches between .env and Langfuse.
  • Learners forgetting that the SDK fetches the production label by default.
  • The Prompt badge proves linking, not usage. A transcript still sending the local SYSTEM_PROMPT passes 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?