Inspiration

My inspiration for Docubot came from struggles I had in the past understanding codebases with lots of documentation. I wanted to contribute but I felt like I didn't know enough about the codebase to make a reliable contribution. The release of easily accessible LLM's has made understanding code much easier, but these models tend to be outdated and with fast moving startups/open-source projects, its still hard to get reliable answers from these LLM's, so you end up spending a good amount of time reading pages of documentation to finally get the answer you are after. I wanted to make a product that any developer could use and integrate with their own docs to help make it easier for other developers to understand how their code works. I wanted to make it customisable, so every product can have its own style, that their community knows and loves.

What it does

Docubot allows people to upload their documentation, and create a custom chat bot that they can then either embed in their website or simply use the link we provide to allows their users to get quick answers to their questions. Docubot creates a large amount of embeddings based on the uploaded docs so that your chat bot is always fed reliable information as context whenever someone asks a question. This conversation is then passed to the GPT-4 API to create a great response that has reliable and useful information for the user. Docubot allows you to continuously update your documentation so the information never goes stale.

How we built it

This was a really fun project to build. First the challenge was to build a smooth website that made it easy for people to interact with their docs and customise their chatbot. Using reacts incredible state management made the process of creating a responsive styling system very smooth. This was then followed by creating a backend with express and postgres, to allow for a fast and reliable connection between the frontend and backend. Many thanks to the creator of pgvector (Andrew Kane) for his incredible postgres extension that made it very simple to store large 1536 dimension embeddings in the postgres database.

Challenges we ran into

The largest challenge was creating the main chat completion cycle that is used in the chat bot. The query first has to be embedded itself, in order to calculate a similarity between documentation embeddings in the database and the question being asked. This then has to be tokenised, and cleaned in order to only pass relevant information to the chat completion endpoint. You then run into the challenge of token limits where when queries or context gets to large the chat bot is unable to generate responses. This was simplified by allowing the user to delete previous messages in a chat in order to carry on the conversation without having to restart.

Accomplishments that we're proud of

Very proud of being able to pull all of these aspects together and create a smooth experience for the user that really makes it easy to manage your docs and create a lovely looking chat bot that hopefully fits the aesthetic of their product/project.

What we learned

Errors are natural, and you will most likely never be able to get rid of them all, but doing your best to find ways around them or looking for other approaches is the fun of programming, and building something cool at the end of the day is best part.

What's next for Docubot

Firstly, improving the application, adding some origin security so api keys are fully secure, then I would like to improve the similarity ranking system that is currently used to compare embeddings, so that responses show great information every time. Then, getting people to start uploading their docs, and integrating their custom chat bot into their docs so that whenever anyone has a question about their code or product they can always be certain to get a fast and reliable answer.

Built With

Share this project:

Updates

Submission history