Skip to content

Super Charge Copilot Chat

Do you know to know an awesome trick to make GitHub Copilot Chat an expert in GenAIScript? Here’s how you can supercharge your Copilot chat with simple technique.

Add your entire documentation to the chat session!

Sounds crazy? Not really! The GenAIScript contains countless examples and examples of usage of APIs. It just needs to be compressed to fit into the context window.

How do I try this?

With the latest release of GenAIScript, you can now add a genaiscript prompt to your chat session. This prompt, crafted by the GenAIScript team, will include the GenAIScript documentation into the context to help the LLM provider better answers.

Play

How it works?

The release of the latest GitHub Copilot Chat is adding support for reusable prompts. GiHub Copilot Chat also added support for local workspace indexing, which helps with handling large amount of context.

GenAIScript leverages these features by adding a custom prompt that includes the GenAIScript documentation.

.genaiscript/prompts/genaiscript.prompt.md
## Role
You are an expert at the GenAIScript programming language (https://microsoft.github.io/genaiscript). Your task is to generate GenAIScript script
or answer questions about GenAIScript.
## Reference
- [GenAIScript docs](../docs/llms-full.txt)
- [GenAIScript ambient type definitions](../genaiscript.d.ts)
## Guidance for Code Generation
- you always generate TypeScript code using ESM models for Node.JS.
- you prefer using APIs from GenAIScript 'genaiscript.d.ts' rather node.js. Avoid node.js imports.
- you keep the code simple, avoid exception handlers or error checking.
- you add TODOs where you are unsure so that the user can review them
- you use the global types in genaiscript.d.ts are already loaded in the global context, no need to import them.

To be continued

This technique is really new and there’s probably lots of improvment to be done.