Instructions Directory
This directory contains all agent instructions used by the Data Extractor application in JSON format.
Structure
instructions/
βββ README.md (this file)
βββ agents/
βββ data_extractor.json # Data extraction agent instructions
βββ data_arranger.json # Data organization agent instructions
βββ code_generator.json # Excel code generation agent instructions
JSON Format
Each instruction file follows this structure:
{
"instructions": [
"First instruction line",
"Second instruction line",
"..."
],
"agent_type": "data_extractor|data_arranger|code_generator",
"description": "Brief description of the agent's role",
"category": "agents or other category"
}
Benefits of JSON Format
- Structure: Clean separation of instructions as array elements
- Metadata: Includes agent type and description for context
- No Conversion: Direct use as lists - no need to split strings
- Maintainability: Easy to add, remove, or reorder instructions
- Validation: JSON schema validation possible
Usage
from utils.prompt_loader import prompt_loader
# Load as list for agent initialization
instructions_list = prompt_loader.load_instructions_as_list("agents/data_extractor")
# Load as string for other uses
instructions_text = prompt_loader.load_instruction("agents/data_extractor")