Prompt templates per pipeline stage #13

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

Design and implement prompt templates for each FSM state.

Templates needed:

  • UNDERSTAND: classify user intent into a fixed enum. Short, focused, with 2-3 examples.
  • LOCATE (ranking): given a list of candidate symbols and a task description, rank by relevance. Constrained output.
  • GENERATE (edit): FIM-style — prefix (code before edit region) + task instruction + suffix (code after edit region).
  • GENERATE (new code): instruction + few-shot examples from the project + generation target.
  • VERIFY (diff review): show the diff + original task, ask "does this correctly address the task? YES/NO + reason."

Each template should be as short as possible. 3B models degrade with long system prompts — keep the instruction component under 256 tokens and let the code context do the work.

Design and implement prompt templates for each FSM state. Templates needed: - **UNDERSTAND**: classify user intent into a fixed enum. Short, focused, with 2-3 examples. - **LOCATE (ranking)**: given a list of candidate symbols and a task description, rank by relevance. Constrained output. - **GENERATE (edit)**: FIM-style — prefix (code before edit region) + task instruction + suffix (code after edit region). - **GENERATE (new code)**: instruction + few-shot examples from the project + generation target. - **VERIFY (diff review)**: show the diff + original task, ask "does this correctly address the task? YES/NO + reason." Each template should be as short as possible. 3B models degrade with long system prompts — keep the instruction component under 256 tokens and let the code context do the work.
austin added this to the Context Assembly milestone 2026-04-07 20:29:38 +00:00
Sign in to join this conversation.
No milestone
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#13
No description provided.