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

Update agent eval tutorial #582

Merged
merged 26 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
8 changes: 4 additions & 4 deletions docs/evaluation/how_to_guides/unit_testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ sidebar_position: 7

# How to unit test applications (Python only)

LangSmith functional tests are assertions and expectations designed to **quickly** identify obvious bugs and regressions in your AI system.
LangSmith functional tests are assertions and expectations designed to **quickly** identify obvious bugs and regressions in your AI system.
Relative to evaluations, tests typically are designed to be **fast** and **cheap** to run, focusing on **specific** functionality and edge cases with binary assertions.
We recommend using LangSmith to track any unit tests, end-to-end integration tests, or other specific assertions that touch an LLM or other non-deterministic part of your AI system.
Ideally these run on every commit in your CI pipeline to catch regressions early.

:::info Version requirement
`@unit` requires `langsmith` Python version `>=0.1.74`.
`@unit` requires `langsmith` Python version `>=0.1.74`.
:::

:::info TypeScript support
If you are interested in unit testing functionality in TypeScript or other languages, please upvote/comment on [this GitHub Issue](https://github.com/langchain-ai/langsmith-sdk/issues/1321).
If you are interested in unit testing functionality in TypeScript or other languages, please upvote/comment on [this GitHub Issue](https://github.com/langchain-ai/langsmith-sdk/issues/1321).
:::

## Write a @unit

To write a LangSmith functional test, decorate your test function with `@unit`.
If you want to track the full nested trace of the system or component being tested, you can mark those functions with `@traceable`. For example:

```python
```python
# my_app/main.py
from langsmith import traceable

Expand Down
Loading
Loading