Skip to content

Yaml prompt system#25

Merged
bnmajor merged 7 commits intomasterfrom
yaml-prompt-system
Mar 9, 2026
Merged

Yaml prompt system#25
bnmajor merged 7 commits intomasterfrom
yaml-prompt-system

Conversation

@bnmajor
Copy link
Copy Markdown
Collaborator

@bnmajor bnmajor commented Mar 4, 2026

Migrates VTK Prompt from legacy text-based templates to a YAML prompt system following GitHub's prompt schema, with support for custom user-defined YAML prompt files.

  • YAMLPromptLoader: Singleton pattern for loading, validating, and processing YAML prompts
  • Variable substitution: Validation for {{variable}} placeholder system
  • Prompt schema: GitHub-compatible YAML structure with name, description, model, modelParameters, messages
  • Migrated all .txt templates to structured YAML files
    • vtk_python_generation.prompt.yml - Standard CLI code generation
    • vtk_python_generation_ui.prompt.yml - UI-specific with renderer instructions
    • vtk_python_rag.prompt.yml - RAG-enhanced CLI prompts
    • vtk_python_rag_ui.prompt.yml - RAG-enhanced UI prompts
    • vtk_xml_generation.prompt.yml - XML file generation
    • rag_chat.prompt.yml - RAG chat assistant
  • CLI integration: New --prompt-file argument for custom YAML prompts

Testing

  • Integration testing: CLI custom prompt loading and parameter validation
  • Unit testing: YAML loader, variable substitution, and error handling

Replace text-based templates with structured YAML prompts following GitHub's
schema. UI now loads model parameters directly from YAML files. Updates UI
initialization to sync with YAML model parameters.
- CLI: vtk-prompt --prompt-file custom.yml
- UI: vtk-prompt-ui --prompt-file custom.yml
- Parameter hierarchy: CLI > custom prompt > defaults
- Add RAG + UI integration with smart prompt selection
Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
Signed-off-by: Brianna Major <brianna.major@kitware.com>
@vicentebolea
Copy link
Copy Markdown
Member

@bnmajor let me me know when is ready for review. lets also setup a staging deployment to further help with the review

@bnmajor bnmajor mentioned this pull request Mar 8, 2026
@bnmajor bnmajor marked this pull request as ready for review March 8, 2026 18:17
@bnmajor bnmajor requested a review from vicentebolea March 8, 2026 18:17
@bnmajor bnmajor mentioned this pull request Mar 8, 2026
Copy link
Copy Markdown
Member

@vicentebolea vicentebolea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, this will allow us to further debug our prompts in the github tab.

@bnmajor bnmajor merged commit 4ed5516 into master Mar 9, 2026
9 checks passed
@bnmajor bnmajor deleted the yaml-prompt-system branch March 9, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants