Citing Sources
When interacting with agents, it's important to let end users know where information was sourced when answering a question or performing an action. In BotDojo, we provide several options for doing this.
When using BotDojo's chat UI, we render markdown-based footnotes using the following format: Markdown Footnote Format
Example
The current weather in Austin, TX is 79°F and cloudy, with a RealFeel® of 89° and described as very warm[^1].
[^1]: [Current Weather Austin, TX](https://www.accuweather.com/en/us/austin/78701/current-weather/351193)
This will render in chat like this:
If you prompt an agent to output this format , it should all work. However, when searching 40-80 websites and documents, LLMs often mess up links. So we provide some workarounds for doing this.
Creating Citations
BotDojo provides a structured way to reference and attribute information sources within your AI applications. Each source - whether it's a webpage, document, or other content - is automatically assigned a unique citation ID when processed through BotDojo's search and indexing tools. This system allows language models to easily reference sources by simply including the citation ID in their responses, making it simple to maintain proper attribution and get dependable links to sources.
The following tools will create citations by default when returning results:
Any results returned from these tools will create a citation id for each source. The citation id is a number and can be referenced in an agent output as [^{citation id}].
When an agent is finished, the Agent Node can create the appropriate markdown footer with the correct links. Make sure you have Add citation references to LLM output turned on to enable this.
Many LLMs will cite items automatically, but we recommend you add something like the following to your system prompt to nudge the model to correctly cite sources:
For each search, if citations are provided in the search results, cite your sources by adding references in the form [^citation_id], for example [^3]. Only reference the documents from the search results; If you don't have a citationId then don't add a citation.
Showing All Sources
In addition to citing sources inline, there is an option in Chat Settings called Show Sources that will list icons for all the citations created. When clicked, this will open a panel with all the links.