Costruisco un Second Brain Avanzato prima che scoppi la Bolla AI | EP. 2 — Transcript
Full transcript
- 0:00Today we are going to build a "second
- 0:03brain" together, a digital brain that
- 0:05can literally remember every piece of
- 0:07information about us.
- 0:10Who we are, what we do for a living,
- 0:12what projects we are working on, and so
- 0:14on.
- 0:15And the reason we are building this
- 0:18second brain is so that we can then
- 0:21connect it to our AI agents, so that
- 0:23when we ask one of these agents a
- 0:26question, it won't give us a generic,
- 0:28trivial response, but will instead query
- 0:31the second brain, find the information
- 0:34it needs, and give us personalized
- 0:36answers relevant to our context.
- 0:41In this video, therefore, I will guide
- 0:44you step by step in creating a second
- 0:47brain that we can use with any agent,
- 0:49Claude, Copilot, Codex, ChatGPT, and
- 0:52many others.
- 0:55Specifically, I will be using it with my
- 0:58Hermes Agent, and that's because this
- 1:01video is part of a series I'm doing on
- 1:04the channel where I build my own custom
- 1:07AI agent.
- 1:09This is the second episode.
- 1:11If you missed the first one, I'll leave
- 1:13it below in the description, and if you
- 1:14don't want to miss the next ones,
- 1:16subscribe to the channel.
- 1:18First of all, what is a second brain?
- 1:21In practical terms, it is a personal
- 1:24knowledge base that concerns us, our
- 1:26work, and our context, which is managed
- 1:29and consulted by artificial intelligence
- 1:33.
- 1:33The advantages offered by a second brain
- 1:35are, in fact, two.
- 1:37First, that the information is managed
- 1:40by AI, meaning we dump our raw files in
- 1:42there as they are, and it is the AI that
- 1:45cleans them, organizes them, links them
- 1:48together, and so on.
- 1:52The second advantage is that by working
- 1:55with clean, organized knowledge with the
- 1:58right connections, it becomes much
- 2:00easier to find the correct information
- 2:03and we are also much faster at finding
- 2:06what we need.
- 2:10Regarding the structure we will give our
- 2:13second brain, I personally like to use
- 2:15this model called LLM Wiki proposed by
- 2:18Andrej Karpathy, formerly of OpenAI and
- 2:21a brilliant mind in artificial
- 2:23intelligence.
- 2:25According to this model, our second
- 2:27brain is divided.
- 2:30into three folders: raw, wiki, and
- 2:33output.
- 2:35The "raw" folder is the entry point to
- 2:38our second brain, meaning we upload our
- 2:41raw files here just as they are—those
- 2:43files we want to clean and bring into
- 2:46our second brain.
- 2:49These files are cleaned and organized by
- 2:52artificial intelligence, not by us, and
- 2:55are moved into the "wiki," which
- 2:58contains the processed, organized, and
- 3:01structured knowledge.
- 3:04We can therefore say that the wiki is,
- 3:05for all intents and purposes, our second
- 3:07brain.
- 3:10Finally, we have the "output" folder,
- 3:12which will contain any answers to the
- 3:15questions we ask whenever those answers
- 3:18require the production of a report, a
- 3:20summary, a document, and so on.
- 3:24Getting into more detail, the structure
- 3:26of the wiki is composed as follows.
- 3:29We have a main folder with a file called
- 3:32index.
- 3:33MD. We will return to this shortly.
- 3:36Inside this folder, we have many
- 3:38subfolders, specifically one subfolder
- 3:42per topic.
- 3:44For example, we have the client
- 3:46subfolder which will then contain all
- 3:49documents regarding clients, or the
- 3:51meetings subfolder which will contain
- 3:53all documents regarding meetings.
- 3:58Besides subfolders, another key element
- 4:01of the wiki are the indexes, which act
- 4:03as a compass that the artificial
- 4:05intelligence uses to navigate within
- 4:08this second brain.
- 4:11Indeed, we have a main index under the
- 4:14wiki folder and then many indexes, one
- 4:16for each subfolder.
- 4:19The main index describes the list of all
- 4:22the wikis, meaning all the subfolders,
- 4:25and explains which types of documents
- 4:28are contained in each subfolder.
- 4:32As for the subfolder indexes, these
- 4:35explain which files are contained in
- 4:37that subfolder and what type of
- 4:40information these files contain.
- 4:45Essentially, when we ask our AI agent a
- 4:47question, it enters the second brain,
- 4:50does not read every single document, but
- 4:53instead reads the indexes, and by
- 4:55reading the indexes, it understands
- 4:57which subfolder to go to and then which
- 5:00files are relevant to effectively answer
- 5:03the question we asked.
- 5:06With the concept understood, let's get
- 5:08our hands dirty and create this second
- 5:10brain.
- 5:12To create the second brain, I will use
- 5:14Herms Agent within VS Code.
- 5:19Actually, VS Code isn't really necessary
- 5:21; I only use it because, at least here
- 5:23on the left, we can see the files,
- 5:25folders, and so on, and therefore this
- 5:27video becomes easier to understand and
- 5:29follow.
- 5:31But you have the possibility to do
- 5:33everything directly from the Claude
- 5:36application, ChatGPT, or whatever agent
- 5:39you prefer. The first request I make is
- 5:42this one.
- 5:44Simply with this prompt, I ask the
- 5:46artificial intelligence to create the
- 5:49tree structure of my second brain,
- 5:51specifically the raw, wiki, and output
- 5:54folders and other files needed for the
- 5:56second brain.
- 6:00together.
- 6:02You can find this prompt below in the
- 6:04description; it is absolutely free, and
- 6:06you will also find the link to my
- 6:08Telegram group and my WhatsApp group,
- 6:10which are free as well.
- 6:12So, what do I do?
- 6:14I copy and paste this prompt, go back to
- 6:16Herms, paste it, press enter, and wait a
- 6:19few seconds.
- 6:21And so here is the structure of our
- 6:23second brain.
- 6:25We have raw, wiki, and output, and then
- 6:28we have two very, very important files
- 6:32called agents.md and log.md. The
- 6:34agents.md file will contain the
- 6:37instructions needed for Herms Agent,
- 6:40Claude, Codex, and so on, to understand
- 6:43how to manage and consult the second
- 6:46brain.
- 6:48And I will give you these instructions
- 6:50now.
- 6:51As for the log.md file.
- 6:56Inside this file, the artificial
- 6:59intelligence will write down every
- 7:01change it makes to the second brain, so
- 7:04that if necessary, we can read this file
- 7:07and understand what has changed.
- 7:11The instructions to put inside agents.md
- 7:14are these, and you can find them for
- 7:16free in the description below.
- 7:19First, we explain to the agent what its
- 7:21role is.
- 7:22It will be the librarian that manages
- 7:24this knowledge base.
- 7:26We then go on to explain how this
- 7:28knowledge base is structured.
- 7:31We explain that there is the raw folder
- 7:33containing raw files, the wiki
- 7:35containing the second brain articles,
- 7:37and the output folder to be used for
- 7:39responses.
- 7:41We then go into detail on how the wiki
- 7:44folder works with the indices, the
- 7:46structure of the articles, the links
- 7:48between them, and so on.
- 7:52And then, scrolling to the bottom, we
- 7:54also have the description of how the log
- 7:56works and the description of the three
- 7:58main actions you can perform with the
- 8:00second brain:
- 8:04compilation, consultation, and audit.
- 8:07As for compilation, it allows you to
- 8:10take files from the raw folder, clean
- 8:12them, organize them, and then move them
- 8:15into the wiki.
- 8:18As for consultation, it is used to
- 8:20search for information within the second
- 8:22brain, first by analyzing the indices,
- 8:25then analyzing the files, and so on.
- 8:29And finally, we have the audit or lint
- 8:32command, which is used to clean up our
- 8:35second brain, meaning that sometimes we
- 8:38want to check for inconsistencies, data
- 8:40that isn't coherent, files that might be
- 8:43old, therefore no longer current or
- 8:46valid, and so on.
- 8:49At the bottom, as I mentioned, there is
- 8:52also the description of how the log.md
- 8:55file works and therefore how it must be
- 8:57managed and how events that modify the
- 9:00second brain must be stored.
- 9:04What we do with this large prompt, very
- 9:07simply, is paste it into agents.md.
- 9:12We then save this file with command S,
- 9:15and at this point, we have the structure
- 9:18of our second brain and have written the
- 9:21operating rules.
- 9:23The only thing left to do is to run some
- 9:26tests.
- 9:27We will then load some files into the
- 9:30raw folder to compile them and see how
- 9:33they are handled.
- 9:36The most attentive and tech-savvy among
- 9:38you will have noticed that I am not
- 9:40using Obsidian, which for many is
- 9:42synonymous with Second Brain.
- 9:46The fact is that that tool is not
- 9:48functional for building a second brain,
- 9:50but at most, it serves to visualize
- 9:52files and see that nice graph with the
- 9:55files and connections.
- 9:57In practical terms, however, it is not
- 10:00essential for what we are doing right
- 10:02now. Currently, therefore, I don't feel
- 10:04the need for it, so I won't use it.
- 10:08If in the future I want to view my
- 10:10second brain files more easily, then I
- 10:13will add it by selecting it as a
- 10:15voltrain.
- 10:18To test this second brain, I uploaded
- 10:22three files to the row folder containing
- 10:26made-up transcripts of a phantom client
- 10:29that doesn't actually exist, as they are
- 10:33transcripts I had the artificial
- 10:36intelligence create. What do I want to
- 10:39do?
- 10:40I want to take these transcripts and
- 10:43move them into the wiki, organizing and
- 10:46structuring them in a more defined way
- 10:48that is easier to consult.
- 10:53So, I go to chat with Hermes and write:
- 10:56"If you look inside row, you will find
- 10:59three files
- 11:04containing call transcripts with the
- 11:07client Meridiana
- 11:13Assicurazioni."
- 11:16I want you to take these three
- 11:20transcripts, process them with the
- 11:24compile command, and move them into the
- 11:28wiki in a folder dedicated to the client
- 11:33Meridiana Assicurazioni.
- 11:38I press enter and I want you to note the
- 11:41level of detail I used for this prompt.
- 11:45I didn't just tell it to run the compile
- 11:48command and see what it could come up
- 11:51with; knowing how I work and that I want
- 11:53a wiki for every client, I am the one
- 11:56who imposed my way of working and
- 11:58managing the second brain on the AI.
- 12:02I told it how to create the wiki.
- 12:05In my opinion, this isn't a flaw, but
- 12:08simply a way of ensuring that artificial
- 12:11intelligence adapts to our processes and
- 12:14the way we work.
- 12:16And so, Hermes Agent has finished its
- 12:19work.
- 12:20We have the wiki folder containing the
- 12:23Meridiana Assicurazioni wiki.
- 12:26We have one file for assessment, one for
- 12:28training, and one for governance.
- 12:32We obviously have an index.md that
- 12:34explains the content of each file, and
- 12:37the interesting thing is that for each
- 12:40file we see the creation date, update
- 12:43date, we see the sources of this file,
- 12:46and then, of course, we see the content
- 12:49, which has been cleaned and structured
- 12:52ad hoc.
- 12:55We also have an update to the wiki index
- 12:58, explaining what the Meridiana
- 13:00Assicurazioni wiki contains, such as
- 13:03information on the client's AI adoption
- 13:06project with assessment, pilot design,
- 13:08and so on.
- 13:12And obviously, inside the log file, we
- 13:14have the operation I performed, which is
- 13:17this one, with all the information on
- 13:19the changes that were made, which are
- 13:22quite a few.
- 13:25Essentially, therefore, our second brain
- 13:28is ready, and what I will do now is
- 13:30delete these example documents and
- 13:32instead populate it with my personal
- 13:34documents, which I obviously won't show
- 13:37you because they are private.
- 13:40At this point, we have our second brain
- 13:43.
- 13:45As long as we're working with 10, 100,
- 13:47or 1,000 files, it works perfectly, but
- 13:49then, at a certain point, its
- 13:51performance worsens.
- 13:55Because, yes, it's true that we have
- 13:57indices that act a bit like a compass,
- 14:00but to find information, our agent still
- 14:03has to read these documents; and so,
- 14:05when the files we work with start to
- 14:08become too many, the performance of the
- 14:10second brain drops drastically, and it's
- 14:13better to use solutions like, for
- 14:15example, RAG, or Retrieval-Augmented
- 14:18Generation.
- 14:21To solve this problem a bit, the CEO of
- 14:24Shopify came up with a solution called
- 14:27QMD.
- 14:29For those who don't know what QMD is,
- 14:32the acronym stands for Query Markdown
- 14:34Documents.
- 14:36Essentially, it is a semantic search
- 14:39system, a keyword search system.
- 14:42within the markdown documents that make
- 14:45up our second brain.
- 14:48To put it simply, it's as if we were
- 14:51unlocking a Ctrl + F, a keyword search,
- 14:54but one powered by artificial
- 14:56intelligence.
- 14:59So, to find a certain paragraph or a
- 15:01specific topic that interests us, we
- 15:04don't need to type the exact words from
- 15:06that paragraph.
- 15:09Just a few keywords are enough, and our
- 15:11artificial intelligence will be able to
- 15:14find that information accurately without
- 15:17needing to read the entire document from
- 15:20top to bottom.
- 15:22Basically, it's as if we combined the
- 15:25second brain with a RAG system, allowing
- 15:27us to find precise information while
- 15:30consuming fewer tokens.
- 15:33And it is precisely this QMD system that
- 15:36we are now going to implement in our
- 15:39second brain, and the prompt we are
- 15:41using to set up this QMD system is this
- 15:44one, which, like all the others, is free
- 15:47below in the description.
- 15:50The first thing we do is specify which
- 15:53folder needs to be indexed, which is the
- 15:56wiki.
- 15:57We ask Hermes to install QMD.
- 16:02We ask to be asked for confirmation
- 16:05before each step, and we specify that we
- 16:08also want to install the QMD MCP, so
- 16:11that we don't have to remember the
- 16:14commands for specific wiki searches, but
- 16:18simply ask Hermes, and he will run those
- 16:21commands.
- 16:25Once we have copied this prompt, we take
- 16:27it to Hermes, I paste it, hit enter, and
- 16:30wait for the artificial intelligence to
- 16:32complete its work.
- 16:35So, QMD is now installed, and at this
- 16:37point, all that's left is to test it.
- 16:41What did I do?
- 16:43I updated my second brain by uploading
- 16:45the slides from my AI Evolution course,
- 16:47which is my practical course on AI
- 16:49applied to work.
- 16:51If you'd like, you can find information
- 16:52below in the description.
- 16:54I uploaded these slides in raw format,
- 16:57had them added to the wiki, and then,
- 17:01using QMD, I asked it to index this wiki
- 17:04.
- 17:05How do we know if it worked?
- 17:08Quite simply, if we go to the terminal
- 17:11and I run QMD status, it tells me that
- 17:14it has indexed the wiki and indexed six
- 17:17files, which are the four lessons plus
- 17:20the two index files.
- 17:24If I clear the screen here and run QMD
- 17:27search iteration,
- 17:33it actually searches for this keyword
- 17:36within my wiki, sort of like a Ctrl + F
- 17:40boosted by embedding and therefore by AI
- 17:43.
- 17:45Obviously, however, we don't want to use
- 17:48these commands, we don't want to
- 17:50memorize them. So what do we do? We use
- 17:52the MCP that has been installed on
- 17:55Airmess Agent.
- 17:57So here I can ask, use QMD and search
- 18:02for information on iteration within the
- 18:08wiki.
- 18:11It will then do what I previously did
- 18:14manually via the terminal; it will take
- 18:16care of running those commands itself.
- 18:20The big advantage, therefore, is that we
- 18:23perform a more precise search by keyword
- 18:25or at least by words similar to the ones
- 18:28we remember.
- 18:31We save a lot of tokens and when
- 18:33necessary, we can also manage to pick
- 18:36out the specific words we need.
- 18:40And so, Hermes is responding.
- 18:44It effectively reports the passages it
- 18:46read within our wiki.
- 18:50The only slightly annoying thing about
- 18:54QMD is that when we modify the wiki,
- 18:57perhaps by adding files, the wiki must
- 19:00be re-indexed, so we come back here into
- 19:03Airmess Agent, specify that the wiki has
- 19:07been updated, and ask to re-index it
- 19:10through QMD.
- 19:13To wrap things up, I would like to
- 19:15answer a couple of comments that a lot
- 19:17of people made under the first episode
- 19:20of this miniseries.
- 19:23And the first comment was: "Antonio,
- 19:25sorry, but what's the point of setting
- 19:27up this agent, this whole setup and
- 19:29everything, if in the end you use Open
- 19:31Router APIs?"
- 19:33And the answer is that it actually
- 19:35doesn't make sense, but that was only
- 19:37the first episode.
- 19:39I am currently building the system, I am
- 19:42setting up the infrastructure.
- 19:44I am doing it with OpenAI APIs because
- 19:47they allow me to test things quickly and
- 19:50very cheaply, but then, moving forward
- 19:53in the series, what I would like to do
- 19:55is buy a Mac Studio or, in any case,
- 19:58some powerful hardware to host this
- 20:01whole system.
- 20:02Locally with local models, so either
- 20:05Llama or LM Studio. Obviously, though,
- 20:09that is the end goal; it cannot be the
- 20:11starting point, and so there will be
- 20:13episodes that lead us to that point.
- 20:17Also, before I buy a Mac Studio, which
- 20:19by the way costs a ton of money, I’d
- 20:20like to get a sense of whether you’re
- 20:22interested in this series and if it’s
- 20:24helpful to you in some way.
- 20:27So, if you find it helpful and you're
- 20:29interested, leave a like and let me know
- 20:31down in the comments below.
- 20:33As for the second comment, this is
- 20:36actually a piece of advice that I truly
- 20:39appreciated a lot.
- 20:41What you told me, in fact, is "Antonio,
- 20:43rather than connecting to Gmail, Drive,
- 20:46and so on using the Google Cloud Console
- 20:49, which is a very cumbersome process,
- 20:52use Composio instead."
- 20:55This way you connect to Composio, you
- 20:57simply ask Hermes in the chat, and it
- 20:59handles the connection for you, and then
- 21:02through Composio you connect to
- 21:04practically all your applications via
- 21:06single sign-on, so basically with one
- 21:08click.
- 21:11I did it, and I have to confess that
- 21:13connecting to Gmail, Drive, and Calendar
- 21:16was much more convenient and much faster
- 21:19, so it's a tip I really appreciated.
- 21:23If you have any other tips, whether on
- 21:25the first or the second point, leave
- 21:27them down here in the comments.
- 21:30That said, I’ll sign off and see you in
- 21:32the next one.
About this transcript
This page contains the full transcript of Costruisco un Second Brain Avanzato prima che scoppi la Bolla AI | EP. 2 by Antonio Guadagno, generated from the public captions YouTube serves with the video. The transcript has 2,907 words across 478 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.