Skip to main content

How I gave a super power to ChatGPT

 

I've been using ChatGPT for my everyday work for quite some time now, including some project planning, generating code snippets, documentations, proof reading, and various tasks. One of the features I like is Projects in ChatGPT. By creating a project, you could consolidated your related chat conversations into a single space. You can start multiple threads with multiple topics in the same project. 

The issue


The issue is the context window and the memory.

When you're working on a large project which could drag for several days, and say you wanna generate a document based on the brainstorming or any research you did with ChatGPT. When longer you go through the chat conversations, it tends to forget your previous conversations. 

If you're using the built in canvas for the documentations within ChatGPT, it helps to create and edit short documents while conversing. However, if it's a longer project, the chances are when you ask to update it later, it might have messed up the correct parts also that you have finalized. 

You mind end up with reminding the AI, about the facts that you've already established and things that you needed to get correctly updated more than few time. 

This could be very painful when working on large projects to remind the AI about the things you discussed and established every now and then.

The reason


The reason is the ChatGPT's memory model that they use. The current memory model as of this date and as of current information available is as of following.

ChatGPT has two parts of it's memory. 
1. The global default memory that keeps information about the user and user's profile and general information about basic context as such.
2. Project specific memory. Which uses a strict isolation for project-level memory.

When you're working on a project or even on a single chat thread, it uses this project level memory in conjunction with global default memory about you so it has some context about your personal preferences. 

This project level memory is said to be using a hybrid mechanism of both direct context injection and Retrieval-Augmented Generation (RAG).

The project files and chats may get stored in a RAG system as a an enhanced vector DB to get retrieved on demand when needed.

This is basically the jist of it but surely it's much more intricate and complicated than this. 

To sum it up, it has a limited project related memory and it may lose some information over time when we fill it with new information and new chats. Therefore it forgets and messes up our work.

The Fix


The best fix would be to introducing a memory layer that could be more scalable than it's default memory allocation. However, what I wanted is something more tangible where I also have more control of. ChatGPT is good with handling text, documents, images, so why don't we keep a knowledge base of our own and share it with ChatGPT? 

This solves 2 things, 
1. Fixes the memory problem. If ChatGPT tends to forget something, we can always ask to refer the documentation that we did so far. Now it's an external document that we can seamlessly update.
2. I can keep track of what the AI is needed to remember and make edits to the document on my own as well when necessary. 

Plus this could work as my default knowledge base for all my projects.

As the knowledge base, I tried using different applications, then settled with Outline. Outline is something like a simplified version of Notion or Obsidian. I picked Outline considering few things I noted.

1. Simple to setup on my own infrastructure. It comes as a docker container and really easy to configure. 
2. No complicated authentication or external authentication required. It just authenticates by pre configured admin email and others are invitation based only. 
3. Usage is pretty simple. It's only a documentation and KB and that's it. Nothing more, nothing less. 
4. It provides a MCP server by default which can integrate seamlessly with ChatGPT. 
5. Supports external files and image attachments.

Outline KB


The installation and setup for the Outline can be found in its setup documentations so I'm not gonna repeat the same thing. Plus you can always get help with ChatGPT for this integration. 

Once this setup is done, then you can integrate it with ChatGPT. 

Settings -> Plugins -> Browse Plugins -> +



You can find the MCP server URL from your outline instance itself.


Since this is self hosted, make sure to turn on the developer mode in ChatGPT Security and Logins so it may have access to this MCP.

Once this is done, you're all good to go with this new super power. 

No need of constant reminding and getting tired of losing track of your projects with multiple chat threads. 

You can refer the Outline app just like this. 





Comments

Popular posts from this blog

VLC skins

It's been a while from my first blog post, so today I thought to make a blog post about skins in VLC player. I think you all are familiar with VLC player if not, here's the link for the website www.videolan.org/vlc/index.htm l In brief, VLC player is a free and opensource player that can play almost all the types of media formats. Even though it is a such a nice player, it looks kind of old and rusty, like the windows classic look. But you can make it prettier by just adding some new skins to it.  You can download skins for the player from here http://www.videolan.org/vlc/skins.php Then place the downloaded skin file (.vlt file) in the " skin " folder in the installation directory.           eg:- in windows:    C:\Program Files\VideoLAN\VLC\skins           or in linux systems:  ~/.local/share/vlc/skins Then, open the VLC player and go to the preferences. ...

How to set terminal title in Ubuntu 18.04 LTS

In older Ubuntu versions, you could have just right-clicked on the Ubuntu Terminal window's title bar and set any title you would like. But unfortunately after Ubuntu 18.04 LTS this feature is gone. I used to love this feature because I'm multiple tabs in the single terminal window kind of a guy. I usually like to work in multiple named terminal tabs like below. By default, in newer Ubuntu version, it is showing just the current directory. Let's see how we can do this. Ubuntu prompt In ubuntu's Bash, there's an environment variable $PS1 which is responsible for the details that the command line prompts. You'll be able to echo this and see what's inside it. If I echo it it will print something like this. echo $PS1 \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ If you really want to understand what this means, you can refer this page .  Updating the termina...

Java, how to create a list with a single element

 I wanted to create a Java List with a single element. Yet, I wanted to add more elements later. So, I was looking for a couple of ways to do this. So far there are multiple elegant ways to create a list with a single element with a one-liner. Not so much for a modifiable list though. Here's what I gathered so far. Followings are a few ways of creating a list with strictly a single entry. Can't add more elements. 1. Collections.singletonList() This returns an immutable list that cannot be modified or add more elements. // An immutable list containing only the specified object. List<String> oneEntryList = Collections. singletonList ( "one" ) ; oneEntryList.add( "two" ) ; // throws UnsupportedOperationException 2.  Arrays.asList() This returns a fixed-size list consisting of the number of elements provided as arguments. The number of elements provided would be an array hence the size is fixed to the length of the array. // Returns a fixed-size list List...