Class: FlowEngine::LLM::SystemPromptBuilder
- Inherits:
-
Object
- Object
- FlowEngine::LLM::SystemPromptBuilder
- Defined in:
- lib/flowengine/llm/system_prompt_builder.rb
Overview
Builds the system prompt for the LLM from the static template and dynamic step metadata from the flow Definition.
Constant Summary collapse
- TEMPLATE_PATH =
File.("../../../resources/prompts/generic-dsl-intake.j2", __dir__)
Instance Method Summary collapse
-
#build ⇒ String
Complete system prompt (static template + step descriptions + response format).
-
#initialize(definition, template_path: TEMPLATE_PATH) ⇒ SystemPromptBuilder
constructor
A new instance of SystemPromptBuilder.
Constructor Details
#initialize(definition, template_path: TEMPLATE_PATH) ⇒ SystemPromptBuilder
Returns a new instance of SystemPromptBuilder.
12 13 14 15 |
# File 'lib/flowengine/llm/system_prompt_builder.rb', line 12 def initialize(definition, template_path: TEMPLATE_PATH) @definition = definition @template_path = template_path end |
Instance Method Details
#build ⇒ String
Returns complete system prompt (static template + step descriptions + response format).
18 19 20 |
# File 'lib/flowengine/llm/system_prompt_builder.rb', line 18 def build [static_prompt, steps_description, response_format].join("\n\n") end |