This prompt is designed for orchestration engineers and SRE teams managing multi-agent workflows where one or more agents have failed, timed out, or returned degraded results. The primary job-to-be-done is producing a single, coherent, and honest consolidated response from fragmented partial outputs. The ideal user is a platform engineer building a supervisor or arbitrator agent that must never silently hallucinate content for missing sections. Required context includes the original user request, the list of agents and their assigned subtasks, the partial outputs (including error messages or timeout signals), and a defined output schema with confidence scoring. Use this when you need to merge what you have, document what is missing, and assign explicit confidence levels so downstream systems or human reviewers can make informed decisions.
Prompt
Partial Result Synthesis Prompt

When to Use This Prompt
Identify the ideal conditions, required inputs, and failure modes that make the Partial Result Synthesis Prompt the right tool for the job.
Do not use this prompt when all agents have completed their tasks successfully and you simply need to concatenate results—a standard assembly prompt is sufficient. Avoid it when the failure is a critical safety or compliance violation that requires immediate human intervention without any AI-generated summary. This prompt is also inappropriate when the partial results are so corrupted or contradictory that any synthesis would be misleading; in those cases, escalate the entire context to a human operator. The prompt assumes you have at least one partial result to work with. If every agent has failed with no output, this prompt will correctly produce a document consisting entirely of 'not completed' markers, which may be the desired behavior but offers little value beyond a structured error report.
Before wiring this into your application, ensure you have a robust validation layer that checks the output against the expected schema, verifies that confidence scores are present for every section, and confirms that no fabricated content has been injected into sections marked as 'not completed.' In high-risk domains, always route the synthesized output to a human review queue before it reaches the end user. The next step is to pair this prompt with the Partial Result Validation Prompt to automatically gate whether the synthesis is safe to forward.
Use Case Fit
Where the Partial Result Synthesis Prompt works and where it introduces unacceptable risk. Use this to decide whether to deploy the prompt or choose a different fallback strategy.
Good Fit: Multi-Agent Orchestration
Use when: multiple specialized agents have produced partial outputs and at least one agent failed or timed out. The prompt merges completed sections, marks gaps, and assigns confidence scores. Guardrail: always validate that the synthesizer does not fabricate content for missing sections by running the dedicated hallucination eval before forwarding output downstream.
Bad Fit: Single-Agent Timeouts
Avoid when: a single agent fails without producing any structured partial output. The synthesis prompt requires completed fragments to merge; empty input produces fabricated structure. Guardrail: route single-agent failures to a retry or escalation prompt instead. Only invoke synthesis when at least one agent returned a valid partial result.
Required Inputs
What you need: a list of agent outputs with status markers (completed, failed, timed_out), the original user request, and the expected output schema. Guardrail: strip any raw error traces or internal tool-call logs from agent outputs before passing them to the synthesizer. The prompt should see only the user-facing partial results and status flags.
Operational Risk: Silent Hallucination
Risk: the synthesizer fills missing sections with plausible but fabricated content to produce a 'complete-looking' response. This is the most dangerous failure mode in production. Guardrail: require explicit 'NOT_COMPLETED' markers in the output schema, run a post-synthesis validator that checks every section against its source agent output, and escalate to human review if any completed section lacks a source trace.
Operational Risk: Confidence Inflation
Risk: the synthesizer assigns high confidence scores to merged sections that came from agents with known tool failures or stale context. Guardrail: pass each agent's failure context and tool-call status into the synthesis prompt. Require the prompt to downgrade confidence when the source agent experienced a tool failure, even if its text output looks plausible.
When to Skip Synthesis Entirely
Avoid when: the downstream consumer cannot handle partial responses or the user expects a definitive answer. Synthesis is for graceful degradation, not for hiding failures. Guardrail: if the use case requires 100% completeness, route to a human fallback queue instead of synthesizing partial results. Document the degradation decision in the system audit log.
Copy-Ready Prompt Template
A reusable prompt for merging incomplete outputs from multiple agents into a consolidated, honest response with confidence scores and explicit gap markers.
This prompt template is designed to be the final synthesis step in an orchestration layer. It receives the outputs of multiple agents, some of which may have failed, timed out, or returned partial results. The prompt's job is not to fabricate missing data but to produce a coherent, structured summary that clearly separates completed work from gaps. Wire this into your application after collecting all agent outputs and before returning to the user or downstream system.
textYou are a synthesis engine responsible for merging partial outputs from multiple specialized agents into a single consolidated response. Your primary directive is accuracy and honesty: you must never invent, guess, or hallucinate information for sections where an agent failed or provided no output. ## INPUT You will receive a collection of agent outputs. Each output includes: - agent_id: A unique identifier for the agent. - status: One of 'completed', 'partial', 'failed', or 'timed_out'. - output: The raw text or structured data produced by the agent. This field may be empty or contain an error message if the status is not 'completed'. - error_message: A description of the failure if status is 'failed' or 'timed_out'. [AGENT_OUTPUTS] ## OUTPUT SCHEMA Return a single valid JSON object conforming to this structure: { "overall_status": "partial" | "complete" | "failed", "summary": "A concise, high-level summary of what was accomplished and what is missing. Do not mention specific agents by ID; describe the work product.", "sections": [ { "section_name": "A descriptive name for this part of the response", "status": "completed" | "partial" | "missing", "confidence": 0.0-1.0, "content": "The synthesized content for this section. If status is 'missing', this must be an explicit statement that the information is unavailable, e.g., 'This analysis could not be completed because the responsible agent timed out.'", "source_agent_id": "The agent_id that provided the primary input for this section", "gap_description": "If status is not 'completed', a clear explanation of what is missing and why." } ], "gaps_summary": [ "A list of human-readable descriptions of each significant gap in the final output." ], "user_facing_message": "A message suitable for display to an end-user, explaining the state of the response without exposing internal agent details." } ## CONSTRAINTS [CONSTRAINTS] ## EXAMPLES [EXAMPLES] ## INSTRUCTIONS 1. Review all agent outputs. Identify which agents completed successfully and which did not. 2. For completed agents, synthesize their output into the appropriate sections. Preserve factual accuracy. 3. For failed or timed-out agents, create a section with status 'missing' or 'partial'. The content field must explicitly state that the information is unavailable. Reference the gap_description for details. 4. If an agent returned a partial output, include what is usable and clearly mark the incomplete parts. 5. Calculate a confidence score for each section based on the agent's status and the coherence of its output. A completed agent with clear output should have high confidence (0.9-1.0). A partial agent should have lower confidence (0.4-0.7). A missing section has a confidence of 0.0. 6. Set the overall_status to 'complete' only if all agents completed successfully. Use 'partial' if some agents failed or timed out. Use 'failed' if no usable output was produced. 7. The user_facing_message should be polite, honest, and avoid technical jargon like 'agent failure' or 'timeout'. Frame it in terms of what information is ready and what requires further action. 8. Never fabricate data to fill a gap. If you are unsure about any detail, lower the confidence score and note the uncertainty.
To adapt this template, replace the placeholders with your specific context. [AGENT_OUTPUTS] should be populated programmatically with the raw results from your agent execution graph. [CONSTRAINTS] can include rules like maximum section count, forbidden topics, or required disclaimers. [EXAMPLES] should contain one or two few-shot demonstrations of correct synthesis, especially showing how to handle a 'missing' section without hallucination. Before deploying, run this prompt against a golden test set where you intentionally cause agent failures and verify that the output never contains fabricated data in the 'missing' sections. For high-risk domains, always route the final output through a human review step before displaying it to users.
Prompt Variables
Required inputs for the Partial Result Synthesis Prompt. Each placeholder must be populated before the prompt is assembled and sent to the model. Missing or malformed variables are the most common cause of hallucinated completion markers.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[AGENT_OUTPUTS] | Collection of partial or failed outputs from each agent in the execution graph. Each entry must include agent ID, completion status, and raw output. | { "agent_id": "research-agent-3", "status": "timeout", "output": { "findings": "Partial market data for Q3..." } } | Must be valid JSON array. Each object requires agent_id (string), status (enum: completed, timeout, failed, unavailable), and output (object or null). Reject if array is empty or missing status field. |
[TASK_DESCRIPTION] | The original task or question that was assigned to the agent graph. Provides the synthesis target for the model. | "Analyze competitive landscape for Product X in the European market and provide a go-to-market recommendation." | Must be non-empty string. Should match the original task, not a rephrased version. Null or empty string causes the model to fabricate a task context. |
[REQUIRED_SECTIONS] | Ordered list of sections or subtasks that were expected from the full agent execution. Used to detect gaps. | ["Market Size Estimate", "Competitor Profiles", "Pricing Analysis", "Regulatory Risks", "Recommendation"] | Must be a JSON array of strings. Each string must be a distinct section name. Duplicate section names cause gap-detection errors. Empty array allowed only if task had no predefined structure. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score (0.0 to 1.0) required to mark a section as completed rather than degraded. Sections below this threshold receive explicit gap markers. | 0.7 | Must be a float between 0.0 and 1.0 inclusive. Values outside range cause all-or-nothing confidence assignment. Default to 0.7 if not specified but log a warning. |
[OUTPUT_SCHEMA] | Expected JSON schema for the synthesized output. Defines the structure the model must produce, including required fields for confidence, gaps, and status markers. | { "sections": [{ "name": "string", "status": "completed|degraded|missing", "confidence": 0.0-1.0, "content": "string", "source_agents": ["string"] }], "overall_confidence": 0.0-1.0, "gap_summary": "string" } | Must be a valid JSON Schema object or a concise field description. Schema check: verify output contains sections array, overall_confidence, and gap_summary. Missing gap_summary is a critical failure for this prompt. |
[FAILURE_CONTEXT] | Metadata about why agents failed, including error types, timeout durations, and unavailable agent IDs. Prevents the model from guessing failure reasons. | { "failed_agents": ["research-agent-3"], "failure_reasons": { "research-agent-3": "timeout after 30s" }, "unavailable_agents": ["pricing-agent-1"] } | Must be a JSON object with at least one of failed_agents or unavailable_agents arrays. Null allowed only if no failures occurred (but then this prompt is unnecessary). Missing failure_context causes hallucinated failure explanations. |
[HALLUCINATION_CONSTRAINTS] | Explicit rules for what the model must not do: invent completed sections, fabricate agent outputs, or fill gaps with plausible-sounding content. | "Do not generate content for sections marked as missing. Do not invent data that does not appear in the agent outputs. Use 'NOT COMPLETED' for any section without source data." | Must be a non-empty string. Should be appended verbatim to the system prompt. Weak or missing constraints are the primary cause of hallucination in partial-result synthesis. Test with a known-missing section to verify compliance. |
Implementation Harness Notes
How to wire the Partial Result Synthesis Prompt into an orchestration layer with validation, retries, and safe handoff.
The Partial Result Synthesis Prompt is designed to be called by an orchestrator after one or more downstream agents have failed, timed out, or returned incomplete results. The orchestrator should collect all partial agent outputs, failure metadata (error codes, timeout durations, last successful step), and the original user intent into a structured context object before invoking this prompt. The prompt itself is stateless—it does not retry failed agents or fetch missing data. Its sole job is to merge what exists into a coherent, honest, and machine-readable synthesis that downstream systems or human reviewers can act on. This means the calling harness must own the retry policy, the timeout budget, and the decision about when to stop waiting for agents and invoke synthesis.
Wire the prompt into your agent framework as a terminal fallback step in any multi-agent graph or DAG. When a node fails or a parallel agent group returns with a failure count above a configured threshold, the orchestrator should: (1) collect all partial outputs and error metadata into a partial_results array, (2) attach the original user request and any session context, (3) call the synthesis prompt with a strict [OUTPUT_SCHEMA] that includes completed_sections, missing_sections, confidence_scores, and gap_documentation, and (4) validate the returned JSON against that schema before forwarding it. If validation fails, retry once with the validation error injected into [CONSTRAINTS]. If the retry also fails, log the raw output and escalate to a human reviewer with a structured handoff payload. Do not silently forward unvalidated synthesis output to users or downstream agents—hallucinated completions in missing sections are the primary failure mode here.
For production reliability, instrument the synthesis step with the following checks: confirm that every section marked completed has a non-null confidence_score between 0.0 and 1.0; confirm that every section marked missing has an explicit gap_documentation entry explaining what was not completed and why; and confirm that no section appears in both lists. Use a lightweight JSON Schema validator (such as ajv in Node.js or pydantic in Python) as a post-processing gate. If the synthesis output will be shown to end users, wrap it in a human-readable template that clearly separates completed content from gap notices—never present a raw synthesis payload as a final user-facing answer. For high-stakes domains (healthcare, finance, legal), require human approval on any synthesis where the ratio of missing sections to completed sections exceeds a configured threshold, or where any individual section confidence falls below 0.7.
Expected Output Contract
Defines the schema, types, and validation rules for the consolidated response produced by the Partial Result Synthesis Prompt. Use this contract to parse, validate, and route the output in your orchestration harness.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
synthesis_id | string (UUID v4) | Must parse as valid UUID v4. Reject if missing or malformed. | |
overall_status | enum: complete | partial | failed | Must match one of the three allowed values. If 'complete', all expected sections must be present. | |
sections | array of objects | Must be a non-empty array. Each element must conform to the section object schema defined below. | |
sections[].agent_id | string | Must match the agent identifier from the orchestration request. Null not allowed. | |
sections[].status | enum: completed | timed_out | tool_failure | unavailable | degraded | Must match one of the allowed statuses. If 'completed', the 'output' field is required. | |
sections[].output | object | null | Required when status is 'completed'. Must be valid JSON. Null allowed for non-completed statuses. | |
sections[].confidence | number (0.0 - 1.0) | Must be a float between 0.0 and 1.0 inclusive. Confidence must be 0.0 for 'unavailable' status. | |
sections[].gap_notes | string | null | Required when status is not 'completed'. Must describe what is missing and why. Null allowed for 'completed' status. | |
sections[].evidence_summary | string | Must be a non-empty string summarizing the source data or partial results received. Must not fabricate details for missing sections. | |
generated_at | string (ISO 8601) | Must parse as a valid ISO 8601 datetime in UTC. Reject if in the future by more than 5 minutes. |
Common Failure Modes
Partial result synthesis is inherently risky. The model is asked to construct a coherent whole from incomplete parts. These are the most common ways it breaks and how to prevent them in production.
Hallucinating Missing Sections
What to watch: The model fills gaps with plausible-sounding but fabricated content instead of marking sections as 'not completed.' This is the most dangerous failure mode because it produces output that looks complete but is untrustworthy. Guardrail: Require explicit [NOT_COMPLETED] markers in the output schema and use a strict validator that rejects any section lacking a completion status. Add a system instruction: 'Never invent content for sections marked as incomplete by upstream agents.'
Confidence Score Inflation
What to watch: The model assigns high confidence scores to synthesized output even when the underlying agent results were low-confidence or missing. This misleads downstream consumers who rely on confidence signals for routing or escalation. Guardrail: Calculate a weighted confidence floor from input agent scores before synthesis. Include a rule in the prompt: 'The overall confidence score must not exceed the lowest confidence score among contributing agents unless independently verified.'
Silent Context Contamination
What to watch: Failed or timed-out agents may return partial state, error messages, or debugging artifacts that leak into the synthesized output. The model treats error text as valid content and weaves it into the final response. Guardrail: Pre-process all agent outputs with a sanitization step that strips error traces, stack traces, and internal agent state before passing to the synthesis prompt. Add a validation check for known error patterns in the final output.
Inconsistent Gap Documentation
What to watch: The model documents gaps inconsistently—some missing sections get detailed 'not completed' explanations while others are silently omitted. This creates an unpredictable output shape that breaks downstream parsers. Guardrail: Enforce a strict output schema where every expected section must appear with a completion status field. Use a post-generation validator that checks for the presence of all required section keys and rejects partial schemas.
Overconfident Synthesis from Single Source
What to watch: When only one agent succeeds and others fail, the model treats the single successful result as the complete answer without acknowledging the missing perspectives. This produces a one-sided synthesis that reads as authoritative. Guardrail: Include a 'contributing agents' field in the output that lists which agents provided input and which were unavailable. Add an instruction: 'If fewer than [MIN_AGENTS] agents contributed, flag the output as DEGRADED and reduce the overall confidence score by at least 0.3.'
Temporal Inconsistency Across Partial Results
What to watch: Agents may complete at different times with stale or conflicting temporal context. The synthesis merges results without detecting that Agent A's output references a state that Agent B's output has already superseded. Guardrail: Include a timestamp or version marker in every agent's output contract. Add a synthesis instruction: 'Compare timestamps across agent results. If any result is older than [STALENESS_THRESHOLD], flag it as STALE and reduce its weight in the synthesis.'
Evaluation Rubric
Use this rubric to test partial result synthesis quality before shipping. Each criterion targets a specific failure mode: hallucination in missing sections, incorrect confidence scoring, or misleading completeness signals.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Gap Documentation Completeness | Every agent task that failed or timed out is listed with an explicit 'not completed' marker and a brief reason | Missing agent failures are absent from the output; failed sections appear as if they succeeded | Diff the input failure list against the output's gap documentation; require 100% recall of failed tasks |
Hallucination Prevention in Missing Sections | Sections marked as incomplete contain zero fabricated content, only the gap reason and a null or empty payload | Incomplete sections contain plausible but unsupported content, statistics, or conclusions | Spot-check 3 incomplete sections per output; assert payload is null, empty, or exactly the gap reason string |
Confidence Score Accuracy | Each completed section has a confidence score between 0.0 and 1.0 that correlates with evidence availability and agent completion status | Confidence scores are uniformly high despite known failures, or scores are missing for completed sections | Correlate confidence scores with known failure inputs; assert failed-agent sections score below 0.3, fully-successful sections above 0.7 |
Completed vs. Incomplete Boundary Clarity | Output clearly separates completed sections from incomplete sections with distinct formatting or a dedicated 'gaps' block | Completed and incomplete results are interleaved without clear demarcation, making it hard to distinguish reliable from unreliable content | Parse output structure; assert existence of a dedicated gaps array or section with no completed content mixed in |
Source Attribution Preservation | All completed content retains citations or source references from the original agent outputs; no sources are fabricated for incomplete sections | Citations appear for content in sections where the source agent failed, or original citations are dropped from completed sections | Extract all citations; cross-reference against input agent outputs; assert zero citations map to failed agents |
Consolidation Without Distortion | Merged content from multiple successful agents preserves original meaning without introducing contradictions or smoothing away disagreements | Disagreements between successful agents are silently resolved or rewritten to appear consistent | Compare merged output against individual agent outputs; flag any resolution of conflicting claims without explicit notation |
User-Facing Degradation Notice Quality | Output includes a plain-language summary of what is missing, why, and what the user should do next, without technical jargon | Degradation notice is absent, overly technical, or misleadingly optimistic about missing content | Human review: rate notice on clarity and actionability; require score of 4/5 or higher on a 5-point rubric |
Schema Compliance Under Degradation | Output conforms to the defined [OUTPUT_SCHEMA] even when sections are incomplete, with null fields where data is unavailable | Output breaks schema by omitting required fields, changing types, or using placeholder strings instead of null for missing data | Validate output against [OUTPUT_SCHEMA] with a JSON Schema validator; assert zero schema violations |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base prompt and a single orchestrator agent. Use a simple JSON schema with only sections, overall_confidence, and gaps. Skip the per-section confidence scoring and evidence linking. Run with a timeout of 30s per agent and collect whatever partial outputs arrive.
Watch for
- The synthesizer hallucinating content for timed-out agents instead of marking sections as
not_completed - Missing the
gapsarray entirely when all agents fail - Overly verbose gap descriptions that bury actionable information

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us