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

# Configure and run a PII/PHI Review workflow

Once you have uploaded your data to Epiq AI and created a PII/PHI Review workflow from a template, you are ready to configure and run your PII/PHI Review workflow.

To configure and run a PII/PHI Review workflow, complete the following procedure.

1. In the **Project space** menu, select **Workflows**.
2. Select your PII/PHI Review workflow.
3. Select the **Input Data** tab and import the dataset containing the documents to review.
4. Select the **Steps** tab and review each of the following components.

<Accordion title="PII Detection">
  This component determines whether each document contains PII or PHI, tags the specific elements found, and captures the supporting text, a confidence level, and a count of unique instances for each element.

  1. Select **PII Detection**.
  2. Select **Instructions** and do the following:
     1. Review the **General Instructions**. This is the scope statement applied to every document — use it to record matter-wide decisions, such as which populations are in scope or whether expired identifiers are reportable.
     2. Review the PII element definitions and the PHI element definitions.
     3. Edit, add, or deselect element definitions as needed for your matter.
  3. Select **Tags** and review the tag groups:
     1. **Document Tags** — the document-level determination, Contains PII and Does Not Contain PII.
     2. **PII Tags** — one tag for each PII element.
     3. **PHI Tags** — one tag for each PHI element.
     4. If you renamed an element on the Instructions tab, rename its tag here to match. Elements and tags are paired by name.
  4. Select **Model** and do the following:
     1. Update model settings as needed, including the score threshold. A lower threshold favors recall, which is often the preference in incident response.
     2. Select **Metrics**.
     3. Modify error categories as desired and select **Update Categories**.
     4. Select **Update**.
  5. Select **Output** and confirm the columns the component writes.
  6. Optional. Click **Run Step** to run this component individually, or wait to deploy the full workflow after you configure all components.
  7. Select the back arrow to return to the **Configuration** tab.
</Accordion>

<Accordion title="PII Entity Extraction">
  This component identifies the individuals the detected information belongs to, records their identity and contact details, and captures the elements exposed for each of them in each document. It reads the determinations produced by PII Detection and does not contradict them.

  1. Select **PII Entity Extraction**.
  2. Select **Instructions** and do the following:
     1. Review the **General Instructions**.
     2. Review the entity field set — identity fields, address fields, and the nested PII and PHI element groups.
     3. Edit the fields as needed for your matter.
  3. Select **Output** and confirm the columns for the entity table and the document-entity table.
  4. Optional. Click **Run Step** to run this component individually, or wait to deploy the full workflow after you configure all components.
  5. Select the back arrow to return to the **Configuration** tab.
</Accordion>

5. Select **Deploy Workflow** to run both components in order.

<Info>
  Running **PII Detection** on its own first is the recommended sequence. Detection establishes the document population and the element inventory, and its output is what you will want to review — and often correct — before spending an extraction pass over the full set.
</Info>

### Review and correct results

Sensitive information review is iterative. Use the following procedure to correct results and refine the configuration.

1. Select the **Steps** tab and select **PII Detection**.
2. In the **Results** view, review the determinations and the supporting text behind the elements applied.
3. Select documents and use the **Tags** menu to **Add tags** or **Remove tags**. Reviewer tags take precedence over the workflow's predictions and are used to re-evaluate conflicting documents on the next run.
4. If an element is being applied too broadly or too narrowly, return to **Configuration** and edit that element's definition rather than correcting each document individually.
5. Click **Run Step** on **PII Detection** to re-run detection with your corrections.
6. Click **Run Step** on **PII Entity Extraction** to rebuild the individual population from the corrected determinations.
7. In the **Entities** view, review the individuals identified and correct identity fields where needed.

<Warning>
  Re-running a component clears and rebuilds its results. Re-running PII Entity Extraction rebuilds the entity table, so corrections made directly to individual records do not survive a re-run. Complete entity review after the final extraction run, or export the entity table first so the corrections can be reapplied.
</Warning>

### Generate reports and export results

1. Select the **Output** tab.
2. Review the **Prediction output** report for the headline counts and the sensitive data element breakdown.
3. Review the **Exceptions** report and resolve the documents that produced no result, or record why they cannot be resolved.
4. Export the reports to Excel or PDF, and export the entity table, the document-entity table, or the per-document results to CSV.
5. Select **Exports** from the project menu to download the generated files.

<Danger>
  Exported files contain the extracted sensitive values. Remove export records from the Exports page once the files have been delivered.
</Danger>
