Knight of Knowledge: How Copilot’s Generative Answers Illuminate Data
Tags: copilotstudio, powerplatform
Published: 2024-07-08 06:53:26

## Intro:
Imagine a tool that not only converses with you but also delves into the depths of your own curated knowledge repositories to bring forth answers tailored to your context. This is the promise of Copilot’s new feature, a testament to the evolution of conversational AI that transcends the need for rigid dialog trees and manual scripting. It’s a leap towards a future where AI assists us by understanding our documents as well as we do, if not better.

## Decoding Co-pilotstudio - conceptual flow:
So here is my take on how the flow of information from the initial conversation input through various stages of processing to generate an appropriate response. The system uses the identified intent and topics to determine the best response logic to apply, whether it’s a standard dialogue, a knowledge-based answer, or a custom-tailored response.

- **Conversation (Utterance)**: 
This is where the interaction begins, with the user providing input through speech or text.

- **Triggers**: 
These are events or conditions that initiate the system’s processes.

- **Intent Match (Intend Match)**: 
The system interprets the user’s intent from their utterance. This involves understanding what the user wants to achieve through their input. This could be generic / default system topics or we could orchastrated as interaction where user picks from pre-defined choices 
Topics: The system categorizes the user’s intent into specific topics (for example Topic 1 might be greeting, topic 2 might be a rule based option to narrow the response for the conversation ). Each topic corresponds to a different subject area that the system can handle.

- **Response Logic**: This includes different methods for generating responses:
1. **Standard Dialogue**: Pre-configured responses for common interactions.
2. **Ground Knowledge**: Alternative grounding for queries related to the knowledge base.
3. **Custom Connector**: Specialized responses that may involve connecting to external systems or databases.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cwehlvi3x5ctx27xum2n.png)


## Demo:
Let’s take a look at how this great feature allows us to be flexible and active in responding to user questions, making sure that the system’s answers are accurate and relevant to the situation.



Here the Generative Answer plugin searches the knowledge base which is PDF and provides the citation of the response. 

![exampel1](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNjE2anhvMHZuM3dkbjI2OGt5cTI2d2llMWlrcWJra3ZoYzF4ZnhrNiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/tHiZ1rgoS8OJ51xsYj/giphy.gif)

The key is to design the Topic navigation and ground the topic to the right knowledge base.The key is how good we write the prompt for the LLM to generate the user response.   

![example2](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExYXYyMjhoN2hua2VjcWc4eHI3eGN1N3cyZGMxOTdkZThwbDV1bW4xOCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/CdfsWcE7Rgj8Kk60Un/giphy.gif)



## Product Documentation:
[Generative answers
](https://learn.microsoft.com/en-us/microsoft-copilot-studio/nlu-boost-conversations)
[CoPilot Studio](https://learn.microsoft.com/en-us/microsoft-copilot-studio/guidance/)