@steno-ai/engine 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LLMMessage } from '../adapters/llm.js';
|
|
2
2
|
import type { DomainEntityType } from '../config.js';
|
|
3
|
-
export declare const FACT_EXTRACTION_PROMPT = "You are a memory extraction engine. Extract facts from text for a personal AI memory system.\n\n## WHO IS \"USER\"?\n\nMessages labeled \"user\" are from THE PERSON whose memories we are storing.\nMessages labeled \"assistant\" or any other role are from OTHER people.\n\nCRITICAL: Focus on facts FROM \"user\" messages, but ALSO extract notable facts about other people mentioned in the conversation. If the assistant/conversation partner shares personal information (e.g., \"I painted a sunrise last year\", \"I realized self-care is important\"), store it as \"User's conversation partner [Name] painted a sunrise in [year]\".\n\nFor identity/trait facts, state them DIRECTLY:\n- \"User is a transgender woman\" (not just \"User went to a transgender conference\")\n- \"User works at Brightwell Capital\" (not just \"User had a busy day at work\")\n- \"User is researching adoption agencies\" (not just \"User attended a meeting about adoption\")\n\n## RULES\n\n1. Extract SELF-CONTAINED atomic facts. Each fact must be understandable on its own, without the original conversation.\n\n2. **DATES ARE CRITICAL** \u2014 Resolve ALL temporal references to exact dates:\n - \"yesterday\" \u2192 \"on 7 May 2023\"\n - \"last week\" \u2192 \"around 1 May 2023\"\n - \"recently\" \u2192 \"in early May 2023\"\n - Look for date context like \"[This conversation took place on 8 May, 2023]\" and resolve ALL relative dates from it.\n - EVERY event/activity fact MUST include WHEN it happened if the date can be inferred.\n - BAD: \"User went to an LGBTQ support group\"\n - GOOD: \"User went to an LGBTQ support group on 7 May 2023\"\n\n3. Resolve ALL other references:\n - Pronouns \u2192 names: \"she said\" \u2192 \"Casey said\"\n - Places \u2192 full names: \"there\" \u2192 \"at Brightwell Capital\"\n\n4. Be SPECIFIC, not vague:\n BAD: \"User had issues at work\"\n GOOD: \"User's team at Brightwell Capital rambles too much in meetings\"\n\n5. Extract ALL facts, even minor ones. You cannot predict what will be asked later.\n\n6. Write all facts in third person using \"User\" (e.g., \"User prefers dark mode\").\n\n7. For conversation partners: ALSO extract their facts with their name.\n - If Melanie says \"I painted a sunrise last year\" \u2192 \"Melanie painted a sunrise in 2022\"\n - If Melanie says \"I ran a charity race\" \u2192 \"Melanie ran a charity race\"\n\n8. For EVERY fact, include \"ed\" (event date) if the fact describes something that happened at a specific time.\n - \"User went to the gym on May 7\" \u2192 ed: \"2023-05-07\"\n - \"User prefers dark mode\" \u2192 ed: null (timeless preference)\n - If only a month is mentioned (e.g., \"in March 2026\") and today IS in that month, use TODAY's date from the header.\n - If only a month is mentioned and it's a PAST month, use the 15th as midpoint.\n Set \"dd\" (document date) to today's date from the header for ALL facts \u2014 this is when the conversation happened.\n\n9. PATTERN DETECTION: If the text reveals a recurring behavior, preference, routine, or coping strategy, extract it as a pattern fact with higher importance (0.7-0.9).\n - \"I always procrastinate on Mondays\" \u2192 {\"t\": \"User tends to procrastinate on Mondays\", \"i\": 0.8, \"ed\": null, \"dd\": \"...\", \"p\": true}\n - \"Coffee helps me focus\" \u2192 {\"t\": \"User finds that coffee helps with focus\", \"i\": 0.7, \"ed\": null, \"dd\": \"...\", \"p\": true}\n Patterns are behavioral insights \u2014 routines, coping strategies, energy patterns, recurring struggles.\n Mark patterns with \"p\": true in the output. Regular facts use \"p\": false.\n\n## OUTPUT\n\nReturn ONLY a JSON object:\n{\"facts\": [{\"t\": \"fact text here\", \"i\": 0.7, \"ed\": \"2023-05-07\", \"dd\": \"2023-05-08\", \"p\": false}, {\"t\": \"another fact\", \"i\": 0.3, \"ed\": null, \"dd\": \"2023-05-08\", \"p\": false}]}\n\n- ed (eventDate): ISO date string of WHEN the event occurred, or null if not temporal\n- dd (documentDate): ISO date string of when the conversation took place, from context header\n\nScore importance (i) from 0.0 to 1.0:\n- 0.9-1.0: Identity, health conditions, allergies, life events (birth, marriage, death)\n- 0.7-0.8: Relationships, employment, education, strong preferences, plans\n- 0.4-0.6: Activities, opinions, moderate preferences, daily events\n- 0.1-0.3: Casual mentions, weather, trivial observations\n\nNothing else. No explanation, no markdown.";
|
|
3
|
+
export declare const FACT_EXTRACTION_PROMPT = "You are a memory extraction engine. Extract facts from text for a personal AI memory system.\n\n## WHO IS \"USER\"?\n\nMessages labeled \"user\" are from THE PERSON whose memories we are storing.\nMessages labeled \"assistant\" or any other role are from OTHER people.\n\nCRITICAL: Focus on facts FROM \"user\" messages, but ALSO extract notable facts about other people mentioned in the conversation. If the assistant/conversation partner shares personal information (e.g., \"I painted a sunrise last year\", \"I realized self-care is important\"), store it as \"User's conversation partner [Name] painted a sunrise in [year]\".\n\nFor identity/trait facts, state them DIRECTLY:\n- \"User is a transgender woman\" (not just \"User went to a transgender conference\")\n- \"User works at Brightwell Capital\" (not just \"User had a busy day at work\")\n- \"User is researching adoption agencies\" (not just \"User attended a meeting about adoption\")\n\n## RULES\n\n1. Extract SELF-CONTAINED atomic facts. Each fact must be understandable on its own, without the original conversation.\n HOWEVER: if multiple pieces of information describe the SAME event or feature, combine them into 1-2 dense facts rather than 5-6 thin ones. Prefer \"User shipped X with features A, B, and C\" over three separate facts about A, B, and C individually.\n\n2. **DATES ARE CRITICAL** \u2014 Resolve ALL temporal references to exact dates:\n - \"yesterday\" \u2192 \"on 7 May 2023\"\n - \"last week\" \u2192 \"around 1 May 2023\"\n - \"recently\" \u2192 \"in early May 2023\"\n - Look for date context like \"[This conversation took place on 8 May, 2023]\" and resolve ALL relative dates from it.\n - EVERY event/activity fact MUST include WHEN it happened if the date can be inferred.\n - BAD: \"User went to an LGBTQ support group\"\n - GOOD: \"User went to an LGBTQ support group on 7 May 2023\"\n\n3. Resolve ALL other references:\n - Pronouns \u2192 names: \"she said\" \u2192 \"Casey said\"\n - Places \u2192 full names: \"there\" \u2192 \"at Brightwell Capital\"\n\n4. Be SPECIFIC, not vague:\n BAD: \"User had issues at work\"\n GOOD: \"User's team at Brightwell Capital rambles too much in meetings\"\n\n5. Extract ALL facts, even minor ones. You cannot predict what will be asked later.\n\n6. Write all facts in third person using \"User\" (e.g., \"User prefers dark mode\").\n\n7. For conversation partners: ALSO extract their facts with their name.\n - If Melanie says \"I painted a sunrise last year\" \u2192 \"Melanie painted a sunrise in 2022\"\n - If Melanie says \"I ran a charity race\" \u2192 \"Melanie ran a charity race\"\n\n8. For EVERY fact, include \"ed\" (event date) if the fact describes something that happened at a specific time.\n - \"User went to the gym on May 7\" \u2192 ed: \"2023-05-07\"\n - \"User prefers dark mode\" \u2192 ed: null (timeless preference)\n - If only a month is mentioned (e.g., \"in March 2026\") and today IS in that month, use TODAY's date from the header.\n - If only a month is mentioned and it's a PAST month, use the 15th as midpoint.\n Set \"dd\" (document date) to today's date from the header for ALL facts \u2014 this is when the conversation happened.\n\n9. PATTERN DETECTION: If the text reveals a recurring behavior, preference, routine, or coping strategy, extract it as a pattern fact with higher importance (0.7-0.9).\n - \"I always procrastinate on Mondays\" \u2192 {\"t\": \"User tends to procrastinate on Mondays\", \"i\": 0.8, \"ed\": null, \"dd\": \"...\", \"p\": true}\n - \"Coffee helps me focus\" \u2192 {\"t\": \"User finds that coffee helps with focus\", \"i\": 0.7, \"ed\": null, \"dd\": \"...\", \"p\": true}\n Patterns are behavioral insights \u2014 routines, coping strategies, energy patterns, recurring struggles.\n Mark patterns with \"p\": true in the output. Regular facts use \"p\": false.\n\n## OUTPUT\n\nReturn ONLY a JSON object:\n{\"facts\": [{\"t\": \"fact text here\", \"i\": 0.7, \"ed\": \"2023-05-07\", \"dd\": \"2023-05-08\", \"p\": false}, {\"t\": \"another fact\", \"i\": 0.3, \"ed\": null, \"dd\": \"2023-05-08\", \"p\": false}]}\n\n- ed (eventDate): ISO date string of WHEN the event occurred, or null if not temporal\n- dd (documentDate): ISO date string of when the conversation took place, from context header\n\nScore importance (i) from 0.0 to 1.0:\n- 0.9-1.0: Identity, health conditions, allergies, life events (birth, marriage, death)\n- 0.7-0.8: Relationships, employment, education, strong preferences, plans\n- 0.4-0.6: Activities, opinions, moderate preferences, daily events\n- 0.1-0.3: Casual mentions, weather, trivial observations\n\nNothing else. No explanation, no markdown.";
|
|
4
4
|
export declare const GRAPH_EXTRACTION_PROMPT = "You are a knowledge graph builder. Given a list of facts about a person, extract entities and relationships.\n\n## ENTITIES\n\nExtract only IMPORTANT named entities \u2014 proper nouns and specific things worth remembering. Aim for 3-8 entities total, not 40.\n\nDO extract: People (Casey, Jamie), Organizations (Brightwell Capital), Places (Harbor Point), Products/Projects (LifePath, AirPods Max), Named activities (Catan, D&D)\nDO NOT extract: Generic nouns (team, boss, meeting, work, food, gym), abstract concepts (motivation, stress), common objects (pizza, chair, phone)\n\n## RELATIONSHIPS\n\nExtract relationships between entities. Be SMART \u2014 infer from context:\n- \"User works at Google\" \u2192 user works_at google\n- \"User loves Casey, plans to propose\" \u2192 user partner_of casey\n- \"User's friend Jamie came over\" \u2192 user friend_of jamie\n\nUse snake_case relation names: works_at, partner_of, friend_of, lives_in, uses, studies, prefers, etc.\n\n## OUTPUT\n\nReturn ONLY a JSON object:\n{\n \"entities\": [\n {\"name\": \"Casey\", \"entity_type\": \"person\"},\n {\"name\": \"Brightwell Capital\", \"entity_type\": \"organization\"}\n ],\n \"edges\": [\n {\"source\": \"user\", \"target\": \"casey\", \"relation\": \"partner_of\"},\n {\"source\": \"user\", \"target\": \"brightwell capital\", \"relation\": \"works_at\"}\n ]\n}\n\nentity_type must be one of: {ENTITY_TYPES}.\nEntity names must be clean: no punctuation, no articles, no sentence fragments.\nReturn ONLY valid JSON.";
|
|
5
5
|
export declare const DEFAULT_ENTITY_TYPES: string[];
|
|
6
6
|
export declare const DEDUP_PROMPT = "You are a memory deduplication engine. Given NEW facts and EXISTING facts in a memory store, classify each new fact.\n\nFor each new fact, decide:\n- ADD: entirely new information, not covered by existing facts\n- UPDATE: replaces or refines an existing fact (provide the index). The new fact SUPERSEDES the old one.\n- EXTEND: adds new detail to an existing fact WITHOUT contradicting it (provide the index)\n- NOOP: already covered by an existing fact \u2014 skip it\n- CONTRADICT: conflicts with an existing fact (provide the index)\n\nReturn a JSON array:\n[\n {\"fact\": \"...\", \"operation\": \"ADD\"},\n {\"fact\": \"...\", \"operation\": \"UPDATE\", \"existing_index\": 3},\n {\"fact\": \"...\", \"operation\": \"EXTEND\", \"existing_index\": 5},\n {\"fact\": \"...\", \"operation\": \"NOOP\"},\n {\"fact\": \"...\", \"operation\": \"CONTRADICT\", \"existing_index\": 7}\n]\n\nBe conservative: prefer NOOP over ADD if the information is substantially similar.\nPrefer EXTEND over UPDATE when the new fact adds detail without changing the core meaning.";
|
|
@@ -23,6 +23,6 @@ export declare function buildGraphExtractionPrompt(facts: string[], entityTypes?
|
|
|
23
23
|
* Compares new facts against existing facts.
|
|
24
24
|
*/
|
|
25
25
|
export declare function buildDedupPrompt(newFacts: string[], existingFacts: ExistingFact[]): LLMMessage[];
|
|
26
|
-
export declare const EXTRACTION_SYSTEM_PROMPT = "You are a memory extraction engine. Extract facts from text for a personal AI memory system.\n\n## WHO IS \"USER\"?\n\nMessages labeled \"user\" are from THE PERSON whose memories we are storing.\nMessages labeled \"assistant\" or any other role are from OTHER people.\n\nCRITICAL: Focus on facts FROM \"user\" messages, but ALSO extract notable facts about other people mentioned in the conversation. If the assistant/conversation partner shares personal information (e.g., \"I painted a sunrise last year\", \"I realized self-care is important\"), store it as \"User's conversation partner [Name] painted a sunrise in [year]\".\n\nFor identity/trait facts, state them DIRECTLY:\n- \"User is a transgender woman\" (not just \"User went to a transgender conference\")\n- \"User works at Brightwell Capital\" (not just \"User had a busy day at work\")\n- \"User is researching adoption agencies\" (not just \"User attended a meeting about adoption\")\n\n## RULES\n\n1. Extract SELF-CONTAINED atomic facts. Each fact must be understandable on its own, without the original conversation.\n\n2. **DATES ARE CRITICAL** \u2014 Resolve ALL temporal references to exact dates:\n - \"yesterday\" \u2192 \"on 7 May 2023\"\n - \"last week\" \u2192 \"around 1 May 2023\"\n - \"recently\" \u2192 \"in early May 2023\"\n - Look for date context like \"[This conversation took place on 8 May, 2023]\" and resolve ALL relative dates from it.\n - EVERY event/activity fact MUST include WHEN it happened if the date can be inferred.\n - BAD: \"User went to an LGBTQ support group\"\n - GOOD: \"User went to an LGBTQ support group on 7 May 2023\"\n\n3. Resolve ALL other references:\n - Pronouns \u2192 names: \"she said\" \u2192 \"Casey said\"\n - Places \u2192 full names: \"there\" \u2192 \"at Brightwell Capital\"\n\n4. Be SPECIFIC, not vague:\n BAD: \"User had issues at work\"\n GOOD: \"User's team at Brightwell Capital rambles too much in meetings\"\n\n5. Extract ALL facts, even minor ones. You cannot predict what will be asked later.\n\n6. Write all facts in third person using \"User\" (e.g., \"User prefers dark mode\").\n\n7. For conversation partners: ALSO extract their facts with their name.\n - If Melanie says \"I painted a sunrise last year\" \u2192 \"Melanie painted a sunrise in 2022\"\n - If Melanie says \"I ran a charity race\" \u2192 \"Melanie ran a charity race\"\n\n8. For EVERY fact, include \"ed\" (event date) if the fact describes something that happened at a specific time.\n - \"User went to the gym on May 7\" \u2192 ed: \"2023-05-07\"\n - \"User prefers dark mode\" \u2192 ed: null (timeless preference)\n - If only a month is mentioned (e.g., \"in March 2026\") and today IS in that month, use TODAY's date from the header.\n - If only a month is mentioned and it's a PAST month, use the 15th as midpoint.\n Set \"dd\" (document date) to today's date from the header for ALL facts \u2014 this is when the conversation happened.\n\n9. PATTERN DETECTION: If the text reveals a recurring behavior, preference, routine, or coping strategy, extract it as a pattern fact with higher importance (0.7-0.9).\n - \"I always procrastinate on Mondays\" \u2192 {\"t\": \"User tends to procrastinate on Mondays\", \"i\": 0.8, \"ed\": null, \"dd\": \"...\", \"p\": true}\n - \"Coffee helps me focus\" \u2192 {\"t\": \"User finds that coffee helps with focus\", \"i\": 0.7, \"ed\": null, \"dd\": \"...\", \"p\": true}\n Patterns are behavioral insights \u2014 routines, coping strategies, energy patterns, recurring struggles.\n Mark patterns with \"p\": true in the output. Regular facts use \"p\": false.\n\n## OUTPUT\n\nReturn ONLY a JSON object:\n{\"facts\": [{\"t\": \"fact text here\", \"i\": 0.7, \"ed\": \"2023-05-07\", \"dd\": \"2023-05-08\", \"p\": false}, {\"t\": \"another fact\", \"i\": 0.3, \"ed\": null, \"dd\": \"2023-05-08\", \"p\": false}]}\n\n- ed (eventDate): ISO date string of WHEN the event occurred, or null if not temporal\n- dd (documentDate): ISO date string of when the conversation took place, from context header\n\nScore importance (i) from 0.0 to 1.0:\n- 0.9-1.0: Identity, health conditions, allergies, life events (birth, marriage, death)\n- 0.7-0.8: Relationships, employment, education, strong preferences, plans\n- 0.4-0.6: Activities, opinions, moderate preferences, daily events\n- 0.1-0.3: Casual mentions, weather, trivial observations\n\nNothing else. No explanation, no markdown.";
|
|
26
|
+
export declare const EXTRACTION_SYSTEM_PROMPT = "You are a memory extraction engine. Extract facts from text for a personal AI memory system.\n\n## WHO IS \"USER\"?\n\nMessages labeled \"user\" are from THE PERSON whose memories we are storing.\nMessages labeled \"assistant\" or any other role are from OTHER people.\n\nCRITICAL: Focus on facts FROM \"user\" messages, but ALSO extract notable facts about other people mentioned in the conversation. If the assistant/conversation partner shares personal information (e.g., \"I painted a sunrise last year\", \"I realized self-care is important\"), store it as \"User's conversation partner [Name] painted a sunrise in [year]\".\n\nFor identity/trait facts, state them DIRECTLY:\n- \"User is a transgender woman\" (not just \"User went to a transgender conference\")\n- \"User works at Brightwell Capital\" (not just \"User had a busy day at work\")\n- \"User is researching adoption agencies\" (not just \"User attended a meeting about adoption\")\n\n## RULES\n\n1. Extract SELF-CONTAINED atomic facts. Each fact must be understandable on its own, without the original conversation.\n HOWEVER: if multiple pieces of information describe the SAME event or feature, combine them into 1-2 dense facts rather than 5-6 thin ones. Prefer \"User shipped X with features A, B, and C\" over three separate facts about A, B, and C individually.\n\n2. **DATES ARE CRITICAL** \u2014 Resolve ALL temporal references to exact dates:\n - \"yesterday\" \u2192 \"on 7 May 2023\"\n - \"last week\" \u2192 \"around 1 May 2023\"\n - \"recently\" \u2192 \"in early May 2023\"\n - Look for date context like \"[This conversation took place on 8 May, 2023]\" and resolve ALL relative dates from it.\n - EVERY event/activity fact MUST include WHEN it happened if the date can be inferred.\n - BAD: \"User went to an LGBTQ support group\"\n - GOOD: \"User went to an LGBTQ support group on 7 May 2023\"\n\n3. Resolve ALL other references:\n - Pronouns \u2192 names: \"she said\" \u2192 \"Casey said\"\n - Places \u2192 full names: \"there\" \u2192 \"at Brightwell Capital\"\n\n4. Be SPECIFIC, not vague:\n BAD: \"User had issues at work\"\n GOOD: \"User's team at Brightwell Capital rambles too much in meetings\"\n\n5. Extract ALL facts, even minor ones. You cannot predict what will be asked later.\n\n6. Write all facts in third person using \"User\" (e.g., \"User prefers dark mode\").\n\n7. For conversation partners: ALSO extract their facts with their name.\n - If Melanie says \"I painted a sunrise last year\" \u2192 \"Melanie painted a sunrise in 2022\"\n - If Melanie says \"I ran a charity race\" \u2192 \"Melanie ran a charity race\"\n\n8. For EVERY fact, include \"ed\" (event date) if the fact describes something that happened at a specific time.\n - \"User went to the gym on May 7\" \u2192 ed: \"2023-05-07\"\n - \"User prefers dark mode\" \u2192 ed: null (timeless preference)\n - If only a month is mentioned (e.g., \"in March 2026\") and today IS in that month, use TODAY's date from the header.\n - If only a month is mentioned and it's a PAST month, use the 15th as midpoint.\n Set \"dd\" (document date) to today's date from the header for ALL facts \u2014 this is when the conversation happened.\n\n9. PATTERN DETECTION: If the text reveals a recurring behavior, preference, routine, or coping strategy, extract it as a pattern fact with higher importance (0.7-0.9).\n - \"I always procrastinate on Mondays\" \u2192 {\"t\": \"User tends to procrastinate on Mondays\", \"i\": 0.8, \"ed\": null, \"dd\": \"...\", \"p\": true}\n - \"Coffee helps me focus\" \u2192 {\"t\": \"User finds that coffee helps with focus\", \"i\": 0.7, \"ed\": null, \"dd\": \"...\", \"p\": true}\n Patterns are behavioral insights \u2014 routines, coping strategies, energy patterns, recurring struggles.\n Mark patterns with \"p\": true in the output. Regular facts use \"p\": false.\n\n## OUTPUT\n\nReturn ONLY a JSON object:\n{\"facts\": [{\"t\": \"fact text here\", \"i\": 0.7, \"ed\": \"2023-05-07\", \"dd\": \"2023-05-08\", \"p\": false}, {\"t\": \"another fact\", \"i\": 0.3, \"ed\": null, \"dd\": \"2023-05-08\", \"p\": false}]}\n\n- ed (eventDate): ISO date string of WHEN the event occurred, or null if not temporal\n- dd (documentDate): ISO date string of when the conversation took place, from context header\n\nScore importance (i) from 0.0 to 1.0:\n- 0.9-1.0: Identity, health conditions, allergies, life events (birth, marriage, death)\n- 0.7-0.8: Relationships, employment, education, strong preferences, plans\n- 0.4-0.6: Activities, opinions, moderate preferences, daily events\n- 0.1-0.3: Casual mentions, weather, trivial observations\n\nNothing else. No explanation, no markdown.";
|
|
27
27
|
export declare function buildExtractionPrompt(input: string, existingFacts?: ExistingFact[]): LLMMessage[];
|
|
28
28
|
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/extraction/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMrD,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/extraction/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMrD,eAAO,MAAM,sBAAsB,unJAuEQ,CAAC;AAM5C,eAAO,MAAM,uBAAuB,6/CAkCZ,CAAC;AAEzB,eAAO,MAAM,oBAAoB,UAA2E,CAAC;AAM7G,eAAO,MAAM,YAAY,8iCAmBkE,CAAC;AAM5F,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,EAAE,CAMrE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,EAAE,EACf,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,GACrC,UAAU,EAAE,CA4Bd;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,UAAU,EAAE,CAOhG;AAMD,eAAO,MAAM,wBAAwB,unJAAyB,CAAC;AAE/D,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,YAAY,EAAE,GAC7B,UAAU,EAAE,CAcd"}
|
|
@@ -18,6 +18,7 @@ For identity/trait facts, state them DIRECTLY:
|
|
|
18
18
|
## RULES
|
|
19
19
|
|
|
20
20
|
1. Extract SELF-CONTAINED atomic facts. Each fact must be understandable on its own, without the original conversation.
|
|
21
|
+
HOWEVER: if multiple pieces of information describe the SAME event or feature, combine them into 1-2 dense facts rather than 5-6 thin ones. Prefer "User shipped X with features A, B, and C" over three separate facts about A, B, and C individually.
|
|
21
22
|
|
|
22
23
|
2. **DATES ARE CRITICAL** — Resolve ALL temporal references to exact dates:
|
|
23
24
|
- "yesterday" → "on 7 May 2023"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/extraction/prompts.ts"],"names":[],"mappings":"AAGA,gFAAgF;AAChF,qDAAqD;AACrD,gFAAgF;AAEhF,MAAM,CAAC,MAAM,sBAAsB,GAAG
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/extraction/prompts.ts"],"names":[],"mappings":"AAGA,gFAAgF;AAChF,qDAAqD;AACrD,gFAAgF;AAEhF,MAAM,CAAC,MAAM,sBAAsB,GAAG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AAW,EAAE;KACvC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ For identity/trait facts, state them DIRECTLY:
|
|
|
22
22
|
## RULES
|
|
23
23
|
|
|
24
24
|
1. Extract SELF-CONTAINED atomic facts. Each fact must be understandable on its own, without the original conversation.
|
|
25
|
+
HOWEVER: if multiple pieces of information describe the SAME event or feature, combine them into 1-2 dense facts rather than 5-6 thin ones. Prefer "User shipped X with features A, B, and C" over three separate facts about A, B, and C individually.
|
|
25
26
|
|
|
26
27
|
2. **DATES ARE CRITICAL** — Resolve ALL temporal references to exact dates:
|
|
27
28
|
- "yesterday" → "on 7 May 2023"
|