- Increased search accuracy. Source Tags direct the search engine to specific Knowledge Sources, ensuring that only the most relevant results are included, which is useful with a large number of Knowledge Sources.
- Flexible tag filtering. Using
AND
andOR
operators for Source Tags refine searches and improve results. - Faster search performance. Limiting the queried Knowledge Sources speeds up Knowledge Queries.
- Enhanced content organization. Categorizing Knowledge Sources improves information management and retrieval.
Prerequisites
- You have created a Knowledge Store.
- You have created a Knowledge Source.
Limitations
- You can add up to 10 Source Tags per Knowledge Source.
- You can add up to 5 Source Tags per Search Extract Output Node.
Naming Guidelines
- Include only lowercase and alpha-numerical (a-z, 0-9) characters, underscores, and hyphens.
- You can include CognigyScript in Source Tag names. In this case, make sure the CognigyScript input is lowercase with the
.toLowerCase()
method, for example,{{input.text.toLowerCase()}}
. Using CognigyScript as a Source Tag name allows your AI Agent to filter Knowledge Sources dynamically according to the user input.
Working with Source Tags
To configure Source Tags, you need to first add them to a Knowledge Source in Build > Knowledge or directly to the CTXT file. Then, you need to add the Source Tag to the Search Extract Output Node in the Flow editor. You can test the knowledge query results in the Interaction Panel.Examples
To reproduce the results presented later in this section, follow these steps:- Create a new Knowledge Store.
-
Upload the following files as Knowledge Sources:
- CTXT โ the Source Tags are already in the CTXT file.
- DOCX โ add the following Source Tags:
endpoint
,webchat
, andtext-based
. - PDF โ add the following Source Tags:
endpoint
,voice
, andvoice-gateway
.
Knowledge Sources Source Tags in CTXT endpoint, voice, copilot DOCX endpoint, voice, voice-gateway PDF endpoint, webchat, text-based -
Navigate to the Flow and add the Search Extract Output Node. Test the following examples to retrieve information based on the Source Tags you add to the Search Extract Output Node. To track how the output changes with different Source Tag combinations, use the input
Could you share a list of native endpoints for Cognigy?
for each Knowledge Source in the Interaction Panel. To check the output results in the Interaction Panel, use theinput.knowledgeSearch.topK
Input object in INFO > Input.
Example 1
Source Tags in the Search Extract Output Node:endpoint
Operator | Expected Result |
---|---|
AND | All files |
OR | All files |
Both Operators
Both Operators
Example 2
Source Tags in the Search Extract Output Node:endpoint
, voice
Operator | Expected Result |
---|---|
AND | CTXT and PDF |
OR | All files |
<code>AND</code>
<code>AND</code>
OR
OR
Example 3
Source Tags in the Search Extract Output Node:voice
, text-base
Operator | Expected Result |
---|---|
AND | No Knowledge Chunks found |
OR | All Knowledge Chunks |
AND
AND
OR
OR