Criando um Copilot com Fluxo de Conversa Personalizado
(custom-copilot-conversation-flow)
Este repositório tem como objetivo guiar você, passo a passo, na criação de um agente inteligente (Copilot) com fluxo de conversa personalizado usando o Microsoft Copilot Studio.
Através de exemplos visuais, dicas práticas e explicações diretas, você aprenderá a configurar tópicos, utilizar IA generativa, conectar bases de conhecimento e personalizar comportamentos do agente para criar experiências conversacionais poderosas e úteis.
This repository aims to guide you, step by step, in creating an intelligent agent (Copilot) with a custom conversation flow using Microsoft Copilot Studio.
Through visual examples, practical tips, and straightforward explanations, you will learn how to configure topics, use generative AI, connect knowledge bases, and customize agent behaviors to create powerful and useful conversational experiences.
🇧🇷 Detalhes do Projeto (Português)
A criação de um agente no Microsoft Copilot Studio é simples e intuitiva. Siga os passos abaixo para iniciar seu primeiro Copilot com fluxo de conversa personalizado:
-
Abra o Microsoft Copilot Studio e clique em "Criar" na barra lateral esquerda.
-
Na tela que será exibida, clique em "Novo agente".
-
Uma interface de chat será aberta. Clique em "Ignorar para configurar" no canto superior direito.
-
Agora, você terá acesso à tela de configuração do agente.
-
Preencha as informações básicas do seu agente:
- Nome e Descrição: defina um nome representativo e explique de forma clara o objetivo do agente.
- Instruções: aqui entra a engenharia de prompt. Defina como o agente deve se comportar, seu papel, tom de voz, nível de formalidade, temperatura da IA, e estilo de resposta.
- Prompts Iniciais: configure possíveis interações iniciais com o usuário.
- Fontes de Conhecimento: conecte documentos ou URLs que serão usados como base de resposta.
-
Clique em "Criar" no canto superior direito para finalizar. Seu agente será criado com uma estrutura inicial em branco.
Após criar o agente, é hora de configurar os tópicos, que definem os caminhos de conversa possíveis:
-
Acesse a aba "Tópicos" no menu superior.
-
Clique em "Adicionar tópico".
-
Escolha se deseja:
- Criar um tópico em branco
- Descrever o comportamento e gerar um tópico com ajuda do Copilot
-
Clique em "Editar" no tópico criado e adicione as frases de gatilho (expressões que o usuário pode usar para ativar o tópico).
-
Clique no ícone "+" para adicionar uma ação de resposta. Recomendamos usar a opção Avançado → Respostas Generativas.
-
No campo Valor de Entrada, selecione a variável
activity.text
para que a IA gere uma resposta com base no que o usuário digitar. -
Se desejar, conecte fontes de dados externas (como arquivos, sites ou plugins).
-
Crie quantos nós forem necessários para construir o fluxo da conversa. Salve, reinicie o chat e teste suas interações com frequência.
Quando o agente não consegue corresponder a um tópico, há duas formas principais de lidar com isso: Conversational Boosting e Fallback.
-
Vá até Tópicos → Sistema e selecione "Melhora da Conversa".
-
Ative o recurso para permitir que a IA tente responder com base em conteúdo externo ou no próprio conhecimento base, mesmo sem um gatilho específico.
-
Personalize a resposta e teste diferentes níveis de controle de IA generativa.
- Ainda em Sistema, clique em "Fallback".
- Configure uma mensagem padrão que será exibida quando nenhuma resposta ou tópico for acionado.
Recurso | Quando acontece | Fonte da resposta | Objetivo |
---|---|---|---|
Conversational Boosting | Quando não há correspondência exata com um tópico | Bases conectadas (sites, docs, Copilot) | Tentar manter a conversa com IA generativa |
Fallback | Quando não há resposta de forma alguma | Mensagem padrão | Encerrar ou redirecionar a conversa |
No Microsoft Copilot Studio, é possível controlar a qualidade, profundidade e criatividade das respostas geradas pelos agentes através de recursos de IA Generativa (GenAI). Isso permite equilibrar entre respostas mais factuais e objetivas, ou respostas mais completas e criativas, conforme o propósito do agente e o tipo de interação desejada com o usuário.
Durante a configuração de tópicos ou ao conectar fontes externas (como documentos, URLs e plugins), é possível definir o nível de controle da IA generativa. Alguns dos ajustes comuns incluem:
-
Temperatura da Resposta:
Define o quão criativa ou precisa a resposta será.- Baixa temperatura → Respostas mais objetivas e diretas
- Alta temperatura → Respostas mais variadas, criativas e abertas
-
Limite de Tokens ou Comprimento da Resposta:
Controla o tamanho máximo da resposta. Útil para manter a interação mais fluida em interfaces curtas, como chat em dispositivos móveis. -
Relevância do Conteúdo Base:
Ao usar Conversational Boosting com conteúdo externo (documentos ou sites), é possível ajustar a prioridade dada a esse conteúdo frente ao conhecimento geral da IA.
Use respostas mais elaboradas e criativas quando:
- O agente atua como assistente explicativo ou educacional
- A intenção é engajar o usuário com sugestões ou explicações mais ricas
- O conteúdo de suporte vem de fontes robustas e confiáveis (como documentação interna ou artigos técnicos)
Use respostas mais simples e diretas quando:
- O objetivo é automatizar tarefas rápidas ou respostas operacionais
- O agente atua em contextos sensíveis, como atendimento ao cliente ou jurídico
- É necessário evitar ambiguidades e garantir conformidade com políticas da empresa
A chave está em ajustar o comportamento do agente de acordo com o perfil do público e o propósito do chatbot. Agentes voltados para suporte técnico, por exemplo, devem priorizar precisão e clareza. Já assistentes internos para brainstorming ou ideação podem se beneficiar de uma abordagem mais criativa e aberta.
🇺🇸 Project Details (English)
Creating an agent in Microsoft Copilot Studio is simple and intuitive. Follow the steps below to start your first Copilot with a custom conversation flow:
-
Open Microsoft Copilot Studio and click "Create" in the left sidebar.
-
On the displayed screen, click "New Agent".
-
A chat interface will open. Click "Skip to Configure" in the top-right corner.
-
You will now have access to the agent configuration screen.
-
Fill in the basic information for your agent:
- Name and Description: Define a representative name and clearly explain the agent's purpose.
- Instructions: This is where prompt engineering comes in. Define how the agent should behave, its role, tone of voice, level of formality, AI temperature, and response style.
- Initial Prompts: Configure possible initial interactions with the user.
- Knowledge Sources: Connect documents or URLs that will be used as the response base.
-
Click "Create" in the top-right corner to finalize. Your agent will be created with a blank initial structure.
After creating the agent, it's time to configure the topics, which define the possible conversation paths:
-
Access the "Topics" tab in the top menu.
-
Click "Add Topic".
-
Choose whether to:
- Create a blank topic
- Describe the behavior and generate a topic with Copilot's help
-
Click "Edit" on the created topic and add trigger phrases (expressions the user can use to activate the topic).
-
Click the "+" icon to add a response action. We recommend using the Advanced → Generative Responses option.
-
In the Input Value field, select the variable
activity.text
so the AI generates a response based on what the user types. -
If desired, connect external data sources (such as files, websites, or plugins).
-
Create as many nodes as necessary to build the conversation flow. Save, restart the chat, and test your interactions frequently.
When the agent cannot match a topic, there are two main ways to handle it: Conversational Boosting and Fallback.
-
Go to Topics → System and select "Conversation Boosting".
-
Enable the feature to allow the AI to try responding based on external content or its own knowledge base, even without a specific trigger.
-
Customize the response and test different levels of generative AI control.
- Still in System, click "Fallback".
- Configure a default message that will be displayed when no response or topic is triggered.
Feature | When It Happens | Response Source | Purpose |
---|---|---|---|
Conversational Boosting | When there's no exact match with a topic | Connected bases (sites, docs, Copilot) | Attempt to maintain the conversation with generative AI |
Fallback | When there's no response at all | Default message | End or redirect the conversation |
In Microsoft Copilot Studio, you can control the quality, depth, and creativity of the responses generated by agents through Generative AI (GenAI) features. This allows you to balance between more factual and objective responses or more complete and creative ones, depending on the agent's purpose and the type of interaction desired with the user.
While configuring topics or connecting external sources (such as documents, URLs, and plugins), you can define the level of generative AI control. Some common adjustments include:
-
Response Temperature:
Defines how creative or precise the response will be.- Low temperature → More objective and direct responses
- High temperature → More varied, creative, and open responses
-
Token Limit or Response Length:
Controls the maximum size of the response. Useful for keeping interactions more fluid in short interfaces, such as mobile chat. -
Relevance of Base Content:
When using Conversational Boosting with external content (documents or websites), you can adjust the priority given to this content compared to the AI's general knowledge.
Use more elaborate and creative responses when:
- The agent acts as an explanatory or educational assistant
- The goal is to engage the user with richer suggestions or explanations
- The support content comes from robust and reliable sources (such as internal documentation or technical articles)
Use simpler and more direct responses when:
- The goal is to automate quick tasks or operational responses
- The agent operates in sensitive contexts, such as customer service or legal
- It's necessary to avoid ambiguities and ensure compliance with company policies
The key is to adjust the agent's behavior according to the audience profile and chatbot purpose. Agents focused on technical support, for example, should prioritize precision and clarity. Internal assistants for brainstorming or ideation, on the other hand, may benefit from a more creative and open approach.
This software is licensed under the terms of the MIT License.
Developed by Vitor Bittencourt ☕