Deep Research API - Inconsistent Output Formatting (50% Success Rate)

:bug: Describe the Bug

Hi Perplexity team,

We’re experiencing a critical issue with the Deep Research API that’s significantly impacting our business operations.

Issue Description:
We use the Deep Research API to research topics and generate research reports for our business. We’ve been using the same prompt consistently, but recently we’re encountering inconsistent output formatting.

Problem Details:
The API produces correctly formatted output approximately 50% of the time
The other 50% of the time, the output formatting does not match our expected format
This is essentially a coin flip - completely unpredictable
We haven’t changed our prompt or implementation
The inconsistency started recently - 2- 3 weeks

Business Impact:
This inconsistency is severely affecting our business operations, as we cannot rely on the API to consistently deliver the formatted output we need for our research reports.

Next Steps:
I’m happy to provide more detailed examples, logs, or any other information that would help diagnose this issue. If someone from the support team would like to get in touch, please let me know what additional details would be helpful.

Thank you for looking into this!

:white_check_mark: Expected Behavior

# RESEARCH OUTPUT

**Article Title:** X Retail Multi-Channel Selling Statistics
**Article Type:** Stats Based
**Research Date:** January 2025


1. TOPIC OVERVIEW RESEARCH

Finding 1:

**Content:** Multi-channel retail selling represents a strategic approach where retailers offer products through multiple independent sales channels—physical stores, brand websites, online marketplaces, social media shops, and mobile apps—allowing customers to choose their preferred shopping platform. Unlike omnichannel retail where channels are fully integrated, multi-channel operations maintain separate channel ecosystems. Success fundamentals include customer-centric mindset, consistent branding across touchpoints, synchronized inventory systems, unified analytics, and scalable technology infrastructure that connects disparate platforms.
**Source:** https://www.infoverity.com/en/blog/multichannel-retailing-benefits-challenges-solutions/
**Date:** 2024
**Relevance:** Provides foundational framework for Anchor Group’s clients seeking to understand multi-channel architecture and implementation requirements.
**Reliability:** High

:cross_mark: Actual Behavior

# NetSuite Warehouse Management System: Comprehensive Analysis of Features, Integration, Pricing, and Implementation Strategies

**Executive Summary:** NetSuite Warehouse Management System (WMS) represents a comprehensive cloud-based solution for optimizing warehouse operations through integrated inventory management, mobile-enabled processes, and real-time data visibility. Organizations implementing NetSuite WMS typically experience significant improvements in operational efficiency, with documented productivity gains of approximately 20 percent alongside enhanced inventory accuracy and reduced handling costs[1][19]. This system functions as a native module within the broader NetSuite enterprise resource planning ecosystem, eliminating the need for data synchronization between disparate systems and enabling seamless communication with inventory management, order fulfillment, and manufacturing systems. The implementation landscape for NetSuite WMS involves carefully structured pricing models based on licensing tiers, module selection, user counts, and implementation scope, with total investment typically ranging from $25,000 to $150,000 or more depending on organizational complexity and customization requirements.

:counterclockwise_arrows_button: Steps to Reproduce

  1. Call the API with the following request:
  2. Observe the unexpected behavior.

:pushpin: API Request & Response (if applicable)

:globe_showing_europe_africa: Environment

  • API Version: Sonar-deep-research
  • SDK (if applicable): [e.g., Python SDK v0.5]
  • Operating System: [e.g., MacOS, Linux, Windows]

:paperclip: Logs or Screenshots (if applicable)

Add any logs or screenshots that can help debug the issue.

:memo: Additional Context

Can we connect, We have used more than 296K token on perplexity on the API.

Hey Aman — thanks for reporting this and sharing the context!

A couple of notes to help us troubleshoot and guide you toward a more reliable setup:

1. Missing request details
We’ll need the full API request body (prompt, parameters, and sample responses) to reproduce this issue accurately. Without that, it’s hard to confirm whether the inconsistency is from the model itself or a prompt-level factor.

2. Markdown is inherently free-form
Since Deep Research is a multi-step, generative model that performs searches and reasoning before writing, Markdown formatting can naturally vary between runs. This is expected behavior when you rely on free-form generation. If you want a 100 % success rate with a custom Markdown layout, use Deep Research as your retrieval and reasoning layer, then pass its results to another model for deterministic formatting. That way, you separate research from presentation.

3. Use Structured Outputs for consistency
If you need a strict, machine-readable format, Perplexity now supports Structured Outputs via JSON Schema. This lets you define an exact schema (e.g. article title, date, findings, sources, reliability) and ensures the model adheres to it every time.
You can find the guide here: Structured Outputs Guide - Perplexity

What you could do is define a schema and then once the output is completed you can pass that JSON into markdown format.

Hope this helps!