Graphite
unlistedby Charan Sandaka
Chat with your vault. Every claim in an answer carries a quote checked against the note it cites. Bring your own AI provider.
Graphite
Chat with your Obsidian vault. Every claim in an answer carries an exact quote, and Graphite checks that quote against the note it cites before showing it to you.
Status
Early development. Version 0.1 is in progress and there is no release to install yet.
Search, the quote check and the answer pipeline work end to end in Obsidian desktop with Groq and Ollama. They have been tested in an isolated Obsidian instance against the 50-note corpus in test-vault/, in both the default light and dark themes. They have not yet been tested on a large real-world vault, and the Anthropic provider is not built.
Measured results
Answers through Groq (qwen/qwen3.8-27b, question expansion on), across the 35 evaluation questions:
| Measure | Result | Target |
|---|---|---|
| Questions answered with verified claims | 34 to 35 of 35 | |
| Claims removed by the quote check | 4.0% to 4.3% | 20% or less |
| Unanswerable questions answered without calling the provider | 5 of 5 | 5 of 5 |
| Provider failures | 0 of 35 |
The range reflects two full runs. Question expansion is generated by the model, so its search terms vary slightly between runs.
Search alone, with no AI provider:
| Measure | Result | Target |
|---|---|---|
| Questions with an expected note in the top 8 | 33 of 35 | 25 of 30 |
| Unanswerable questions correctly returning nothing | 5 of 5 | 5 of 5 |
| Full index of 5,000 notes | 6.6 to 9.4 s | under 30 s |
| Median search over 5,000 notes | 12.6 to 30.2 ms | under 100 ms |
Without AI, the two misses are vocabulary mismatches keyword search cannot close: "gets paged" against a note that says "we page", and "message queue" against a note titled "Queue comparison". Question expansion recovers them in most runs.
Other models measured on Groq, for comparison:
| Model | Answered | Claims removed | Output tokens for 35 questions |
|---|---|---|---|
qwen/qwen3.8-27b (default) | 35 of 35 | 4.0% | 1,259 |
openai/gpt-oss-120b | 34 of 35 | 8.5% | 10,469 |
Reasoning models such as gpt-oss spend output tokens thinking before they answer, which matters on Groq's free tier, where tokens per minute are limited.
The full specification, including user stories and acceptance criteria, is in SPEC.md. Work in progress is tracked in the repository's issues.
Why another vault chat plugin
Obsidian's search matches exact words, but people remember what a note was about long after they forget how they worded it. AI tools that read a vault solve that, and introduce a worse problem: they can name notes, paths or content that do not exist. One invented note is enough to stop trusting the answer.
Existing plugins answer with citations, but a citation only tells you which note an answer came from. It does not tell you whether that note actually says what the answer claims.
Graphite's answer to this is a quote check. Every claim must end with a citation carrying an exact quote from the note it cites. Before anything is shown, Graphite looks for that quote in the note's retrieved text, after normalising whitespace, letter case and Markdown formatting. Claims whose quote cannot be found are removed, and the answer says how many were dropped. If no claim survives, no answer is shown.
This runs the same way on every provider, including local models, rather than depending on one vendor's grounding feature.
Known limit
Graphite guarantees that every claim shown cites a real note that search returned, and carries a quote that is genuinely in that note. It cannot guarantee the claim reads the quote correctly, for example a quote taken out of context. The quote sits next to the claim so you can judge that yourself at a glance.
How it will work
- Index. Each note is split into sections at its headings and indexed locally with its title, aliases, tags, heading, folder and body. Title matches weigh more than body matches. No AI, no network.
- Search. BM25 ranks sections, results are grouped by note, and notes connected through Obsidian's link graph get a small boost.
- Answer. The provider receives only the numbered excerpts and must answer from them alone, ending each claim with a citation and quote.
- Verify. Each citation is checked against the retrieved note text. Unverified claims are removed. Wikilinks that do not resolve become plain text. The sources list is built from the real search results, never from the model's output.
Search runs with no AI provider configured, offline, and when a provider call fails. In those cases you get ranked notes with the reason each one matched.
Design principles
- Every claim shown carries a quote that Graphite found in the cited note.
- Search works before any provider is set up, and never fails because of one.
- You can see why each note matched and exactly what was sent to your provider.
- You bring your own provider. Graphite has no server and needs no account.
- Graphite never creates, edits or deletes notes. This is permanent, not a v0.1 limit.
Provider support
| Provider | Status | Notes |
|---|---|---|
| Groq | Built, tested live | Default. Default model qwen/qwen3.8-27b |
| OpenAI, OpenRouter, LM Studio, custom | Built | Same OpenAI-compatible connector as Groq; not yet tested live |
| Ollama | Built | Local models, default http://localhost:11434; not yet tested live |
| Anthropic | Not built | Planned, through the official SDK |
API keys are stored in Obsidian's SecretStorage, never in plugin data or source. Nothing is sent anywhere except the provider you configure. There is no telemetry.
Requirements
- Obsidian 1.11.4 or later, which introduced the SecretStorage API
- Desktop only. Mobile is a candidate for v0.3.
Building from source
git clone https://github.com/whyCharan/Graphite.git
cd Graphite
npm install
npm run build
| Command | What it does |
|---|---|
npm run dev | esbuild in watch mode, writes main.js |
npm run build | Type check with tsc --noEmit, then a production build |
npm test | Run the test suite with Vitest |
npm run eval:vault | Regenerate test-vault/ from its definitions |
npm run eval:retrieval | Score retrieval against the evaluation questions |
npm run eval:benchmark | Measure index build and search time on 5,000 notes |
npm run eval:answers | Run every evaluation question through Groq and the quote check. Needs GROQ_API_KEY in a git-ignored .env |
To try it in Obsidian, copy main.js, manifest.json and styles.css into <your-vault>/.obsidian/plugins/graphite-vault-chat/ and reload. Use a scratch vault rather than your real one while the plugin is in development.
Out of scope for v0.1
Writing to the vault in any form is permanently out of scope. Embedding-based search and natural-language filters by date, folder or tag are candidates for v0.2. Streaming answers and mobile support are candidates for v0.3.
License
MIT. See LICENSE.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.