New Feature: Ask Kokoron — AI-Powered Blog Assistant
New Feature: Ask Kokoron — AI-Powered Blog Assistant
Today I'm excited to announce a new feature on shinBlog: Ask Kokoron — an AI assistant that can answer questions about everything on this blog.
What Is Ask Kokoron?
Ask Kokoron is a RAG-powered chat interface where you can ask questions about my blog content and get answers grounded in actual posts, project descriptions, and the About page. Instead of browsing through posts to find what you're looking for, just ask Kokoron.
Try asking things like:
- "What topics does this blog cover?"
- "Tell me about Shin's projects"
- "What is Shin's research about?"
- "What tech stack is shinBlog built with?"
Kokoron will search through all the blog content and give you a relevant, sourced answer.
How It Works
Under the hood, Ask Kokoron uses Retrieval-Augmented Generation (RAG):
- All blog content (posts, projects, knowledge base, About page) is exported as documents
- These documents are split into chunks and stored as vector embeddings in ChromaDB
- When you ask a question, the system finds the most relevant chunks via similarity search
- Those chunks are passed as context to GPT-4o-mini, which generates a natural language answer
- The response streams back to you in real-time
The system also supports locale-aware retrieval — if you're browsing in Japanese, Kokoron searches through Japanese content and responds in Japanese. Same for English and Chinese.
The Tech Behind It
- Frontend: Next.js chat interface with SSE streaming at
/ask - API proxy: Next.js API route that forwards requests to the RAG service
- RAG service: FastAPI backend with LangChain + ChromaDB + OpenAI
- Content pipeline: Node.js export script that bridges blog content to the RAG knowledge base
This is built on top of my earlier rag-research project, repurposed from a Rust documentation Q&A tool to a blog content assistant.
Try It Out
Head over to Ask Kokoron and give it a try. It knows about all the blog posts, my projects, research, and background.
The feature is still evolving — as I add more blog posts, the knowledge base grows automatically. If you have feedback or questions, feel free to reach out via email or GitHub.