Skip to content

Commit ce03f6a

Browse files
authored
Merge pull request #5471 from ClickHouse/add-langfuse-documentation-page
docs: add langfuse documentation page
2 parents 6c4546c + 3eacef3 commit ce03f6a

File tree

2 files changed

+264
-0
lines changed

2 files changed

+264
-0
lines changed
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
---
2+
sidebar_label: 'Langfuse'
3+
slug: /cloud/features/ai-ml/langfuse
4+
title: 'Langfuse'
5+
description: 'Langfuse is an open-source LLM engineering platform that helps teams collaboratively debug, analyze, and iterate on their LLM applications.'
6+
doc_type: 'reference'
7+
---
8+
9+
import Tabs from '@theme/Tabs';
10+
import TabItem from '@theme/TabItem';
11+
12+
# Langfuse
13+
14+
## What is Langfuse? {#what-is-langfuse}
15+
16+
[Langfuse](https://langfuse.com) is an open-source LLM engineering platform that helps teams collaboratively debug, analyze, and iterate on their LLM applications. It is part of the ClickHouse ecosystem and relies on **ClickHouse** at its core to provide a scalable, high-performance observability backend.
17+
18+
By leveraging ClickHouse's columnar storage and fast analytical capabilities, Langfuse can handle billions of traces and events with low latency, making it suitable for high-throughput production workloads.
19+
20+
## Why Langfuse? {#why-langfuse}
21+
22+
- **Open source:** Fully open source with public API for custom integrations
23+
- **Production optimized:** Designed with minimal performance overhead
24+
- **Best-in-class SDKs:** Native SDKs for Python and JavaScript
25+
- **Framework support:** Integrated with popular frameworks like OpenAI SDK, LangChain, and LlamaIndex
26+
- **Multi-modal:** Support for tracing text, images and other modalities
27+
- **Full platform:** Suite of tools for the complete LLM application development lifecycle
28+
29+
## Deployment options {#deployment-options}
30+
31+
Langfuse offers flexible deployment options to meet different security and infrastructure needs.
32+
33+
**[Langfuse Cloud](https://cloud.langfuse.com)** is a fully managed service powered by a managed ClickHouse cluster for optimal performance. It is SOC 2 Type II and ISO 27001 certified, GDPR compliant, and available in US (AWS us-west-2) and EU (AWS eu-west-1) data regions.
34+
35+
**[Self-hosted](https://langfuse.com/self-hosting)** Langfuse is fully open-source (MIT license) and free to deploy on your own infrastructure using Docker or Kubernetes. You run your own ClickHouse instance (or use ClickHouse Cloud) to store observability data, ensuring complete control over your data.
36+
37+
## Architecture {#architecture}
38+
39+
Langfuse only depends on open source components and can be deployed locally, on cloud infrastructure, or on-premises:
40+
41+
* **ClickHouse**: Stores high-volume observability data (traces, spans, generations, scores). It enables fast aggregation and analytics for dashboards.
42+
* **Postgres**: Stores transactional data like user accounts, project configurations, and prompt definitions.
43+
* **Redis**: Handles event queuing and caching.
44+
* **S3/Blob Storage**: Stores large payloads and raw event data.
45+
46+
```mermaid
47+
flowchart TB
48+
User["UI, API, SDKs"]
49+
subgraph vpc["VPC"]
50+
Web["Web Server<br/>(langfuse/langfuse)"]
51+
Worker["Async Worker<br/>(langfuse/worker)"]
52+
Postgres@{ img: "https://langfuse.com/images/logos/postgres_icon.svg", label: "Postgres - OLTP\n(Transactional Data)", pos: "b", w: 60, h: 60, constraint: "on" }
53+
Cache@{ img: "https://langfuse.com/images/logos/redis_icon.png", label: "Redis\n(Cache, Queue)", pos: "b", w: 60, h: 60, constraint: "on" }
54+
Clickhouse@{ img: "https://langfuse.com/images/logos/clickhouse_icon.svg", label: "Clickhouse - OLAP\n(Observability Data)", pos: "b", w: 60, h: 60, constraint: "on" }
55+
S3@{ img: "https://langfuse.com/images/logos/s3_icon.svg", label: "S3 / Blob Storage\n(Raw events, multi-modal attachments)", pos: "b", w: 60, h: 60, constraint: "on" }
56+
end
57+
LLM["LLM API/Gateway<br/>(optional; BYO; can be same VPC or VPC-peered)"]
58+
59+
User --> Web
60+
Web --> S3
61+
Web --> Postgres
62+
Web --> Cache
63+
Web --> Clickhouse
64+
Web -..->|"optional for playground"| LLM
65+
66+
Cache --> Worker
67+
Worker --> Clickhouse
68+
Worker --> Postgres
69+
Worker --> S3
70+
Worker -..->|"optional for evals"| LLM
71+
```
72+
73+
## Features {#features}
74+
75+
### Observability {#observability}
76+
77+
[Observability](/docs/observability/overview) is essential for understanding and debugging LLM applications. Unlike traditional software, LLM applications involve complex, non-deterministic interactions that can be challenging to monitor and debug. Langfuse provides comprehensive tracing capabilities that help you understand exactly what's happening in your application.
78+
79+
_📹 Want to learn more? [**Watch end-to-end walkthrough**](https://langfuse.com/watch-demo?tab=observability) of Langfuse Observability and how to integrate it with your application._
80+
81+
<Tabs groupId="observability">
82+
<TabItem value="trace-details" label="Trace Details">
83+
84+
Traces allow you to track every LLM call and other relevant logic in your app.
85+
86+
<video src="https://static.langfuse.com/docs-videos/trace-new-ui.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
87+
88+
</TabItem>
89+
<TabItem value="sessions" label="Sessions">
90+
91+
Sessions allow you to track multi-step conversations or agentic workflows.
92+
93+
<video src="https://static.langfuse.com/docs-videos/sessions-new-ui.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
94+
95+
</TabItem>
96+
<TabItem value="timeline" label="Timeline">
97+
98+
Debug latency issues by inspecting the timeline view.
99+
100+
<video src="https://static.langfuse.com/docs-videos/timeline-new-ui.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
101+
102+
</TabItem>
103+
<TabItem value="users" label="Users">
104+
105+
Add your own `userId` to monitor costs and usage for each user. Optionally, create a deep link to this view in your systems.
106+
107+
<video src="https://static.langfuse.com/docs-videos/users-new-ui.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
108+
109+
</TabItem>
110+
<TabItem value="agent-graphs" label="Agent Graphs">
111+
112+
LLM agents can be visualized as a graph to illustrate the flow of complex agentic workflows.
113+
114+
<video src="https://static.langfuse.com/docs-videos/langgraph-new-ui.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
115+
116+
</TabItem>
117+
<TabItem value="dashboard" label="Dashboard">
118+
119+
See quality, cost, and latency metrics in the dashboard to monitor your LLM application.
120+
121+
<video src="https://static.langfuse.com/docs-videos/dashboard.mp4%20MOVED%20TO%20R2.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
122+
123+
</TabItem>
124+
</Tabs>
125+
### Prompt management {#prompt-management}
126+
127+
[Prompt Management](/docs/prompt-management/overview) is critical in building effective LLM applications. Langfuse provides tools to help you manage, version, and optimize your prompts throughout the development lifecycle.
128+
129+
_📹 Want to learn more? [**Watch end-to-end walkthrough**](https://langfuse.com/watch-demo?tab=prompt) of Langfuse Prompt Management and how to integrate it with your application._
130+
131+
<Tabs groupId="prompt-management">
132+
<TabItem value="create" label="Create">
133+
134+
Create a new prompt via UI, SDKs, or API.
135+
136+
<video src="https://static.langfuse.com/docs-videos/create-update-prompts.mp4%20MOVED%20TO%20R2.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
137+
138+
</TabItem>
139+
<TabItem value="version-control" label="Version Control">
140+
141+
Collaboratively version and edit prompts via UI, API, or SDKs.
142+
143+
<video src="https://static.langfuse.com/docs-videos/create-prompt-version.mp4%20MOVED%20TO%20R2.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
144+
145+
</TabItem>
146+
<TabItem value="deploy" label="Deploy">
147+
148+
Deploy prompts to production or any environment via labels - without any code changes.
149+
150+
<video src="https://static.langfuse.com/docs-videos/deploy-prompt.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
151+
152+
</TabItem>
153+
<TabItem value="metrics" label="Metrics">
154+
155+
Compare latency, cost, and evaluation metrics across different versions of your prompts.
156+
157+
<video src="https://static.langfuse.com/docs-videos/prompt-metrics.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
158+
159+
</TabItem>
160+
<TabItem value="test-in-playground" label="Test in Playground">
161+
162+
Instantly test your prompts in the playground.
163+
164+
<video src="https://static.langfuse.com/docs-videos/prompt-to-playground.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
165+
166+
</TabItem>
167+
<TabItem value="link-with-traces" label="Link with Traces">
168+
169+
Link prompts with traces to understand how they perform in the context of your LLM application.
170+
171+
<video src="https://static.langfuse.com/docs-videos/linked-generations.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
172+
173+
</TabItem>
174+
<TabItem value="track-changes" label="Track Changes">
175+
176+
Track changes to your prompts to understand how they evolve over time.
177+
178+
<video src="https://static.langfuse.com/docs-videos/track-changes.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
179+
180+
</TabItem>
181+
</Tabs>
182+
183+
### Evaluation & datasets {#evaluation}
184+
185+
[Evaluation](/docs/evaluation/overview) is crucial for ensuring the quality and reliability of your LLM applications. Langfuse provides flexible evaluation tools that adapt to your specific needs, whether you're testing in development or monitoring production performance.
186+
187+
_📹 Want to learn more? [**Watch end-to-end walkthrough**](https://langfuse.com/watch-demo?tab=evaluation) of Langfuse Evaluation and how to use it to improve your LLM application._
188+
189+
<Tabs groupId="evaluation">
190+
<TabItem value="analytics" label="Analytics">
191+
192+
Plot evaluation results in the Langfuse Dashboard.
193+
194+
<video src="https://static.langfuse.com/docs-videos/scores-dashboard.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
195+
196+
</TabItem>
197+
<TabItem value="user-feedback" label="User Feedback">
198+
199+
Collect feedback from your users. Can be captured in the frontend via our Browser SDK, server-side via the SDKs or API. Video includes example application.
200+
201+
<video src="https://static.langfuse.com/docs-videos/scores-user-feedback.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
202+
203+
</TabItem>
204+
<TabItem value="llm-as-a-judge" label="LLM-as-a-Judge">
205+
206+
Run fully managed LLM-as-a-judge evaluations on production or development traces. Can be applied to any step within your application for step-wise evaluations.
207+
208+
<video src="https://static.langfuse.com/docs-videos/scores-llm-as-a-judge.mp4%20MOVED%20TO%20R2.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
209+
210+
</TabItem>
211+
<TabItem value="experiments" label="Experiments">
212+
213+
Evaluate prompts and models on datasets directly in the user interface. No custom code is needed.
214+
215+
<video src="https://static.langfuse.com/docs-videos/prompt-experiments.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
216+
217+
</TabItem>
218+
<TabItem value="annotation-queue" label="Annotation Queue">
219+
220+
Baseline your evaluation workflow with human annotations via Annotation Queues.
221+
222+
<video src="https://static.langfuse.com/docs-videos/scores-annotation-queue.mp4" autoPlay loop muted playsInline width="100%" style={{boxShadow: "0px 1px 8px -1px rgba(21, 21, 21, 0.20)", borderRadius: "4px"}} />
223+
224+
</TabItem>
225+
<TabItem value="custom-evals" label="Custom Evals">
226+
227+
Add custom evaluation results, supports numeric, boolean and categorical values.
228+
229+
```bash
230+
POST /api/public/scores
231+
```
232+
233+
Add scores via Python or JS SDK.
234+
235+
```python title="Example (Python)"
236+
langfuse.score(
237+
trace_id="123",
238+
name="my_custom_evaluator",
239+
value=0.5,
240+
)
241+
```
242+
243+
</TabItem>
244+
</Tabs>
245+
## Quickstarts {#quickstarts}
246+
247+
Get up and running with Langfuse in minutes. Choose the path that best fits your current needs:
248+
249+
- [Integrate LLM Application/Agent Tracing](https://langfuse.com/docs/observability/get-started)
250+
- [Integrate Prompt Management](https://langfuse.com/docs/prompt-management/get-started)
251+
- [Setup Evaluations](https://langfuse.com/docs/evaluation/overview)
252+
253+
## Learn more {#learn-more}
254+
255+
- [Langfuse Documentation](https://langfuse.com/docs)
256+
- [Langfuse GitHub Repository](https://github.com/langfuse/langfuse)
257+
- [Watch the Demo Video](https://langfuse.com/watch-demo)

scripts/aspell-ignore/en/aspell-dict.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,7 @@ Lakekeeper
757757
LangChain
758758
LangGraph
759759
Langchain
760+
Langfuse
760761
Lemire
761762
Levenshtein
762763
Lhotsky
@@ -1200,6 +1201,7 @@ QueryPreempted
12001201
QueryThread
12011202
QuickAssist
12021203
QuickSight
1204+
Quickstarts
12031205
QuoteMeta
12041206
RBAC
12051207
RClickHouse
@@ -1815,6 +1817,7 @@ auditability
18151817
auth
18161818
authenticator
18171819
authenticators
1820+
autoPlay
18181821
autocomplete
18191822
autocompletion
18201823
autodetect
@@ -1918,9 +1921,11 @@ bool
19181921
boolean
19191922
booleans
19201923
bools
1924+
borderRadius
19211925
boringssl
19221926
bottlenecked
19231927
boundingRatio
1928+
boxShadow
19241929
bozerkins
19251930
brainer
19261931
brotli
@@ -3083,6 +3088,7 @@ pipelined
30833088
pipelining
30843089
plaintext
30853090
plantuml
3091+
playsInline
30863092
plperl
30873093
plperlu
30883094
plpgsql
@@ -3356,6 +3362,7 @@ retryable
33563362
reusability
33573363
reverseUTF
33583364
rewritable
3365+
rgba
33593366
rightPad
33603367
rightPadUTF
33613368
rightUTF

0 commit comments

Comments
 (0)