| category | wiki-concept | ||||
|---|---|---|---|---|---|
| updated | 2026-05-30 | ||||
| tags |
|
This page is a practical guide mapping common visual workflow patterns inside the PLG IDE.
When you open the IDE, a default seed template loads automatically to show you the basic structure of a prompt flow circuit. It includes:
- File Node (
prompt.txt) - Prompt Boxes for
Abandoned hospitalandPS1 graphics - AND Gate merging them
- NOT Gate suppressing
cute cartoon style - Prompt File Viewer displaying the result
Use this pattern when you want to compose a scene subject with environmental modifiers and choose between competing style directions.
graph TD
FN[File Node] -->|File Stream| AND1{AND Gate}
PB1[Prompt Box: Cyberpunk Samurai] -->|A| AND1
PB2[Prompt Box: Neon City Street] -->|B| AND1
AND1 -->|File Stream| OR1{OR Gate}
PB3[Prompt Box: Realistic Photograph] -->|A| OR1
PB4[Prompt Box: Anime Sketch] -->|B| OR1
OR1 -->|File Stream| FV[File Viewer]
- Add Baseline: Drag in a
File Nodeand label itcyber-samurai.txt. - Add Scene Details: Drag in two
Prompt Boxes(e.g.cyberpunk samurai, dual katanasandrain-slicked neon street, towering skyscrapers). - Merge Details: Drag in an
AND Gate. Connect the File Node's source pin to the AND gate's file input pin. Connect Prompt Box 1 toaand Prompt Box 2 tob. - Add Style Candidates: Drag in two additional Prompt Boxes containing competing style directives (e.g.,
realistic photo, raytracedvsvintage anime sketch, Hokusai woodblock). - Choose Best Compatibility: Drag in an
OR Gate. Route the AND gate's output baseline pin to the OR gate's file baseline pin. Connect style candidate A to OR'sainput, and style candidate B to OR'sbinput. - Evaluate: Connect the OR gate's baseline output to the
Prompt File Viewertarget pin and click Compile.- Rule Mode: The compiler evaluates context overlap and keeps the style candidate that has the highest semantic affinity (e.g. matches similar aesthetic tones).
- AI Mode: AI reads the entire cyberpunk samurai scene and selects the candidate that matches the narrative tone, outputting a brief single-sentence reason.
Use this pattern when you want to explicitly suppress a specific style, object, or color, forcing it out of the positive prompt and adding explicit negation instructions into the baseline.
- Drag in an
AND Gatecompiling a scene (e.g.dark medieval gothic cathedral, atmospheric mist). - Drag in a new
Prompt Boxcontaining the concept you want to forbid (e.g.bright neon lights). - Drag in a
NOT Gate. - Route the AND gate output baseline stream to the NOT gate's file input. Connect the forbidden Prompt Box to the NOT gate's
ainput handle. - Route the NOT gate output baseline to the
Prompt File Viewer. - Click Compile:
- The compiled prompt window in the viewer will show a sanitized prompt (stripping any accidental terms related to
neonorbright) and appending explicit negation instructions:avoid bright neon lights. - There is no separate negative prompt window, keeping the generation prompt clean and unified.
- The compiled prompt window in the viewer will show a sanitized prompt (stripping any accidental terms related to
Use this pattern when you have a basic concept but want to use interactive AI questioning to refine details (e.g., framing, camera focal length, color grading) directly inline.
graph LR
FN[File Node] -->|File Stream| ASK{Ask AI Questions}
ASK -->|Questions List| ANS{Provide Answers}
FN -->|File Stream| ANS
ANS -->|Refined Stream| FV[File Viewer]
- Drag in a
File Nodeand aPrompt Boxcontaining a simple starter prompt (e.g.a lonely explorer on Mars). Connect them using anAND GateorPrompt to Fileconverter. - Drag in an
Ask AI Questionsnode. - Connect the baseline file output stream to the
Ask AI Questionsfile input handle. - Configure the question count to
3. Click Compile to generate three questions tailored to the Mars explorer scene. - Drag in a
Provide Answersnode. - Connect the
Ask AI Questionssource handlequestions(Orange) to the target handlequestions(Orange) of theProvide Answersnode. - Connect the primary file baseline output to the
Provide Answersfile target handle. - You will immediately see the generated questions appear inside the input boxes of the
Provide Answersnode! - Type your desired answers in each field (e.g., Q1: Wide cinematographic shot, Q2: Sunset orange sky, Q3: Retro-futuristic space suit).
- Route the baseline output stream of
Provide Answersto thePrompt File Viewertarget pin. - Click Compile. The compiler will read your inputs and merge them into a single, beautifully structured prompt.
- Saving Layouts: Click the Save button in the top bar. This compiles the visual node coordinates and text fields into a local
.jsonfile (plg-graph.json) and downloads it to your machine. - Loading Layouts: Click the Load button and select a previously saved
plg-graph.jsonfile. The workspace will restore all connections and node values automatically. - Exporting TXT: Click the Compile button to run compiler stages. Then, click Export TXT to download a finalized
.txtfile containing the compiled prompt.