Tutorial for those wanting to add citations to sources from KB replies.
Note this is only for successful KB replies, citing from "Web Search"/"Web Site" KB sources.
Knowledge agent spits out 2 outputs..
{{turn.KnowledgeAgent.answer}}
{{turn.KnowledgeAgent.citations}}
You can feed {{turn.KnowledgeAgent.citations}} into "AI Generate Text" to generate a list of citations for you after after you queried the KB. It will then tell the user where it got its sources from.
In the prompt:
Under tasks, specifically use these words,
> Rewrite above sources into a numbered list of hyperlinks in markdown
Under Sample output, specifically use these words,
> '''
> Here is more info:
> 1. [title based on hyperlink](hyperlink)
> '''
This format [title based on hyperlink](hyperlink) is called Markdown link formatting.
Markdown is a lightweight markup language with plain-text formatting syntax.
In this format:
[.........] represents the link text, the visible and clickable part of the link.
(.........) is the URL or web address that the text links to.
Since chatgpt knows many things including how to code, it automatically knows how to handle these formats..