# Extract insights from files

Use **Extract insights from files** to parse files from a store, ask a model to distill their content, and retain the results as `insights` records. It is a starting process for document facts and action items, rather than a human approval workflow.

## Configure the inputs

| Parameter | What to enter |
| --- | --- |
| `workflow_name` | A nonempty workflow name. |
| `source_connection_id` | The saved connection containing the files. |
| `source_catalog_slug` | Its connector type; the starter defaults to `platform_store`. |
| `prefix` | Optional file-key prefix; use a narrow scope for the first run. |
| `insight_prompt` | Instructions for the model, retaining the document text variable where needed. |

The default prompt asks for key facts, entities, and action items from each document section and includes `${text}`. This variable supplies the section text; removing it can leave the model without the material you meant to analyze.

## Run the prepared process

1. Choose the template and fill the connection and scope fields.
2. Review the prompt for the information your readers need.
3. Create the workflow and inspect `parse → insights → write_results`.
4. Review the model selection in the LLM job; it is not a separate template parameter.
5. Validate and run a small document set manually.
6. Open retained outputs and compare the insights with the source documents.

`parse` uses document extraction. `insights` adds the model response at the `insight` field and does not separately publish that intermediate result. `write_results` retains the final records with type `insights`.

## Understand the result

A document can produce several extracted sections and therefore several insight records. Do not interpret the number of records as the number of files. Model results can include finish and usage metadata, or an error instead of a usable insight; inspect the actual payload.

The destination keys are based on run, step, and record sequence. They help repeat attempts within an execution but do not make separate new runs overwrite one universal record per document. Plan a stable business identity if you need that behavior.

Extraction and model calls can incur usage, and dry-run policy can suppress parts of the process. A successful generation is not independent verification or approval of its claims.

See [document extraction](/docs/steps/digest-extract), [LLM](/docs/steps/llm-complete), and [workflow outputs](/docs/workflows/outputs).

## Prepared job settings

The starter is enabled and uses a Manual trigger. These settings are supplied by the recipe; review them in the editor before adapting the process. `${…}` values below refer to the corresponding template parameter or run variable.

| Setting | Prepared value |
| --- | --- |
| `parse.config.source.kind` | `"connection"` |
| `parse.config.source.connection_id` | `"${source_connection_id}"` |
| `parse.config.source.catalog_slug` | `"${source_catalog_slug}"` |
| `parse.config.prefix` | `"${prefix}"` |
| `insights.config.prompt_template` | `"${insight_prompt}"` |
| `insights.config.output_path` | `"insight"` |
| `insights.config.persist_outputs` | `false` |
| `write_results.config.record_type` | `"insights"` |
| `write_results.config.idempotency_key_template` | `"${run_id}:${step_id}:${record_seq}"` |
