Text Link
1/5

Desired Service

PROJECT DETAILS

2/5

BUDGET

3/5

TIMEFRAME

4/5

CONTACT DETAILS

We use your details solely to process your enquiry. Details in our privacy policy.

5/5

THANK YOU

                    Our AI agent was quick: the reply to your initial enquiry is already in your inbox.

ERROR

THANK YOU!

                    We will get back to you shortly.

001JAPANESE MANUFACTURING COMPANY · 2025–2026

Multilingual RAG Knowledge Agent for a Japanese Manufacturing Company

5
AI PROVIDERS ORCHESTRATED
Kuroko Labs built a three-stage RAG pipeline for a Japanese manufacturing company that orchestrates five AI providers. A domain-aware Query Planner breaks every question down into a structured search plan; up to seven parallel retrieval channels, semantic via pgvector, lexical via PGroonga, tabular, graph-based via LightRAG, plus email, entity and Kanban search, surface hits from documents, mailboxes and meeting transcripts in Japanese and Thai; Reciprocal Rank Fusion and Cohere Rerank consolidate the results before a four-tier system controls the depth, latency and cost of every answer. The result: simple questions in under four seconds, deep multi-document analyses in under 35, with citation, source and in the language of the question.
CLIENT
Japanese manufacturing company
YEAR
2025–2026
INDUSTRY
Textile Manufacturing
LOCATION
Japan · Thailand
5
AI Providers
Anthropic, OpenAI, Cohere, Mistral, Unstructured.io
7
Retrieval Channels
Vector, Full-Text, Tabular, Email, Graph, Entity, Kanban
4
Answer Tiers
Flash ≤4s to Deep ≤35s
2
Languages
Japanese and Thai
0.9
Self-Test Score
100 scenarios against the live pipeline (max 1.0)
ALL CASE STUDIES
01 — THE CHALLENGE

Knowledge nobody could find

The client is a Japanese textile manufacturer with manufacturing sites in Thailand. The company manufactures for international fashion brands, from yarn selection to the finished collection. The CEO runs a company whose daily business depends on precise communication across two countries, two languages and thousands of documents.
The problem was not a lack of documents, but their undiscoverability. Production specifications sat as PDFs in SharePoint, quality standards as Excel tables with Japanese and English columns, cost calculations in nested XLSX sheets with dozens of tabs, decisions in email threads and meeting minutes, and critical knowledge existed only in the heads of individual employees. With staff across multiple time zones, this was a systemic risk.
The language barrier compounded the problem fundamentally: Japanese staff could not efficiently search English or Thai documents from the factory, Thai personnel had no access to Japanese specifications, and vice versa. Japanese is especially challenging here: kanji characters have multiple readings (on and kun readings), word boundaries are not separated by spaces, and a search for "生産" (production) does not automatically find "生産管理" (production management), even though the context is identical.
The client did not need a chatbot. They needed a knowledge agent that understands their entire document landscape, regardless of language, format or storage location. An agent that recognizes product codes in questions, targets exactly the right Excel sheets, and does not merely tolerate the peculiarities of Japanese script but actively exploits them.
Fragmented Knowledge
SharePoint, email mailboxes, meeting transcripts, nested Excel sheets
2
Language Barrier
Japanese and Thai, no shared index, Japanese without word boundaries
!
No Discoverability
Answers after 60 min of Slack ping-pong, wrong file versions
0
Company Memory
Two countries, two languages, no shared knowledge store
02 — THE SOLUTION

A three-stage pipeline instead of a simple search

Instead of a simple vector search, Kuroko Labs designed a three-stage RAG pipeline that orchestrates five AI providers: a domain-aware Query Planner for structured search planning, up to seven parallel retrieval channels with Reciprocal Rank Fusion, and a four-tier system that controls the depth, latency and cost of every request, from fast factual questions in under four seconds to deep analytical research spanning multiple Excel workbooks, mailboxes and meeting series.
The Query Planner (gpt-4o-mini, around 300 milliseconds) forms the first stage. It knows the domain, brand codes, product types, partner names, typical sheet labels, and breaks every question down into a JSON plan: a semantic query in the original language for embedding recall, multilingual keyword chains (Japanese + English + Thai) for full-text search, automatically detected product codes and brand aliases as hard filters, predicted Excel sheet names and a complexity tag that assigns the question to one of the four answer tiers. An employee resolver translates names from the question, including romanized forms such as "mori-san", into the kanji spelling of the document corpus, and a Redis cache answers repeated phrasings in under 30 milliseconds.
Parallel Discovery forms the heart of the system: pgvector with an HNSW index delivers semantic similarity (1,536-D OpenAI embeddings, cosine), PGroonga with a TokenBigram tokenizer finds exact matches in Japanese text, LightRAG supplies entity relationships from the knowledge graph, and depending on the detected intent, tabular, email, entity-fanout and Kanban search are added. All channels run in parallel, the total latency is that of the slowest channel, not the sum. Reciprocal Rank Fusion (k=60, sparse 0.6 / dense 0.4) consolidates the lists with source-diversity enforcement, which prevents a single document from dominating the top results. HyDE, a hypothetical answer as an additional search vector, and a JP↔EN synonym dictionary with over 40 term groups close the gap between the languages of the corpus.
The hybrid search with Japanese kanji was the biggest technical challenge. Standard full-text search fails on Japanese: no spaces between words, multiple readings per character, compound terms. The solution: PGroonga splits Japanese text into overlapping 2-character fragments, bigrams. A search for "品質管理" thus also finds "品質管理報告書", without any morphological analysis ever taking place. Combined with a Supabase function that automatically resolves Japanese particles into OR conjunctions, the system achieves a hit rate that surprises even experienced Japanese users.
The document ingestion was a challenge in its own right, and today draws on four sources: SharePoint via Microsoft Graph delta sync (including mirrored document permissions, every user only sees what they would be allowed to see in SharePoint), email mailboxes with a two-stage relevance filter, meeting transcripts via webhook and browser upload. Mistral OCR parses PDFs up to 35 MB (including scanned ones), ExcelJS handles XLSX, Unstructured.io DOCX and PPTX. Japanese texts require a language-dependent chunking strategy: target 800 characters for Japanese, 1,200 for Latin script, overlap 150, with sentence-boundary detection at the Japanese full stop 「。」 and paragraph breaks in English. A SHA-256-based deduplication across the file and chunk level prevents redundant processing on repeated uploads.
PGROONGA TOKENBIGRAM
How Japanese text without word boundaries becomes searchable
01
Document text
02
Bigram index Overlapping 2-character fragments (not words)
03
Search query
03 — ARCHITECTURE

Tables that begin to talk, and a graph that thinks along

01QUERY PLANNER

Domain-aware query planning per question

Before every search, a Query Planner (gpt-4o-mini, deterministic at temperature 0) breaks the question down into a JSON plan: a semantic query in the original language for embeddings, multilingual keyword chains (JP+EN+TH) for full-text search, automatically detected product codes and brand aliases as hard filters, predicted Excel sheet names and a complexity tag that determines the answer tier. An employee resolver maps names from the question ("mori-san") to the kanji spelling in the document corpus, and a Redis cache answers repeated phrasings in under 30 milliseconds.
300
MS planning latency (Redis cache: <30 ms)
02PARALLEL DISCOVERY

Seven retrieval channels, one ranking

pgvector with an HNSW index delivers semantic hits (1,536-D embeddings, cosine), PGroonga TokenBigram finds exact matches without MeCab or morphological analysis, LightRAG supplies entity relationships from the knowledge graph, joined, depending on intent, by tabular, email, entity-fanout and Kanban search. Reciprocal Rank Fusion (k=60, sparse 0.6 / dense 0.4) consolidates the lists with source diversity (max. three chunks per document) before Cohere Rerank v3.5 determines the final selection. HyDE and a JP↔EN synonym dictionary with over 40 term groups broaden recall across language boundaries.
7
Parallel retrieval channels
03TABULAR DEEP DIVE

Excel tables that begin to talk

XLSX files are stored row by row in two representations: tab-separated plain text for PGroonga and an HTML table for LLM synthesis. On a hit, the system retrieves not only the matching row but also the header rows, seed rows and sibling rows of the same table block, so the model sees the full context, not just a single cell. The context budget scales tier-based from 15,000 to 130,000 characters.
130K
Characters deep-tier budget
04SYNTHESIS

Four tiers from Flash to Deep

Instead of answering every request with the most expensive model, the planner classifies each question into one of four tiers: Flash (≤4 s) for simple facts, Fast (≤8 s) and Standard (≤18 s) with Claude Haiku 4.5, Deep (≤35 s) with Claude Sonnet 4.6 for multi-document analyses. Output budget, retrieval pool and context window grow with each tier (1,024 to 8,192 tokens). SSE streaming delivers the first tokens immediately, an Anti-Loop Session State prevents repetition on follow-up questions, and guardrails block sensitive topics such as salaries or personnel decisions.
4
Answer tiers (≤4s to ≤35s)
05INGESTION

Four sources, one knowledge pool

SharePoint is mirrored via Microsoft Graph delta sync, including document permissions, so every user only sees what they would be allowed to see in SharePoint. Email mailboxes run through a two-stage relevance filter, meeting transcripts land in the index automatically via webhook, plus browser upload. Mistral OCR parses PDFs up to 35 MB (including scans), while ExcelJS and Unstructured.io handle XLSX, DOCX and PPTX. Language-dependent chunking (800 characters JP / 1,200 Latin, overlap 150) with sentence-boundary detection at the Japanese full stop 「。」, and SHA-256 deduplication at the file and chunk level.
4
Source connectors
06FEEDBACK LOOP

A learning company profile

A Learned Facts loop extracts corrections from user feedback (via gpt-4o-mini, hardened against prompt injection) and injects them into all future syntheses, the agent learns without re-training. A 100-query self-test runs as a real user against the live pipeline and measures score, source coverage and latency per category. On the operations side, circuit breakers, exponential retry, a cost tracker with hourly and daily budgets per provider and an alert manager ensure stability in production.
100
Self-test scenarios
Excel is the lingua franca of manufacturing, and the hardest nut to crack for any RAG. A question like “What is the current unit price for item X?” targets a single cell in a sheet with dozens of tabs, hundreds of rows and a header logic that nobody ever standardized.
The Tabular Deep Dive logic solves this in two steps. During ingestion, the system stores two representations per row: a tab-separated plain text for the PGroonga search and an HTML table for the later LLM synthesis. On a query, the system retrieves not only the matching row but also the header rows, seed rows and sibling rows of the same table block, so the model sees the full context, not just a single cell.
Before synthesis, the HTML tables are converted into compact Markdown (around 30 % token savings), and a tier-based context budget between 15,000 and 130,000 characters ensures the model always sees complete sources, three full documents rather than ten truncated ones. Each source is passed with its document name, update date and web URL, so the answer ultimately contains not just the figure, but also the reference: “[Cost Calculation Q1.xlsx] as of 2025-03-15”.
Where vector and full-text search end at individual documents, the LightRAG knowledge graph begins. During import, it automatically extracts entities, sites, suppliers, product lines, reports, and relations between them: who supplies what, who reviews what, who documents what. For cross-document questions, it provides a short path through the graph so that the synthesis understands the connection rather than guessing it. The visualization below shows a simplified view of a manufacturing domain, the lines are relationships that the graph learned from the corpus itself.
The orchestration of five AI providers, Anthropic, OpenAI, Cohere, Mistral, Unstructured.io, was a deliberate architectural decision. Each has a clearly defined role: precise multilingual embeddings, OCR quality on scanned PDFs, semantic re-ranking, cost-efficient synthesis and Office document extraction. Instead of answering every request with the most expensive model, the planner classifies each question into one of four tiers, Flash (≤4 s), Fast (≤8 s) and Standard (≤18 s) with Claude Haiku 4.5, Deep (≤35 s) with Claude Sonnet 4.6 for multi-document analyses. An Anti-Loop Session State tracks chunks already seen and prevents the agent from repeating the same results on follow-up questions; guardrails block sensitive topics such as salaries or personnel decisions. Operationally, circuit breakers, exponential retry with rate-limit awareness, a cost tracker with hourly and daily budgets per provider and an alert manager safeguard stability in production.
LIGHTRAG KNOWLEDGE GRAPH — EXAMPLE DOMAIN MANUFACTURING
本社 HEADQUARTERS 品質管理 QUALITY CTRL 生産計画 PRODUCTION 海外工場 OVERSEAS PLANT 原材料 RAW MATERIALS 検品報告 INSPECTION 管轄 策定 運営 調達 監査 準拠 実施 使用
QUERY 品質管理 → 海外工場の検品報告 3 entities, 2 relations, path resolved in under a second
04 — RESULTS

Measured, not promised: 0.9 out of 1.0 in the live self-test

5
AI providers orchestrated
7
Retrieval channels in parallel
2
Languages in the index
0.9
Self-test score (max 1.0)
METRIKBEFOREAFTER
Knowledge searchSharePoint manually, ask 3 colleaguesOne question, one answer with citation
Language barrierTranslate manually or ignoreJP/TH automatically in the hybrid index
Excel researchScroll through sheet tabsTabular Deep Dive with header and sibling rows
Meeting knowledgeEvaporates after the meetingTranscripts ingested automatically and queryable
Source trustNo traceabilityEvery answer with document link and snippet
Synthesis costPremium model for every questionFour tiers, Sonnet only when the question needs it
Rather than relying on impressions, an automated self-test with 100 scenarios (83 after deduplication) runs as a real user against the live pipeline, across eight categories, from simple factual questions through meeting summaries and email lookups to cross-brand analyses. The result: an overall score of 0.9 out of 1.0, with source attribution in virtually every answer. And when the knowledge base does not contain an answer to a question, the agent says exactly that, instead of hallucinating.
The response time scales with the question: the cache answers recurring factual questions in under two seconds, the Flash tier delivers simple lookups in under four, and even deep multi-document analyses in the Sonnet tier stay under 35 seconds, with SSE streaming showing the first tokens immediately. For complex questions that require a Tabular Deep Dive across Excel data, this is a fraction of the time an employee would need for manual research, and the answer arrives with a source link, snippet and update date.
Quality here is not a one-off acceptance test but a continuous control loop: the self-test measures score, source coverage and latency per category and uncovers weaknesses before users notice them. A Learned Facts loop extracts corrections from user feedback, hardened against prompt injection, and injects them into all future syntheses. Every answer is linked to its source documents, every correction flows back into learning, trust through transparency and an agent that becomes more precise with every passing day.
The system processes content in Japanese and Thai, from SharePoint, email mailboxes, meeting transcripts and browser uploads. New documents are deduplicated, chunked, embedded and available in the knowledge pool within minutes; the access rights from SharePoint are mirrored per user in the process. For a company with sites in Japan and Thailand and two working languages, this is a fundamental shift, a knowledge agent that not only finds documents but also understands them.
AI is the enabler we needed: our staff in Japan ask a question in Japanese and receive an answer in seconds that draws on English or Thai documents. This has fundamentally improved communication between our Thai and Japanese teams.
CEO, JAPANESE MANUFACTURING COMPANY
TECH STACK
Claude Haiku 4.5
Synthesis (Flash, Fast & Standard tier)
Claude Sonnet 4.6
Synthesis (Deep tier)
gpt-4o-mini
Query Planner & Learned Facts extraction
OpenAI Embeddings
text-embedding-3-small (1536-D)
Cohere Rerank v3.5
Final re-ranking
Mistral OCR
PDF parsing incl. scans (up to 35 MB)
Unstructured.io
DOCX & PPTX extraction
Supabase + pgvector
Semantic search, HNSW index
PGroonga
Japanese full-text search, TokenBigram
LightRAG
Knowledge graph, entity & relation
Microsoft Graph
SharePoint delta sync, email & ACL mirroring
Whisper (self-hosted)
Meeting transcription, on-premise
Node.js + Express
Backend, PM2 cluster & SSE streaming
Redis
Planner & synthesis cache, rate limiting
SSE
Real-time token streaming
OUTLOOK
Meeting transcripts and email mailboxes, still a distant prospect in the first build stage, are productive knowledge sources today. The next steps are already defined: cost transparency per individual query, a finer intent classification for even more precise tier routing and a deeper graph enrichment that automatically links suppliers, product lines and quality reports. The knowledge pool keeps growing with every meeting and every email, a company memory that has understood each new document within minutes.
AI AgentsRAGKnowledge ManagementNLPHybrid-SearchKnowledge-GraphpgvectorPGroongaSupabase
NEXT STEP

A similar project?

GET IN TOUCH ALL CASE STUDIES
Frequently Asked Questions, RAG Knowledge Agent Case Study
How does Kuroko Labs’ multilingual RAG search work?+
A three-stage pipeline: a domain-aware Query Planner breaks every question down into a structured search plan with multilingual keywords and product-code filters. Up to seven parallel search channels, pgvector (semantic), PGroonga TokenBigram (Japanese full-text search), LightRAG (knowledge graph) as well as tabular, email, entity and Kanban search, return results that are consolidated via Reciprocal Rank Fusion and given a final score by Cohere Rerank v3.5. Claude then synthesizes a cited answer from them, in Japanese or Thai.
Which document formats are supported?+
PDF (including scanned documents via Mistral OCR, up to 35 MB), DOCX, PPTX, XLSX and CSV. Excel files receive special handling: a Tabular Deep Dive automatically detects header rows, finds relevant data rows via full-text search and extends the context with neighbouring rows. The sources are SharePoint (via Microsoft Graph delta sync, including mirrored access rights), email mailboxes with a two-stage relevance filter, automatically ingested meeting transcripts and browser upload.
Why does the system orchestrate five different AI providers?+
Each provider excels in a specific role: gpt-4o-mini as a fast Query Planner with product-code detection, OpenAI Embeddings for vectorization, Cohere Rerank v3.5 for semantic relevance optimization, Mistral OCR for high-quality document parsing, and Claude for tier-based synthesis, Haiku 4.5 for flash to standard queries, Sonnet 4.6 for deep multi-document analyses. A single model could not cover all of these requirements equally well.
Can Kuroko Labs build a similar RAG solution for my company?+
Yes, the architecture is modular and transferable to any industry and document landscape. Whether legal documents, technical manuals or sales knowledge: Kuroko Labs analyses your information flows and builds a RAG pipeline for exactly those sources. The initial consultation and potential analysis are free of charge.
How is the quality of the answers ensured?+
Through an automated self-test with 100 scenarios across eight categories that runs as a real user against the live pipeline (current overall score: 0.9 out of 1.0). A Learned Facts Feedback Loop extracts user corrections and injects them into future syntheses. Guardrails block sensitive topics, hash-based deduplication prevents redundant processing, and an Anti-Loop Session State ensures that follow-up questions deliver new results.
Technology used
The search combines pgvector, PGroonga, LightRAG and Cohere. Every component is publicly documented and can be checked; we do not build closed methods nobody can follow.
The links lead to the documentation of each component.
DEJPEN