Search Knowledge
The Search Knowledge node allows you to search for relevant information within a knowledge base and retrieve the most pertinent results. It is particularly useful when you need to find specific information or answers based on a given query.Inputs
flow(required): The input flow containing the data to be processed.query(required): The search query or keywords to look for in the knowledge base.count(optional, default: 3): The maximum number of search results to return.metadata(optional, default: ): Additional metadata or parameters to pass to the search engine.
Outputs
flow: The output flow with the search results appended.knowledge: An array containing the retrieved knowledge items that match the search query.data: An array containing the raw data of the search results.
Configuration
This node does not have any additional configuration options.Usage
- Connect the input
flowto the node from which you want to initiate the search. - Set the
queryinput to specify the search keywords or query you want to use. - Optionally, adjust the
countinput to control the maximum number of search results to retrieve (default is 3). - If needed, provide any additional
metadataor parameters required by the search engine. - Connect the
flowoutput to the next node in your spell to continue processing the data. - Use the
knowledgeoutput to access the retrieved knowledge items that match the search query. - If you need access to the raw data of the search results, use the
dataoutput.
Example
Here’s an example of how to use the Search Knowledge node in a spell:Best Practices
- Be specific and concise with your search queries to get the most relevant results.
- Adjust the
countinput based on your requirements. Retrieving too many results may impact performance. - Utilize the
metadatainput to pass any additional parameters or filters supported by the search engine. - Process and format the retrieved
knowledgeitems as needed before using them in subsequent nodes.
Common Issues
- If the search query is too broad or ambiguous, the retrieved results may not be relevant to your intended use case.
- Ensure that the knowledge base being searched contains the information you expect. If the desired information is not available, the search results may be empty or unsatisfactory.
