Skip to main content
Use Semantic Search when you want the assistant to retrieve information from previously ingested artifacts (documents, notes, PDFs, HTML, and more).

Prerequisites

Requirements

  • Tool spec: { "name": "semantic_search", "type": "semantic_search_v1" }
  • tool_context: at least one ingested_artifact with a context_filter

Basic request and response

This example validates a request that enables semantic search over a collection:
Example response:
To run the request, send the same body to POST /messages.

Response blocks

Zylon runs this tool on the server. The response contains a server_tool_use block with the call, followed by a server_tool_result block with the result. The call ID starts with srvtoolu_. Don’t send a tool_result back for it.
source blocks are Zylon-specific. They are returned only when the Zylon extension is enabled. Error:
is_error is true when the tool fails, and content holds the error message. See Migrating from 1.57 to 1.58 for the full list of server tool blocks.

Tips

  • Keep tool_context narrow (use a single collection and the smallest set of artifacts you need).
  • If you’re not getting relevant results, ingest cleaner source text (or split large documents into smaller artifacts).

Next steps

  • Ingest and manage artifacts: Artifacts
  • Learn how messages return tool blocks: Messages