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

# Reference attachments and context

> Use double brackets in chat to reference attached files, Workspace items, artifacts, plans, and selected content.

Context references let you point Sofie to a specific attachment or selected Sofie item inside your message. Type `[[` in the chat input to open a picker, then choose the item you want to mention.

Use references when a message includes several sources and you need Sofie to focus on the right one at the right moment.

## What you can reference

The `[[` picker uses the context already available in the chat input.

You can reference:

* Attached files.
* CoDrafts.
* CoSheets.
* CoMeetings.
* Workspaces.
* Orchestrations.
* Plans in the current conversation.
* Selected text from a CoDraft or CoSheet when it has been added as context.

<Note>
  If the picker says no context items are added, click **+** first. Add a Sofie item with **Add context** or choose **Attach** for a local file.
</Note>

## Add a reference

<Steps>
  <Step title="Add context or attach a file">
    Click **+** and choose **Add context** or **Attach**. Confirm the item appears above the chat input.
  </Step>

  <Step title="Type double brackets">
    In the message, type `[[`.
  </Step>

  <Step title="Find the item">
    Type part of the item name to filter the picker.
  </Step>

  <Step title="Select the item">
    Click the item, or use the arrow keys and press Tab or Enter.
  </Step>

  <Step title="Write the instruction around the reference">
    Tell Sofie exactly how to use that source.
  </Step>
</Steps>

After you select an item, Sofie inserts it as a chip in the message. Remove the chip if you picked the wrong item.

<Tip>
  Use arrows plus Tab when you are adding several references quickly. This is faster than switching between the keyboard and mouse.
</Tip>

## Why references improve answers

References make source intent explicit. They help Sofie understand which attachment or context item belongs to each part of the task.

This matters when:

* Multiple attachments have similar names.
* One source should be used for facts and another for formatting.
* You want Sofie to compare two specific items.
* You want to refer to a selected range or selected text.
* You need Sofie to ignore earlier context in the conversation.

Without references:

```text theme={null}
Compare the protocol and the table. Flag gaps.
```

With references:

```text theme={null}
Compare [[Validation protocol]] against [[Acceptance criteria table]]. Return a gap table with protocol section, table field, mismatch, impact, and SME question.
```

## Reference attachments

Attachments are useful for one-time file review. Reference an attachment when you have more than one file attached or when one file has a specific role in the prompt.

Examples:

```text theme={null}
Use [[Deviation summary.pdf]] as the event source and [[Batch record excerpt.xlsx]] as the data source. Return only source-backed facts, gaps, assumptions, and SME questions.
```

```text theme={null}
Use [[Investigation draft.docx]] for structure and [[QA comments.pdf]] for review points. Do not add conclusions unless the comments support them.
```

```text theme={null}
Extract tables from [[assay-results.csv]] and create a CoSheet. Add a summary tab for missing values, outliers, and rows needing review.
```

## Reference Sofie items

Use references for existing Sofie work when the item already lives in Sofie.

Examples:

```text theme={null}
Use [[PPQ Workspace]] and [[Sampling rationale CoDraft]]. Find source gaps before drafting any new language.
```

```text theme={null}
Compare decisions in [[QA triage CoMeeting]] with the assumptions listed in [[Impact assessment CoDraft]].
```

```text theme={null}
Use [[Release readiness CoSheet]] to identify batches with missing review status, then draft a follow-up message.
```

## Reference selected content

When selected text or a selected CoSheet range appears as context, reference it directly. This keeps the prompt focused on the exact excerpt or range instead of the whole artifact.

Examples:

```text theme={null}
Rewrite [[Selected protocol paragraph]] for QA review. Keep claims tied to the selected source and list missing evidence below the revision.
```

```text theme={null}
Explain the trend in [[A1:F24 selected range]]. Flag any row that needs SME review before creating a chart.
```

## Combine references with search settings

References identify specific context. Search settings control how Sofie gathers additional evidence.

| Need                            | Use                                                       |
| ------------------------------- | --------------------------------------------------------- |
| Use this exact file or artifact | Add it, then reference it with `[[`.                      |
| Search across a Workspace       | Reference the Workspace and turn on **Workspace search**. |
| Ask about Sofie documentation   | Turn on **Sofie Guide**.                                  |
| Use current public information  | Turn on **Web search** or **Deep research**.              |
| Review a multi-step source plan | Turn on **Plan Mode**.                                    |

Good combined prompt:

```text theme={null}
Use [[PPQ Workspace]] with Workspace search. Compare the search results against [[Protocol outline CoDraft]]. Return source-backed facts, source gaps, assumptions, and questions for QA.
```

## Write precise reference prompts

Use this pattern:

```text theme={null}
Use [[source name]] for:
Compare it with [[second source]] for:
Return:
Do not:
Flag:
```

Example:

```text theme={null}
Use [[Deviation summary.pdf]] for the event timeline.
Compare it with [[Investigation interview notes]] for missing facts.
Return a table with fact, source, missing evidence, assumption, and SME question.
Do not infer root cause.
Flag any unsupported conclusion language.
```

## Troubleshoot references

| Problem                       | What to do                                                                    |
| ----------------------------- | ----------------------------------------------------------------------------- |
| The picker is empty           | Add context or attach a file first.                                           |
| The item is missing           | Check that it is selected in the current chat input and that you have access. |
| Too many similar names appear | Type more of the title after `[[` to filter the picker.                       |
| Sofie used the wrong item     | Remove the chip, add the right one, and restate the source boundary.          |
| Sofie answered too broadly    | Say `Use only [[item name]] and ignore other context unless I ask for it.`    |

<Warning>
  Referencing a source helps Sofie focus, but it does not replace human review. Verify source use, calculations, conclusions, and any output used in regulated or controlled work.
</Warning>

## Related guides

* [Sources and search](/chat/sources-and-search)
* [Context windows and summarization](/chat/context-windows-and-summarization)
* [Sofie Guide](/chat/sofie-guide)
* [Saved prompts](/prompts/saved-prompts)
