How it Works
When you add the semantic search tool and the specified context to your API request, Zylon follows these steps:- Determines queries: Zylon analyzes your question and determines what specific query or queries it should perform to search through the selected documents.
- Performs semantic searches: Executes searches using the tool against the ingested knowledge base.
- Analyzes and responds: Analyzes all obtained responses and returns a coherent answer with optional citations from found sources.
Important Notes
- To use this tool, you must specify the type
semantic_search_v1
. - The
tool_context
must contain at least one artifact of typeingested_artifact
. - Artifacts must have been previously ingested into the system.
Example Usage
In this practical example, we upload an Apple financial document and then perform semantic queries on its content.1
Upload the Document
First, we ingest the document we want to query into our system. In this case, we use Apple’s Q2 FY25 financial report.
2
Perform Semantic Search
Once the document is processed, we perform the query by specifying messages, tools, context, and tool choice in the request body.
3
Response
The system responds with the searches performed, the results found and the final answer: