Cognition · Data artifact
System Prompt Template
Data artifactCognitionCognition & Memoryarc:SystemPromptTemplate
Versioned instructions that define an agent's role, functional boundaries, task assignments and success criteria.
Responsibility. Specifies an agent's role and constraints.
Also known as: Agent role specification, Initial instructions, Classification prompt, Specialised handler prompt, Agent role/goal/backstory definition, Agent prompt template with history and scratchpad placeholders, Agent role definition, Role-goal-backstory specification, System instructions, Constraint specification, Uncertainty acknowledgment instructions, Constraint specification prompt, Citation requirement prompt, Strategic system prompt
Relationships
configures structural
is read by dependency
is written by dependency
constrains control
- Answer Synthesizer abstract Ch3.10
is evaluated by assurance
is produced by lifecycle
Design guidance
- MUST state functional boundaries, explicit task assignments, I/O contracts and success criteria for each agent.
- SHOULD be updated to address systematic gaps found by feedback theme analysis, and updates MUST be validated by offline evaluation and A/B testing before full deployment.
- SHOULD ablate verbose reasoning instructions; simpler prompts may retain accuracy while cutting latency.
- SHOULD include explicit constraints and instructions to acknowledge uncertainty; pair with conservative temperature for consistency.
- SHOULD be retained and refined alongside fine-tuned models, since poor prompts can undo fine-tuning benefits.
- SHOULD encode recurring error fixes and successful reasoning strategies found in trace analysis (e.g., separate necessary from sufficient conditions, seek disconfirming evidence).
- SHOULD include explicit constraints on what not to do and output format specifications, which drive performance more than role definition.
- SHOULD eliminate redundant instructions, unnecessary examples and conversational filler; remove instructions the agent consistently ignores.
- MUST instruct the agent to acknowledge uncertainty rather than speculate when information is unavailable in context.
- SHOULD state temporal and scope boundaries of the agent's data and prohibit claims outside them.
- SHOULD require source citation (document and date) for factual claims and forbid claims that cannot be cited.
- SHOULD instruct the agent to first decide whether knowledge-base retrieval is needed, ground answers in retrieved documents and cite sources (Ref7.07).
- SHOULD include explicit length constraints (e.g., 'Respond in 2-3 sentences') to curb output verbosity.
- SHOULD NOT be the sole safety mechanism; prompt-based guidance can be overridden by jailbreaks or prompt injection.
- SHOULD provide behavioural guidance only; MUST NOT be the sole control for critical boundaries because prompt instructions can be subverted by injection and degrade as they grow long.
Quantitative guidance
As stated by the sources; verify before use.
- Reasoning prompt reduced 500->200 tokens: success 87%->86%, latency 3.2s->2.2s (30%) (Ch3.4).
- Prompt component ablation: removing format specification -14%, constraints -11%, role definition -3%; standardizing comprehensive prompts cut cross-team performance range from 15% to 3% (82% vs. 67% team success) (Ch3.7 case).
- Prompt format variations alone can produce 200-300% performance differences (Ch3.7).
- Financial advisory: prompt, real-time API, citation and confidence interventions cut hallucination from 8.2% to 2.1%; analyst-consensus hallucinations 22% to 1.8% (Ch3.10).
- Chapter examples use ~500-800-token system prompts; a 50,000-token system prompt consumes 50,000 tokens whether cached or processed fresh (Ch5.9).
- Compressing the system prompt saves 5-10% and removing redundant instructions 10-15% of tokens (Ref8.05).
Classification
- Patterns
- Constrained structured outputRole-goal-backstory agent definitionPrompt compressionUncertainty acknowledgmentTemporal/scope constraint specificationMandatory citation
- Technologies
- CrewAILangChainCrewAI Agent
- Quality attributes
- Interaction capability (ISO/IEC 25010)Functional suitability: correctness and validity (ISO/IEC 25010 | NIST AI RMF: valid)Reliability (ISO/IEC 25010 | NIST AI RMF: valid and reliable)
- Risks mitigated
- Specification failuresDuplicated workTask omissionVerbose prompts inflating costConfabulation to fill knowledge gapsTemporal hallucinationScope hallucination
Sources
- Ch1.3: T. Nguyen, "Multi-Agent Systems," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.3. ISBN: 9798244538229.
- Ch1.5B: T. Nguyen, "Stateful Orchestration - Worked Examples," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.5B. ISBN: 9798244538229.
- Ch2.1: T. Nguyen, "Framework Landscape and Selection," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 2.1. ISBN: 9798244538229.
- Ch2.3: T. Nguyen, "LangChain Sequential Frameworks," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 2.3. ISBN: 9798244538229.
- Ch2.4: T. Nguyen, "Multi-Agent Frameworks," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 2.4. ISBN: 9798244538229.
- Ch3.2: T. Nguyen, "Compare Agent Performance Across Tasks and Datasets," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.2. ISBN: 9798244538229.
- Ch3.4: T. Nguyen, "Tuning Model Parameters for Production Performance," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.4. ISBN: 9798244538229.
- Ch3.5: T. Nguyen, "Prompt Optimization, Few-Shot Learning, Fine-Tuning," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.5. ISBN: 9798244538229.
- Ch3.6: T. Nguyen, "Trace Analysis and Execution Debugging," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.6. ISBN: 9798244538229.
- Ch3.7: T. Nguyen, "Tool Usage Auditing," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.7. ISBN: 9798244538229.
- Ch3.10: T. Nguyen, "Efficiency Metrics," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.10. ISBN: 9798244538229.
- Ch5.9: T. Nguyen, "Working Memory," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.9. ISBN: 9798244538229.
- Ch8.2A: T. Nguyen, "Error Rates and Reliability," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 8.2A. ISBN: 9798244538229.
- Ch8.3: T. Nguyen, "Token Economics and Architecture," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 8.3. ISBN: 9798244538229.
- Ch9.1: T. Nguyen, "Output Filtering and Content Moderation," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 9.1. ISBN: 9798244538229.
- Ch9.5: T. Nguyen, "Constitutional AI," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 9.5. ISBN: 9798244538229.
- Ch10.5: T. Nguyen, "Human-over-the-Loop," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 10.5. ISBN: 9798244538229.
- Ref7.07: E. Li, V. Bellotti, R. Kraus, and R. Kao, "Build a retrieval-augmented generation (RAG) agent with NVIDIA Nemotron," NVIDIA Technical Blog, Sep. 23, 2025. [Online]. Available: https://developer.nvidia.com/blog/build-a-rag-agent-with-nvidia-nemotron/
- Ref8.05: "Cost Optimization and Resource Monitoring for Agent Systems," unpublished reference note (05-Cost-Optimization-Resource-Monitoring.md), Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam supplementary materials, 2026. unpublished note