GENERATE state: code production #20

Open
opened 2026-04-07 20:24:01 +00:00 by austin · 0 comments
Owner

Implement the GENERATE pipeline state.

  • Assemble the generation prompt using the context manager (located code + task + few-shot examples within budget)
  • For edits: use FIM mode — prefix is code before the edit region, suffix is code after, model fills the middle
  • For new code: use instruction-following mode with few-shot examples
  • Generate N candidates (configurable, default 5)
  • Pass candidates to the VERIFY state
  • On retry (after verification failure): inject the structured error feedback into the prompt and regenerate

This state is primarily a coordinator — the actual generation logic lives in the inference backend, and context assembly lives in the context manager. GENERATE wires them together.

Implement the GENERATE pipeline state. - Assemble the generation prompt using the context manager (located code + task + few-shot examples within budget) - For edits: use FIM mode — prefix is code before the edit region, suffix is code after, model fills the middle - For new code: use instruction-following mode with few-shot examples - Generate N candidates (configurable, default 5) - Pass candidates to the VERIFY state - On retry (after verification failure): inject the structured error feedback into the prompt and regenerate This state is primarily a coordinator — the actual generation logic lives in the inference backend, and context assembly lives in the context manager. GENERATE wires them together.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
austin/localcode#20
No description provided.