You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
content: `👋 Do you have any questions about Langfuse? Ask me!
106
106
107
-
_⚠️ Warning: Do not enter sensitive information. All chat messages can be viewed in the [live demo](/docs/demo). Hosted LLMs by OpenAI are used. Humans (the founders) are available via the chat widget._`,
107
+
_⚠️ Warning: Do not enter sensitive information. All chat messages can be viewed in the public demo project. Humans (the founders) are available via the chat widget._`,
Copy file name to clipboardExpand all lines: cookbook/evaluation_with_langchain.ipynb
+3-11
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,9 @@
6
6
"id": "SWL354n0DECo"
7
7
},
8
8
"source": [
9
-
"# Model-based Evaluations in Langfuse\n",
9
+
"# Run Langchain Evaluations on data in Langfuse\n",
10
10
"\n",
11
-
"Model-based evaluations are a powerful tool to automate the evaluation of production completions in Langfuse.\n",
12
-
"\n",
13
-
"Currently, model-based evals can be applied to production data in Langfuse via the Python SDK. This gives you full flexibility to run various eval libraries on your production data and discover which work well for your use case.\n",
14
-
"\n",
15
-
"**Coming soon**: support for running model-based evals directly from the Langfuse UI/Server.\n",
16
-
"\n",
17
-
"## Example using Langchain Evals\n",
18
-
"\n",
19
-
"This cookbook shows how model-based evaluations can be used to automate the evaluation of production completions in Langfuse. This example uses Langchain but any other eval library can be used as well. Which library is the best to use depends heavily on the use case.\n",
11
+
"This cookbook shows how model-based evaluations can be used to automate the evaluation of production completions in Langfuse. This example uses Langchain and is adaptable to other libraries. Which library is the best to use depends heavily on the use case.\n",
20
12
"\n",
21
13
"This cookbook follows three steps:\n",
22
14
"1. Fetch production `generations` stored in Langfuse\n",
@@ -25,7 +17,7 @@
25
17
"\n",
26
18
"\n",
27
19
"----\n",
28
-
"Not using Langfuse yet? [Get started](/docs/get-started) by capturing LLM events."
20
+
"Not using Langfuse yet? [Get started](https://langfuse.com/docs/get-started) by capturing LLM events."
Copy file name to clipboardExpand all lines: cookbook/python_sdk.ipynb
+4-6
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,7 @@
28
28
"id": "qL7HhNyIYNwn"
29
29
},
30
30
"source": [
31
-
"This is a Python SDK used to send LLM data to Langfuse in a convenient way. It uses a worker Thread and an internal queue to manage requests to the Langfuse backend asynchronously. Hence, the SDK adds only minimal latency to your application.\n",
32
-
"\n",
33
-
"Using Langchain or OpenAI SDK? Use the native [integrations](https://langfuse.com/docs/integrations)."
31
+
"This is a Python SDK used to send LLM data to Langfuse in a convenient way. It uses a worker Thread and an internal queue to manage requests to the Langfuse backend asynchronously. Hence, the SDK adds only minimal latency to your application."
34
32
]
35
33
},
36
34
{
@@ -193,8 +191,8 @@
193
191
"| input | object | yes | The input of the trace. Can be any JSON object.\n",
194
192
"| output | object | yes | The output of the trace. Can be any JSON object.\n",
195
193
"| metadata | object | yes | Additional metadata of the trace. Can be any JSON object. Metadata is merged when being updated via the API.\n",
196
-
"| user_id | string | yes | The id of the user that triggered the execution. Used to provide [user-level analytics](https://langfuse.com/docs/user-explorer).\n",
197
-
"| session_id | string| yes | Used to group multiple traces into a [session](https://langfuse.com/docs/sessions) in Langfuse. Use your own session/thread identifier.\n",
194
+
"| user_id | string | yes | The id of the user that triggered the execution. Used to provide [user-level analytics](https://langfuse.com/docs/tracing/users).\n",
195
+
"| session_id | string| yes | Used to group multiple traces into a [session](https://langfuse.com/docs/tracing/sessions) in Langfuse. Use your own session/thread identifier.\n",
198
196
"| version | string | yes | The version of the trace type. Used to understand how changes to the trace type affect metrics. Useful in debugging.\n",
199
197
"| release | string | yes | The release identifier of the current deployment. Used to understand how changes of different deployments affect metrics. Useful in debugging.\n",
200
198
"| tags | string[] | yes | Tags are used to categorize or label traces. Traces can be filtered by tags in the UI and GET API. Tags can also be changed in the UI. Tags are merged and never deleted via the API. |"
@@ -519,7 +517,7 @@
519
517
"source": [
520
518
"## Scores\n",
521
519
"\n",
522
-
"[Scores](https://langfuse.com/docs/scores) are used to evaluate single executions/traces. They can created manually via the Langfuse UI or via the SDKs.\n",
520
+
"[Scores](https://langfuse.com/docs/scores/overview) are used to evaluate single executions/traces. They can created manually via the Langfuse UI or via the SDKs.\n",
523
521
"\n",
524
522
"If the score relates to a specific step of the trace, specify the `observation_id`.\n",
_From the [Langchain integration docs](/docs/langchain)_
37
+
_From the [Langchain integration docs](/docs/integrations/langchain/python)_
38
38
39
39
## Which actions are tracked?
40
40
@@ -57,15 +57,15 @@ Demo of the debug view in Langfuse:
57
57

58
58
</Frame>
59
59
60
-
_You can find the code of these examples in the [Langchain integration docs](/docs/langchain)_
60
+
_You can find the code of these examples in the [Langchain integration docs](/docs/integrations/langchain/python)_
61
61
62
62
## About Langfuse
63
63
64
64
Langfuse is an open source product analytics platform for LLM applications. It is used by teams to track and analyze their LLM app in production with regards to quality, cost and latency across product releases and use cases. In addition, the Langfuse Debug UI helps to visualize the control flow of LLM apps in production. Read our [launch post](/blog/product-analytics-for-LLM-apps) if you want to learn more.
65
65
66
66
## Next steps
67
67
68
-
- Read the [Langchain integration](/docs/langchain) docs for more details and examples to get started.
68
+
- Read the [Langchain integration](/docs/integrations/langchain/python) docs for more details and examples to get started.
69
69
-**Not (exclusively) using Langchain in production?** Follow the [quickstart](/docs/get-started) to get started with the Typescript and Python SDKs that allow you to integrate with your custom LLM app.
Copy file name to clipboardExpand all lines: pages/blog/update-2023-10.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ openai.ChatCompletion.create(
86
86
87
87
This integration fully supports grouping multiple requests into one trace if they belong to a single invocation. Also you can add scores to evaluate the outputs.
88
88
89
-
See [integration docs](/docs/openai) for full details.
89
+
See [integration docs](/docs/integrations/openai) for full details.
90
90
91
91
Thanks to [@Dev-Khant](https://github.com/Dev-Khant) for contributing to this.
Copy file name to clipboardExpand all lines: pages/changelog/2023-12-13-sessions.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -15,4 +15,4 @@ Example use cases:
15
15
- Conversations / threads
16
16
- Multiple interactions within a user session
17
17
18
-
To get started, add a `sessionId` string when creating/updating a trace. See [docs](/docs/sessions) for full details on how to add sessions to your traces.
18
+
To get started, add a `sessionId` string when creating/updating a trace. See [docs](/docs/tracing/sessions) for full details on how to add sessions to your traces.
Copy file name to clipboardExpand all lines: pages/changelog/2023-12-28-v2-sdks.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ langfuse.generation(
67
67
68
68
For every chain run, a new trace is created. Previously all runs that were traced with the same Callback Handler instance were grouped into the same trace. While this was intended to be able to trace complex applications, it is not a great default for most users.
69
69
70
-
For those who want this behavior, you can create a trace and get a Langchain Handler that is scoped to the trace ([Python](/docs/langchain/python#upgrading-from-v1xx-to-v2xx), [JS/TS](/docs/langchain/typescript#upgrade1to2)).
70
+
For those who want this behavior, you can create a trace and get a Langchain Handler that is scoped to the trace ([Python](/docs/integrations/langchain/python#upgrading-from-v1xx-to-v2xx), [JS/TS](/docs/integrations/langchain/typescript#upgrade1to2)).
Head over to [our docs](/docs/prompts) to learn more and get started. Alternatively, see a demo by [logging in](https://cloud.langfuse.com) and selecting the ‘langfuse-docs’ project since we use Langfuse Prompt Management for the [QA-chatbot](/docs/qa-chatbot).
26
+
Head over to [our docs](/docs/prompts) to learn more and get started. Alternatively, see a [live demo](/docs/demo)since we use Langfuse Prompt Management to build a demo project that is integrated with Langfuse.
27
27
28
28
If you have any feedback, do get in touch on [Discord](/discord).
0 commit comments