Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flip docs to new version #220

Merged
merged 9 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/evaluation/faq/regression-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Click on the regressions or improvements buttons on the top of each column to fi

## Try it out

To get started with regression testing, try [running a no-code experiment in our prompt playground](experiments-app) or check out the [Evaluation Quick Start Guide](/evaluation/quickstart) to get started with the SDK.
To get started with regression testing, try [running a no-code experiment in our prompt playground](experiments-app) or check out the [Evaluation Quick Start Guide](../quickstart) to get started with the SDK.
8 changes: 4 additions & 4 deletions docs/evaluation/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ The evaluator itself can be any arbitrary function. There are a few different ty
which would be considered a **ground truth** evaluator because it compares the output to a reference. See [How to create custom evaluators](evaluation/faq/custom-evaluators).
- **LLM-as-judge**: An LLM-as-judge evaluator uses an LLM to score system output. For example, you might want to check whether your system is outputting
offensive content. This is **reference-free**, as there is no comparison to an example output. You might also want to check whether the system output has the same
meaning as the example output, which would be a **ground truth** evaluator. To get started with LLM-as-a-judge, try out LangSmith's [off-the-shelf evaluators](https://docs.smith.langchain.com/evaluation/faq/evaluator-implementations)!
meaning as the example output, which would be a **ground truth** evaluator. To get started with LLM-as-a-judge, try out LangSmith's [off-the-shelf evaluators](evaluation/faq/evaluator-implementations)!
- **Human**: You can also evaluate your runs manually. This can be done in LangSmith [via the SDK](tracing/faq/logging_feedback#capturing-feedback-programmatically),
or [in the LangSmith UI](http://localhost:3000/tracing/faq/logging_feedback#annotating-traces-with-feedback).

## Next steps

To get started with code, check out the [Quick Start Guide](/evaluation/quickstart).
To get started with code, check out the [Quick Start Guide](evaluation/quickstart).

If you want to learn how to accomplish a particular task, check out our comprehensive [How-To Guides](/evaluation/faq)
If you want to learn how to accomplish a particular task, check out our comprehensive [How-To Guides](evaluation/faq)

For a higher-level set of recommendations on how to think about testing and evaluating your LLM app, check out the [evaluation recommendations](/evaluation/recommendations) page.
For a higher-level set of recommendations on how to think about testing and evaluating your LLM app, check out the [evaluation recommendations](evaluation/recommendations) page.
26 changes: 12 additions & 14 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ To create an API key head to the [Settings page](https://smith.langchain.com/set

## Log your first trace

<p>
We provide multiple ways to log traces to LangSmith. Below, we'll highlight
how to use <code>traceable</code>. See more on the{" "}
<a href="./tracing/integrations">Integrations</a> page.
</p>
We provide multiple ways to log traces to LangSmith. Below, we'll highlight
how to use `traceable`. See more on the [Integrations](./tracing/integrations/index.mdx) page.

<CodeTabs
tabs={[
{
Expand All @@ -85,11 +83,11 @@ To create an API key head to the [Settings page](https://smith.langchain.com/set
/>

- View a [sample output trace](https://smith.langchain.com/public/b37ca9b1-60cd-4a2a-817e-3c4e4443fdc0/r).
- Learn more about tracing on the [tracing page](/tracing).
- Learn more about tracing on the [tracing page](./tracing/index.mdx).

## Create your first evaluation

Evalution requires a system to test, [data](evaluation/faq) to serve as test cases, and optionally evaluators to grade the results. Here we use a built-in accuracy evaluator.
Evalution requires a system to test, [data](./evaluation/faq/index.mdx) to serve as test cases, and optionally evaluators to grade the results. Here we use a built-in accuracy evaluator.

<CodeTabs
tabs={[
Expand Down Expand Up @@ -176,19 +174,19 @@ await runOnDataset(
groupId="client-language"
/>

- See more on the [evaluation quick start page](/evaluation/quickstart).
- See more on the [evaluation quick start page](./evaluation/quickstart.mdx).

## Next Steps

Check out the following sections to learn more about LangSmith:

- **[User Guide](/user_guide)**: Learn about the workflows LangSmith supports at each stage of the LLM application lifecycle.
- **[User Guide](./user_guide.mdx)**: Learn about the workflows LangSmith supports at each stage of the LLM application lifecycle.
- **[Pricing](/pricing)**: Learn about the pricing model for LangSmith.
- **[Self-Hosting](/category/self-hosting)**: Learn about self-hosting options for LangSmith.
- **[Proxy](/category/proxy)**: Learn about the proxy capabilities of LangSmith.
- **[Tracing](/tracing)**: Learn about the tracing capabilities of LangSmith.
- **[Evaluation](/evaluation)**: Learn about the evaluation capabilities of LangSmith.
- **[Prompt Hub](/category/prompt-hub)** Learn about the Prompt Hub, a prompt management tool built into LangSmith.
- **[Proxy](/1.0/category/proxy)**: Learn about the proxy capabilities of LangSmith.
- **[Tracing](./tracing/index.mdx)**: Learn about the tracing capabilities of LangSmith.
- **[Evaluation](./evaluation/index.mdx)**: Learn about the evaluation capabilities of LangSmith.
- **[Prompt Hub](/1.0/category/prompt-hub)** Learn about the Prompt Hub, a prompt management tool built into LangSmith.

## Additional Resources

Expand All @@ -202,7 +200,7 @@ Check out the following sections to learn more about LangSmith:

### How do I migrate projects between organizations?

Currently we do not support project migration betwen organizations. While you can manually imitate this by reading and writing runs and datasets using the SDK (see the querying runs and traces guide [here](/tracing/faq/querying_traces)), it will be fastest to create a new project within your organization and go from there.
Currently we do not support project migration betwen organizations. While you can manually imitate this by reading and writing runs and datasets using the SDK (see the querying runs and traces guide [here](./tracing/faq/querying_traces.mdx)), it will be fastest to create a new project within your organization and go from there.

### Why aren't my runs aren't showing up in my project?

Expand Down
6 changes: 3 additions & 3 deletions docs/monitoring/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ table_of_contents: true
# Concepts

In this guide we will go over some of the concepts that are important to understand when thinking about production logging and automations in LangSmith.
A lot of these concepts build off of tracing concepts - it is recommended to read the [Tracing Concepts](/tracing/concepts) documentation before.
A lot of these concepts build off of tracing concepts - it is recommended to read the [Tracing Concepts](../tracing/concepts) documentation before.

## Runs

Expand All @@ -29,7 +29,7 @@ A `Thread` is a sequence of traces representing a conversation. Each response is

You can track threads by attaching a special metadata key to runs (one of `session_id`, `thread_id` or `conversation_id`).

See [this documentation](/tracing/faq/customizing_trace_attributes#adding-metadata-and-tags-to-traces) for how to add metadata keys to a trace.
See [this documentation](../tracing/faq/customizing_trace_attributes#adding-metadata-and-tags-to-traces) for how to add metadata keys to a trace.

## Monitoring Dashboard

Expand All @@ -43,7 +43,7 @@ An example of a rule could be, in plain English, "Run a 'vagueness' evaluator on

## Datasets

Datasets are a way to collect examples, which are input-output pairs. You can use datasets for evaluation, as well as fine-tuning and few-shot prompting. For more information, see [here](/evaluation)
Datasets are a way to collect examples, which are input-output pairs. You can use datasets for evaluation, as well as fine-tuning and few-shot prompting. For more information, see [here](../evaluation)

## Annotation Queues

Expand Down
2 changes: 1 addition & 1 deletion docs/monitoring/faq/filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can also define a filter from the `Filter Shortcuts` on the sidebar. This co
## How to filter for sub runs

In order to filter for sub runs, you first need to remove the default filter of `IsRoot` is `true`. After that, you can apply any filter you wish. A common way to do this is to filter by name for sub runs.
This relies on good naming for all parts of your pipeline - see [here](/tracing/faq/customizing_trace_attributes#customizing-the-run-name) for more details on how to do that.
This relies on good naming for all parts of your pipeline - see [here](../../tracing/faq/customizing_trace_attributes#customizing-the-run-name) for more details on how to do that.

## How to filter for sub runs whose parent traces have some attribute

Expand Down
2 changes: 1 addition & 1 deletion docs/monitoring/faq/monitoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You can view monitors over differing time periods. This can be controlled by the
By default, the monitor tab shows results for all runs. However, you can group runs in order to see how different subsets perform.
This can be useful to compare how two different prompts or models are performing.

In order to do this, you first need to make sure you are [attaching appropriate tags or metadata](/tracing/faq/customizing_trace_attributes#adding-metadata-and-tags-to-traces) to these runs when logging them.
In order to do this, you first need to make sure you are [attaching appropriate tags or metadata](../../tracing/faq/customizing_trace_attributes#adding-metadata-and-tags-to-traces) to these runs when logging them.
After that, you can click the `Tag` or `Metadata` tab at the top to group runs accordingly.

![Subsets Monitor](../static/subsets_monitor.png)
Expand Down
2 changes: 1 addition & 1 deletion docs/monitoring/faq/online_evaluation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Currently, we provide support for specifying a prompt template, a model, and a s

## How to set up online evaluation

The way to configure online evaluation is to first set up an [automation](/monitoring/faq/automations).
The way to configure online evaluation is to first set up an [automation](../../monitoring/faq/automations).

![Subsets Monitor](../static/filter_rule.png)

Expand Down
8 changes: 4 additions & 4 deletions docs/monitoring/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ It's also crucial to get a high-level overview of application performance with r
In order to facilitate this, LangSmith supports a series of workflows to support production monitoring and automations.
This includes support for easily exploring and visualizing key production metrics, as well as support for defining automations to process the data.

To get started, check out the [Quick Start Guide](/monitoring/quickstart).
To get started, check out the [Quick Start Guide](monitoring/quickstart).

After that, peruse the [Concepts Section](/monitoring/concepts) to better understand the different components involved with monitoring and automations.
After that, peruse the [Concepts Section](monitoring/concepts) to better understand the different components involved with monitoring and automations.

If you want to learn how to accomplish a particular task, check out our comprehensive [How-To Guides](/monitoring/faq)
If you want to learn how to accomplish a particular task, check out our comprehensive [How-To Guides](monitoring/faq)

For example use cases, check out the [Use Cases](/monitoring/use_cases) page.
For example use cases, check out the [Use Cases](monitoring/use_cases) page.
8 changes: 4 additions & 4 deletions docs/monitoring/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ table_of_contents: true

# Quick Start

Production monitoring starts by configuring tracing for your application. See the [tracing section](/tracing) for details on how to do that.
Production monitoring starts by configuring tracing for your application. See the [tracing section](../tracing) for details on how to do that.

Compared to tracing while prototyping applications, you want to pay attention to a few particular points:

- [Sampling](/tracing/faq/logging_and_viewing#setting-a-sampling-rate-for-tracing): When logging production workloads, you may only want to log a subset of the datapoints flowing through your system.
- [Adding Metadata](/tracing/faq/customizing_trace_attributes#adding-metadata-and-tags-to-traces): As we'll see with automations, attaching relevant metadata to runs is particularly important to enable filtering and grouping your data.
- [Feedback](/tracing/faq/logging_feedback): When an application is in production you can't always look at all datapoints. Capturing user feedback is helpful to draw your attention to particular datapoints.
- [Sampling](../tracing/faq/logging_and_viewing#setting-a-sampling-rate-for-tracing): When logging production workloads, you may only want to log a subset of the datapoints flowing through your system.
- [Adding Metadata](../tracing/faq/customizing_trace_attributes#adding-metadata-and-tags-to-traces): As we'll see with automations, attaching relevant metadata to runs is particularly important to enable filtering and grouping your data.
- [Feedback](../tracing/faq/logging_feedback): When an application is in production you can't always look at all datapoints. Capturing user feedback is helpful to draw your attention to particular datapoints.

So - now you've got your logs flowing into LangSmith. What can you do with that data?

Expand Down
2 changes: 1 addition & 1 deletion docs/tracing/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Collecting feedback on runs can be done in three main ways:

1. [In the UI](faq/logging_feedback#annotating-traces-with-feedback) - Annotate runs directly in the UI
2. [With the SDK](faq/logging_feedback#capturing-feedback-programmatically) - Programmatically log feedback to LangSmith
3. [With Online Evaluators](/monitoring/faq/online_evaluation) - Automatically run evaluators on a sample of your production traces to generate feedback in realtime
3. [With Online Evaluators](../monitoring/faq/online_evaluation) - Automatically run evaluators on a sample of your production traces to generate feedback in realtime

![Feedback](static/concepts/feedback.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/tracing/faq/customizing_trace_attributes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ await chain.invoke(
### Adding metadata and tags to traces

LangSmith supports sending arbitrary metadata and tags along with traces. This is useful for associating additional information with a trace, such as the environment in which it was executed, or the user who initiated it.
For more information on metadata and tags, see the [Concepts](/tracing/concepts) page. For information on how to query traces and runs by metadata and tags, see the [Querying Traces](/tracing/faq/querying_traces) page.
For more information on metadata and tags, see the [Concepts](../../tracing/concepts) page. For information on how to query traces and runs by metadata and tags, see the [Querying Traces](../../tracing/faq/querying_traces) page.

<CodeTabs
tabs={[
Expand Down
6 changes: 3 additions & 3 deletions docs/tracing/faq/logging_and_viewing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The `LANGCHAIN_TRACING_V2` environment variable must be set to `'true'` in order
Additionally, you will need to set the `LANGCHAIN_API_KEY` environment variable to your API key (see [Setup](/) for more information).

By default, the traces will be logged to a project named `default`.
To log traces to a different project, see [this section](/tracing/faq/customizing_trace_attributes#logging-to-a-specific-project).
To log traces to a different project, see [this section](customizing_trace_attributes#logging-to-a-specific-project).
:::

<CodeTabs
Expand Down Expand Up @@ -117,7 +117,7 @@ The `LANGCHAIN_TRACING_V2` environment variable must be set to `'true'` in order
Additionally, you will need to set the `LANGCHAIN_API_KEY` environment variable to your API key (see [Setup](/) for more information).

By default, the traces will be logged to a project named `default`.
To log traces to a different project, see [this section](/tracing/faq/customizing_trace_attributes#logging-to-a-specific-project).
To log traces to a different project, see [this section](customizing_trace_attributes#logging-to-a-specific-project).
:::

<CodeTabs
Expand Down Expand Up @@ -343,7 +343,7 @@ This setting works both with LangChain and the LangSmith SDK, in both Python and

## Getting the run ID of a logged run

The example below shows how to get the run ID of a logged run using the LangSmith SDK. **To get the run ID of a run using LangChain, you can follow the guide [here](/tracing/faq/langchain_specific_guides#getting-a-run-id-from-a-langchain-call).**
The example below shows how to get the run ID of a logged run using the LangSmith SDK. **To get the run ID of a run using LangChain, you can follow the guide [here](langchain_specific_guides#getting-a-run-id-from-a-langchain-call).**

<CodeTabs
tabs={[
Expand Down
4 changes: 2 additions & 2 deletions docs/tracing/faq/logging_feedback.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import {
# How to Collect Feedback for Traces

Feedback allows you to understand how your users are experiencing your application and helps draw attention to problematic traces. LangSmith makes it easy to collect feedback for traces and view it in the context of the trace, as well as filter traces based on feedback.
For more information on how to score your application programmatically using a testing workflow, see the [Evaluation](/evaluation) section.
For more information on how to score your application programmatically using a testing workflow, see the [Evaluation](../../evaluation) section.

### Capturing feedback programmatically

It's often helpful to expose a simple mechanism (such as a thumbs-up, thumbs-down button) to collect user feedback for your application responses. You can then use the LangSmith SDK or API to send feedback for a trace.
To get the run_id of a logged run, see [this guide](/tracing/faq/logging_and_viewing#getting-the-run-id-of-a-logged-run).
To get the run_id of a logged run, see [this guide](./logging_and_viewing#getting-the-run-id-of-a-logged-run).

<CodeTabs
tabs={[
Expand Down
8 changes: 4 additions & 4 deletions docs/tracing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Tracing can help you track down issues like:
- Why a chain was slower than expected
- How many tokens an agent used at each step

To get started, check out the [Quick Start Guide](/tracing/quick_start).
To get started, check out the [Quick Start Guide](./tracing/quick_start).

After that, peruse the [Concepts Section](/tracing/concepts) to better understand the different components involved with tracing.
After that, peruse the [Concepts Section](./tracing/concepts) to better understand the different components involved with tracing.

If you want to learn how to accomplish a particular task, check out our comprehensive [How-To Guides](/tracing/faq)
If you want to learn how to accomplish a particular task, check out our comprehensive [How-To Guides](./tracing/faq)

For example use cases, check out the [Use Cases](/tracing/use_cases) page.
For example use cases, check out the [Use Cases](./tracing/use_cases) page.
4 changes: 2 additions & 2 deletions docs/tracing/integrations/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ client.chat.completions.create(

Oftentimes, you use the OpenAI client inside of other functions.
You can get nested traces by using this wrapped client and decorating those functions with `@traceable`.
See [this documentation](/tracing/faq/logging_and_viewing) for more documentation how to use this decorator
See [this documentation](../faq/logging_and_viewing.mdx) for more documentation how to use this decorator

```python
from langsmith import traceable
Expand Down Expand Up @@ -124,7 +124,7 @@ user = client.chat.completions.create(

Oftentimes, you use `instructor` inside of other functions.
You can get nested traces by using this wrapped client and decorating those functions with `@traceable`.
See [this documentation](/tracing/faq/logging_and_viewing) for more documentation how to use this decorator
See [this documentation](../faq/logging_and_viewing.mdx) for more documentation how to use this decorator

```python
# You can customize the run name with the `name` keyword argument
Expand Down
Loading
Loading