Skip to content

Commit

Permalink
Document Copilot LLM context
Browse files Browse the repository at this point in the history
  • Loading branch information
esarafianou committed Feb 17, 2025
1 parent a300ab4 commit 826a3d6
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 6 deletions.
26 changes: 20 additions & 6 deletions source/collaborate/chat-with-copilot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ With Copilot you can perform the following tasks:
Get started
------------

Begin with suggested prompts, or engage in a private thread with Copilot for a tailored experience. If you have follow-up questions or need further insights, simply ask! Copilot is designed to provide deeper understanding based on your inquiries.
Begin with suggested prompts, or engage in a private thread with Copilot for a tailored experience. If you have follow-up questions or need further insights, simply ask! Copilot is designed to provide deeper understanding based on your inquiries.

Copilot remembers the context for follow-up questions and requests. Access all previous AI conversations by selecting **View chat history** from the Copilot panel.

.. tab:: Web/Desktop

Select the **Copilot** icon in the apps sidebar to open the Copilot panel.
Select the **Copilot** icon in the apps sidebar to open the Copilot panel.

.. image:: ../images/copilot-AI-RHS.webp
:alt: Privately chat with Copilot inside Mattermost via the right-hand sidebar.
:scale: 50

If your Mattermost workspace has multiple Copilot bots, switch between them by selecting the bot name in the top right corner of the Copilot panel.

.. image:: ../images/multi-llm-copilot.png
:alt: Switch between multiple bots by selecting the bot name in the top right corner of the Copilot panel.
:scale: 50
Expand Down Expand Up @@ -84,7 +84,7 @@ Summarize threads & unread channel messages
.. include:: ../_static/badges/ent-only.rst
:start-after: :nosearch:

Accelerate decision-making and improve information flows with concise summaries of long discussions delivered to you directly through direct messages.
Accelerate decision-making and improve information flows with concise summaries of long discussions delivered to you directly through direct messages.
Ensure you stay on top of communications across threads, channels, and teams, by using Copilot to summarize new messages, identify next steps, and pinpoint unanswered questions.

.. tab:: Summarize threads
Expand Down Expand Up @@ -112,7 +112,7 @@ Bring Copilot into any conversation
.. include:: ../_static/badges/ent-only.rst
:start-after: :nosearch:

Invoke the power of AI by @mentioning Copilot bots by their username, such as ``@copilot``, in any thread to bring AI's capabilities to your conversation.
Invoke the power of AI by @mentioning Copilot bots by their username, such as ``@copilot``, in any thread to bring AI's capabilities to your conversation.

Copilot can help extract information quickly or transform discussions into charts, resources, documentation, articles, and more. Copilot can find action items and open questions in new messages. With the power of Mattermost integrations and interoperability, the potential to enhance your workflow is limitless.

Expand Down Expand Up @@ -168,4 +168,18 @@ Enable your Operating System's voice dictation or speech recognition tools for h
- Compact statements. Say, "Condense this into a single paragraph."

- Use AI as a tool, not a replacement: Treat the outputs generated by Copilot as initial drafts. Copilot can help you enhance your writing and analysis, not replace your own skills and judgment. Think of Copilot as your very own high-tech assistant that can provide suggestions and help you brainstorm.
- Iterate for quality: Go through multiple rounds of revisions to catch errors, improve clarity, and refine the content to better align with your goals. By continually reviewing and tweaking the outputs, you'll end up with more polished and accurate content, and maximize the value of Copilot by producing professional-grade results.
- Iterate for quality: Go through multiple rounds of revisions to catch errors, improve clarity, and refine the content to better align with your goals. By continually reviewing and tweaking the outputs, you'll end up with more polished and accurate content, and maximize the value of Copilot by producing professional-grade results.


Learn more
----------

Learn more about Copilot:

.. toctree::
:maxdepth: 1
:hidden:

Copilot's Context Management </collaborate/copilot-context-management>

* :doc:`Copilot's Context Management </collaborate/copilot-context-management>` - Learn how Copilot manages LLM context and how to ensure data privacy
73 changes: 73 additions & 0 deletions source/collaborate/copilot-context-management.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Copilot Context Management
=========================


.. include:: ../_static/badges/allplans-cloud-selfhosted.rst
:start-after: :nosearch:


Copilot is designed to handle context efficiently, ensuring that only necessary information is sent to the Large Language Model (LLM) for generating accurate responses. This document outlines how Copilot processes and includes relevant context. The company name, the server name and the time are always passed to the LLM to ensure accurate and contextually relevant responses.


Direct Messages to the Copilot Bot
------------------------------------

When you send a direct message to the Copilot bot, the context sent to the LLM includes:

- The profile information of the user sending the prompt
- Chat messages exchanged between the user and the bot


Additional Context in Direct Messages: When the "Enable Tools" bot configuration option is enabled (default is true), additional context may be sent to the LLM, depending on the prompt. This includes:

- Jira tickets (public tickets)

- Example: Summarize the Jira ticket: <LINK TO TICKET>

- GitHub issues

- Example: Summarize the GitHub issue: <LINK TO ISSUE>

- User data

- Example: What is @Bob's position?


@-Mentions in Channels
------------------------

For @-mentions in channels, the context includes:

**Standalone Messages (@-mentions in a channel)**

- The post containing the @-mention, including any attachments
- The channel name and display name
- The team name and display name
- The profile information of the user sending the prompt

**Threaded Messages (@-mentions in a thread)**

- Everything sent when used in a standalone message
- Messages within the thread, including the usernames of the users involved, as well as any attachments and their filenames

**Differences Between Standalone and Threaded Messages:**

- For @-mentions in standalone messages, the context includes only the mentioned post
- For @-mentions in threads, the entire thread's messages are included, along with usernames of the authors of the messages


Built-in Ways to Trigger Copilot
---------------------------------

In addition to regular chat interactions, Copilot provides specialized features where extra context is sent to the LLM. Each one provides specialized context tailored to the task being performed. Below are the scenarios where extra context is sent to the LLM:

- **Thread Summarization**: Includes thread messages and the usernames of the authors
- **Meeting Summar**: Incorporates transcriptions from calls
- **Channel Summary Since Last Visit Feature**: Uses channel posts along with their authors to create summaries.
- **Finding Action Items & Open Questions Features**: Analyzes thread and channel messages to identify action items or open questions


Ensuring Data Privacy
---------------------

To prevent any sensitive data—including personally identifiable information (PII) and message content—from being transmitted to external services, it is advisable to run the LLM locally. This setup ensures that data privacy is maintained while still leveraging Copilot’s capabilities. Because Copilot relies on sharing specific user details and other PII (such as message content) with the LLM to function effectively, hosting the model on-premises is the only suitable option for customers with strict data privacy requirements.

0 comments on commit 826a3d6

Please sign in to comment.