I Built a Second Brain with OpenAI
Tags: architecture, openai, gpt3, productivity
Published: 2023-02-27 22:12:34

## What is a Second Brain?

I first heard of the term “second brain” from Ali Abdaal, which turns out was first coined by Tiago Forte. Tiago Forte’s book “Building a Second Brain” is about how to increase productivity and reduce psychological baggage through the use of technology and effective self-management techniques. The book provides readers with a step-by-step guide to building their own “second brain” by integrating various tools and resources into their daily lives. Forte includes many personal anecdotes and case studies throughout the book to illustrate the benefits of using a second brain. He also provides exercises for readers to help them get started on building their own second brain.

He expresses that the power of the human brain lies not in its ability to store vast amounts of information, but in its ability to percolate ideas between different sources of knowledge. In other words, the brain is not a computer that can simply be programmed with more and more data; rather, it is a complex system that is constantly learning and evolving through the interaction of different ideas.

## AI empowering the Second Brain
Open AI, an artificial intelligence research lab founded by Elon Musk, has enabled this concept of the second brain to the next level. Through its cutting-edge research, Open AI is developing artificial intelligence systems that have the potential to replicate and even surpass human intelligence. There is currently a lot of fear circulating about how AI will replace us but rather than be afraid of this potential, we should see it as an untapped resource that has the ability to empower us. If used correctly, AI has the potential to make all aspects of our lives easier and more efficient.

# How I built my AI powered Second Brain
What you need
- Various data sources — books, manual input, websites, etc
- RSS Manager — or some sort ofaggregator that automates collection of data
- Note taking tools — to organize and categorize all the information. This could be: Notion, Obsidian, or something similar
- AI integration


![Data_Architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mxap2i0569taoy3lqsnc.png)


## C.O.D.E (Capture, Organize, Distill, Express)
In the book, Forte outlines a system for outlining the methodology: C.O.D.E (Capture, Organize, Distill, Express).

In the Capture phase, I have three main sources: an RSS feeder that automatically captures content from various sites (e.g. Thoughtworks Technology Radar, Stack Overflow Blog), Goodreads and Readwise integration that gets all the highlights from books I’ve read, and notes from myself.

In the Organize phase, I use a note-taking app (I use Obsidian) to collate and categorize all of the content I’ve captured in the previous stage. This helps me to make connections between different ideas and start to see patterns emerge. There several note-taking apps that are popular in the market but I use Obsidian because of how easy it is for me to integrate with other sources. There are much easier note taking apps to use like Notion but unsure how well you can extend to integrate with other applications

The Distill phase is where I try to write down my thoughts on each of these ideas in a more permanent format. For this, I have integrated Obsidian to have connected directly to OpenAI API. 

For example, *what is the best database to use approach given a specific usecase*. Here is how I would go about it:

- Create a note specific for that use case 
- Gather all my notes with related tags (this works easily if each of your notes are categorized and tagged correctly, sample return would be different database paradigms,sql versus nosql, etc etc)
- Call the Open AI endpoint with all the related notes, my prompt would be: "Given all the information I have about database and `<specific-problem-I'm-trying-to-solve>`, give me all the pros and cons of each approach" or something to this effect of what I need specifically.

The final stage is Express, which completely optional is when I share my thoughts with the world via this blog or other channels.

## Why?
In conclusion, building your own AI powered second brain provides the following main benefits:
1. Helps to increase productivity by automating the collection of information

2. Reduces mental baggage by having access to an “external brain” to store all your thoughts and ideas

3. Enables you to interact with ideas on a deeper level by replicating the way the human brain processes information

I hope you found this overview of my architecture helpful! Leave the comments sections questions you might have.