Japanese PDF RAG Demo Shows Which Passages an LLM Relied On
Kohei Matsunobe, a second-year online student at ZEN University aiming to become an AI engineer, built a retrieval-augmented generation demo for Japanese PDFs. Users upload documents, ask questions in Japanese, and receive answers citing file names and page numbers. The app uses multilingual-e5-small with FAISS for retrieval and Google Gemini for generation, with an extractive fallback mode when no API key is provided. The author wrote a custom chunker that splits text by character count at sentence boundaries and never crosses page breaks, prioritizing citation accuracy. The system prompt restricts answers to the retrieved passages and instructs the model to say it doesn't know when the answer isn't present.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in