Skip to content

This repository aims to guide you, step by step, in creating an intelligent agent (Copilot) with a custom conversation flow using Microsoft Copilot Studio

Notifications You must be signed in to change notification settings

vitorVBD/custom-copilot-conversation-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Microsoft Copilot Studio
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)

Criando o Copilot

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:

  1. Abra o Microsoft Copilot Studio e clique em "Criar" na barra lateral esquerda.

  2. Na tela que será exibida, clique em "Novo agente".

  3. Uma interface de chat será aberta. Clique em "Ignorar para configurar" no canto superior direito.

  4. Agora, você terá acesso à tela de configuração do agente.

  5. 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.
  6. Clique em "Criar" no canto superior direito para finalizar. Seu agente será criado com uma estrutura inicial em branco.


Customizando um Tópico

Após criar o agente, é hora de configurar os tópicos, que definem os caminhos de conversa possíveis:

  1. Acesse a aba "Tópicos" no menu superior.

  2. Clique em "Adicionar tópico".

  3. Escolha se deseja:

    • Criar um tópico em branco
    • Descrever o comportamento e gerar um tópico com ajuda do Copilot
  4. 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).

  5. Clique no ícone "+" para adicionar uma ação de resposta. Recomendamos usar a opção Avançado → Respostas Generativas.

  6. 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.

  7. Se desejar, conecte fontes de dados externas (como arquivos, sites ou plugins).

  8. 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.


Personalizando Mensagens de Erro de Tópico

Quando o agente não consegue corresponder a um tópico, há duas formas principais de lidar com isso: Conversational Boosting e Fallback.

Usando o Conversational Boosting

  1. Vá até Tópicos → Sistema e selecione "Melhora da Conversa".

  2. 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.

  3. Personalize a resposta e teste diferentes níveis de controle de IA generativa.

Usando o Fallback

  1. Ainda em Sistema, clique em "Fallback".
  2. Configure uma mensagem padrão que será exibida quando nenhuma resposta ou tópico for acionado.

Diferenças entre Conversational Boosting e Fallback

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

Aumentar e Diminuir a Qualidade da Resposta Com GenAI

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.

🔧 Como ajustar a qualidade da resposta

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.

📈 Quando aumentar a qualidade (mais criativa e completa)

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)

📉 Quando diminuir a qualidade (mais direta e objetiva)

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

⚖️ Equilíbrio ideal

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 the Copilot

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:

  1. Open Microsoft Copilot Studio and click "Create" in the left sidebar.

  2. On the displayed screen, click "New Agent".

  3. A chat interface will open. Click "Skip to Configure" in the top-right corner.

  4. You will now have access to the agent configuration screen.

  5. 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.
  6. Click "Create" in the top-right corner to finalize. Your agent will be created with a blank initial structure.


Customizing a Topic

After creating the agent, it's time to configure the topics, which define the possible conversation paths:

  1. Access the "Topics" tab in the top menu.

  2. Click "Add Topic".

  3. Choose whether to:

    • Create a blank topic
    • Describe the behavior and generate a topic with Copilot's help
  4. Click "Edit" on the created topic and add trigger phrases (expressions the user can use to activate the topic).

  5. Click the "+" icon to add a response action. We recommend using the Advanced → Generative Responses option.

  6. In the Input Value field, select the variable activity.text so the AI generates a response based on what the user types.

  7. If desired, connect external data sources (such as files, websites, or plugins).

  8. Create as many nodes as necessary to build the conversation flow. Save, restart the chat, and test your interactions frequently.


Customizing Topic Error Messages

When the agent cannot match a topic, there are two main ways to handle it: Conversational Boosting and Fallback.

Using Conversational Boosting

  1. Go to Topics → System and select "Conversation Boosting".

  2. Enable the feature to allow the AI to try responding based on external content or its own knowledge base, even without a specific trigger.

  3. Customize the response and test different levels of generative AI control.

Using Fallback

  1. Still in System, click "Fallback".
  2. Configure a default message that will be displayed when no response or topic is triggered.

Differences Between Conversational Boosting and Fallback

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

Adjusting Response Quality with GenAI

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.

🔧 How to Adjust Response Quality

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.

📈 When to Increase Quality (More Creative and Complete)

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)

📉 When to Decrease Quality (More Direct and Objective)

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

⚖️ Ideal Balance

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.


License

This software is licensed under the terms of the MIT License.


Developed by Vitor Bittencourt

About

This repository aims to guide you, step by step, in creating an intelligent agent (Copilot) with a custom conversation flow using Microsoft Copilot Studio

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published