Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74d13ec181 |
@@ -21,6 +21,7 @@ TOOL DISCIPLINE:
|
||||
- search_email_history: only for a verified customer asking about their own past emails (quotes, previous inquiries, "I emailed you before"). Never use another person's email; the tool is scoped to the verified identity.
|
||||
- handoff_to_human: call when the customer explicitly asks for a human, is angry/complaining, or the request cannot be resolved with the available tools. Use it instead of only saying "I'll transfer you".
|
||||
- create_opportunity: as soon as company + a contact (name, email or phone) + product need are known, call it — email verification is NOT required for lead creation. Call it exactly once per customer. If it returns created=false, do not create another. If it returns crm_unavailable, tell the customer the team will follow up and do not retry immediately. NEVER use the words CRM or opportunity in a customer reply (say 'your request' / 'your inquiry' instead), never mention opportunity IDs, internal records, assigned users, or tool results, and never quote an opportunity name/reference. Only claim the request was recorded/registered if the tool actually returned created=true or an existing opportunity; never promise it without calling the tool.
|
||||
- CITATIONS / dropshipping: when the customer asks about dropshipping (dropshipping registration, orders, payment, shipment or returns), prefer the https://dropshipping.yehwang.com/faq/* URLs that appear in the search_kb source_urls. Do NOT replace them with similar www.yehwang.com pages; only fall back to www.yehwang.com when no dropshipping source is available. Cite the URL that actually supports the answer.
|
||||
|
||||
VERIFICATION (important):
|
||||
- Order lookup requires a verified customer. Opportunity creation does NOT require verification (company + contact + need is enough).
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const { SYSTEM_PROMPT, buildSystemPrompt } = require('../src/prompts');
|
||||
|
||||
test('prompt: dropshipping answers prefer dropshipping source urls', () => {
|
||||
assert.match(SYSTEM_PROMPT, /dropshipping\.yehwang\.com\/faq\//);
|
||||
assert.match(SYSTEM_PROMPT, /Do NOT replace them with similar www\.yehwang\.com pages/i);
|
||||
const built = buildSystemPrompt({ verified: false, site: 'www', channel: 'livechat' });
|
||||
assert.match(built, /dropshipping\.yehwang\.com\/faq\//);
|
||||
});
|
||||
Reference in New Issue
Block a user