TECHNOLOGY

Exa query, objective, and systemPrompt guide different stages

In this article
THE QUICK TAKE

The query identifies what to retrieve, objective explains the larger task, and synthesis instructions govern how the acquired evidence becomes output.

Separate the search turn from the whole task

An agent comparing database backup methods may issue a search about restoration constraints. Its current query should describe that immediate information need. The broader task still matters: the application needs material suitable for an operational comparison, not a general introduction. Keep those levels separate so the search request remains interpretable.

Put the broader purpose in objective

Exa’s best-practices guide defines objective as the task a search serves. It can explain the preferred document type and specific facts needed from results. A manual tool wrapper should preserve that field explicitly rather than pasting the entire agent transcript into query, where unrelated instructions can obscure the immediate retrieval target.

Keep query focused on candidates

The Search reference defines the query and broader objective separately. For the backup example, the query can locate restoration documentation while objective explains the comparison’s operational purpose. Store both values in the run record. This allows a reviewer to determine whether the wrong sources followed from a poor query or from a misunderstood larger goal.

Guide synthesis with its own controls

The quickstart distinguishes systemPrompt instructions from outputSchema shape. Use those when requesting generated output, validating eligibility for the selected search mode. An instruction to emphasize recovery prerequisites is different from a schema requiring a prerequisites field; neither alone establishes that retrieval found supporting evidence for that field.

For a structured comparison, keep unknown prerequisites explicit. A polished response format cannot compensate for an absent source, and a detailed objective does not turn every preferred source into a hard allowlist. Apply documented request filters when candidate eligibility truly requires them.

Diagnose one layer at a time

Freeze the candidate requirement while testing a revised objective, then separately test a revised output instruction. Inspect both retrieved pages and generated fields. If the same evidence yields a clearer explanation, the improvement concerns synthesis. If different authoritative pages are found, the retrieval change deserves its own analysis.

The local guides to task contracts and progressive reading help structure that separation. Keep small reviewed examples that fail at different layers. The resulting integration can explain which input needs correction without treating every unsuccessful answer as a reason to increase search depth or replace the model.

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