TECHNOLOGY

Exa Search streaming needs outputSchema and a synthesis-aware consumer

In this article
THE QUICK TAKE

Streaming is a synthesis response path; partial text is a preview until the documented final event supplies the completed artifact.

Identify which artifact streams

A comparison interface may want to display an explanation while research synthesis progresses. That is different from receiving ordinary ranked search results as one JSON response. Decide whether the interface needs generated output before enabling streaming, rather than treating the flag as a universal way to make every search response arrive incrementally.

Validate the synthesis request

The Search reference says stream is used with outputSchema; otherwise Search returns its normal JSON response. The quickstart documents synthesis eligibility and separates ranked results from output.content and output.grounding. Validate those request choices before opening a stream consumer, including unsupported search-mode combinations.

Consume the documented event lifecycle

Deep Search documentation instructs consumers to read typed events until done. It says the final event includes completed output and search time, with costs when available. Keep the parser aligned with those event types and preserve unknown observations for diagnosis instead of assuming every incoming data fragment is answer text.

Separate preview from committed output

Render partial prose as a preview, then reconcile the saved artifact from the completed result. A browser disconnect after several visible paragraphs does not establish completed synthesis. Keep an interrupted state if no documented completion was observed. Do not store the partial text as the final explanation merely because it looks grammatically finished.

For structured output, avoid treating an incomplete JSON prefix as a valid business object. Keep partially rendered progress separate from the object accepted by the application’s schema validator. Only then attach the final field-level grounding used by the review interface or export step.

Measure caller completion honestly

Record first visible progress separately from time to a usable completed artifact. The former describes responsiveness; the latter matters when another process needs validated data. A streaming interface can improve perceived speed without shortening all required work, so report both measurements under the same reviewed task configuration.

The existing guides to terminal SSE handling and response contracts help validate that boundary. Use stored cases with a complete stream, an interrupted prefix, and an unexpected event. The consumer should preserve the evidence and execution state without inventing completion or conflating a preview with the final grounded result.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles