> For the complete documentation index, see [llms.txt](https://til.kurianbenoy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.kurianbenoy.com/ai-ml/how-does-github-copilot-works.md).

# How does github copilot works?

Parth Thakkar, had created an interesting analysis on how github copilot works:

{% embed url="<https://thakkarparth007.github.io/copilot-explorer/posts/copilot-internals.html>" %}

* [Copilot Explorer](https://thakkarparth007.github.io/copilot-explorer) (2022)

  &#x20;In this project, I delved into the internals of Github Copilot. I [wrote](https://github.com/thakkarparth007/copilot-inspector) a tool to decompile Copilot's VSCode extension, and identified key insights regarding prompt construction logic, post processing of model's output and telemetry collection (*after sifting through over 400 obfuscated modules!*). I also built a [code browser](https://thakkarparth007.github.io/copilot-explorer/codeviz/templates/code-viz.html) to intuitively explore the codebase. I wrote a [blog post](https://thakkarparth007.github.io/copilot-explorer/posts/copilot-internals) about it that got a [little](https://twitter.com/karpathy/status/1608895189078380544) [bit](https://twitter.com/parth007_96/status/1604160949434421248) [popular](https://news.ycombinator.com/item?id=34032872).

{% embed url="<https://github.com/thakkarparth007/copilot-explorer>" %}

This was brought to attention by Charles Frye, fantastic instructor at<https://github.com/thakkarparth007/copilot-explorer> FSDL

{% embed url="<https://twitter.com/charles_irl/status/1633873928967032832>" %}

{% embed url="<https://twitter.com/simonw/status/1633830742966030351>" %}

{% embed url="<https://twitter.com/kurianbenoy2/status/1634061279064383489>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://til.kurianbenoy.com/ai-ml/how-does-github-copilot-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
