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

# Prompting patterns

> Use practical Sofie prompt patterns for source review, document drafting, spreadsheet analysis, meetings, Orchestrations, and life sciences workflows.

Good Sofie prompts describe the job, the source, the output, and the review constraints. You do not need perfect wording. You do need enough structure for Sofie to choose the right path.

## The core pattern

Use this structure for most work:

```text theme={null}
Task:
Source:
Context:
Output:
Constraints:
Review points:
```

Example:

```text theme={null}
Task: Review this validation protocol.
Source: Attached DOCX and the protocol Workspace.
Context: Stage 2 PPQ for a fill-finish process.
Output: A table with section, gap, why it matters, source support, and SME question.
Constraints: Preserve requirement IDs. Do not invent acceptance criteria.
Review points: Ask me before creating a CoDraft.
```

## Source-backed review

Use this when accuracy and source traceability matter.

```text theme={null}
Use the selected sources only. Separate source-backed facts, assumptions, unsupported claims, missing evidence, and SME questions. Cite or name the source for each fact where possible.
```

Good for:

* Deviation investigations.
* CAPA traceability.
* Validation protocol review.
* URS review.
* Batch record review.
* Regulatory or pharmacopoeia research.

## Extract into a table

Use this when you need structured review.

```text theme={null}
Extract the relevant information into a table with columns for source, section, finding, impact, assumption, and follow-up question.
```

Useful columns:

| Workflow            | Columns                                                                        |
| ------------------- | ------------------------------------------------------------------------------ |
| Deviation           | Event, source, known fact, assumption, missing evidence, SME question.         |
| CAPA                | Cause, action, owner, effectiveness metric, evidence, open risk.               |
| Validation          | Requirement ID, acceptance criterion, test method, gap, source support.        |
| Batch record review | Section, observation, possible impact, source reference, disposition question. |

## Ask for conservative drafting

Use this when language may be reviewed by QA, regulatory, or technical teams.

```text theme={null}
Draft in neutral language. Separate observations from conclusions. Flag unsupported statements instead of making them sound certain.
```

Variant:

```text theme={null}
Rewrite this for quality review. Keep factual claims tied to sources, avoid causal language unless supported, and list open questions after the paragraph.
```

## Use Plan Mode before action

Use this when Sofie should think through the work first.

```text theme={null}
Use Plan Mode. Propose the steps first. Include source review, gap identification, artifact creation, and human review points. Do not execute until I approve the plan.
```

## Create a CoDraft

```text theme={null}
Create a CoDraft outline from these sources. Include headings, source map, missing evidence, SME questions, and placeholders where conclusions need review.
```

For templates:

```text theme={null}
Create a CoDraft template for a deviation report. Include placeholders for deviation ID, product, batch, event date, immediate actions, evidence reviewed, root cause assessment, CAPA link, and approval notes.
```

## Analyze a CoSheet

```text theme={null}
Analyze this CoSheet. Profile the data, find missing values, outliers, duplicate IDs, inconsistent units, and columns that need formulas. Suggest one pivot table and one chart.
```

## Visual generation prompts

Use visual generation prompts when the answer should be easier to review as an image, chart, diagram, or illustration.

Ask for chart and diagram generation when the visual should represent data, order, or relationships:

```text theme={null}
Create a flowchart for the CAPA effectiveness check process. Include trigger, evidence review, sampling decision, effectiveness conclusion, QA review, and follow-up actions.
```

Ask for Image Generation when the visual should be illustrative:

```text theme={null}
Generate a clean technical illustration for internal training. Show a quality team reviewing a deviation timeline and source documents. Avoid logos, patient data, and readable document text.
```

Ask Sofie to review the result:

```text theme={null}
Review this visual before I use it. List assumptions, source gaps, labels that need checking, and details an SME should confirm.
```

Formula prompt:

```text theme={null}
Create a formula for Status using Result, Lower Limit, and Upper Limit. Mark Fail when Result is outside limits, Review when a limit is missing, and Pass otherwise. Show the formula before applying it.
```

## Use a CoMeeting

```text theme={null}
Use this CoMeeting to create a follow-up table with decision, action item, owner, due date, unresolved question, source transcript section, and related Workspace file to check.
```

Interview prompt:

```text theme={null}
Turn this SME interview into a CoDraft memo. Separate observed facts, SME opinion, assumptions, decisions, and evidence needed.
```

## Build or run an Orchestration

Design prompt:

```text theme={null}
Build an Orchestration for batch record review. First propose required inputs, optional inputs, agents, tasks, source checks, output format, and human review points. Do not create it until I approve the design.
```

Run prompt:

```text theme={null}
Run the CAPA effectiveness Orchestration using this Workspace and CoSheet. Ask me for missing inputs before starting, and pause before drafting the final conclusion.
```

## Compare sources

```text theme={null}
Compare these sources. Return a table with claim, source A position, source B position, difference, practical impact, and question for internal review.
```

Use this for regulatory, pharmacopoeia, vendor, or internal document comparisons.

## Ask for a next-step workflow

```text theme={null}
Based on the sources and gaps, recommend the next Sofie workflow. Tell me whether to use chat, CoDraft, CoSheet, CoMeeting, Workspace, or Orchestrate, and explain the first three steps.
```

## What to avoid

Avoid prompts that:

* Ask for a final conclusion without sources.
* Include too many unrelated files.
* Say `analyze everything` without an output format.
* Ask Sofie to infer missing criteria.
* Skip review before saving, sending, or creating a shared artifact.

Better:

```text theme={null}
Analyze these three files for protocol gaps. Return a table first. Ask me before creating or saving any artifact.
```
