Support citations

Display in-line citations in chat using responses from your knowledge base

What are citations of a Knowledge base?

Citations are references that point to the original source of information when your conversational AI delivers a response from a knowledge base. Citations show where the information comes from, allowing users to verify an answer's accuracy and explore its sources.

In the AI's response, citations will appear inline with number indicators [1] and an accompanying sources section to correlate with each numbered citation:

Source citations using NLX's Touchpoint framework

Create citation modality

To appropriately render citations in your AI's response using Touchpoint, first create a citation modality:

  • Select Resources > Modalities in your workspace menu

  • Select New modality > Provide a name (e.g., KBCitation)

  • Select Auto-generate

  • Paste sample JSON schema provided below

  • Click Set schema

  • Click Save

Citation modality schema:

[
  {
    "content": "",
    "fileName": "",
    "pageNumber": 1,
    "score": 1
  }
]

Citation setup in flow

Once your modality is created, you'll set up your Knowledge base with citation support in a flow:

  • Select Flows in your workspace menu > Choose or create a flow

  • Add a Knowledge base node to the Canvas > Assign the knowledge base created in your workspace to the node

  • Enter {System.utterance} in the node's Question field

  • Expand the node's Settings section > Enable Include citation

  • From the Match edge of the Knowledge base node, add and link a User choice node

  • On the User choice node, add {Response.answer) as a message > Assign a custom Yes/No slot to the node

  • Select Add functionality on the User choice node > Choose Modalities

  • Select the modality you created in the previous step (e.g., KBCitation) > Toggle ON Enable

  • Set the modality's payload value to {Response.sources}

  • Click Save

Note that while using the Test widget in your workspace, the citation modality will not render for test chats. Instead, deploy a build of your application to launch the Touchpoint configurator and experience it live.

Last updated