Skip to content

Commit c1412a0

Browse files
authored
Update README.md
1 parent 38d99e0 commit c1412a0

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

copilot-studio/citations-topic/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Citations (Topic)
22

3-
This is a snippet that demonstrates how you can generate better looking citations in Copilot Studio.
3+
This snippet demonstrates how you can generate better looking citations in Copilot Studio for [uploaded documents](https://learn.microsoft.com/microsoft-copilot-studio/nlu-documents).
4+
5+
This allows to both display a **title** for the document, but also to point to a **URL** when the citation link is clicked, for example to download or open the document.
6+
7+
> [!IMPORTANT]
8+
> **This assumes that you're responsibe for storing the files in a location where they are accessible to your users, when clicked.**
9+
10+
The sample works both for uploaded files and other knowledge sources (e.g. public website, SharePoint / OneDrive).
11+
12+
With this sample, you have two options, that can be used indepently from each other:
13+
1. Set a URL pointing to a folder where files are expected to be available to your users, when no URLs are available. For this, set the URL for your base folder in `Topic.UploadedFilesRootUrl`.
14+
1. Set a mapping between each document and a URL location for the file. For this, udpdated the `Topic.FilesSources` table. Make sure that each file name is encoded in the same way as returned as citation when an answer is generated (e.g. use %20 instead of spaces, etc.)
415

516
![View of the citations](./assets/citations.png)
617

@@ -16,14 +27,15 @@ Citations (Topic) | [Henry Jammes](https://github.com/HenryJammes) ([@HenryJamme
1627

1728
1. Open a copilot in **Copilot Studio**
1829
1. Select **Topics**
19-
1. Select **+ Create**
20-
1. Select **Topic**
21-
1. Select **Create from blank**
22-
1. Select the **...** in the upper right corner and select **Open code editor**
30+
1. Select **System**
31+
1. Select **Conversational boosting**
32+
1. Select the **... More** in the upper right corner and select **Open code editor**
2333
1. Click inside the code editor and **CTL + A for Windows** or **Command-A** for Mac to select all rows.
2434
1. Paste the contents of the **[YAML-file](./source/citations.yaml)** inside the code editor.
25-
1. Enter a **Name** for your Topic.
26-
1. Select **Save**
35+
1. Select **Close code editor**
36+
1. If you're using a folder to store all of your documents, set the URL for your base folder in the `Topic.UploadedFilesRootUrl` string variable.
37+
1. If you're using a different locations for each file, update the `Topic.FilesSources` table variable accordingly.
38+
1. **Save**
2739

2840
## Disclaimer
2941

0 commit comments

Comments
 (0)