searchKnowledgeSources query.
There are 2 kinds of knowledge sources in Plain:
- Help Center articles published in Plain’s Help Center
- Indexed documents you have added as knowledge sources, such as your docs site or your marketing website.
knowledgeSource:read permission to be able to do this.
Example query
__typename. See union types.
The page size (pageSize) defaults to 10 and accepts 1–50. searchQuery is 1–1000 characters.
Keep the article title or document URL if you want the agent to cite its sources.
Options
Include “
INDEXED_DOCUMENT” if you want to include external knowledge sources added to Plain.Include “HELP_CENTER_ARTICLE” if you want to include Plain-hosted Help Center articles.A list of label type IDs. When provided, knowledge sources will be filtered to only include knowledge sources with these labels.
labelTypeIds without types searches indexed documents only. Labels don’t apply to Help Center articles.Report questions your knowledge doesn’t answer
When your agent searches and still can’t answer, hand the thread to your team and record a knowledge gap signal withcreateKnowledgeGapSignal. Send the thread ID, the queries your agent searched for, and the IDs of the articles and documents searchKnowledgeSources returned.
Plain checks whether the signal is a real gap, groups it with similar questions into a knowledge gap, and raises a task once the gap has 2 signals. Your agent’s gaps appear in the same list as the Customer Agent’s.
