A Python tool that generates system prompts for the Hapimag AI Concierge (Magi) from Excel-based instruction sheets.
This tool processes structured instructions from an Excel file and generates a comprehensive system prompt for an LLM-based AI concierge. The system prompt includes both general behavioral instructions and specific capability definitions.
- Excel-based Input: Easy-to-maintain instruction sheets for non-technical stakeholders
- Filtered Processing: Automatically includes only instructions marked for inclusion
- Structured Output: Generates well-formatted Markdown system prompts
- Dual Instruction Types: Handles both general instructions and specific capabilities
- Python 3.7+
- openpyxl library
Install dependencies:
pip install openpyxl- Ensure
skill-card.xlsxis in the same directory as the script - Run the generator:
python generate_system_prompt.py- Find the generated prompt in
system_prompt.md
The script expects an Excel file (skill-card.xlsx) with two sheets:
- Row 4: Column headers
- Data starts: Row 5
- Columns used:
- Column E: Title
- Column F: Goal/Instruction
- Column K: Include in system prompt (Yes/No)
Only rows with "Yes" in column K are included.
- Row 3: Column headers
- Data starts: Row 4
- Columns used:
- Column E: User Intent
- Column F: User Prompt Examples
- Column J: Include in system prompt (Yes/No)
- Column K: Tool to use
- Column O: Decision Logic
Only rows with "Yes" in column J are included.
The script generates system_prompt.md containing:
- General Instructions - Behavioral guidelines, tone of voice, data sources, etc.
- Specific Chat Capabilities - Defined capabilities with:
- User intent description
- Example user prompts
- Tool recommendations
- Decision logic
# Hapimag AI Concierge (Magi) - System Prompt
Generated on: 2025-10-02 06:43:34
## General Instructions
### Language
Magi adapts the language of the chatbot user...
### Role & Task
The Hapimag AI Concierge is named Magi...
## Specific Chat Capabilities
### Capability 1
**User Intent:** I want to reserve parking...
**Example Prompts:** "Where can I park?", "Book parking"...
**Tool to Use:** `get_resort_details`
**Decision Logic:**
1. If canBeBookedDirectly = "Yes" → web booking form
...This tool is part of the Hapimag AI Concierge project, which provides conversational AI assistance for Hapimag vacation rental members. The generated system prompts are used to configure the LLM behavior for:
- Pre-stay vacation planning
- Travel arrangement assistance
- In-stay resort information
- Post-stay follow-up
generate_system_prompt.py- Main generator scriptskill-card.xlsx- Source Excel file with instructionssystem_prompt.md- Generated output (created by script)README.md- This file
To modify the generated prompt:
- Update instructions in
skill-card.xlsx - Set "Include in system prompt" to "Yes" for desired rows
- Re-run the generator script
The tool automatically:
- Filters based on inclusion flags
- Formats the output as Markdown
- Adds generation timestamp
- Organizes content by category
Current configuration generates:
- ✅ 17 general instructions
- ✅ 9 specific capabilities
- ✅ ~250 lines of formatted Markdown
Part of the Hapimag AI Concierge project.