> ## 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.

# Prompt shows None in experiment view

export const plans_0 = "Any"

export const deployments_0 = "Any"

export const data_plane_version_0 = undefined

export const use_case_0 = undefined

<Note>
  **Applies to:**

  * Plan - {plans_0}
  * Deployment - {deployments_0}
  * {data_plane_version_0}
  * {use_case_0}
</Note>

## Summary

**Issue:** Experiment view displays `Prompt: None` despite using prompts in the task function.

**Cause:** Prompt detection requires `metadata.prompt.id` on LLM spans, which only appears when using Braintrust-managed prompts with `load_prompt()` and `prompt.build()`.

**Resolution:** Replace hardcoded prompts with Braintrust-managed prompts using the `load_prompt()` and `prompt.build()` workflow.

## Resolution steps

### Step 1: Create a Braintrust prompt

Save your prompt in Braintrust and note the project name and prompt slug.

### Step 2: Update your task function

Replace hardcoded prompts with the Braintrust prompt workflow:

```python theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
import braintrust

client = braintrust.wrap_openai(openai.OpenAI())
prompt = braintrust.load_prompt(project=PROJECT_NAME, slug=PROMPT_SLUG)

def task(input):
    built = prompt.build(input=input)
    response = client.chat.completions.create(**built)
    return response.choices[0].message.content

Eval(
    PROJECT_NAME,
    experiment_name=EXPERIMENT_NAME,
    data=my_data,
    task=task,
    scores=[Levenshtein],
)
```

The `prompt.build()` method returns `span_info` containing `metadata.prompt.id`, which the wrapped client automatically attaches to LLM spans.

### Step 3: Run the experiment

The experiment view will now display the linked prompt instead of `None`.

## Alternative approaches

If you prefer not to use Braintrust prompt management, there is no supported workaround. The experiment UI requires `metadata.prompt.id` on LLM spans, which only comes from the Braintrust prompt workflow.
