# Prompts Directory | |
This directory contains all prompts used by the Data Extractor application in JSON format. | |
## Structure | |
``` | |
prompts/ | |
βββ README.md (this file) | |
βββ workflow/ | |
βββ data_extraction.json # Financial data extraction prompt | |
βββ data_arrangement.json # Data organization prompt | |
βββ code_generation.json # Excel code generation prompt | |
``` | |
## JSON Format | |
Each prompt file follows this structure: | |
```json | |
{ | |
"prompt": "The actual prompt text with {variable} placeholders", | |
"variables": ["list", "of", "variable", "names"], | |
"description": "Brief description of what this prompt does", | |
"category": "workflow or other category" | |
} | |
``` | |
## Variables | |
Prompts can include variables in `{variable_name}` format. These are substituted when the prompt is loaded using the `prompt_loader.load_prompt()` function. | |
## Usage | |
```python | |
from utils.prompt_loader import prompt_loader | |
# Load prompt with variables | |
prompt = prompt_loader.load_prompt("workflow/data_extraction", | |
file_path="/path/to/document.pdf") | |
# Load prompt without variables | |
prompt = prompt_loader.load_prompt("workflow/code_generation") | |
``` |