In a recent talk at the Unstructured Data Meetup, we heard from Idan Gazit, a senior research director, and Cole Bemis, a senior research engineer at GitHub Next. They introduced their Copilot Workspace, a new task-oriented development environment built on GitHub Copilot.
This dev environment enhances how we utilize generative AI models, as we can now go beyond simple code suggestions to whole feature implementation. In the following sections, let’s explore this Copilot Workspace and how it can help us build and maintain AI apps.
Watch the replay of the talk on YouTube.
What is GitHub Copilot Workspace?
The GitHub Copilot Workspace is a tool designed to integrate generative AI directly into the coding environment. It allows us to brainstorm, plan, build, test, and run code using natural language conversations and prompts. It is built to help us do tasks such as fixing bugs, implementing features, etc.
The GitHub Copilot workspace is powered by a generative model, which can present some challenges when interacting with it, just as you do with generative models. One common challenge is getting the model to deliver a response, in this case, a suggestion, without completely going off the rails.
The GitHub Next team solved this challenge by implementing steering points between the given task and the suggested code. They allow developers to guide the model by telling it when it misunderstands our requests or misses some edge cases. Let us take a look at the flow that Copilot Workspace follows.
Task to Spec to Plan to Code
The Copilot Workspace starts with task creation and flows into specification, planning, and coding.
Fig 1- Task to Spec to Plan to Code Workflow
Here’s a breakdown of each step:
Task Creation: The workflow starts with a task, which could be a GitHub issue, pull request, or a general feature request or idea. This is the initial prompt or your goal.
Specification: Copilot Workspace generates a high-level specification or outline of what needs to be achieved from the task. It leverages its understanding of the codebase, issue comments, and other contexts to suggest a specification.
Planning: Copilot Workspace then transforms the specification into a detailed plan. This plan outlines the step-by-step process required to implement the solution, including any necessary code changes, tests, and other actions. The plan is then presented to you for validation.
Coding: Once you are satisfied with the plan, Copilot Workspace generates the actual code to implement the solution. It uses the plan as a guide, leveraging its understanding of the codebase and programming languages to write the necessary code.
Without these points of steering, it's just like closing your eyes and hoping you hit the target. Each step in the workflow is editable and allows you to collect or improve the content.
A Practical Demo Showcasing How Copilot Workspace Works
Let’s look at a practical example to better understand the Copilot Workspace workflow. Since Copilot is in the technical review stage and unavailable to everyone, we will use screenshots presented at its official release.
Let’s start with a GitHub issue. This is the task we want Copilot Workspace to work on with us. In this case, we want to add an AI Player to our game so that it does not always require two people. The AI player should successfully block the human player 95% of the time, making the game challenging yet playable. Once you click on Open in Workspace, the workflow will be triggered.
Fig 2- GitHub AI player option issue
Once triggered, Copilot Workspace takes the issue as the task and generates the specifications or an outline. It looks at the current code base and validates that there is no AI player. It then proposes the modifications that would allow the future state of the game to have an AI player. You can click on the proposal and edit it to meet your expectations.
Fig 3- Copilot Workspace workflow specification step
Once you are satisfied with the outline, Copilot Workspace generates the plan to implement it. The plan is to change the index.jsx
and style.css
files to incorporate the new AI player feature. Copilot Workspace lists all the changes it will make in each file to implement the specifications. You can edit the plan at this stage or add an item.
Fig 4- Copilot Workspace workflow planning step
After you have reviewed the plan and are satisfied, implementing the planned solution is the next step. This involves writing the suggested code to the suggested files. The Copilot workspace displays the changed files. You can edit and modify the code right at the display.
Fig 5- Copilot Workspace workflow implementation step
Once you are happy with the code, you can open a live preview to see how the game looks. Within the Copilot Workspace environment, a built-in terminal enables you to validate and test your code without switching to a separate terminal or environment. If you are satisfied with the new feature, in this case, the AI player, the next step is to open a pull request.
Fig 6- Copilot Workspace workflow Create pull request step
This step enables you or your team to review the changes made one final time before merging the code. This approach shows us that Copilot Workspace does not replace developers but helps complement them as validation is needed throughout the process.
Streamlining RAG Building with GitHub Copilot Workplace and Milvus
GitHub Copilot Workspace enhances productivity by allowing for task-to-code development workflow using generative AI. This Copilot Workspace makes building complicated applications much easier and more efficient.
A great example is Retrieval-Augmented Generation (RAG). It is an advanced technique designed to address large language model (LLM) hallucinations by providing those models with external knowledge. RAG comprises two key components: a Retriever built with vector databases like Milvus or Zilliz Cloud (the managed Milvus) and embedding models, and an LLM.
Building RAG applications is complicated. However, with Copilot Workspace, such tasks are so much more streamlined.
Let’s look at a RAG task—making a monolingual app multilingual—and see how this workplace can help.
You have RAG code on an app that is currently monolingual and powered by the Milvus vector database. You want the app to support multiple languages using Milvus multilingual-supported embedding model, such as BGE-M3. You can instruct Copilot Workspace to implement this feature.
Implementation with Copilot Workspace
Here's how you can utilize Copilot Workspace to implement this feature:
Task Creation: You start by creating a GitHub issue to make the app multilingual. The task is integrating the (BGE-M3) multilingual model into the existing RAG system.
Specification: Copilot Workspace analyzes the task and generates a high-level specification. It identifies the need to update the data processing pipeline to handle multiple languages and modify the RAG system to utilize BGE-M3 for multilingual support.
Planning: The Workspace then generates a detailed plan. This includes steps such as:
Updating the data ingestion process to include multilingual data.
Modifying the existing Milvus setup to support BGE-M3.
Adjusting the RAG system to leverage the multilingual capabilities of BGE-M3.
Testing the system to ensure it works across multiple languages.
- Coding: Based on the validated plan, Copilot Workspace generates the necessary code:
It updates the data ingestion scripts to preprocess and index multilingual data into Milvus.
It configures the Milvus code to utilize BGE-M3 embeddings for similarity searches in multiple languages.
It modifies the RAG system to query Milvus using the multilingual model and retrieve relevant results.
Review and Test: You review the generated code, make any necessary adjustments, and test the changes.
Pull Request and Merge: Once satisfied, you open a pull request to review the changes with your team. After final validation, the changes are merged, making the app multilingual.
Conclusion
The presentation by Idan Gazit and Cole Bemis illuminated the potential of the GitHub Copilot Workspace. This dev environment represents a significant step in streamlining complicated software development like RAG, enhancing productivity by allowing for task-to-code development workflow using generative AI.
Further Resources
- What is GitHub Copilot Workspace?
- A Practical Demo Showcasing How Copilot Workspace Works
- Streamlining RAG Building with GitHub Copilot Workplace and Milvus
- Conclusion
- Further Resources
Content
Start Free, Scale Easily
Try the fully-managed vector database built for your GenAI applications.
Try Zilliz Cloud for Free