Second Brain Platform: Knowledge Base, Vector Search and Automatic File Indexing
AI · RAG · Laravel · Qdrant · OpenAI API · Automation
RAG-platform « Second brain » to work with corporate knowledge
He developed a MVP platform that collects documents, notes, letters and audio recordings into a single knowledge base. The system automatically extracts text, defines semantic fragments, creates embeddings and makes information available through semantic search and Custom GPT.
The project was built not as a file uploader or a separate integration with PLAUD, but as a universal core of knowledge to which new data sources can be gradually connected.
Choosing a solution for the client's task
The client needed a single database for documents, notes, letters and audio. The task is decomposed on the collection of materials, background processing and search. The common kernel allows you to connect new sources to one pipeline.
Why is this stack?
Laravel combines data model, API and background tasks. MySQL stores records and relationships, Qdrant stores vectors for semantic search, OpenAI stores analysis, and embeddings. Redis and queues separate the lengthy processing from the user request.
What you can leave behind the first MVP
In a similar project, it is wise to start with a single source of documents. Additional channels, analytics and a separate step of reranking can be the next steps after checking the search. This is a phased launch option, not a list of missing features of the implemented platform.
Project task
The customer needed a personal and corporate knowledge base that could work not with one format or service, but with different sources of information.
Collect data
- audio recordings and transcriptions of PLAUD
- PDF, DOCX, TXT and Markdown
- notebook
- postage
- files from cloud storage.
Process automatically
- extraction
- transcribe
- summary and facts
- problem-solving
- indexing materials in the background.
Make sense
- find materials without exact matching words
- filter results by source and type
- maintain accurate requests
- return
- Work through the AI interface.
Develop in stages
- run the MVP
- do not depend on one supplier
- connect new channels without reworking the core
- share base, queue and storage
- Scaling the components separately.
The main architectural solution
The center of the system is Knowledge Core — is a unified data model and common pipeline processing. PLAUD, manual download, mail or cloud drive are sources, but do not define the device of the entire platform.
The new data source should be connected to a common processing system rather than requiring the development of a separate knowledge base.
Thanks to this, the same material passes the standard path: source → text extraction → AI-analysis → semantic fragments → embeddings → Qdrant.
How data processing is arranged
-
Reception of source
The user adds a note, uploads a document or audio file. Data can also come via webhook, mail, or cloud storage integration.
Upload · Webhook · IMAP · Cloud storage
-
Text extraction
For TXT, MD, PDF and DOCX, the system extracts content. Audio MP3, M4A, WAV, WEBM, OGG and FLAC is transmitted for transcription through OpenAI API.
Documents · Audio · Transcription
-
AI analysis
From the text, a brief content, facts, tasks and decisions are formed. Results are stored as structured data, not just as solid text.
Summary · Facts · Tasks · Decisions
-
Breakdown and indexation
The material is divided into small semantic fragments. For each fragment, embedding is created and payload is stored with source, file type, project, category and date.
Chunks · Embeddings · Metadata
-
Search and answer
Qdrant finds similar snippets, and MySQL is used as fallback for precise phrases, codes, and numbers. API transmits the found context to Custom GPT.
Semantic search · Keyword fallback · Custom GPT
Why processing is placed in line
Transcribing audio, parsing documents, and creating embeddings can take time. These operations cannot be performed within a normal HTTP request: the user does not have to wait until the entire pipeline is finished.
Fast interface.
After downloading, the file immediately appears in the system, and heavy processing continues in the background.
Control of statuses
For each task, the processing state is recorded. The user can see what has already been done and where the error occurred.
Repeated attempts
The temporary unavailability of the external API does not result in data loss: the task can be safely re-run.
Scaling
The number of handlers can be increased separately from the web application as the file volume grows.
The structure of the knowledge base
MySQL does not only store a list of files. The model reflects the semantic content of materials and the relationship between them.
Materials
knowledge_items— Knowledge Base Recordsknowledge_chunks— fragments for searchsource_files— source filesaudio_transcriptions— transcription.
Meaningful data
knowledge_tags— tagsknowledge_entities— people, companies and topicsknowledge_relations— communications- facts, challenges and solutions.
External sources
- postage
- postage
- cloudfiles
- Data from webhook integrations.
Integration with PLAUD
During development, a limitation was discovered: PLAUD integration via Zapier transmits the finished transcription and summary, but not the original audio file. The system supports two independent scenarios.
Automatic scenario
PLAUD → transcript / summary → Zapier → Laravel webhook → Knowledge Core
Suitable when the result already generated by PLAUD is sufficient.
Script with source audio
PLAUD → audio download → admin → OpenAI transcription → Knowledge Core
Allows you to independently manage transcription and further analysis.
Restricting external service should not be a limitation of the entire platform.
Semantic and accurate search
Each chunk is stored in Qdrant along with embedding and metadata. Due to this, the query can be formulated in other words: the system seeks the proximity of meanings, not just the coincidence of formulations.
In this case, vector search does not replace the usual completely. For short queries, articles, codes, numbers and exact citations, keyword fallback is used via MySQL.
Qdrant
Finds relevant fragments in meaning and takes into account metadata of the material.
MySQL
Processes exact matches and stores the basic structure of the project data.
Hybrid result
It combines the strengths of semantic and full-text search.
Connection to Custom GPT
To work with a private knowledge base, a separate API was developed and a OpenAPI schema was prepared for the GPT Actions.
-
GPT gets a question
The user asks the question in normal language inside the chat.
-
Action addresses Laravel API
The request is authorized by API key and transmitted to the search layer.
-
The system finds context
Qdrant and MySQL return related snippets, full records, summary, tasks, facts, and solutions.
-
GPT generates a response
The answer is built on data from a closed knowledge base, not just the model’s general knowledge.
Administrative panel
To manage the sources and results of processing, a separate admin in a minimalist style was developed.

Work with materials
- texting
- downloading of documents and audio
- scan
- start processing.
Results of the AI analysis
- summary
- task
- facts
- decisions taken.
Integrations and statuses
- mailboxes via IMAP
- manual synchronization
- background
- Control of processing errors.
Mail and cloud storage
The architecture is prepared for connection Mail.ru, Gmail, Yandex. Mail and arbitrary IMAP servers. Once synchronized, the letter becomes the same Knowledge Core element as a document or note.
For Yandex.Disk, Google Drive and Dropbox, the same principle applies: the external file is converted into a file. SourceFile, passes through the common text extractor and is indexed without changing the kernel.
The source could be anything. The format of storage, analysis and search within the platform remains the same.
Stack and infrastructure
Backend
Laravel · PHP · REST API · Webhooks
Data and search
MySQL · Qdrant · Embeddings · Hybrid Search
Background processes
Redis · Laravel Queue · Workers
AI
OpenAI API · Transcription · Text Analysis · Custom GPT Actions
Integration
PLAUD · Zapier · IMAP · Google Drive · Dropbox · Yandex. Disc.
Development and launch
Docker · Laravel Sail · Vite
The result
As a result, the working foundation of the RAG platform was created, which combines loading, processing, storage and intelligent search through different data sources.
A common knowledge base
Documents, audio, notes and external sources are brought to a common structure.
Automatic processing
Text is extracted, analyzed, broken down into chunks and indexed in the background.
Hybrid search
The system understands the meaning of the request and at the same time maintains exact matches.
AI interface
The Custom GPT receives responses from private data via a secure API.
Independence from source
The new channels connect to the Knowledge Core without overhauling the entire system.
Basis for growth
The database, Qdrant, queues and file storage can be scaled separately.
What can we do next?
The next steps may include automatic folder and mail synchronization, additional connectors to CRM and messengers, differentiation of corporate access, improving the quality of retrieval and its own AI assistant inside the interface.
The main advantage of the current architecture is that there is already a single core for such development: new sources expand the platform, rather than creating another isolated system next to it.
Frequent Questions About the Second Brain Platform
How is the second brain different from the usual cloud storage?
Storage helps you save and open files. In this project, materials additionally undergo text extraction, AI analysis and indexing. The user can search for information in meaning and access the database through Custom GPT, and the system stores summary content, facts, tasks and solutions.
What documents and sources can be connected?
The described MVP provides text notes, download TXT, Markdown, PDF and DOCX, as well as audio MP3, M4A, WAV, WEBM, OGG and FLAC. For PLAUD received transcriptions and summary via Zapier. Connection of mail and cloud drives is allocated in a separate direction of development: the composition of connectors and synchronization mode need to be specified for specific implementation.
How is the knowledge base updated when changing files?
The loaded material is processed and indexed in the background. Constant tracking of changes in external folders is not stated as a ready-made feature of this MVP: automatic synchronization is listed among the following steps. For the updated source, the frequency of verification, re-indexing and processing of deleted documents are separately determined.
Can I get answers with references to the original documents?
Search snippets are stored with source metadata, and API allows you to obtain a complete record of the knowledge base. This is the basis for linking the answer to the materials. Automatic display of clickable links in each response Custom GPT in this case is not separately confirmed – this format should be agreed and checked during implementation.
What is included in MVP and what needs separate development?
The case describes material loading, text extraction and transcription, AI analysis, background indexing, search through Qdrant and MySQL, administration panel and API for Custom GPT. Automatic synchronization of external sources, additional connectors, corporate access rights and native AI assistant in the interface are listed as possible next steps.
Discuss the AI/RAG project
If you need a knowledge base with document search, audio and mail processing, integration with GPT or automation of work with corporate data — describe the task in free form.
You can briefly tell where the data is stored, what sources you need to connect and what result users should get.
Laravel · RAG · Qdrant · OpenAI API · Custom GPT · Documents · Audio · Integrations
