Skip to content

Commit e289ddf

Browse files
authored
docs: improve structure (langfuse#325)
1 parent 612a127 commit e289ddf

File tree

82 files changed

+988
-1731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+988
-1731
lines changed

components/Background.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export const Background = () => (
1212
cr={1}
1313
className={cn(
1414
"[mask-image:linear-gradient(to_bottom,white,transparent,transparent)]",
15-
"dark:opacity-70"
15+
"dark:opacity-30"
1616
)}
1717
/>
1818
<LinearGradient
19-
to="rgba(120,119,198,0.25)"
19+
to="rgba(120,119,198,0.15)"
2020
from="rgba(0,0,0,0.0)"
2121
direction="top"
2222
transitionPoint="50%"

components/NotebookBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Callout, Cards, Card } from "nextra-theme-docs";
1+
import { Callout } from "nextra-theme-docs";
22
import { Button } from "./ui/button";
33

44
export const NotebookBanner: React.FC<{ src: string; className?: string }> = ({

components/home/Integrations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const features = [
1414
description:
1515
"Using Langchain? Get full execution traces in 5 minutes by adding the Langfuse Callback Handler to your app. Works for Python and JS projects.",
1616
icon: Link,
17-
href: "/docs/langchain",
17+
href: "/docs/integrations/langchain",
1818
},
1919
{
2020
name: "Web SDK",
@@ -28,7 +28,7 @@ const features = [
2828
description:
2929
"If you use the OpenAI SDK, use the Langfuse drop-in replacement to get full trace data by just changing the import.",
3030
icon: SiOpenai,
31-
href: "/docs/openai",
31+
href: "/docs/integrations/openai",
3232
},
3333
{
3434
name: "API",

components/qaChatbot/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ const welcomeMessage: Message = {
104104
id: "announcement-1",
105105
content: `👋 Do you have any questions about Langfuse? Ask me!
106106
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._`,
108108
} as const;

cookbook/_routes.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
},
66
{
77
"source": "cookbook/integration_langchain.md",
8-
"destination": "/docs/langchain/python.md"
8+
"destination": "/docs/integrations/langchain/python.md"
99
},
1010
{
1111
"source": "cookbook/integration_openai_sdk.md",
12-
"destination": "/docs/openai.md"
12+
"destination": "/docs/integrations/openai.md"
1313
},
1414
{
15-
"source": "cookbook/evaluation_get_started.md",
16-
"destination": "/docs/scores/model-based-evals.md"
15+
"source": "cookbook/evaluation_with_langchain.md",
16+
"destination": "/docs/scores/model-based-evals/langchain.md"
1717
},
1818
{
1919
"source": "cookbook/python_sdk.md",

cookbook/evaluation_get_started.ipynb renamed to cookbook/evaluation_with_langchain.ipynb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,9 @@
66
"id": "SWL354n0DECo"
77
},
88
"source": [
9-
"# Model-based Evaluations in Langfuse\n",
9+
"# Run Langchain Evaluations on data in Langfuse\n",
1010
"\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",
2012
"\n",
2113
"This cookbook follows three steps:\n",
2214
"1. Fetch production `generations` stored in Langfuse\n",
@@ -25,7 +17,7 @@
2517
"\n",
2618
"\n",
2719
"----\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."
2921
]
3022
},
3123
{

cookbook/python_sdk.ipynb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
"id": "qL7HhNyIYNwn"
2929
},
3030
"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."
3432
]
3533
},
3634
{
@@ -193,8 +191,8 @@
193191
"| input | object | yes | The input of the trace. Can be any JSON object.\n",
194192
"| output | object | yes | The output of the trace. Can be any JSON object.\n",
195193
"| 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",
198196
"| version | string | yes | The version of the trace type. Used to understand how changes to the trace type affect metrics. Useful in debugging.\n",
199197
"| release | string | yes | The release identifier of the current deployment. Used to understand how changes of different deployments affect metrics. Useful in debugging.\n",
200198
"| 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 @@
519517
"source": [
520518
"## Scores\n",
521519
"\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",
523521
"\n",
524522
"If the score relates to a specific step of the trace, specify the `observation_id`.\n",
525523
"\n",

next.config.mjs

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,32 +59,47 @@ const nonPermanentRedirects = [
5959
["/issue", "https://github.com/langfuse/langfuse/issues/new/choose"],
6060
["/security", "/docs/data-security-privacy"],
6161
["/idea", "https://github.com/orgs/langfuse/discussions/new?category=ideas"],
62-
];
6362

64-
const permanentRedirects = [
65-
// Migration 2023-07
66-
["/observability", "/docs/tracing"],
67-
["/docs/debugging-ui", "/docs/tracing"],
68-
// Migration 2023-08-01
69-
// deployment
63+
// Redirect to overview pages
64+
...[
65+
"/docs/integrations",
66+
"/docs/sdk",
67+
"/docs/tracing",
68+
"/docs/scores",
69+
"/docs/scores/model-based-evals",
70+
"/docs/datasets",
71+
].map((path) => [path, path + "/overview"]),
72+
73+
// Redirects to bridge all kinds of old links to new links
74+
["/docs/reference", "https://api.reference.langfuse.com/"],
75+
["/docs/integrations/api", "https://api.reference.langfuse.com/"],
76+
["/docs/langchain", "/docs/integrations/langchain/python"],
77+
["/docs/integrations/langchain", "/docs/integrations/langchain/python"],
78+
["/docs/langchain/python", "/docs/integrations/langchain/python"],
79+
["/docs/langchain/typescript", "/docs/integrations/langchain/typescript"],
80+
["/docs/flowise", "/docs/integrations/flowise"],
81+
["/docs/litellm", "/docs/integrations/litellm"],
82+
["/docs/langflow", "/docs/integrations/langflow"],
83+
["/integrations", "/docs/integrations"],
7084
["/docs/local", "/docs/deployment/local"],
7185
["/docs/self-host", "/docs/deployment/self-host"],
7286
["/docs/cloud", "/docs/deployment/cloud"],
73-
// integrations
74-
["/integrations", "/docs/integrations"],
75-
["/docs/reference", "/docs/api"],
76-
// Integrations back on root
77-
...["langchain", "api", "openai", "sdk", "flowise", "langflow", "litellm"].map(
78-
(integration) => [`/docs/integrations/${integration}/:path*`, `/docs/${integration}/:path*`]),
79-
// sdk integration guide
80-
["/docs/langchain", "/docs/langchain/python"],
81-
["/docs/guides/sdk-integration", "/docs/sdk#example"],
82-
// evals
83-
["/docs/scores/evals", "/docs/scores/model-based-evals"],
84-
// old experimentation to new experimentation
87+
["/docs/guides/sdk-integration", "/docs/sdk/overview"],
88+
["/docs/scores/evals", "/docs/scores/model-based-evals/overview"],
8589
["/experimentation", "/docs/experimentation"],
86-
// token usage to model usage, 2024-01
8790
["/docs/token-usage", "/docs/model-usage-and-cost"],
88-
]
91+
["/docs/debugging-ui", "/docs/tracing/overview"],
92+
["/observability", "/docs/tracing/overview"],
93+
["/docs/openai", "/docs/integrations/openai"],
94+
["/docs/api", "https://api.reference.langfuse.com/"],
95+
["/docs/qa-chatbot", "/docs/demo"],
96+
["/docs/user-explorer", "/docs/tracing/users"],
97+
["/docs/sessions", "/docs/tracing/sessions"],
98+
["/docs/deployment/cloud", "/security"],
99+
["/docs/schedule-demo", "/schedule-demo"],
100+
["/docs/project-sharing", "/docs/rbac"],
101+
];
102+
103+
const permanentRedirects = []
89104

90105
export default withBundleAnalyzer(nextraConfig);

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@
3131
"autoprefixer": "^10.4.17",
3232
"class-variance-authority": "^0.7.0",
3333
"clsx": "^2.1.0",
34-
"core-js": "^3.35.1",
3534
"gpt3-tokenizer": "^1.1.5",
3635
"langfuse": "3.0.2",
3736
"lucide-react": "^0.321.0",
38-
"mobx": "^6.12.0",
3937
"next": "^14.1.0",
4038
"next-sitemap": "^4.2.3",
4139
"nextra": "^2.13.3",
@@ -50,10 +48,8 @@
5048
"react-markdown": "^9.0.1",
5149
"react-syntax-highlighter": "^15.5.0",
5250
"react-tweet": "^3.2.0",
53-
"redoc": "^2.1.3",
5451
"remark-gfm": "^4.0.0",
5552
"remark-math": "^6.0.0",
56-
"styled-components": "^6.1.8",
5753
"tailwind-merge": "^2.2.1",
5854
"tailwindcss": "^3.4.1",
5955
"tailwindcss-animate": "^1.0.7",

pages/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"type": "menu",
5656
"items": {
5757
"try-yourself": {
58-
"title": "Try live demo",
58+
"title": "Interactive demo",
5959
"href": "/docs/demo"
6060
},
6161
"video": {

0 commit comments

Comments
 (0)