Huzaifa Rasheed

Huzaifa Rasheed

Software Engineer

Blogs

Enhancing ChatGPT Responses with Fabric's AI Prompts

Posted on June 23, 2024

Quick backstory: I frequently used some fabric prompts with ChatGPT, and found myself having to find the prompt from the fabric repo, copying it over to ChatGPT, and then adding my custom input.

This was manual work that I wanted to avoid and directly use these prompts on the ChatGPT’s website. There are some extensions like AIPRM for ChatGPT which is a great tool and includes a lot of engineered prompts, but it is not open-source.


Now, what is Fabric anyway? Let’s boil down to some basics.

Prompting

If you have ever used a Generative AI or LLM modal like ChatGPT, you know that it requires prompts or messages to generate a matching response.

Not all prompts are equal

Some are way better for generating correct and contextual responses. This is where Prompt Engineering comes in, which is a process of improving the instructions sent to the AI modal for generating great responses.

Now — What Is Fabric

Per its own definition, Fabric is a framework for augmenting humans using AI.

It includes a large list of engineered prompts for LLMs or generative AI models which you can find in the Fabric repo under the patterns sections.

Fabric refers to these prompts as “patterns”.

How to use Fabric prompts with ChatGPT

As I mentioned before, I wanted to use fabric prompts directly into ChatGPT, so I made my own Chrome Extension for this.

Introducing fabric-browser-extension, which is a wrapper around fabric prompts.

It adds a simple Ƒ button in the ChatGPT’s chatbox

Fabric button image

When clicked, it would show a settings modal, which would look something like this

Fabric settings modal

Notice there are some options here which you can tweak. Once you select an active pattern and send a custom input to ChatGPT, the extension will modify the prompt you sent and make it better based on the active pattern.

The whole process will look something like this

Installation

You can install the extension by following these steps

  1. Clone the fabric-browser-extension repository or download it and extract the ZIP file.
  2. Open Google Chrome and navigate to chrome://extensions/.
  3. Enable Developer Mode using the toggle switch in the top right corner.
  4. Click on “Load unpacked” and select the directory where you cloned/downloaded the extension.
  5. The extension should now be loaded and ready to use in Chrome on the ChatGPT’s website.

and there you have it.


Hope you find this extension helpful 😉.