Neural Composer: Local Graph RAG made easy (LightRAG integration)

TL;DR

I built Neural Composer because standard vector search plugins weren’t connecting the dots in my vault. It integrates LightRAG (a specific “flavor” of Graph RAG, faster and efficient) directly into Obsidian to give you answers based on relationships, not just keywords. It automatically manages a local LightRAG server for you (starts/stops with Obsidian), supports PDFs/DOCX, (and many others), and offers a hybrid search mode. Free and open source.

The “Why”

Hi everyone! :waving_hand:

I’ve been using Obsidian for years to manage engineering projects, research, and personal journal. Like many of you, I hit a wall: my vault grew huge, and finding specific notes was easy, but synthesizing concepts across different notes was hard.

I tried a Smart Composer plugin, which uses RAG (Retrieval Augmented Generation), and I used a lot. It is great, but rely on simple vector search. If I asked: “How does the methodology in Paper A contradict the results in Project B?”, the AI often failed because the text chunks weren’t mathematically similar, even though they were logically connected.

Recently I read about LightRAG and Knowledge Graphs and realized that was the missing piece. I wanted a graph that could “traverse” my notes to find those hidden connections.

What I Built

I’m an engineer, so I decided to build a solution (with the heavy assistance of my AI co-pilot). I forked the UI of Smart Composer (credits to glowingjade for the amazing base!) and completely re-engineered the backend.

“Neural Composer” is the result. It’s a client for running a local LightRAG server that:

  1. Builds a Knowledge Graph of your vault (Entities + Relationships).
  2. Manages the Server: I didn’t want to open a terminal every time I wanted to chat with my notes. The plugin auto-starts the LightRAG server when Obsidian opens and kills it when you close the app.
  3. Hybrid Retrieval: It combines local file reading (for precision) with global graph queries (for synthesis).

Who is this for?

I built this for my own needs, but I think it fits well if you are:

  • A Researcher: Trying to synthesize literature reviews from a lot of PDFs.
  • A DM/Writer: Needing to track complex lore and character relationships without manual wikis.
  • Privacy Conscious: You can run this 100% locally with Ollama if you have the hardware (I use it with a RTX 2070 and it flies).

How to try it

It requires a bit of setup (installing Python and the library), but I tried to make the rest as “plug-and-play” as possible.

  1. pip install "lightrag-hku[api]"
  2. Install Neural Composer (Manual install from GitHub releases for now. Also you can use BRAT).
  3. Point the plugin to your lightrag-server.exe file.
  4. Right-click your notes folder → “:brain: Ingest into Graph”.

It’s open source. I’m not selling anything, just sharing a tool that solved a big headache for me.

:backhand_index_pointing_right: Repository & Download: https://github.com/oscampo/obsidian-neural-composer

I’d love to hear if this helps your workflow or if you find any bugs (it’s a v1.0, so be gentle!).

Happy connecting! Oscar.

6 Likes

I tried Ollama today with BGE-M3 and found that no matter how small the chunk size, how I even attempted to patch LightRAG utils.py, nothing doing, I always hit the 60sec worker timeout bottleneck.

Is it architectural that LightRAG cannot seem to reliably embed long-form content using Ollama models?

These env settings are always dropped:

EMBEDDING_TIMEOUT=600
EMBEDDING_FUNC_MAX_ASYNC=1
EMBEDDING_BATCH_NUM=1

As I definitely wanted to try this locally on a CPU-only laptop, do you see a way forward on this one?

Hi @Sunnaq445!
Thanks for testing the limits on a CPU-only setup! That is a very challenging environment for RAG.

1. Why your settings are “dropped”
Neural Composer currently manages the .env file authoritatively. Every time the plugin loads or you change a setting in the UI, it regenerates the .env file to ensure consistency, which overwrites any manual edits you made externally.

The Workaround:
Use the plugin’s built-in editor:

  1. Go to Settings > Neural Composer.

  2. Scroll down to the orange button: :gear: Review .env & Restart”.

  3. Add your custom lines (EMBEDDING_TIMEOUT=600, etc.) inside this modal window.

  4. Click “Save & Restart”.
    Note: This will apply them for the current session. However, be aware that changing a dropdown in the UI later might reset the file again (we are working on a “Custom Env Variables” feature to make this permanent).

2. The Bottleneck (Architecture)
BGE-M3 is a very heavy model for a CPU-only laptop. It generates 1024-dimension embeddings and handles multiple languages. It is likely timing out because the CPU simply cannot crunch the math fast enough for the default HTTP timeout window.

My Recommendation:
Switch to nomic-embed-text in Ollama.

  • It is significantly lighter and faster on CPU.

  • It is optimized for RAG.

  • It usually stays well under the 60s timeout even on modest hardware.

Try changing your Embedding Model in the settings to nomic-embed-text and let us know if that stabilizes the pipeline!

1 Like

Hi fellow knowledge workers!

I’m excited to share a major update to Neural Composer , a plugin that brings LightRAG (Graph-Augmented Generation) to Obsidian.

Unlike traditional plugins that rely solely on vector similarity, Neural Composer builds a Knowledge Graph from your notes, allowing you to ask questions that require understanding relationships and global context.

What’s new in v1.1.x?

We focused heavily on Usability and Sovereignty:

  • Native Graph Manager: Visualize your brain in 2D (Sigma.js) or 3D (WebGL) without leaving Obsidian. It’s not just a viewer; it’s a manager. You can Merge duplicate entities and Edit descriptions generated by the AI to curate your knowledge base.
  • Local & Private: Full support for local LLMs (Ollama), local Embeddings, and now Local Reranking. You can run the entire pipeline offline.
  • Custom Ontology: Teach the graph your specific domain language (e.g., “Experiment”, “Character”, “Theorem”) instead of generic categories.

Latest Hotfix (v1.1.5):
We just pushed a fix for users using Google Gemini, updating the default embedding models to match Google’s latest API changes (deprecation of text-embedding-004).

How to get it:
Currently available via GitHub Releases (manual install) or via BRAT (Repo: oscampo/obsidian-neural-composer). We are currently in the review queue for the Community Plugins list!

Link to Repository & Documentation

Happy connecting!

1 Like

This looks really awesome, thanks for putting this together. I have been actually working hard and struggling for a week or two to research, understand and to put together my own solution using Cognee and Falkordb which AI research (as i have no idea what im doing) seems to indicate is the best stack but who knows what that means, would it only be 5% better and not worth the effort? uncertain. Ive heard good things about lightrag, AI says cognee is better but again, better enough to matter? Since you are obviously knowledge in this area and i dont know what im doing, would you by any chance be familiar with those options and be able to let me know if its likely a waste of time to go down that road myself and simply use your plugin instead to essentially get results that are practically as good with far less effort? Crippled with indecision lol. Thanks

Also Is there a good way to estimate initial ingestion llm costs and ongoing model costs (im assuming a tiny local model on a normal laptop wont be ideal to get good results) based on recommended models (what level of model do you even need to ensure 80/20 rule good enough results) for a specific vault size, any good calculation formulas i can use to estimate based on your experience of costs?

Hi @Jay36!

I feel your pain! “Crippled with indecision” is the default state of AI engineering right now because new stacks come out every week. Take a deep breath.

Let me save you a few weeks of headaches:

  1. The “Perfect Stack” Trap (Cognee/FalkorDB vs. Neural Composer)
    You hit the nail on the head: “Would it only be 5% better and not worth the effort?” → YES.

Cognee + FalkorDB are amazing, enterprise-grade tools. They are designed for deterministic, scalable data pipelines. Building a custom integration for Obsidian with them requires setting up Docker containers, managing API endpoints, and writing a lot of glue code.

Neural Composer (LightRAG) is designed for unstructured text (your notes). It abstracts away the complexity of graph construction.

My advice: Don’t reinvent the wheel unless your goal is to learn how to make wheels. If your goal is to use your notes, Neural Composer gets you 95% of the way there with 1% of the setup time. Try the plugin first. If you truly hit a ceiling in 6 months, then build your custom beast.

  1. the Models & Costs
    ok, a tiny local model on a normal laptop (e.g., Llama-3-8B q4) is fast but “dumb” for Graph Extraction. It might miss subtle relationships.

Recommendation:

Best Balance (Performance/Cost): Google Gemini 2.5 Flash

Context: Google recently announced the deprecation of the 2.0 series, so jump straight to 2.5 Flash. It is incredibly fast, cheap, and has a massive context window suitable for analyzing many notes at once.
Cost Estimate: Ingesting 1,000 average notes (~500 words each) might cost you less than $0.50 USD total.

Ongoing Cost:Pennies per month for queries.

Best Local (If you have a decent GPU): Qwen-2.5-14B or 32B.

Don’t go below 7B/8B parameters for graph extraction, or the graph will be messy.

If you are on a laptop without a dedicated NVIDIA GPU (e.g., Mac M1/M2/M3), use Ollama with qwen2.5:14b. It runs surprisingly well on Apple Silicon.

Summary:

Install Neural Composer.

Get a Gemini API key (Target gemini-2.5-flash).

Run it on a small folder first.

Stop researching and start chatting with your notes! You can always switch stacks later.

Hope this helps cure the indecision!

Hello community!

I’m excited to share the latest evolution of Neural Composer, a plugin designed to bridge the gap between static notes and dynamic Graph RAG (powered by the LightRAG engine).

After a period of intense refining and security hardening (now strictly adhering to Obsidian’s no-innerHTML and CSS isolation policies), v1.1.6 is out with a focus on User Sovereignty over the Graph.

Key Features in v1.1.6:

  • The Relationship Weaver: A manual curation tool. You can now establish explicit edges between entities. The “Suggest with AI” feature uses your active LLM provider to maintain semantic consistency by generating relationship descriptions based on the connected nodes’ metadata.

  • Reactive Status Monitoring: We’ve added a StatusBar item with a “heartbeat” logic that polls the local server’s /health endpoint. It provides immediate visual feedback on the backend state (Online/Busy/Offline) and allows for one-click server recovery.

  • Zero-Config Portable Architecture: To improve the UX for new users and ensure data portability, the plugin now defaults to a local .neural_memory workspace within the vault. This ensures that the Knowledge Graph index remains in sync with the notes, even across different devices or Git syncs.

  • Hybrid Graph Explorer: Stable high-performance 2D (Sigma.js) and immersive 3D (WebGL) visualization modes with fixed coordinate-based search navigation.

We are currently at 22 stars and growing! I’d love to hear your thoughts, especially from those running local LLMs via Ollama.

Repository & Docs: Neural Composer

Hi, I just managed to find my way back here and see your response. I forgot I posted this, but what is funny is I actually installed this yesterday just by chance and am looking forward to getting stuck in soon so thanks for the reply; I will confirm how it goes.

This looks fantastic- thanks for sharing your work!!
Can this tool be accessed by other LLM clients via MCP? I love this implementation, but want to be able to access from other LLM tools (Claude Code, etc.)

1 Like

Yes, you can use it

@oscampo I am on Windows 11 and I installed the plugin with BRAT and created a venv with LightRAG per Installation Guide · oscampo/obsidian-neural-composer Wiki · GitHub . I pointed the plugin to the the location for the lightrag-server.exe as directed and the return is Server failed to respond in time. I tried using both pointers to the .exe file C:\Users\<username\.local\bin\lightrag-server.exe and C:\Users\pnsh004\AppData\Roaming\uv\tools\lightrag-hku\Scripts\lightrag-server.exe neither of which worked.

I plan to use a FastAPI LLM call which means I need to edit the .env which I see the note

Server configuration (.env)
Review the generated configuration below. Changes here are temporary until you edit the settings in the plugin tab.

Yet when I make changes there, the Save & restart server, those changes are simply reset. I made the changes directly in the .env, but again, they are simply reset.

So, what I want to know is:

  1. How to ensure the lightrag-server.exe is accessible in a Windows 11 virtual environment?
  2. Does Windows 11 require the same sort of shell script to get Obsidian to see the server?
  3. How can I set the .env I want and your code not overwrite it?

And this one is more of a larger security issue:
4. How can I set the host address to 127.0.0.1? Having 0.0.0.0 is a security no-no as anyone on the same network can access this, read all the data, and all without authentication.

Hi @Spark706!

First of all, huge apologies for the delay! I missed the notification for this thread.

Thank you for this incredibly detailed report, and especially for catching Point #4. You are 100% correct.

Let’s address your questions:

  1. The Security Issue (0.0.0.0 vs 127.0.0.1)
    You are absolutely right. Hardcoding 0.0.0.0 was a development oversight on my part and a security risk for a local-first PKM tool. I am pushing a patch today (v1.1.8) that permanently changes the hardcoded host to 127.0.0.1 so your server is completely locked down to your local machine. Thank you for catching this!

  2. How to stop the plugin from overwriting the .env?
    The plugin is designed to be the “Single Source of Truth” for the configuration, which is why it overwrites the file on restart.
    However, you don’t need to manually edit the .env to use a custom FastAPI LLM anymore! In version v1.1.7, we fixed the custom provider logic.

The Fix: Simply go to the plugin settings → Providers → Add a Custom Provider. Put your FastAPI URL in the Base URL field. The plugin will automatically generate the correct .env (using the OpenAI-compatible binding under the hood) without you having to hack the file manually.

1 & 2. Windows 11 Virtual Environment Access
Yes, Windows can sometimes suffer from the same “naked process” issue as Linux when Obsidian spawns the server, failing to activate the venv context properly. The most bulletproof way to fix the Server failed to respond in time error is to use a wrapper script (just like Linux).

Create a file named launch_lightrag.bat in your vault or documents folder.

Paste this inside (adjust the path to your actual venv):

@echo off
call “C:\\Users\\pnsh004\\AppData\\Roaming\\uv\\tools\\lightrag-hku\\Scripts\\activate.bat”
lightrag-server %\*

In the Neural Composer settings, set the LightRAG Command Path to point to this .bat file instead of the .exe. This guarantees the environment is active before the server starts.

Thank you again for your patience and for the sharp security audit! I’ll have the 127.0.0.1 patch out immediately.

Hi !

Thanks for your work ! I will try it soon. What about raphaelmansuy/edgequake ? Seems easier to deploy ?

Sorry if I missed something in the doc but can we use LightRAG with an external URL and as a backend for Obsidian ?

Hi @picman!

Thanks for the kind words! It’s great to see more people interested in local AI for Obsidian.

Regarding Edgequake : It is indeed a fantastic project by Raphael Mansuy! The main difference lies in the underlying reasoning engine.

  • Edgequake is a very polished and fast semantic search engine (Vector RAG).

  • Neural Composer is powered by LightRAG , which is a Graph RAG .

The key benefit here is that instead of just finding similar text, it builds a Knowledge Graph of your entities and their relationships. This enables “multi-hop” reasoning (e.g., asking “How does the methodology in Paper A influence the results in Project B?”), which is something traditional vector search often struggles to synthesize.

Regarding the External URL (Remote Backend):
You didn’t miss it in the docs, it was a very important addition! Actually, since v1.1.9 (and fully refined in our current v1.1.13) , we officially support Remote Server mode .

  • You can host your heavy LightRAG backend on a dedicated GPU server or a cloud instance.

  • In the plugin settings, simply toggle the mode to “Remote” and enter your External URL and API Key/Token .

  • This removes the need to manage Python environments on your local note-taking machine.

Also, we just hit a massive milestone: Neural Composer is now an official Obsidian Community Plugin! You can now find it and install it directly from the official store.

Give it a try and let us know your thoughts!