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

# What Loop can do

> Query logs, diagnose traces, write scorers, run experiments, and build dashboards through natural language, with example prompts for every task.

&#x20;**Loop** lets you ask questions about your app's behavior in production and helps you improve it. It works with your traces, experiments, datasets, and connected code to diagnose problems, build evaluations, and suggest or implement fixes.

Explore the capabilities below, or [get started with Loop](https://docs.braintrust.dev/loop/get-started.md).

> [!NOTE]
>
> Loop starts consuming [Braintrust credits](https://docs.braintrust.dev/admin/billing/braintrust-credits.md) on December 7, 2026.

## Investigate

Ask questions about your data, from a single trace up to every project in your organization.

### &#x20;Explore your data

Loop queries logs, experiments, and datasets with SQL to uncover trends, costs, and recurring problems.

> [accordion] Summarize logs and suggest next steps
>
> ```text wrap theme={null}
> Review this project's logs from the past seven days. Summarize up to three recurring problems, link supporting traces, and recommend what to investigate first. Ask me which project to use if it isn't clear.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Review%20this%20project's%20logs%20from%20the%20past%20seven%20days.%20Summarize%20up%20to%20three%20recurring%20problems%2C%20link%20supporting%20traces%2C%20and%20recommend%20what%20to%20investigate%20first.%20Ask%20me%20which%20project%20to%20use%20if%20it%20isn't%20clear.)

> [accordion] Break down cost by model
>
> ```text wrap theme={null}
> Show model costs recorded in traces over the past seven days, broken down by project and model. Include total cost and p50, p95, and p99 cost per trace. Explain how you attribute costs for traces that use multiple models without double-counting them.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Show%20model%20costs%20recorded%20in%20traces%20over%20the%20past%20seven%20days%2C%20broken%20down%20by%20project%20and%20model.%20Include%20total%20cost%20and%20p50%2C%20p95%2C%20and%20p99%20cost%20per%20trace.%20Explain%20how%20you%20attribute%20costs%20for%20traces%20that%20use%20multiple%20models%20without%20double-counting%20them.)

> [accordion] Graph caching and usage metrics
>
> ```text wrap theme={null}
> For this project's traces from the past seven days, graph daily prompt cache-hit rate and LLM calls per trace. Explain how you calculate each metric, and distinguish missing cache measurements from zero cache hits. Ask me which project to use if it isn't clear.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=For%20this%20project's%20traces%20from%20the%20past%20seven%20days%2C%20graph%20daily%20prompt%20cache-hit%20rate%20and%20LLM%20calls%20per%20trace.%20Explain%20how%20you%20calculate%20each%20metric%2C%20and%20distinguish%20missing%20cache%20measurements%20from%20zero%20cache%20hits.%20Ask%20me%20which%20project%20to%20use%20if%20it%20isn't%20clear.)

> [accordion] Hand off a query to the Query page
>
> ```text wrap theme={null}
> Put the SQL query we discussed into the Query page and run it there so I can keep refining it. If you don't have the query, ask me to provide it first.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Put%20the%20SQL%20query%20we%20discussed%20into%20the%20Query%20page%20and%20run%20it%20there%20so%20I%20can%20keep%20refining%20it.%20If%20you%20don't%20have%20the%20query%2C%20ask%20me%20to%20provide%20it%20first.)
>
> The query stays on the [\*\* Query\*\*](https://www.braintrust.dev/app/~/sql) page for you to edit. Ask Loop to [refine or fix it](https://docs.braintrust.dev/reference/sql.md#loop) as needed.

> [accordion] Attribute traces to teammates
>
> ```text wrap theme={null}
> Which teammates logged the most traces over the past seven days? Show each teammate's trace count and the total model cost recorded in those traces. Keep activity attributed only to API keys or service tokens, and unattributed activity, separate.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Which%20teammates%20logged%20the%20most%20traces%20over%20the%20past%20seven%20days%3F%20Show%20each%20teammate's%20trace%20count%20and%20the%20total%20model%20cost%20recorded%20in%20those%20traces.%20Keep%20activity%20attributed%20only%20to%20API%20keys%20or%20service%20tokens%2C%20and%20unattributed%20activity%2C%20separate.)
>
> Loop resolves `span_attributes.created_by_user_id` to organization member names and emails, and `span_attributes.created_by_api_key_id` to API key and service token names. You can ask about people and keys by name.
>
> > [!NOTE]
> >
> > Fields you define in `metadata`, including ones named like `metadata.user_id`, describe your own application's users. Loop doesn't read them as Braintrust members.

From the logs table, Loop can [turn a question into a SQL filter or find traces similar to your selection](https://docs.braintrust.dev/observe/filter.md#ask-questions-with-loop).

### &#x20;Analyze traces

Loop diagnoses trace failures and summarizes work across LLM and tool calls. Paste a trace permalink or ID into the thread to give Loop the context.

> [accordion] Understand what happened
>
> ```text wrap theme={null}
> Summarize this trace, including its outcome, total latency, and where the time was spent. Account for overlapping calls rather than adding their durations together. Ask me for the trace link if you don't have it.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Summarize%20this%20trace%2C%20including%20its%20outcome%2C%20total%20latency%2C%20and%20where%20the%20time%20was%20spent.%20Account%20for%20overlapping%20calls%20rather%20than%20adding%20their%20durations%20together.%20Ask%20me%20for%20the%20trace%20link%20if%20you%20don't%20have%20it.)

> [accordion] Find related failures
>
> ```text wrap theme={null}
> Find traces from the past seven days with errors similar to this failure. Show what they have in common and link representative examples. Ask me for the original trace if you don't have it.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Find%20traces%20from%20the%20past%20seven%20days%20with%20errors%20similar%20to%20this%20failure.%20Show%20what%20they%20have%20in%20common%20and%20link%20representative%20examples.%20Ask%20me%20for%20the%20original%20trace%20if%20you%20don't%20have%20it.)

Loop can also help [troubleshoot online scoring failures](https://docs.braintrust.dev/evaluate/score-online.md#scoring-failures).

### &#x20;Find patterns

Loop searches logs and raw traces for recurring problems and trends, even without a scorer measuring them, and records them as [patterns](https://docs.braintrust.dev/observe/patterns.md).

> [accordion] Record a failure you suspect
>
> ```text wrap theme={null}
> Compare tool-call failure rates over the past seven days with the previous seven days. Identify which tools changed most, include request counts and supporting traces, and record a pattern if the evidence supports a recurring problem.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Compare%20tool-call%20failure%20rates%20over%20the%20past%20seven%20days%20with%20the%20previous%20seven%20days.%20Identify%20which%20tools%20changed%20most%2C%20include%20request%20counts%20and%20supporting%20traces%2C%20and%20record%20a%20pattern%20if%20the%20evidence%20supports%20a%20recurring%20problem.)

> [accordion] Turn an investigation into a tracked pattern
>
> ```text wrap theme={null}
> Review this project's logs from the past seven days and identify a recurring failure supported by multiple traces. Record it as a pattern with supporting evidence, or update a matching existing pattern. If the evidence is insufficient, explain what is missing.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Review%20this%20project's%20logs%20from%20the%20past%20seven%20days%20and%20identify%20a%20recurring%20failure%20supported%20by%20multiple%20traces.%20Record%20it%20as%20a%20pattern%20with%20supporting%20evidence%2C%20or%20update%20a%20matching%20existing%20pattern.%20If%20the%20evidence%20is%20insufficient%2C%20explain%20what%20is%20missing.)

> [accordion] Ask how a pattern was found
>
> ```text wrap theme={null}
> Explain the evidence supporting this pattern, distinguish confirmed findings from hypotheses, and identify what additional evidence would strengthen or change the conclusion. Ask me for the pattern link if you don't have it.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Explain%20the%20evidence%20supporting%20this%20pattern%2C%20distinguish%20confirmed%20findings%20from%20hypotheses%2C%20and%20identify%20what%20additional%20evidence%20would%20strengthen%20or%20change%20the%20conclusion.%20Ask%20me%20for%20the%20pattern%20link%20if%20you%20don't%20have%20it.)

Each pattern includes supporting evidence. Loop updates an existing pattern when it finds related evidence, rather than creating a duplicate.

> [!NOTE]
>
> Loop can also find patterns on a schedule, without being asked. See [Enable Patterns](https://docs.braintrust.dev/observe/patterns/enable.md).

### &#x20;Use external tools and context

Connect [external MCP servers](https://docs.braintrust.dev/loop/mcp.md) so Loop can combine trace evidence with known issues, internal documentation, and other business context. Depending on the server's tools, Loop can also create follow-up tasks from its findings.

> [accordion] Investigate failures with Linear context
>
> ```text wrap theme={null}
> Investigate recurring tool-call failures from the past week. Search Linear for related issues, and draft a bug report for any failure that isn't already tracked. Include example traces.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Investigate%20recurring%20tool-call%20failures%20from%20the%20past%20week.%20Search%20Linear%20for%20related%20issues%2C%20and%20draft%20a%20bug%20report%20for%20any%20failure%20that%20isn%27t%20already%20tracked.%20Include%20example%20traces.)

> [accordion] Check responses against internal guidance
>
> ```text wrap theme={null}
> Use the connected knowledge base to find our refund policy. Compare it with recent traces where the agent answered refund questions, and flag responses that conflict with the policy. Include the policy references and trace links.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Use%20the%20connected%20knowledge%20base%20to%20find%20our%20refund%20policy.%20Compare%20it%20with%20recent%20traces%20where%20the%20agent%20answered%20refund%20questions%2C%20and%20flag%20responses%20that%20conflict%20with%20the%20policy.%20Include%20the%20policy%20references%20and%20trace%20links.)

### &#x20;Investigate failures in source code

The [GitHub integration](https://docs.braintrust.dev/loop/github.md) lets Loop investigate failures using your code, pull request reviews, and CI logs and artifacts. With [write access](https://docs.braintrust.dev/loop/github.md#give-loop-write-access), it can write a fix and regression test, push a branch, and open a pull request.

> [accordion] Trace a failure back to the code
>
> ```text wrap theme={null}
> Compare a failed tool call with a successful one, then find the relevant implementation in the connected repository. Explain the likely cause and suggest a fix and a regression test. Include trace links and file paths.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Compare%20a%20failed%20tool%20call%20with%20a%20successful%20one%2C%20then%20find%20the%20relevant%20implementation%20in%20the%20connected%20repository.%20Explain%20the%20likely%20cause%20and%20suggest%20a%20fix%20and%20a%20regression%20test.%20Include%20trace%20links%20and%20file%20paths.)

> [accordion] Find test coverage gaps
>
> ```text wrap theme={null}
> Review recurring failures in this project's traces from the past week and the tests in the connected repository. Identify failure cases the tests don't cover, and suggest regression tests using representative trace inputs.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Review%20recurring%20failures%20in%20this%20project%27s%20traces%20from%20the%20past%20week%20and%20the%20tests%20in%20the%20connected%20repository.%20Identify%20failure%20cases%20the%20tests%20don%27t%20cover%2C%20and%20suggest%20regression%20tests%20using%20representative%20trace%20inputs.)

> [accordion] Turn a failure into a pull request
>
> ```text wrap theme={null}
> Investigate the most common tool-call failure in this project's traces from the past week and confirm its cause in the connected repository. Implement a focused fix, add and run a regression test, and open a pull request on a new branch with supporting trace links and test results. If you can't establish the cause or run the tests, explain what's missing.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Investigate%20the%20most%20common%20tool-call%20failure%20in%20this%20project's%20traces%20from%20the%20past%20week%20and%20confirm%20its%20cause%20in%20the%20connected%20repository.%20Implement%20a%20focused%20fix%2C%20add%20and%20run%20a%20regression%20test%2C%20and%20open%20a%20pull%20request%20on%20a%20new%20branch%20with%20supporting%20trace%20links%20and%20test%20results.%20If%20you%20can't%20establish%20the%20cause%20or%20run%20the%20tests%2C%20explain%20what's%20missing.)

### &#x20;Analyze projects

Loop can investigate a whole project or compare projects across your organization.

For a single project, enter a prompt in **Search or ask Loop anything** on its ** Home** page.

> [accordion] Track a score over time
>
> ```text wrap theme={null}
> Show the daily distribution and sample count for my accuracy scorer over the past seven days. Identify changes in performance and whether changes in traffic or scoring coverage might explain them. Ask me to choose a scorer if the name is ambiguous or no accuracy scorer exists.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Show%20the%20daily%20distribution%20and%20sample%20count%20for%20my%20accuracy%20scorer%20over%20the%20past%20seven%20days.%20Identify%20changes%20in%20performance%20and%20whether%20changes%20in%20traffic%20or%20scoring%20coverage%20might%20explain%20them.%20Ask%20me%20to%20choose%20a%20scorer%20if%20the%20name%20is%20ambiguous%20or%20no%20accuracy%20scorer%20exists.)

> [accordion] Find the experiments that moved
>
> ```text wrap theme={null}
> Find experiments from the past seven days with the largest score changes relative to their baselines. Compare runs with matching tasks, dataset versions, and scorer configurations, and flag differences that prevent a fair comparison. Include experiment links and sample counts.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Find%20experiments%20from%20the%20past%20seven%20days%20with%20the%20largest%20score%20changes%20relative%20to%20their%20baselines.%20Compare%20runs%20with%20matching%20tasks%2C%20dataset%20versions%2C%20and%20scorer%20configurations%2C%20and%20flag%20differences%20that%20prevent%20a%20fair%20comparison.%20Include%20experiment%20links%20and%20sample%20counts.)

> [accordion] Check recent activity
>
> ```text wrap theme={null}
> Show this project's logs with errors and datasets created over the past seven days. Summarize recurring errors and link representative traces and the new datasets.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Show%20this%20project's%20logs%20with%20errors%20and%20datasets%20created%20over%20the%20past%20seven%20days.%20Summarize%20recurring%20errors%20and%20link%20representative%20traces%20and%20the%20new%20datasets.)

> [accordion] Watch token usage
>
> ```text wrap theme={null}
> Show daily input, cached input, and output token usage for this project over the past 30 days, broken down by model. Include trace counts and tokens per trace so I can distinguish traffic growth from more expensive requests. Avoid double-counting cached tokens.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Show%20daily%20input%2C%20cached%20input%2C%20and%20output%20token%20usage%20for%20this%20project%20over%20the%20past%2030%20days%2C%20broken%20down%20by%20model.%20Include%20trace%20counts%20and%20tokens%20per%20trace%20so%20I%20can%20distinguish%20traffic%20growth%20from%20more%20expensive%20requests.%20Avoid%20double-counting%20cached%20tokens.)

To compare projects, select  **Loop agent** from the organization-level [projects list](https://www.braintrust.dev/app). Ask about project metrics, usage, or performance trends.

> [accordion] Rank projects by usage
>
> ```text wrap theme={null}
> Rank projects by total token usage over the past seven days, and separately by the number of experiments created in that period. Show the totals and link to each project.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Rank%20projects%20by%20total%20token%20usage%20over%20the%20past%20seven%20days%2C%20and%20separately%20by%20the%20number%20of%20experiments%20created%20in%20that%20period.%20Show%20the%20totals%20and%20link%20to%20each%20project.)

> [accordion] Compare performance across projects
>
> ```text wrap theme={null}
> Compare the five projects with the most traces over the past seven days. Show each project's trace count and p50 and p95 end-to-end trace latency, and flag differences in workloads that could affect the comparison.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Compare%20the%20five%20projects%20with%20the%20most%20traces%20over%20the%20past%20seven%20days.%20Show%20each%20project's%20trace%20count%20and%20p50%20and%20p95%20end-to-end%20trace%20latency%2C%20and%20flag%20differences%20in%20workloads%20that%20could%20affect%20the%20comparison.)

> [accordion] Spot trends in volume
>
> ```text wrap theme={null}
> Show daily trace counts by project over the past 30 days. Compare the most recent seven complete days with the preceding seven days and identify projects with declining volume. Show absolute counts and percentage changes.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Show%20daily%20trace%20counts%20by%20project%20over%20the%20past%2030%20days.%20Compare%20the%20most%20recent%20seven%20complete%20days%20with%20the%20preceding%20seven%20days%20and%20identify%20projects%20with%20declining%20volume.%20Show%20absolute%20counts%20and%20percentage%20changes.)

> [accordion] Audit recent projects
>
> ```text wrap theme={null}
> What projects were created in the last month?
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=What%20projects%20were%20created%20in%20the%20last%20month%3F)

## Build

Turn findings into saved Braintrust objects. Loop asks for approval before creating or changing them.

### &#x20;Author prompts and evaluators

Loop creates and tests prompts, [scorers](https://docs.braintrust.dev/evaluate/write-scorers.md), and classifiers based on your application's behavior. Scorers return numbers, and classifiers return labels.

> [accordion] Suggest scorers for my project
>
> ```text wrap theme={null}
> Review representative traces from this project and suggest up to three scorers for recurring failure types. Explain what each scorer would measure, what evidence it needs, and whether code or an LLM judge is appropriate. Don't create them yet.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Review%20representative%20traces%20from%20this%20project%20and%20suggest%20up%20to%20three%20scorers%20for%20recurring%20failure%20types.%20Explain%20what%20each%20scorer%20would%20measure%2C%20what%20evidence%20it%20needs%2C%20and%20whether%20code%20or%20an%20LLM%20judge%20is%20appropriate.%20Don't%20create%20them%20yet.)

> [accordion] Write a scorer for known errors
>
> ```text wrap theme={null}
> Write a scorer for the failure we identified. Test it on known failing and successful traces, show the results, and explain any cases it cannot reliably judge before saving it. If you don't have the failure description and example traces, ask me for them first.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Write%20a%20scorer%20for%20the%20failure%20we%20identified.%20Test%20it%20on%20known%20failing%20and%20successful%20traces%2C%20show%20the%20results%2C%20and%20explain%20any%20cases%20it%20cannot%20reliably%20judge%20before%20saving%20it.%20If%20you%20don't%20have%20the%20failure%20description%20and%20example%20traces%2C%20ask%20me%20for%20them%20first.)

> [accordion] Create a helpfulness judge
>
> ```text wrap theme={null}
> Help me create a helpfulness judge for this project. Review representative traces and propose criteria based on the requests and available evidence. Confirm the criteria with me, then test the judge on helpful and unhelpful responses before saving it.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Help%20me%20create%20a%20helpfulness%20judge%20for%20this%20project.%20Review%20representative%20traces%20and%20propose%20criteria%20based%20on%20the%20requests%20and%20available%20evidence.%20Confirm%20the%20criteria%20with%20me%2C%20then%20test%20the%20judge%20on%20helpful%20and%20unhelpful%20responses%20before%20saving%20it.)

> [accordion] Set up online scoring
>
> ```text wrap theme={null}
> Set up online scoring using the scorer we created. Ask me for the scorer and project if you don't have them. Check that it works without dataset-only expected outputs, and test it on representative production traces. Propose the scope, filter, and sampling rate for review before enabling the rule, then verify it scores new matching traces.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Set%20up%20online%20scoring%20using%20the%20scorer%20we%20created.%20Ask%20me%20for%20the%20scorer%20and%20project%20if%20you%20don't%20have%20them.%20Check%20that%20it%20works%20without%20dataset-only%20expected%20outputs%2C%20and%20test%20it%20on%20representative%20production%20traces.%20Propose%20the%20scope%2C%20filter%2C%20and%20sampling%20rate%20for%20review%20before%20enabling%20the%20rule%2C%20then%20verify%20it%20scores%20new%20matching%20traces.)

> [accordion] Audit judges for lower-cost models
>
> ```text wrap theme={null}
> Audit my LLM-as-a-judge scorers for lower-cost models. For each scorer, pick up to 30 recent traces it already scored, with similar numbers of passes, failures, and borderline scores. Test a version that uses a cheaper model on those traces without saving it, in batches of up to 10 traces. Show me where the scores differ, and recommend whether to switch.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Audit%20my%20LLM-as-a-judge%20scorers%20for%20lower-cost%20models.%20For%20each%20scorer%2C%20pick%20up%20to%2030%20recent%20traces%20it%20already%20scored%2C%20with%20similar%20numbers%20of%20passes%2C%20failures%2C%20and%20borderline%20scores.%20Test%20a%20version%20that%20uses%20a%20cheaper%20model%20on%20those%20traces%20without%20saving%20it%2C%20in%20batches%20of%20up%20to%2010%20traces.%20Show%20me%20where%20the%20scores%20differ%2C%20and%20recommend%20whether%20to%20switch.)
>
> Loop tests unsaved copies of your judges and compares their scores with the recorded ones. To check per-token rates and other ways to lower scorer costs, see [Optimize scorer calls](https://docs.braintrust.dev/admin/billing/optimize-costs.md#optimize-scorer-calls).

Loop can also create [human review scores](https://docs.braintrust.dev/annotate/human-review.md#configure-review-scores), including categorical choices, sliders, and free-form inputs. It can [revise playground prompts from your annotations](https://docs.braintrust.dev/evaluate/playgrounds.md#annotate-outputs) on individual outputs.

### &#x20;Curate datasets

Loop [creates datasets from your logs](https://docs.braintrust.dev/annotate/datasets/create.md#generate-with-loop), edits rows, and manages dataset versions and environments.

> [accordion] Generate a dataset from errors
>
> ```text wrap theme={null}
> Build a dataset of up to 30 representative failing requests from this project's logs over the past seven days. Cover distinct failure types and avoid duplicate cases. Preserve the inputs and context needed to replay each request, link the source traces, and leave expected outputs empty unless we have verified reference answers.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Build%20a%20dataset%20of%20up%20to%2030%20representative%20failing%20requests%20from%20this%20project's%20logs%20over%20the%20past%20seven%20days.%20Cover%20distinct%20failure%20types%20and%20avoid%20duplicate%20cases.%20Preserve%20the%20inputs%20and%20context%20needed%20to%20replay%20each%20request%2C%20link%20the%20source%20traces%2C%20and%20leave%20expected%20outputs%20empty%20unless%20we%20have%20verified%20reference%20answers.)

> [accordion] Add traces to a dataset
>
> ```text wrap theme={null}
> Add the traces I select to my regression dataset. Propose expected outputs where the evidence supports them, and leave them empty otherwise. Show me the proposed rows before saving. Ask me for the trace links and target dataset if you don't have them.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Add%20the%20traces%20I%20select%20to%20my%20regression%20dataset.%20Propose%20expected%20outputs%20where%20the%20evidence%20supports%20them%2C%20and%20leave%20them%20empty%20otherwise.%20Show%20me%20the%20proposed%20rows%20before%20saving.%20Ask%20me%20for%20the%20trace%20links%20and%20target%20dataset%20if%20you%20don't%20have%20them.)

> [accordion] Copy logs into a regression dataset
>
> ```text wrap theme={null}
> Find up to 30 log rows from the past seven days with a correctness score below 0.5 and copy them into my regression dataset. Ask me to identify the project, scorer, and target dataset if they aren't clear. Don't treat failed outputs as expected outputs.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Find%20up%20to%2030%20log%20rows%20from%20the%20past%20seven%20days%20with%20a%20correctness%20score%20below%200.5%20and%20copy%20them%20into%20my%20regression%20dataset.%20Ask%20me%20to%20identify%20the%20project%2C%20scorer%2C%20and%20target%20dataset%20if%20they%20aren't%20clear.%20Don't%20treat%20failed%20outputs%20as%20expected%20outputs.)
>
> Loop copies log rows into a dataset in the same project. Each row links to its source. This copies individual rows, not [full-trace references](https://docs.braintrust.dev/annotate/datasets/create.md#promote-traces-from-logs). See [Copy behavior and limits](https://docs.braintrust.dev/integrations/developer-tools/mcp.md#run-evals-and-edit-datasets).

> [accordion] Snapshot before editing
>
> ```text wrap theme={null}
> Ask me which dataset to edit and what makes a row outdated. Save a snapshot, then identify candidate rows for removal and explain how they match those criteria. Show me the proposed removals before changing the rows.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Ask%20me%20which%20dataset%20to%20edit%20and%20what%20makes%20a%20row%20outdated.%20Save%20a%20snapshot%2C%20then%20identify%20candidate%20rows%20for%20removal%20and%20explain%20how%20they%20match%20those%20criteria.%20Show%20me%20the%20proposed%20removals%20before%20changing%20the%20rows.)

> [accordion] Review and restore a version
>
> > [!WARNING]
> >
> > Restoring a dataset to a snapshot replaces its current rows. Review the proposed snapshot before approving the restore. The confirmation flow lets you save the current state first.
>
> ```text wrap theme={null}
> List snapshots for my dataset and show which one production points to. Ask me for the dataset and the changes I want to undo if needed. Identify the proposed restore snapshot, summarize what would change, and confirm it with me before restoring. Offer to save the current state first.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=List%20snapshots%20for%20my%20dataset%20and%20show%20which%20one%20production%20points%20to.%20Ask%20me%20for%20the%20dataset%20and%20the%20changes%20I%20want%20to%20undo%20if%20needed.%20Identify%20the%20proposed%20restore%20snapshot%2C%20summarize%20what%20would%20change%2C%20and%20confirm%20it%20with%20me%20before%20restoring.%20Offer%20to%20save%20the%20current%20state%20first.)

> [accordion] Promote a dataset version
>
> > [!WARNING]
> >
> > Retagging an environment changes which dataset state your applications resolve. Review the proposed mapping before approving it.
>
> ```text wrap theme={null}
> List the environments and identify the dataset snapshot I want to promote. Ask me for the dataset and snapshot if you don't have them. Show the current staging mapping and confirm the replacement with me, then point staging at the selected snapshot.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=List%20the%20environments%20and%20identify%20the%20dataset%20snapshot%20I%20want%20to%20promote.%20Ask%20me%20for%20the%20dataset%20and%20snapshot%20if%20you%20don't%20have%20them.%20Show%20the%20current%20staging%20mapping%20and%20confirm%20the%20replacement%20with%20me%2C%20then%20point%20staging%20at%20the%20selected%20snapshot.)

Loop can list [snapshots](https://docs.braintrust.dev/annotate/datasets/manage.md#save-and-restore-snapshots), their environment tags, and the current head version. It can also list or create [environments](https://docs.braintrust.dev/deploy/environments.md) and clear their dataset mappings.

### &#x20;Build views and dashboards

Loop creates and edits [custom views](https://docs.braintrust.dev/annotate/custom-views.md) for traces and dataset rows, and [builds dashboard charts](https://docs.braintrust.dev/observe/dashboards/build-charts.md).

> [accordion] Suggest trace visualizations
>
> ```text wrap theme={null}
> Review a representative trace from my project and suggest useful custom trace views for its data. Explain what each view would help me understand. Ask me which views to create before building them.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Review%20a%20representative%20trace%20from%20my%20project%20and%20suggest%20useful%20custom%20trace%20views%20for%20its%20data.%20Explain%20what%20each%20view%20would%20help%20me%20understand.%20Ask%20me%20which%20views%20to%20create%20before%20building%20them.)

> [accordion] Build a custom dataset view
>
> ```text wrap theme={null}
> Build a custom view for my dataset that renders the input and expected output side by side. Ask me for the dataset if you don't have it.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Build%20a%20custom%20view%20for%20my%20dataset%20that%20renders%20the%20input%20and%20expected%20output%20side%20by%20side.%20Ask%20me%20for%20the%20dataset%20if%20you%20don't%20have%20it.)

> [accordion] Build a daily cost dashboard
>
> ```text wrap theme={null}
> Create a dashboard showing daily model costs recorded in this project's traces over the past 30 days, broken down by model. Include trace counts and average cost per trace to distinguish traffic growth from more expensive requests. Ask me which project to use if it isn't clear.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Create%20a%20dashboard%20showing%20daily%20model%20costs%20recorded%20in%20this%20project's%20traces%20over%20the%20past%2030%20days%2C%20broken%20down%20by%20model.%20Include%20trace%20counts%20and%20average%20cost%20per%20trace%20to%20distinguish%20traffic%20growth%20from%20more%20expensive%20requests.%20Ask%20me%20which%20project%20to%20use%20if%20it%20isn't%20clear.)

> [accordion] Investigate an error spike
>
> ```text wrap theme={null}
> Investigate this error spike. Ask me for the project, time window, and relevant trace or chart if you don't have them. Identify affected users or sessions where identifiers are available, inspect representative traces, and distinguish observed evidence from suspected causes.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Investigate%20this%20error%20spike.%20Ask%20me%20for%20the%20project%2C%20time%20window%2C%20and%20relevant%20trace%20or%20chart%20if%20you%20don't%20have%20them.%20Identify%20affected%20users%20or%20sessions%20where%20identifiers%20are%20available%2C%20inspect%20representative%20traces%2C%20and%20distinguish%20observed%20evidence%20from%20suspected%20causes.)

> [accordion] Share a dashboard with your team
>
> ```text wrap theme={null}
> Turn this analysis into a dashboard my team can revisit to monitor the findings. Include clear metric definitions, filters, and time ranges, and give me a dashboard link. Ask me for the analysis or source thread if you don't have it.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Turn%20this%20analysis%20into%20a%20dashboard%20my%20team%20can%20revisit%20to%20monitor%20the%20findings.%20Include%20clear%20metric%20definitions%2C%20filters%2C%20and%20time%20ranges%2C%20and%20give%20me%20a%20dashboard%20link.%20Ask%20me%20for%20the%20analysis%20or%20source%20thread%20if%20you%20don't%20have%20it.)

### &#x20;Configure Topics

Loop configures [Topics](https://docs.braintrust.dev/observe/topics.md) for your project, from extracting conversation text to testing facets and enabling automatic analysis.

> [accordion] Set up Topics from scratch
>
> ```text wrap theme={null}
> Set up Topics for my project.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Set%20up%20Topics%20for%20my%20project.)

> [accordion] Configure Topics with a custom preprocessor
>
> Changing the project default preprocessor affects every function that uses it, including built-in Topics facets. Loop asks for approval before changing it.
>
> ```text wrap theme={null}
> Help me configure Topics with a custom preprocessor. My traces don't store conversation text on LLM spans.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Help%20me%20configure%20Topics%20with%20a%20custom%20preprocessor.%20My%20traces%20don%27t%20store%20conversation%20text%20on%20LLM%20spans.)

> [accordion] Discover error categories
>
> ```text wrap theme={null}
> I want to discover the kinds of errors my users hit. Build a facet for that, validate it on real traces, and enable it.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=I%20want%20to%20discover%20the%20kinds%20of%20errors%20my%20users%20hit.%20Build%20a%20facet%20for%20that%2C%20validate%20it%20on%20real%20traces%2C%20and%20enable%20it.)

Loop tests the project's default [preprocessor](https://docs.braintrust.dev/observe/topics/enable.md#write-a-custom-preprocessor) and can write a custom one if it returns no conversation text. It recommends span, trace, or group scope based on your data and available grouping keys.

Loop tests facets on up to ten representative traces, showing results for your feedback. It can reuse that set as you refine the prompt, run evals for larger sets, and compare candidate prompts before saving them.

After enabling Topics, Loop can process a historical window. This consumes [Braintrust credits](https://docs.braintrust.dev/admin/billing/braintrust-credits.md). Loop estimates the volume and asks for approval before processing historical traces.

## Run and automate

Test changes with evaluations, then schedule recurring checks or alerts.

### &#x20;Run evaluations

Loop creates experiments and reruns evaluations in playgrounds or experiments. It can edit the task prompt or code, add or modify scorers, and rerun the evaluation to compare results.

> [accordion] Build a dataset and run an experiment
>
> ```text wrap theme={null}
> Help me evaluate cases where my agent gave a wrong answer. Confirm the project, task or saved prompt, and scorers with me. Build a dataset from representative failures and successful requests, using verified expected outputs where available. Run an experiment and show which cases fail, with links to the dataset and results.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Help%20me%20evaluate%20cases%20where%20my%20agent%20gave%20a%20wrong%20answer.%20Confirm%20the%20project%2C%20task%20or%20saved%20prompt%2C%20and%20scorers%20with%20me.%20Build%20a%20dataset%20from%20representative%20failures%20and%20successful%20requests%2C%20using%20verified%20expected%20outputs%20where%20available.%20Run%20an%20experiment%20and%20show%20which%20cases%20fail%2C%20with%20links%20to%20the%20dataset%20and%20results.)

> [accordion] Evaluate an agent decision
>
> ```text wrap theme={null}
> Evaluate the decision in these traces against the intended behavior. Ask me for the trace links and decision criteria if you don't have them. Inspect the relevant messages and tool calls, explain whether the evidence supports the decision, and identify anything you cannot determine from the traces.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Evaluate%20the%20decision%20in%20these%20traces%20against%20the%20intended%20behavior.%20Ask%20me%20for%20the%20trace%20links%20and%20decision%20criteria%20if%20you%20don't%20have%20them.%20Inspect%20the%20relevant%20messages%20and%20tool%20calls%2C%20explain%20whether%20the%20evidence%20supports%20the%20decision%2C%20and%20identify%20anything%20you%20cannot%20determine%20from%20the%20traces.)

> [accordion] Compare a cheaper model
>
> ```text wrap theme={null}
> Help me compare this workflow with a cheaper model. Confirm the task, candidate model, dataset, and scorers, then compare both models on the same cases with the same scoring criteria. Report quality, cost, latency, and regressions, and recommend whether the results justify a broader test. Explain what the test does not establish.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Help%20me%20compare%20this%20workflow%20with%20a%20cheaper%20model.%20Confirm%20the%20task%2C%20candidate%20model%2C%20dataset%2C%20and%20scorers%2C%20then%20compare%20both%20models%20on%20the%20same%20cases%20with%20the%20same%20scoring%20criteria.%20Report%20quality%2C%20cost%2C%20latency%2C%20and%20regressions%2C%20and%20recommend%20whether%20the%20results%20justify%20a%20broader%20test.%20Explain%20what%20the%20test%20does%20not%20establish.)

New experiments can use a dataset, inline rows, or a prior experiment, with a saved or inline task and your chosen scorers. When a prior experiment supplies the data, its outputs become the expected values.

> [!NOTE]
>
> Loop runs evaluations in Braintrust rather than by writing an `Eval()` script. To keep evaluations in your own repository and run them in CI, see [Run evaluations in code](https://docs.braintrust.dev/evaluate/run-in-code.md).

### &#x20;Manage automations and alerts

Loop turns investigations into [alerts](https://docs.braintrust.dev/observe/alerts.md) and [scheduled checks](https://docs.braintrust.dev/loop/automations.md), and helps you inspect existing automations.

> [accordion] Alert on the errors you just found
>
> ```text wrap theme={null}
> Create an alert for the recurring error we investigated. Ask me for an example trace if you don't have the context. Show me the matching condition, confirm the notification destination, and create the alert with the agreed settings. Explain how to test delivery.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Create%20an%20alert%20for%20the%20recurring%20error%20we%20investigated.%20Ask%20me%20for%20an%20example%20trace%20if%20you%20don't%20have%20the%20context.%20Show%20me%20the%20matching%20condition%2C%20confirm%20the%20notification%20destination%2C%20and%20create%20the%20alert%20with%20the%20agreed%20settings.%20Explain%20how%20to%20test%20delivery.)

> [accordion] Alert on a quality regression
>
> ```text wrap theme={null}
> Help me create an alert when a scorer's average drops below 0.8 over a six-hour window. Confirm the project, scorer, score scale, and notification destination with me. Check recent score volume and explain how low sample counts could affect the alert before creating it.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Help%20me%20create%20an%20alert%20when%20a%20scorer's%20average%20drops%20below%200.8%20over%20a%20six-hour%20window.%20Confirm%20the%20project%2C%20scorer%2C%20score%20scale%2C%20and%20notification%20destination%20with%20me.%20Check%20recent%20score%20volume%20and%20explain%20how%20low%20sample%20counts%20could%20affect%20the%20alert%20before%20creating%20it.)

> [accordion] Alert on cost growth
>
> ```text wrap theme={null}
> Help me create an alert for model costs recorded in this project's traces. Calculate the average daily cost over the previous seven complete days and propose a fixed threshold 20% above it for a rolling 24-hour window. Confirm the project, threshold, and notification destination with me before creating the alert. Explain that the threshold won't automatically follow future changes in average cost.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Help%20me%20create%20an%20alert%20for%20model%20costs%20recorded%20in%20this%20project's%20traces.%20Calculate%20the%20average%20daily%20cost%20over%20the%20previous%20seven%20complete%20days%20and%20propose%20a%20fixed%20threshold%2020%25%20above%20it%20for%20a%20rolling%2024-hour%20window.%20Confirm%20the%20project%2C%20threshold%2C%20and%20notification%20destination%20with%20me%20before%20creating%20the%20alert.%20Explain%20that%20the%20threshold%20won't%20automatically%20follow%20future%20changes%20in%20average%20cost.)

> [accordion] Audit what's configured
>
> ```text wrap theme={null}
> What automations are configured in this project, and which ones are paused?
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=What%20automations%20are%20configured%20in%20this%20project%2C%20and%20which%20ones%20are%20paused%3F)
>
> Loop can list online scoring rules, alerts, exports, retention policies, and Topics automations with their full configurations.

> [accordion] Work out why a scheduled run found nothing
>
> ```text wrap theme={null}
> Inspect my project's pattern discovery configuration and yesterday's run status and available results. Determine whether it ran, failed, skipped work, updated existing findings, or found no new issues. Explain what the evidence shows and what remains unknown, and link the relevant run or findings.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Inspect%20my%20project's%20pattern%20discovery%20configuration%20and%20yesterday's%20run%20status%20and%20available%20results.%20Determine%20whether%20it%20ran%2C%20failed%2C%20skipped%20work%2C%20updated%20existing%20findings%2C%20or%20found%20no%20new%20issues.%20Explain%20what%20the%20evidence%20shows%20and%20what%20remains%20unknown%2C%20and%20link%20the%20relevant%20run%20or%20findings.)

Loop can create scheduled jobs with their own instructions and schedules, pause or resume automations, and rewrite alerts or Loop automations. Scheduled exports and retention policies are inspect-only.

> [!WARNING]
>
> Rewriting an automation replaces its entire configuration. Ask Loop to read the current configuration first, then review the proposed replacement before approving it.

To configure these directly, see [Alerts](https://docs.braintrust.dev/observe/alerts.md) and [Loop automations](https://docs.braintrust.dev/loop/automations.md).

## Get help

Find documentation, locate Braintrust objects, and get help.

### &#x20;Search docs and find objects

Loop finds documentation and Braintrust objects, compares experiment results, and provides shareable links.

> [accordion] Look up how to set up human review
>
> ```text wrap theme={null}
> How do I set up human review?
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=How%20do%20I%20set%20up%20human%20review%3F)

> [accordion] Compare experiments
>
> ```text wrap theme={null}
> Help me compare two experiments. Ask me for the experiment links and which is the baseline. Check for differences in task, dataset version, or scorer configuration, then summarize score changes, improved and regressed cases, cost, and latency. Explain any limits on the comparison.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Help%20me%20compare%20two%20experiments.%20Ask%20me%20for%20the%20experiment%20links%20and%20which%20is%20the%20baseline.%20Check%20for%20differences%20in%20task%2C%20dataset%20version%2C%20or%20scorer%20configuration%2C%20then%20summarize%20score%20changes%2C%20improved%20and%20regressed%20cases%2C%20cost%2C%20and%20latency.%20Explain%20any%20limits%20on%20the%20comparison.)

> [accordion] Get a shareable link
>
> ```text wrap theme={null}
> Give me a link to the dashboard I want to share. Ask me for its name or URL if you don't have it, and explain what access teammates need to view it. Don't change its access settings.
> ```
>
> [Run in Loop](https://www.braintrust.dev/app/~/loop?prompt=Give%20me%20a%20link%20to%20the%20dashboard%20I%20want%20to%20share.%20Ask%20me%20for%20its%20name%20or%20URL%20if%20you%20don't%20have%20it%2C%20and%20explain%20what%20access%20teammates%20need%20to%20view%20it.%20Don't%20change%20its%20access%20settings.)

### &#x20;Request support

Loop can't file support tickets. For help, email [support@braintrust.dev](mailto:support@braintrust.dev).

## Next steps

* [Run Loop on a schedule](https://docs.braintrust.dev/loop/automations.md) to turn any of this into recurring work.
* [Enable Patterns](https://docs.braintrust.dev/observe/patterns/enable.md) for automatic discovery of recurring problems.
* [Manage threads and limits](https://docs.braintrust.dev/loop/manage.md) for sandbox behavior and cleanup.
* [What Loop can't do](https://docs.braintrust.dev/loop/get-started.md#what-loop-cant-do) for the boundaries it works inside.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.