Skip to main content

Overview

The prompt section (internally called ContextBuilderConfig) controls how prompts are generated for the LLM, including system messages, templates, and simplification suggestions.

Basic Configuration

System Message

The system message is the primary instruction given to the LLM. It should describe the problem, constraints, and optimization objectives.

Inline System Message

Multi-Line System Message

System Message from File

For longer prompts, reference an external file:
SkyDiscover automatically loads the content if:
  • The string has no newlines
  • The string is less than 256 characters
  • A file with that name exists in the config directory
See implementation in skydiscover/config.py:573-587

Environment Variable Expansion

Use ${VAR} syntax to inject environment variables:

ContextBuilderConfig Parameters

Defined in skydiscover/config.py:103-113
template
str
default:"default"
Prompt template to use. Options: default, evox
template_dir
str
default:"None"
Directory containing custom prompt templates
system_message
str
default:"system_message"
Primary system message for solution generation
evaluator_system_message
str
default:"evaluator_system_message"
System message for LLM-as-a-judge evaluation (when evaluator.llm_as_judge=true)
suggest_simplification_after_chars
int
default:"500"
Suggest prompt simplification if user message exceeds this character count. Set to null to disable

Examples

Algorithm Optimization

Machine Learning Model

configs/ml_optimization.yaml

LLM-as-a-Judge

Configure separate messages for generation and evaluation:
configs/llm_judge.yaml

EvoX Template

Use the EvoX template for co-evolutionary search:

Custom Templates

Create custom prompt templates in a separate directory:
Template structure:

CLI Overrides

Override system prompt from command line:
See implementation in skydiscover/config.py:907-909

Best Practices

Clearly define:
  • The problem domain
  • Input/output formats
  • Optimization objectives
  • Success metrics
  • Constraints and limitations
Suggest approaches to explore:
Define hard limits:
Show expected behavior:
Balance competing objectives:

Prompt Engineering Tips

1

Start Simple

Begin with a basic prompt and iterate based on results
2

Add Constraints Gradually

Introduce constraints one at a time to understand their impact
3

Provide Context

Include domain knowledge and expected solution characteristics
4

Test with Multiple Models

Different models respond differently to prompt styles
5

Monitor Results

Use the live monitor to see how prompts affect generation quality

Next Steps

LLM Configuration

Configure models to use your prompts

Agentic Configuration

Enable agentic generation for codebase-aware solutions