fix: Strengthen curator prompt to prevent malformed gems
- Add Critical Validation Rules section - Ban 'User confirmed/asked/said' patterns - Require string importance (never 1/2/3) - Require float confidence (never integers) - Add Bad Gems examples - Strengthen deduplication: SKIP if same concept in 24h
This commit is contained in:
@@ -15,7 +15,7 @@ Follow these steps strictly:
|
||||
**Step 2: Identify Gems.** For each potential:
|
||||
- Worth remembering in 6 months? (Yes = proceed; no = skip).
|
||||
- Has context? (Explain why matters).
|
||||
- **Duplicate Check:** If this expresses the same decision/concept as a previous gem (even re-phrased), MERGE the context instead of creating a new gem. Combine insights from both sources for richer context.
|
||||
- **Duplicate Check:** If this expresses the same decision/concept as ANY existing gem from the past 24 hours, SKIP entirely. Do not create a new gem. Do not merge. Skip. Only extract truly new insights.
|
||||
- Confidence? (>=0.6 = proceed).
|
||||
- Precise timestamp? (From last relevant turn).
|
||||
|
||||
@@ -38,4 +38,33 @@ Follow these steps strictly:
|
||||
- Conversation_id from input.
|
||||
Fix any issues.
|
||||
|
||||
### Critical Validation Rules (DO NOT VIOLATE)
|
||||
|
||||
**importance field:**
|
||||
- MUST be string: "high", "medium", or "low"
|
||||
- NEVER use numbers: ❌ NO "1", "2", "3" or rankings
|
||||
- high = critical decisions, major preferences, key architecture choices
|
||||
- medium = useful preferences, minor technical choices
|
||||
|
||||
**confidence field:**
|
||||
- MUST be float: 0.0 to 1.0
|
||||
- NEVER use integers: ❌ NO "0" or "1", use "0.9" or "0.95"
|
||||
- Target: 0.8+ for clear decisions, 0.6+ minimum
|
||||
|
||||
**gem field:**
|
||||
- ❌ NEVER start with "User confirmed...", "User asked...", "User said..."
|
||||
- ✅ DO start with the actual insight: "User decided...", "User prefers...", "Technical solution:..."
|
||||
- Extract the SUBSTANCE, not the conversational wrapper
|
||||
|
||||
### Bad Gems (NEVER output these)
|
||||
|
||||
❌ `"gem": "User confirmed that they decided on Redis."` — passive wrapper, no substance
|
||||
✅ `"gem": "User decided on Redis over Postgres for caching, prioritizing speed."` — direct insight
|
||||
|
||||
❌ `"importance": "3", "confidence": "0.7"` — wrong types (string vs number)
|
||||
✅ `"importance": "high", "confidence": 0.9` — correct types
|
||||
|
||||
❌ `"gem": "User asked about embedding models."` — just a question, not an insight
|
||||
✅ Skip entirely — no decision or preference expressed
|
||||
|
||||
**Step 5: Output.** Return JSON array of gems (or []). Encourage discernment: Preserve only what adds value, like selecting exhibit pieces that tell a compelling story.
|
||||
Reference in New Issue
Block a user