Retrieval method
RAPTOR
Builds a tree of summaries by embedding, clustering and summarizing passages
Teams needed fast, accurate information from around 300 long policy and operations documents. We built an AI assistant that summarizes and answers from them, keeping both the big picture and the precise detail.
| Industry | Content | Interface |
|---|---|---|
| Manufacturing (agricultural machinery) | About 300 policy and operations documents | Web chat app |
An agricultural machinery manufacturer relied on around 300 policy and operations documents and manuals. They were long, detailed and slow to work through, and three problems followed.
Reading took too long. Staff spent significant time reading documents end to end to find one answer or understand one policy.
Manual summaries were costly. Summarizing documents by hand took skilled time away from other work.
Important details got missed. In long documents, a summary written in a hurry can drop a condition or exception that matters, which creates risk.
The goal was simple: accurate, fast and convenient access to what the manuals actually say.
Standard document search retrieves short passages, which works for narrow questions but misses the bigger picture across a long document. We chose an approach that keeps both.
Summaries at every level. We used RAPTOR, a published retrieval method that groups related passages, summarizes each group, then groups and summarizes those summaries again, up to one high-level summary of the whole collection.
Retrieve from the right level. For each question, the assistant can draw on exact passages for specific detail or on higher-level summaries for broader questions that span several documents.
Write a clear answer from what was found. A language model turns the retrieved material into a concise summary or answer that keeps the important detail.
Make it easy to use. Staff ask questions in a simple chat interface, with no training needed.
The solution was built with LangChain and came together in four parts.
Building the summary tree. The documents are split into passages, embedded and clustered by meaning. Each cluster is summarized, and the summaries are embedded and clustered again, ending in one root summary of the whole collection.
One searchable store. The original passages, the cluster summaries and the root summary all go into a vector database, so a single search can reach any level of detail.
Fast answers. For each question, the most relevant passages and summaries are retrieved and passed to a large language model served through Groq, an inference platform built for low-latency responses.
Chat interface. Staff use a Streamlit web app to ask questions and read the answers.
Results reported after launch:
| Result | What changed |
|---|---|
| Faster access | Staff get answers and summaries without reading documents end to end |
| Consistent, accurate answers | Answers come from the same source material every time, reducing the risk of missing critical information |
| Lower summarization cost | Less skilled time spent writing summaries by hand |
More time for real work. Staff spend less time reading manuals and more time acting on what they say.
Lower risk of missed detail. Summaries keep the conditions and exceptions that matter, so decisions rest on the full picture.
Scales with the document set. The same approach handles new and larger collections without changing how people use it.
Fits existing workflows. The assistant can be integrated into the tools and processes teams already use.
RAPTOR
Builds a tree of summaries by embedding, clustering and summarizing passages
LangChain
Connects ingestion, retrieval and the language model
Vector database
Holds passages, cluster summaries and the root summary
Groq
Serves the language model with low-latency responses
Streamlit
Web chat app for asking questions and reading answers