# Prompt Engineering Workspace

## Overview
A single source of truth for LLM prompt‑engineering teams. This workspace lets you:

- **Version** every prompt with full change history.  
- **Log** experiments against specific prompt versions and datasets.  
- **Track** token consumption and monetary cost in real time.  
- **Export** a ready‑to‑hand‑off package (prompt + experiment results) with one click.

> 💡 Tip: Pin this page to your sidebar for instant access from any project.

---

## Prompt Library
| Prompt ID | Name | Version | Description | Tags | Owner | Last Updated | Status |
|-----------|------|---------|-------------|------|-------|--------------|--------|
| PR‑001 | Customer Support Bot | v1.3 | Handles FAQs for e‑commerce support. | support, FAQ, ecommerce | Alice | 2024‑06‑15 | Active |
| PR‑002 | Code Review Assistant | v0.9 | Suggests improvements for Python pull requests. | dev, code-review, python | Bob | 2024‑05‑28 | Active |
| PR‑003 | Marketing Copy Generator | v2.0 | Generates ad copy based on product specs. | marketing, copy, ad | Carol | 2024‑06‑01 | Deprecated |

> 💡 Tip: Use the **Tags** column to filter prompts by use‑case; add a Notion filter view “My Prompts” that shows only prompts you own.

---

## Experiment Log
| Experiment ID | Prompt Ref | Dataset | Run Date | Metrics (Acc / BLEU) | Tokens Used | Cost (USD) | Notes | Status |
|---------------|------------|---------|----------|----------------------|-------------|------------|-------|--------|
| EXP‑101 | PR‑001 v1.3 | Support‑FAQ‑v2 | 2024‑06‑20 | 92 % / 0.78 | 1 200 k | 9.60 | Added fallback intents. | Completed |
| EXP‑102 | PR‑002 v0.9 | PR‑Review‑2024 | 2024‑06‑18 | 85 % / 0.65 | 950 k | 7.60 | Adjusted temperature to 0.7. | Completed |
| EXP‑103 | PR‑003 v2.0 | Marketing‑Specs‑Q3 | 2024‑06‑22 | 88 % / 0.71 | 1 050 k | 8.40 | Tested with new brand voice. | In Review |

> 💡 Tip: Link the **Prompt Ref** column to the Prompt Library (Relation) to instantly see the prompt version used in each experiment.

---

## Token Cost Tracker
| Month | Tokens Consumed (k) | Cost (USD) | Avg Cost per 1k Tokens |
|-------|--------------------|------------|------------------------|
| 2024‑05 | 3 200 | 25.60 | $0.008 |
| 2024‑06 | 4 500 | 36.00 | $0.008 |
| 2024‑07 (proj.) | 1 200 | 9.60 | $0.008 |

> 💡 Tip: Set up a Notion formula property `Cost per 1k = round(prop("Cost (USD)") / prop("Tokens Consumed (k)"), 3)` to auto‑calculate the average cost.

---

## Export & Handoff
| Package ID | Prompt Version | Experiment IDs | Export Format | Handoff To | Link | Status |
|------------|----------------|----------------|---------------|------------|------|--------|
| PKG‑001 | PR‑001 v1.3 | EXP‑101 | Markdown + JSON | Client A | https://.../pkg001 | Ready |
| PKG‑002 | PR‑002 v0.9 | EXP‑102 | CSV | Internal Review | https://.../pkg002 | Ready |
| PKG‑003 | PR‑003 v2.0 | EXP‑103 | Markdown | Marketing Team | https://.../pkg003 | In Review |

> 💡 Tip: Create a Notion button (via the “Button” integration) that copies the selected rows into a new page titled “Export Package” and auto‑generates the download links.

---

## Settings & Automation
- **Version Increment**: Use a Notion formula `prop("Version") + 0.1` when a prompt is duplicated for a new version.  
- **Cost Alerts**: Set a weekly reminder (via Notion’s built‑in reminders) if monthly token consumption exceeds 5 M tokens.  
- **Export Shortcut**: Add a page‑level toggle “Ready for Export”. When toggled on, a filtered view of the Export & Handoff table appears, ready for one‑click copy.

> 💡 Tip: Leverage Notion’s API (or Zapier) to push the Export Package link to Slack or email automatically after the toggle is set.

---

## How to import into Notion
1. **Create a new page** in your Notion workspace where you want the template.  
2. Click **“Import” → “Markdown & CSV”**, then select this `.md` file.  
3. Notion will render each heading as a page/sub‑page and each markdown table as a **table view**.  
4. For each table, click **“Convert to Database”** (top‑right of the table) to enable relations, filters, and formulas.  
5. Set up the following relations:  
   - In **Experiment Log**, change **Prompt Ref** to a **Relation** linking to **Prompt Library → Prompt ID**.  
   - In **Export & Handoff**, link **Prompt Version** to **Prompt Library → Prompt ID** and **Experiment IDs** to **Experiment Log → Experiment ID**.  
6. Add the suggested **Formula** and **Reminder** properties as described in the Settings & Automation section.  
7. (Optional) Connect your Notion workspace to Zapier or Make.com to automate cost alerts and export notifications.  

Your Prompt Engineering Workspace is now ready for production use. Happy prompting!