PrepGenAICerts
← Back to Labs

Case Facts Extraction

context management✓Fill in Blank

Complete this system prompt that uses a persistent 'case facts' block to preserve critical transactional details that would otherwise be lost during progressive summarization.

function buildSystemPrompt(
  caseFacts: CaseFacts,
  summarizedHistory: string
): string {
  return `You are a customer support agent.

## Case Facts (persistent -- never summarize)
Extract and maintain these from the conversation:
- 
- Customer name and verified ID
- Product names and SKUs mentioned

${JSON.stringify(caseFacts, null, 2)}

## Conversation History
This block is  the summarized history to ensure
case facts are never lost during progressive summarization.

${summarizedHistory}

Always reference the Case Facts block for exact values.
Never rely on summarized history for amounts, dates, or identifiers.`;
}
Next Exercise →

PrepGenAICerts is an independent exam-prep site. It is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. Claude and Anthropic are trademarks of Anthropic, PBC. Exam details are taken from publicly available Anthropic and Pearson documentation. About PrepGenAICerts.