whatisgithub

What is second-brain-rag?

hasil7677/second-brain-rag — explained in plain English

Analysis updated 2026-05-18

2HTMLAudience · researcherLicense

In one sentence

An experiment that gives an AI agent Obsidian-style linked notes and a knowledge graph to answer questions about insurance documents.

Mindmap

mindmap
  root((second-brain-rag))
    What it does
      Obsidian style notes
      Knowledge graph
      Hybrid retrieval
    Tech stack
      Python FastAPI
      AWS Bedrock
      D3 graph view
    Use cases
      Underwriting Q and A
      Live graph building
      Concept exploration
    Audience
      Researchers
      AI experimenters

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Test whether wikilink-style document memory answers questions better than plain vector search.

USE CASE 2

Watch a knowledge graph build live as insurance documents are ingested.

USE CASE 3

Explore a corpus graph in the browser and inspect how concepts connect.

USE CASE 4

Get grounded answers to underwriting questions with the source documents shown.

What is it built with?

PythonFastAPID3.jsAWS BedrockBM25

How does it compare?

hasil7677/second-brain-rag100/talk_stockalexcybernetic/playground-ai
Stars222
LanguageHTMLHTMLHTML
Last pushed2022-03-24
MaintenanceDormant
Setup difficultymoderateeasy
Complexity3/51/5
Audienceresearchergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

So what is it?

Second-brain-rag is an experiment that asks whether an AI agent can be given a structured memory similar to the note-taking app Obsidian, using linked markdown files and a knowledge graph, instead of just storing everything as raw text chunks in a vector database. The project tests this idea on a small set of insurance documents, covering things like underwriting rules and claims procedures. Each source document is written as plain markdown with a YAML header describing its title, type, tags, and links to related documents, using the same double bracket wikilink style Obsidian uses. When the documents are loaded, a small routing model decides whether a question can be answered by looking directly in the existing set of documents, or whether it needs a combined search using both keyword matching and semantic similarity. Whichever path is chosen, the top matching documents are then expanded by following their wikilinks up to two steps away, pulling in related concepts before an answer is generated. The project includes three web pages: one explaining the underlying idea, one showing the document ingestion process building the knowledge graph live, and one for browsing the resulting graph and clicking on individual concept nodes. The final answers are generated by an AI model, with the documents the answer was based on shown alongside it. Under the hood it combines several pieces: cloud hosted AI models for routing questions and generating answers, a semantic search model, a classic keyword search algorithm, a small custom scoring method that blends both search results, a Python web server with live streaming updates, and a graph visualization library for the browser. To try it, you install the Python dependencies, add your own cloud API keys to a config file, and run the server locally. The project is licensed under the MIT License.

Copy-paste prompts

Prompt 1
Explain how the wikilink enrichment step expands a search result before answering.
Prompt 2
Walk me through setting up AWS Bedrock credentials to run this project locally.
Prompt 3
Show me how the small routing model decides between direct lookup and hybrid retrieval.
Prompt 4
Help me add a new insurance document in the same YAML frontmatter and wikilink format.

Frequently asked questions

What is second-brain-rag?

An experiment that gives an AI agent Obsidian-style linked notes and a knowledge graph to answer questions about insurance documents.

What language is second-brain-rag written in?

Mainly HTML. The stack also includes Python, FastAPI, D3.js.

Who is second-brain-rag for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.