Inspiration

I was inspired by my own experience processing large amounts of data to develop trading algorithms. It was a pain keeping track of all the different types of data I had. Additionally, if I wanted to use a chatbot, I had to manually paste in all my data. Therefore, I designed a system where users can save data to a database to be used as context during interactions with an AI chatbot.

What it does

There are two main components to the app: the contextMenu and the contentAction. The contextMenu appears when the user highlights some text. The text highlighted becomes the context. The user is then prompted with 5 options. They can chat with the AI, asking questions about the context. They can ask the AI to summarize, explain, or expand on the context. And finally, they can save the context to their personal vector database. If they check the box "Utilize stored data" the bot will search through their vector database, performing a vector search algorithm to find the most similar vectors to the prompt. If the user opens the contentAction, they will be brought to a new interface. They can either select text to be used as context or just chat with the AI. Once they reach the chat menu they can chat with the AI or ask it to explain, expand upon, fix errors in, or rephrase the provided context.

How we built it

I used the custom UI features of Atlassian forge and used the forge bridge to connect them to a backend. My app opens when users open it manually or when users highlight some text. When users choose to store data, the data is vectorized using the openai embeddings model and then stored in the Atlassian storage API. A vector search process can then be undertaken every time the user makes a query to give the AI relevant context. User prompts go through the openai api to GPT-3.

Challenges we ran into

I was using the custom UI components, so I had trouble figuring out how to resize the iframe to make my content show up. Additionally, I had to figure out how to structure my manifest.yml to allow for a confluence:contextMenu and a confluence:contentAction. I also started the hackathon late, so I had to pick up Forge quickly.

Accomplishments that we're proud of

I built a storage system using the Atlassian storage API that functions like a vector database. When queried with a vector, it returns the most similar vectors.

What we learned

I learned how to use the Atlassian Forge platform. I had never used it before. I also gained more experience with web development languages.

What's next for DataBot: A data-based chatbot for Confluence

First, I want to store the data in s3 instead of in the Atlassian storage API. This will both allow more data to be stored and boost the speeds of the vector search process due to parallelization. Additionally, I want to allow the bot to write comments and label documents.

Share this project:

Updates