|
| 1 | +# Feedback Analyzer |
| 2 | + |
| 3 | +This project attempts to provide a mechanism to collect the reactions (thumbs up/down and comments) from users interacting with Copilot Studio agents as noted [**here**](https://learn.microsoft.com/en-us/microsoft-copilot-studio/analytics-improve-agent-effectiveness#reactions). Currently, the feedback is surfaced through the agent's 'analytics' tab in Copilot Studio. Makers can see feedback provided but some limitations currently exist: |
| 4 | + |
| 5 | +- Cannot see the answer and original user query that generated the feedback |
| 6 | +- Cannot see who provided the feedback |
| 7 | +- Cannot export the feedback |
| 8 | +- Cannot work with the feedback to process. |
| 9 | + |
| 10 | +## Known Issue |
| 11 | +Currently M365 copilot channel does not capture feedback the same way as other channels. This project includes an alternative to capture feedback from M365 copilot channel. |
| 12 | + |
| 13 | +## Solution |
| 14 | +What the solution does: |
| 15 | + |
| 16 | +- Automation that processes the feedback and stores it into a Dataverse table |
| 17 | +- A Model driven application to view and interact with the feedback |
| 18 | +- Extend the functionality to collect the user who submitted the feedback |
| 19 | +- Provide a mechanism to capture feedback from M365 Copilot channel. |
| 20 | + |
| 21 | + |
| 22 | +## Installation |
| 23 | +Base install (without additional configuration) can be installed in any environment (development, test/uat, production). For additional configuration that leverages component collections, it is reccomended to only use them in uat/test/production as to avoid adding additional dependencies in development environments. |
| 24 | + |
| 25 | +1. Install the solution from the provided .zip file. |
| 26 | +2. Configure the dataverse connection reference. |
| 27 | +3. Configure environment variables |
| 28 | +```json |
| 29 | + { |
| 30 | + "captureUserActivity": false, |
| 31 | + "globalVariableIdentifierName":"GlobalUserName", |
| 32 | + "m365Copilot_showCardAfterEveryResponse":false, |
| 33 | + "extendsOnGeneratedResponse":false |
| 34 | + } |
| 35 | +``` |
| 36 | + |
| 37 | +## Configuration |
| 38 | +With just the base installation the following functionality is achieved: |
| 39 | +- OOB Feedback captured from all channels except M365 Copilot channel |
| 40 | +- Agent response and user query related to feedback captured |
| 41 | +- Model Driven app to view and interact with feedback |
| 42 | + |
| 43 | +## Optional Configuration - User Identity Capture |
| 44 | +By default, user identity is not captured on a conversation transcript. If you want to extend the functionality to capture user identity, this project includes a helper topic to capture this. This topic is included in a component collection. |
| 45 | + |
| 46 | +1. Navigate to the agent that you want to enable user identity capture for. |
| 47 | +2. Navigate to Settings -> Component collections -> Available -> Select 'Feedback_Core' -> Add to the agent's component collection. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +Now by default, on every conversation, the user identity will be captured on the transcript and be available in new feedback records captured going forward. |
| 56 | + |
| 57 | +Note: Make sure you have set the environment variable property 'captureUserActivity' to true and the topic is enabled. |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +## Optional Configuration - M365 Copilot Channel Feedback |
| 62 | +Currently M365 copilot does not collect the same way as other channels. This project leverages adaptive cards to capture feedback from the M365 copilot channel. There are two options to this configuration: |
| 63 | + 1. Show the feedback card ad-hoc when a user chooses to: i.e. "provide feedback" |
| 64 | + 2. Show the feedback card after every response from the agent |
| 65 | + |
| 66 | +First, add the included provided component collection 'Feedback_M365_Extenstion' to the agent you want to enable M365 copilot feedback capture for. This will also include several helper topics that user to provide the functionality to the agent. |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | +Note: Make sure you have set the environment variable property 'm365Copilot_showCardAfterEveryResponse' to true or false (true: shows the card after every response, false: shows the card on demand) depending on the behavior you want as well as enabling/disabling the appropriate topics. |
| 71 | + |
| 72 | +- Option 1: Show feedback card ad-hoc |
| 73 | + 1. In the agent's topics, make sure that the topic 'FeedbackHelper-M365-ShowCard-AdHoc' is enabled AND that the topic 'FeedbackHelper-M365-ShowCard-AfterEveryResponse' is disabled. |
| 74 | + 2. In your environment variable configuration, make sure you have have m365Copilot_showCardAfterEveryResponse set to false. |
| 75 | +  |
| 76 | +- Option 2: Show feedback card after every response (experimental) |
| 77 | + This option attempts to show the feedback card after every response from the agent. |
| 78 | + 1. If you are extending the agent's responses with custom content (i.e. have topics with extendsOnGeneratedResponse ), make sure you set the property in the environment variable configuration 'extendsOnGeneratedResponse' to true. |
| 79 | +  |
| 80 | + |
| 81 | +## Feedback Processing |
| 82 | +Feedback processing is done through Power Automate, parsing the feedback collected in the conversation transcripts. There are two main flows: |
| 83 | + |
| 84 | +1. Push All Feedback: This flow is intended to be run only once in case there has been already feedback collected prior installing the solution. It will parse all existing feedback and push it to the feedback table. |
| 85 | +2. Process New Incoming Feedback: This flow is intended to process feedback as it comes in during conversations. |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | +## Feedback Consumption |
| 90 | +The processing extracts the feedback and stores it in a dataverse table ('MCS Feedback'). For easy consumption, there is a model driven app included to quickly view and interact with the feedback (MS Feedback Review App). |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +You can quickly view the feedback submitted at high level (channel, rating, comments, time). You can open each record to see more details about the specific feedback including (feedback response & comments, Agent response and original user query). |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +With the model driven app, you can create views, charts, dashboards, export the data as needed to further analyze the feedback collected according to your needs. |
| 99 | + |
| 100 | +## Transcript Viewer (Experimental) |
| 101 | +As a fun exercise, there is a custom page included that allows to view the transcript in a 'chat' like view. There are can be some rendering flaws (hopefully fully fixed in later versions). It attempts to provide more context about how a feedback came to be submitted by being able to analyze the full conversation. |
| 102 | + |
| 103 | + |
| 104 | + |
0 commit comments