Chunking Company Documents for Agent Retrieval: Keep Clauses Whole
Learn how to chunk contracts, manuals and SOPs so retrieval returns the full clause or step an AI agent needs, not a misleading fragment.

The right chunk size for company documents is the smallest unit that still carries a complete rule, step or obligation, with its conditions and exceptions attached. For contracts, manuals and SOPs, that usually means splitting by clause, procedure step or policy rule instead of by a fixed character or token count. Each chunk should also carry its document title, version, section path and scope, so the agent knows exactly which text it is reading.
Key takeaways
- Chunk by the unit a reader acts on, such as a clause, a numbered step or a policy rule, not by a fixed length.
- Every chunk should carry its document title, version, section path, scope and status, or the agent cannot tell which rule it is reading.
- Keep exceptions, prerequisites and defined terms in the same chunk as the rule they modify.
- Contracts, manuals and SOPs fail in different ways, so each document type needs its own splitting rule.
- Test retrieval with real staff questions and check that the returned chunk alone is enough for a correct answer.
Why fixed-length chunks mislead agents
Most tutorials split documents every few hundred words or tokens, with some overlap between neighboring pieces. That approach is easy to build and hard to trust. A cut often lands in the middle of a sentence, a list or a condition, and the retrieval system returns whichever fragment contains the most matching words.
Consider what happens when a fragment says that the customer may cancel within the notice period, but the definition of that notice period sits two sections earlier. The agent receives a sentence that sounds complete, answers with confidence, and is wrong because the qualifier was never retrieved. Overlap reduces the chance of a hard cut, but it repeats text without fixing the real problem, which is that the meaning boundary does not match the cut boundary.
This is not mainly a question of which embedding model you use. A clean match on a fragment still produces a bad answer when the condition that governs it lives somewhere else. The fix is to choose boundaries that follow how the document is meant to be read. For a broader view of how retrieval feeds an agent, see how to prepare company documents for an AI agent.
Split by the unit a reader acts on
Start by asking what a competent employee would need in front of them to act. In a contract, that is usually a clause together with its sub-clauses and the exceptions that modify them. In a manual, it is a procedure with its prerequisites, its warnings and its steps in order. In an SOP, it is a step with its trigger, its owner and any decision branch that follows from it.
If a person would need to read two paragraphs together to act correctly, the agent needs them together too. Use the following guide when a document does not fit a clean pattern:
- If the unit is a single rule with its exceptions, keep it as one chunk, even if its length varies.
- If the unit is a list of steps, keep the steps in order and place the prerequisites in the first chunk.
- If the unit is too long to return comfortably, split it at sub-points and repeat the heading and the governing condition in every piece.
- If the unit only points elsewhere, such as "see Annex B", store the target as its own chunk and link the two so the pointer is not treated as an answer.
The last point matters more than teams expect. A pointer chunk can rank highly for a question and then give the agent nothing to say, which leads it to guess.
Attach the context every chunk needs
A chunk is read alone once it is retrieved, so it has to identify itself. Prefix each chunk with a short header that the model sees and the citation logic can use. A practical header includes the document title, the version, the section path, the scope (for example which product line, region or customer type the text covers), the status (draft, approved or retired) and the owner who can answer questions about it.
This header does two jobs. It lets the agent state which document and version it relied on, which staff can check in seconds. It also lets you filter out retired text before ranking, so an old procedure cannot compete with the current one. Without this metadata, two near-identical clauses from different versions look the same to retrieval, and the agent has no basis for choosing between them.
A chunk that cannot say where it came from will eventually be cited as if it were current.
The same discipline applies to tone, terminology and defined names. If your company uses one term for a service and the contract uses another, the header or a short glossary line should connect them. For terms that agents should consistently use, see the company glossary for AI agents.
[Figure]
Handle contracts, manuals and SOPs differently
Contracts depend on defined terms and cross-references. A clause that refers to "the Services" only makes sense with the definition from the first pages. Keep the definition attached to any chunk that uses the term, or store definitions as short chunks that the agent retrieves alongside the clause. Schedules and annexes should carry their parent clause reference in the header so the agent knows which obligation they belong to.
Manuals are shaped by models, variants and warnings. A warning that applies to a whole procedure should be repeated in each step chunk, because a single step read without its warning can cause harm. Tables are a frequent failure point: a table split across chunks loses its column headers. Either keep a table as one unit or convert each row group into sentences that repeat the column labels.
SOPs change often, so their main risk is staleness. The chunk that describes last quarter's approval threshold may be perfectly well written and still wrong. Version headers and retirement status are the protection here, along with a clear owner who confirms each change.
Illustrative scenario: a support team uses an agent to answer questions about a supplier agreement. Clause 7 sets payment terms, and clause 7.4 describes an exception for disputed invoices. A fixed-length splitter places the first half of clause 7 in one chunk and the exception in another. When a staff member asks whether a disputed invoice must be paid, the agent retrieves the general payment rule and answers yes. With clause-based splitting, clause 7 and 7.4 are one chunk with a header naming the agreement, version and scope, so the answer carries the exception and cites the right section.
A step-by-step chunking plan
A workable plan for a first engagement is shorter than most teams expect, because it only needs to cover the documents one role depends on.
- Inventory the document types the role needs, their owners, and any duplicates or retired versions that should be removed before splitting.
- Define the unit boundary for each type: clause for contracts, step for procedures, rule for policies.
- Attach defined terms, exceptions, prerequisites and governing warnings to the units they modify.
- Write one header template with title, version, section path, scope, status and owner, and apply it to every chunk.
- Split tables and long lists into self-contained units, repeating column labels or governing conditions where needed.
- Index only approved versions, and mark retired versions so they cannot rank for current questions.
- Record which source version produced each chunk, so a later change to a document can trigger a targeted rebuild.
The last step is what keeps the system maintainable. When a clause changes, you should know which chunks to replace without re-reading the entire library. For the rebuild side of this, see reindexing agent memory after an embedding model change.
How to test whether retrieval returns the whole rule
Testing chunk quality is different from testing whether a search returns something relevant. You need to know whether the returned chunk, read alone, leads to the correct answer. Start with ten to twenty questions that staff actually ask, written in their words rather than the document's. Have a subject owner write the correct answer and the condition that must appear in it.
For each question, check three things. First, does the top chunk contain the answer? Second, does it also contain the qualifier, exception or prerequisite that changes the answer? Third, if you read the chunk without the rest of the document, could a competent person act on it? If the answer to the third question is no, the agent will struggle in the same way. Evaluation practice for agent systems, including how to score answers against expected outcomes, is covered in [OpenAI's evals guide](https://platform.openai.com/docs/guides/evals).
Repeat the test after every document change and after any change to chunking rules. Keep the question set as a living file owned by the team that answers those questions. For more on measuring this, see how to test retrieval quality in an AI knowledge base.
How Be Human handles this in managed operations
In a Be Human engagement, the work begins with one useful role and the document types it needs to answer correctly. We map each type to its splitting rule and header template, agree the owner for each source, and build a question set with your team to test retrieval against. Managed operations then keep that set running after document changes, review which versions are indexed, and handle incidents when an agent cites a retired clause. Approval boundaries and final decisions on which text is authoritative stay with your staff. If you are not sure which document work should go to an agent first, the free Be Human AI diagnostic is a practical place to find that first task.
Frequently asked questions
Is there one correct chunk size for company documents? No. The useful boundary is the unit a reader acts on, such as a clause, a procedure step or a policy rule, and its length will vary from one document to another. A fixed size is a starting point for experiments, not a rule for contracts, manuals or SOPs. Judge the result by whether a returned chunk answers real questions correctly when read alone.
Should chunks overlap? Some overlap can help when a boundary falls in an awkward place, but it is not a substitute for choosing the right boundary. Overlap also duplicates text, which can make the same passage rank several times and push out other relevant material. Use it sparingly, and prefer keeping related sentences together in one chunk.
Do tables and scanned PDFs need different handling? Yes. Tables should stay whole or be converted into sentences that repeat their column labels, because a split table loses its meaning. Scanned PDFs need text extraction checked by a person before splitting, since errors in extraction become errors in every chunk built from them. Treat both as separate steps in the document inventory.
How often should chunks be rebuilt? Rebuild chunks when their source document changes, and keep a record of which version produced each chunk so the update can be targeted. A full rebuild is only needed when the splitting rules or the embedding approach change. Regular checks on retired and stale text, similar to a monthly review, catch problems that a change log alone can miss.
Your next step
See where an AI agent fits in your company first.
Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.
Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.


