Home›Claude / Claude Code›孫のためにAI「侍読」を作った ― ローカルLLMのジレンマをClaudeで解いた話

孫のためにAI「侍読」を作った ― ローカルLLMのジレンマをClaudeで解いた話A developer built an AI reading companion called 'Jidoku' for their grandchild,…

元記事を読むRead original articlezenn.dev(新しいタブで開きます)(opens in a new tab)
AI 要約AI summary

孫の読書支援用AIアシスタント「侍読」を構築する過程で、ローカルLLMの限界に直面し、最終的にClaudeとRAGを組み合わせて実用的なシステムを実現した体験談。プライバシーと性能のトレードオフをどう解決するかを具体的に示している。

A developer built an AI reading companion called 'Jidoku' for their grandchild, encountered the limitations of local LLMs around privacy vs. quality, and resolved the dilemma by integrating Claude with a RAG pipeline.

AI 生成の要約と解説(解説は要約と収集メタデータに基づく)で、元記事全文の転載・翻訳ではありません。日本語版と英語版は言語ごとに独立して生成しています。正確性は元記事 (zenn.dev) でご確認ください。AI-generated summary and explainer (the latter based on the summaries and collected metadata), not a copy or translation of the full source article. Generated independently for each language. Verify accuracy at the original source (zenn.dev).

孫が本を読むとき、隣に座って必要なときだけ答えるAI「侍読(じどく)」の開発記録が公開されている。ローカルLLM運用で起きがちな「日本語の自然さ」と「複雑な指示への追従力」のトレードオフに直面し、Claudeを使って解いた過程が中心に語られている。

侍読という構想

侍読は自宅のリビングで使うことを想定したAIで、答えを教えるのではなく、聞かれたときだけ答え、聞かれなければ黙っている控えめな存在として設計されたという。孫たちがいつか本を読む場面を想定している。

三つの構成要素

システムは三つの部品でできている。一つ目のOpen Notebookは自己ホスト型のNotebookLM代替で、松岡正剛『少年の憂鬱』をソースに登録し、RAGの土台にしている。二つ目のJarvisはfaster-whisperとAivisSpeechを使ったローカル音声アシスタントだ。ウェイクワード「Hey Jarvis」で起動し、侍読モードと雑談モードを音声で切り替えられる。

三つ目が今回新規に実装されたKernelで、上記2つの間に立つ「知能エンジン」にあたる。RAGの組み立てとLLM呼び出しをまとめて担う。

3段階チェーンの壁

侍読モードでは当初、Open Notebookの /api/search/ask/simple エンドポイントを使っていた。内部では strategy_model、answer_model、final_answer_model の順に3回LLMを呼び出す。検索戦略の決定、回答生成、最終整形をそれぞれ別の呼び出しで行う設計だ。

このチェーンをRTX 5060 Ti(VRAM 16GB)上のOllamaで動かしたところ、2つの問題に突き当たった。1つ目は速度である。3回の呼び出しが直列に走るため、1回の質問に数十秒かかることがあり、会話として成立させるには致命的だったという。2つ目はモデルサイズを変えた検証で、そこでは明確な傾向が見られたとされる。

Claudeで解く

筆者は、こうしたプライバシーと性能のトレードオフを、ClaudeとRAGを組み合わせることで解決し、実用的なシステムに仕上げたと説明している。ローカルで運用するか、性能の高いモデルを使うかというジレンマに、具体的な実装を通じて答えを出した体験談である。

控えめなAI「侍読」とは

This article describes a home project: an AI called "Jidoku" (侍読) that sits beside a reader while they read. The author designed it for their grandchildren, so that when they read books someday, the AI does not hand over answers. According to the author, it answers only when needed and stays quiet if no one asks. The piece is a record of the technical obstacles met during implementation, centered on a trade-off in local LLM operation between natural Japanese and the ability to follow complex instructions.

三つの構成要素

The system is described as three parts. Open Notebook is a self-hosted alternative to NotebookLM; Matsuoka Seigo's 『少年の憂鬱』 is registered as its source and serves as the foundation for RAG. Jarvis is a local voice assistant built on faster-whisper and AivisSpeech. It starts with the wake word "Hey Jarvis" and lets the user switch between Jidoku mode and chat mode by voice. The third part, Kernel, was newly implemented for this project. It sits between the other two as an "intelligence engine" and handles both RAG assembly and LLM calls.

三段階チェーンの問題

In Jidoku mode, the author originally used Open Notebook's /api/search/ask/simple endpoint. Internally it runs a chain of three LLM calls: strategy_model, answer_model, and final_answer_model. These decide the search strategy, generate the answer, and format the final output, each as a separate call.

The author ran this chain with Ollama on an RTX 5060 Ti with 16GB of VRAM and hit two problems. The first was latency. Because the three calls run in series, a single question sometimes took tens of seconds to answer, which the author calls fatal for making the exchange work as a conversation.

The second problem concerns model size. The author tested different model sizes and says a clear tendency emerged, though the details of that result are not given here.

解決の方向

The author's summary is that, after running into the limits of local LLMs, the project reached a practical system by combining Claude with RAG. The write-up frames this as a resolution of the privacy-versus-performance trade-off, and the article as a whole presents the solution as a concrete account of that process.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPoko孫と本を読むとき、侍読って普段の何が変わるの?When a grandkid is reading, what actually changes with Jidoku?
  2. TECHガイドTECH Guide隣に座って、聞かれたときだけ答えて、聞かれなければ黙っている控えめなAIだよ。答えを教え込まない設計なんだ。It sits beside them, answers only when asked, and stays quiet otherwise. It's designed not to just hand over answers.
  3. ポコPoko前はローカルのLLMで動かしてたんだよね?何が困ったの?It used to run on a local LLM, right? What went wrong?
  4. TECHガイドTECH Guide3段階のLLM呼び出しが直列に走って、1回の質問に数十秒かかることがあったそうだよ。導入後の具体的な速さは書かれていないから分からないな。Three LLM calls ran in sequence, so one question could take tens of seconds. How fast it got after the switch isn't stated, so I can't say.
  5. ポコPokoじゃあ一番の収穫は、ローカルの限界にぶつかっても、ClaudeとRAGを組み合わせて使える形にできたことかな?So the big win is that even after hitting local limits, pairing Claude with RAG made it usable?
  6. TECHガイドTECH Guideそう読めるよ。次は、モデルサイズを変えた検証の「明確な傾向」が、日本語の自然さと指示への追従力にどう効いたかが気になるね。That's how it reads. Next, I'd look at the clear trend from varying model sizes, and how it affected natural Japanese and instruction-following.
記事情報・収集記録Article details & collection record
出典Source
Zenn ClaudeコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
日本語Japanese
重要度の位置づけImportance in this lane
MediumMedium priority(Claude / Claude Code 167件中、同等以上 142件)(142 of 167 Claude / Claude Code entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
2.1 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🧡Claude / Claude Code の他の記事More from Claude / Claude Codeもっと見る →View more →

ページ上部へScroll to top