File size: 1,211 Bytes
90b0a17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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")
```