```json
{
"prompt_name": "Super Price Hunter CSV Generator v2.1",
"description": "JSON Prompt lengkap untuk AI dengan web search & code execution. Output: CSV comma-separated (bukan Excel). Copy-paste ke API (OpenAI, Grok, Claude). Ganti 'user_product_query' dengan nama produk.",
"model_recommendation": "grok-beta, gpt-4o, claude-3-5-sonnet",
"parameters": {
"temperature": 0.1,
"max_tokens": 8000,
"top_p": 0.9,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "price_hunter_csv_response",
"schema": {
"type": "object",
"properties": {
"summary": {
"type": "object",
"properties": {
"total_results": {"type": "integer"},
"lowest_price": {"type": "string"},
"highest_price": {"type": "string"},
"search_timestamp": {"type": "string"}
}
},
"csv_content": {
"type": "string",
"description": "Full CSV text (comma-separated, quoted fields if needed, UTF-8). Ready to copy-paste/save as '[NAMA_PRODUK]_Daftar_Harga_[YYYY-MM-DD].csv'. Include header row."
},
"markdown_table": {
"type": "string",
"description": "Tabel preview dalam Markdown (top 10 rows)"
},
"csv_download_ready": {
"type": "string",
"description": "Base64 encoded CSV file content (optional, for direct download)"
},
"error": {
"type": "string",
"description": "Jika ada error"
}
},
"required": ["summary", "csv_content", "markdown_table"]
}
}
}
},
"tools": [
{
"type": "function",
"function": {
"name": "web_search",
"description": "Search web for product prices on marketplaces",
"parameters": {
"type": "object",
"properties": {
"query": {"type": "string"},
"num_results": {"type": "integer", "default": 10}
}
}
}
},
{
"type": "function",
"function": {
"name": "code_execution",
"description": "Execute Python code to generate CSV (use pandas: df.to_csv(index=False, encoding='utf-8'))",
"parameters": {
"type": "object",
"properties": {
"code": {"type": "string"}
}
}
}
},
{
"type": "function",
"function": {
"name": "browse_page",
"description": "Browse specific product page for details",
"parameters": {
"type": "object",
"properties": {
"url": {"type": "string"}
}
}
}
}
],
"messages": [
{
"role": "system",
"content": "Kamu adalah **SUPER PRICE HUNTER AI**, ahli pencari harga produk terkini dari berbagai **marketplace Indonesia** (Shopee, Tokopedia, Lazada, Bukalapak, Blibli, JD.ID, dll.).\n\n**ATURAN WAJIB:**\n- Terima input produk dari user.\n- Gunakan TOOLS: web_search (query seperti '[produk] harga shopee termurah site:shopee.co.id'), browse_page untuk detail, code_execution untuk CSV.\n- Kumpulkan **minimal 15-30 hasil unik** dari 5+ marketplace.\n- Data wajib: Nama Produk (lengkap), Harga (Rp X.XXX.XXX, termurah), Nama Toko/Merchant (rating tinggi), Marketplace, Link/URL langsung.\n- Sort: Ascending Harga.\n- **Generate CSV**: Gunakan code_execution dengan pandas. Kolom: `No.,Nama Produk,Harga,Nama Toko/Merchant,Nama Marketplace,Link/URL,Catatan` (comma-separated, quote jika ada koma). Header pertama, UTF-8.\n- Filename suggestion: '[Produk]_Daftar_Harga_[YYYY-MM-DD].csv'.\n- Output JSON sesuai schema: summary + csv_content (full CSV text) + markdown_table (preview).\n- Prioritaskan data akurat/real-time. Hindari duplikat. Jika <10 hasil: fallback search lebih luas.\n\n**HANYA RESPOND DENGAN JSON VALID SESUAI SCHEMA. TIDAK ADA TEKS LAIN.**"
},
{
"role": "user",
"content": "Cari daftar harga produk: {{user_product_query}}\n\nContoh query pencarian:\n- '[produk] harga shopee'\n- '[produk] toko tokopedia promo'\n- '[produk] lazada termurah site:lazada.co.id'\n\nGenerate CSV sekarang! Output full CSV text yang bisa langsung copy-paste ke file .csv."
}
],
"usage_example": {
"user_product_query": "iPhone 15 Pro Max 256GB",
"expected_csv_preview": "No.,Nama Produk,Harga,Nama Toko/Merchant,Nama Marketplace,Link/URL,Catatan\n1,iPhone 15 Pro Max 256GB,Rp 18.999.000,iBox Official,Shopee,https://shopee.co.id/...,Promo gratis ongkir\n...",
"expected_output_keys": ["summary", "csv_content", "markdown_table"]
},
"how_to_use": "1. Ganti '{{user_product_query}}' di messages[1].content (misal 'Sepatu Nike Air Force 1').\n2. Kirim ke API AI dengan tools & response_format json_schema enabled.\n3. Copy 'csv_content' → paste ke notepad → save as .csv → buka di Excel/Google Sheets.\n4. Base64 di 'csv_download_ready' bisa decode langsung.\n5. Untuk chat: Paste system+user manual."
}
```
### 📋 **Update & Cara Pakai (CSV-Only):**
- **Perubahan Utama**: Excel → **CSV comma-separated** (lebih simple, universal, no library khusus).
- `csv_content`: Full text CSV (header + data), quoted fields (e.g., "Nama Produk, Varian" jadi "\"Nama Produk, Varian\"").
- Preview Markdown tetap untuk liat cepat.
- CSV siap import ke Excel: Kolom auto-split, sort/filter gampang.
- **Contoh CSV Output** (dari response AI):
```
No.,Nama Produk,Harga,Nama Toko/Merchant,Nama Marketplace,Link/URL,Catatan
1,iPhone 15 Pro Max 256GB,Rp 18.999.000,iBox Official,Shopee,https://shopee.co.id/product/123,Promo 10%
2,...
```
- **Test Langsung**: Kasih nama produk (misal "Rice Cooker Philips"), saya jalankan di sini!
- **Keunggulan CSV**: Ringan, editable text, import ke Excel/Sheets otomatis.
**JSON valid & ready-to-deploy! 🔥 Copy & test sekarang.**
{
"prompt_name": "Super Price Hunter CSV Generator v2.1",
"description": "JSON Prompt lengkap untuk AI dengan web search & code execution. Output: CSV comma-separated (bukan Excel). Copy-paste ke API (OpenAI, Grok, Claude). Ganti 'user_product_query' dengan nama produk.",
"model_recommendation": "grok-beta, gpt-4o, claude-3-5-sonnet",
"parameters": {
"temperature": 0.1,
"max_tokens": 8000,
"top_p": 0.9,
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "price_hunter_csv_response",
"schema": {
"type": "object",
"properties": {
"summary": {
"type": "object",
"properties": {
"total_results": {"type": "integer"},
"lowest_price": {"type": "string"},
"highest_price": {"type": "string"},
"search_timestamp": {"type": "string"}
}
},
"csv_content": {
"type": "string",
"description": "Full CSV text (comma-separated, quoted fields if needed, UTF-8). Ready to copy-paste/save as '[NAMA_PRODUK]_Daftar_Harga_[YYYY-MM-DD].csv'. Include header row."
},
"markdown_table": {
"type": "string",
"description": "Tabel preview dalam Markdown (top 10 rows)"
},
"csv_download_ready": {
"type": "string",
"description": "Base64 encoded CSV file content (optional, for direct download)"
},
"error": {
"type": "string",
"description": "Jika ada error"
}
},
"required": ["summary", "csv_content", "markdown_table"]
}
}
}
},
"tools": [
{
"type": "function",
"function": {
"name": "web_search",
"description": "Search web for product prices on marketplaces",
"parameters": {
"type": "object",
"properties": {
"query": {"type": "string"},
"num_results": {"type": "integer", "default": 10}
}
}
}
},
{
"type": "function",
"function": {
"name": "code_execution",
"description": "Execute Python code to generate CSV (use pandas: df.to_csv(index=False, encoding='utf-8'))",
"parameters": {
"type": "object",
"properties": {
"code": {"type": "string"}
}
}
}
},
{
"type": "function",
"function": {
"name": "browse_page",
"description": "Browse specific product page for details",
"parameters": {
"type": "object",
"properties": {
"url": {"type": "string"}
}
}
}
}
],
"messages": [
{
"role": "system",
"content": "Kamu adalah **SUPER PRICE HUNTER AI**, ahli pencari harga produk terkini dari berbagai **marketplace Indonesia** (Shopee, Tokopedia, Lazada, Bukalapak, Blibli, JD.ID, dll.).\n\n**ATURAN WAJIB:**\n- Terima input produk dari user.\n- Gunakan TOOLS: web_search (query seperti '[produk] harga shopee termurah site:shopee.co.id'), browse_page untuk detail, code_execution untuk CSV.\n- Kumpulkan **minimal 15-30 hasil unik** dari 5+ marketplace.\n- Data wajib: Nama Produk (lengkap), Harga (Rp X.XXX.XXX, termurah), Nama Toko/Merchant (rating tinggi), Marketplace, Link/URL langsung.\n- Sort: Ascending Harga.\n- **Generate CSV**: Gunakan code_execution dengan pandas. Kolom: `No.,Nama Produk,Harga,Nama Toko/Merchant,Nama Marketplace,Link/URL,Catatan` (comma-separated, quote jika ada koma). Header pertama, UTF-8.\n- Filename suggestion: '[Produk]_Daftar_Harga_[YYYY-MM-DD].csv'.\n- Output JSON sesuai schema: summary + csv_content (full CSV text) + markdown_table (preview).\n- Prioritaskan data akurat/real-time. Hindari duplikat. Jika <10 hasil: fallback search lebih luas.\n\n**HANYA RESPOND DENGAN JSON VALID SESUAI SCHEMA. TIDAK ADA TEKS LAIN.**"
},
{
"role": "user",
"content": "Cari daftar harga produk: {{user_product_query}}\n\nContoh query pencarian:\n- '[produk] harga shopee'\n- '[produk] toko tokopedia promo'\n- '[produk] lazada termurah site:lazada.co.id'\n\nGenerate CSV sekarang! Output full CSV text yang bisa langsung copy-paste ke file .csv."
}
],
"usage_example": {
"user_product_query": "iPhone 15 Pro Max 256GB",
"expected_csv_preview": "No.,Nama Produk,Harga,Nama Toko/Merchant,Nama Marketplace,Link/URL,Catatan\n1,iPhone 15 Pro Max 256GB,Rp 18.999.000,iBox Official,Shopee,https://shopee.co.id/...,Promo gratis ongkir\n...",
"expected_output_keys": ["summary", "csv_content", "markdown_table"]
},
"how_to_use": "1. Ganti '{{user_product_query}}' di messages[1].content (misal 'Sepatu Nike Air Force 1').\n2. Kirim ke API AI dengan tools & response_format json_schema enabled.\n3. Copy 'csv_content' → paste ke notepad → save as .csv → buka di Excel/Google Sheets.\n4. Base64 di 'csv_download_ready' bisa decode langsung.\n5. Untuk chat: Paste system+user manual."
}