Multimodal — Context handler
Assemble your LLM's background knowledge without a monster text block
- extra_context
- extra_context_preview
- STRING
The main LLM node's extra_context input is where your model's background knowledge goes - character sheets, style briefs, editing rules, the stuff the model should always have in front of it. Type it as one giant multiline blob and it's unreadable and unmaintainable. This node is the version-controlled, block-based assembler for that field: up to four toggleable blocks, each sourced from inline text, a file, or a preset, joined together into one extra_context string you feed to the LLM.
How it works
Each block is a mini-module with three source options: text (paste right in the block), file (a path to a .md/.txt - the file overrides the text field when set), or preset (one of the pack's presets/context/*.md files, e.g. character_sheet_template, image_prompting_flux, sdxl_negative_baseline, json_schema_contracts). You enable blocks 1–4 with blockN_enable, give them titles, and the node concatenates whatever's enabled, honoring include_titles (default true - titles become headers inside the context, which models genuinely use as anchors) and join_with (one or two blank lines between blocks). preview_chars (default 1600) truncates the preview so you don't get a 4,000-token wall of text in your face.
Two outputs that matter: extra_context (wire to the LLM node) and extra_context_preview (read it on a Show Text node, or trust the in-node preview). The third output is a raw STRING that duplicates the assembled context - handy for chaining without fighting the widget graph.
Why blocks beat a blob
Because blocks compose. A realistic workflow: block 1 is your character sheet preset, block 2 is a .md file with the current story state that something else updates, block 3 is your style rules. You can enable/disable any of them per run, which is the entire point - one node, and "which background knowledge does this pass get?" becomes a checkbox question instead of an edit to a giant string. And like the system presets, the context preset dropdown scans presets/context/ at load, so you can drop your own .md templates in and they show up as options after a restart.
The caveat is the standard one for context engineering: every enabled block eats into the model's context window, and a context stuffed with irrelevant background actively hurts small quantized models. Start with the character sheet, get the loop working, add blocks one at a time. preview_chars is your canary - if the preview is already a wall of text, the model is drowning too. This node doesn't decide what context is good; it just makes good context cheap to assemble and easy to audit.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| join_with | COMBO | double_blank_line | 2 options: blank_line, double_blank_line |
| include_titles | BOOLEAN | true | — |
| preview_chars | INT | 16000–20000 | — |
| block1_enable | BOOLEAN | true | — |
| block1_title | STRING | Context 1 | — |
| block1_source | COMBO | preset | 3 options: text, file, preset |
| block1_preset_file | COMBO | character_sheet_template | 14 options: character_sheet_template, editing_invariants_checklist, image_prompting_flux, image_prompting_flux_kontext, image_prompting_sdxl, image_prompting_zimage, +8 |
| block1_text | STRING | — | |
| block1_file | STRING | — | |
| block2_enable | BOOLEAN | false | — |
| block2_title | STRING | Context 2 | — |
| block2_source | COMBO | preset | 3 options: text, file, preset |
| block2_preset_file | COMBO | character_sheet_template | 14 options: character_sheet_template, editing_invariants_checklist, image_prompting_flux, image_prompting_flux_kontext, image_prompting_sdxl, image_prompting_zimage, +8 |
| block2_text | STRING | — | |
| block2_file | STRING | — | |
| block3_enable | BOOLEAN | false | — |
| block3_title | STRING | Context 3 | — |
| block3_source | COMBO | preset | 3 options: text, file, preset |
| block3_preset_file | COMBO | character_sheet_template | 14 options: character_sheet_template, editing_invariants_checklist, image_prompting_flux, image_prompting_flux_kontext, image_prompting_sdxl, image_prompting_zimage, +8 |
| block3_text | STRING | — | |
| block3_file | STRING | — | |
| block4_enable | BOOLEAN | false | — |
| block4_title | STRING | Context 4 | — |
| block4_source | COMBO | preset | 3 options: text, file, preset |
| block4_preset_file | COMBO | character_sheet_template | 14 options: character_sheet_template, editing_invariants_checklist, image_prompting_flux, image_prompting_flux_kontext, image_prompting_sdxl, image_prompting_zimage, +8 |
| block4_text | STRING | — | |
| block4_file | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| extra_context | STRING | — |
| extra_context_preview | STRING | — |
| STRING | STRING | — |