Prompt management and self-hosting Langfuse
Prompt management and self-hosting Langfuse
A prompt in a Python string has two problems. Changing a sentence needs a deploy, so the people who tune wording wait on the people who ship code. And the trace shows the final text but not which version it was, so comparing "the friendlier tone we tried on Tuesday" with the old one means reading diffs. Langfuse stores prompts as versioned, labelled objects that your code fetches by name, and it links each generation to the prompt version that produced it.
The second half of this lesson is about where Langfuse itself runs. The cloud service is the default; a self-hosted instance is the answer when traces, which contain customer conversations, may not leave your infrastructure.
Continue reading
Pro unlocks every video lesson, the full notes and runnable code across the Python with AI course, from the language itself to agents, MCP, Langfuse and deployment.