> ## Documentation Index
> Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Patterns

> Let Loop investigate your traces on a schedule and record recurring problems and trends as patterns, each with supporting evidence and a suggested fix.

export const feature_0 = "Patterns"

export const verb_0 = "is"

Most projects collect more traces than a team can read. [**<Icon icon="scan-search" /> Patterns**](https://www.braintrust.dev/app/~/patterns) puts [Loop](/docs/loop) to work on that backlog: it searches your logs and raw trace data for recurring problems and trends that no scorer is already measuring, then records what it finds.

A **pattern** is a saved finding rather than a single trace. Each one collects the traces that support it, explains what is happening, and suggests what to do next.

<Warning>
  {feature_0} {verb_0} in [public preview](/docs/feature-lifecycle) and can change before reaching general availability.
</Warning>

Use Patterns to:

* **Catch failures you aren't already measuring.** Surface a failure mode that affects one cohort of users, or a regression that started last week. Patterns searches your traces whether or not a scorer already covers the behavior.
* **Track cost and latency drift.** Notice a recurring LLM call whose cost climbed, before it shows up on a bill.
* **Find opportunities, not just problems.** Recurring successful behavior and emerging use cases are patterns too.
* **Hand work to a coding agent.** Copy a pattern and its evidence as a prompt for the agent that will write the fix.

<Tip>
  Follow [Active observability for coding agents](/docs/cookbook/recipes/CodingAgentInsights) to configure Topics facets and a Loop automation that finds recurring problems in coding-agent sessions.
</Tip>

## How discovery works

Patterns are produced by a scheduled [Loop automation](/docs/loop/automations). Each run:

1. **Queries a slice of your project.** The automation's instruction and default query range decide how much recent data the run inspects.
2. **Investigates what looks notable.** Loop narrows in with queries, and inspects individual traces in depth using the [Debugger](/docs/observe/debug-traces).
3. **Records what it can support with evidence.** A finding becomes a pattern only when Loop can attach the traces behind it.
4. **Updates rather than duplicates.** When new evidence points at a pattern Loop already recorded, it updates that pattern instead of adding a second one.

Loop also records patterns when you ask it to during an interactive thread. Those appear in the same list. See [Find patterns](/docs/loop/capabilities#find-patterns).

## Requirements

Patterns runs through Loop, so it needs a model to run on:

* **A way to pay for inference.** By default, Patterns runs on Braintrust's [built-in models](/docs/admin/ai-providers#available-models), which draw down your organization's monthly [model credits](/docs/plans-and-limits#model-credits) and need no setup, subject to the [built-in model requirements](/docs/admin/ai-providers#requirements). To run Patterns on your own key, or to keep it running once your credits are exhausted, configure an OpenAI-compatible [AI provider](/docs/admin/ai-providers).
* **Permission to close patterns.** Anyone who can read the project's logs can read patterns. Closing and reopening one additionally requires the [`Update` permission](/docs/admin/access-control#object-permissions) on the project.

## Patterns and Topics

Braintrust gives you two ways to make sense of a large volume of traces. They answer different questions, and neither requires the other.

|                     | Topics                                                                                       | Patterns                                                                |
| ------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| Question it answers | What themes occur most often?                                                                | What keeps happening, why does it matter, and what should we do next?   |
| Output              | A classification on every trace                                                              | A focused set of findings, each with evidence and a suggested fix       |
| Scope               | Broad, across all your traces                                                                | Scans your traces, then investigates a subset of them in depth          |
| Models              | Braintrust built-in models, drawing on your [model credits](/docs/plans-and-limits#model-credits) | The same built-in models by default, or your own configured AI provider |
| Cadence             | Daily pipeline                                                                               | Scheduled Loop automation                                               |

[Topics](/docs/observe/topics) is the broad, low-cost layer. It classifies and clusters every trace, so you can filter and chart your logs by user intent, sentiment, or issue.

Patterns is the deeper layer. It searches across the same traces, then investigates the ones that look notable closely enough to tell you what deserves attention.

They work well together in both directions. Topic classifications, scores, and human feedback all become signal that Loop can draw on while investigating. Going the other way, once a pattern proves worth tracking, Loop can turn it into a facet, scorer, classifier, or monitor so the behavior is measured continuously at lower cost. See [Act on a pattern](/docs/observe/patterns/review#act-on-a-pattern).

## Next steps

* [Enable Patterns](/docs/observe/patterns/enable) and configure how often Loop looks for them.
* [Review and act on patterns](/docs/observe/patterns/review) once the first run finishes.
* [Discover insights with Topics](/docs/observe/topics) to classify your traces at a broader scale.
* [Run Loop on a schedule](/docs/loop/automations) for recurring analysis beyond pattern discovery.
