Parsing a document is only the first step in making it useful to a search system. LlamaParse can turn PDFs, word-processing files, spreadsheets, and other complex sources into structured text, but searchable knowledge requires a second pipeline: normalize the parsed output, preserve its meaning, divide it into useful chunks, enrich each chunk with metadata, and index it for retrieval.
For a WooCommerce agency, this pipeline can support internal documentation search, merchant support assistants, product knowledge bases, implementation runbooks, and customer-service tools. The important distinction is that a parsed document is an output format, while searchable knowledge is an information model.
1. Start with a parsed document, not a plain text blob
Documents usually contain more structure than their visible text suggests. A merchant policy may include headings, numbered procedures, tables, footnotes, page references, and links. Product documentation may place a critical value in a table rather than in a paragraph. If that structure is discarded before chunking, later retrieval becomes less reliable.
A useful parsed representation should retain, where available:
- Document and page boundaries
- Headings and heading hierarchy
- Paragraphs and list items
- Tables and their column relationships
- Links, captions, and footnotes
- Source file names and document versions
For example, the text “30 days” has very different meanings depending on whether it appears under a “Returns” heading, a “Warranty” heading, or a shipping table. The parser output should give the chunking stage enough context to preserve that distinction.
2. Normalize the parser output
Before creating chunks, convert the parsed result into a consistent internal schema. Do not send every parser artifact directly to an embedding model. Repeated headers, page numbers, broken line wraps, OCR errors, and empty blocks can reduce both retrieval quality and index efficiency.
A practical normalized record might contain fields such as:
{
"document_id": "returns-policy-2025",
"source_uri": "s3://docs/store-a/returns-policy.pdf",
"source_name": "returns-policy.pdf",
"version": "2025-01-15",
"page": 3,
"section_path": ["Customer policies", "Returns", "Eligibility"],
"block_type": "paragraph",
"text": "Unused items may be returned within 30 days..."
}
Keep the original parser response separately from the normalized representation. The raw response is useful for auditing, reprocessing, and debugging extraction problems. The normalized form should be stable enough that the rest of the indexing pipeline does not depend on a particular parser response format.
3. Convert tables into searchable meaning
Tables need special treatment. Flattening a table by reading cells from left to right can produce text that looks reasonable but loses the relationship between a row label and its value. A shipping table, for example, should make it clear which delivery time belongs to which region and service level.
One useful representation repeats the relevant column headers in each row:
Region: United Kingdom. Service: Standard delivery. Estimated time: 3–5 business days. Cost: £4.95.
Region: United Kingdom. Service: Express delivery. Estimated time: 1–2 business days. Cost: £9.95.
For product catalogs, consider storing important table values as structured metadata as well as searchable text. A price range, SKU, category, stock status, or product identifier can then be filtered deterministically instead of relying only on semantic similarity.
4. Chunk by meaning and retrieval purpose
Chunking should follow the way users ask questions, not only the physical page layout. A page boundary is useful metadata, but it is rarely a reliable semantic boundary. A single page can contain several unrelated sections, while a procedure may continue across multiple pages.
For agency documentation, a strong default is hierarchical chunking:
- Use the document title and section path as context.
- Keep headings with the paragraphs they describe.
- Keep a procedure and its steps together when they fit within the target size.
- Split long sections at paragraph or list boundaries rather than in the middle of a sentence.
- Use a small overlap only when a concept routinely spans chunk boundaries.
Chunk size should be tested against the embedding model, the expected question length, and the answer style. Smaller chunks can improve precision but may omit necessary context. Larger chunks provide more context but can dilute similarity scores and increase the amount of irrelevant text passed to a language model.
For a WooCommerce implementation runbook, a chunk containing one complete task is often more useful than a fixed slice of 500 characters:
Section: Configure tax display
Task: Enable prices inclusive of tax
Steps:
1. Open WooCommerce > Settings > Tax.
2. Set “Display prices during cart and checkout” to “Including tax”.
3. Save the changes and verify the cart totals in a staging environment.
Prerequisite: Tax rates must already be configured.
5. Add metadata that supports both search and operations
Embeddings capture semantic similarity, but metadata enables precise filtering, permissions, freshness checks, and citations. Each chunk should have enough metadata to answer where it came from and whether it should be included in a particular search.
Useful metadata for WooCommerce knowledge systems includes:
document_idandchunk_idsource_name,source_uri, and page number- Section path and content type
- Store, client, brand, locale, and language
- Product, SKU, plugin, or integration identifiers
- Document version, publication date, and last indexed date
- Access-control or tenant identifiers
Tenant and permission metadata is essential for agencies. A support assistant serving several merchants must never retrieve a chunk from the wrong store merely because the content is semantically similar. Apply tenant filters before or during retrieval, not after an answer has already been assembled.
6. Create a hybrid searchable index
A production knowledge base generally benefits from both vector and lexical search. Vector search is useful when the query uses different wording from the source document. Keyword search is valuable for exact product names, order statuses, SKUs, error codes, hook names, and configuration keys.
A typical indexing flow is:
- Parse the source with LlamaParse.
- Normalize blocks and repair extraction issues.
- Build semantic chunks with inherited section context.
- Generate an embedding for each chunk.
- Store the chunk text, embedding, and metadata in a vector-capable index.
- Store the same text in a lexical index if exact matching matters.
- Record the parser version, embedding model, and content hash for reproducibility.
At query time, combine lexical and vector candidates, apply tenant and document filters, remove duplicates, and optionally rerank the remaining results. The final context should contain the smallest set of chunks that can support the answer, along with source information for citation.
7. Treat indexing as an incremental process
Reprocessing every document after every change is expensive and makes it difficult to identify what changed. Hash the normalized content of each source and each chunk. When a merchant updates a policy, re-index only the affected document and delete stale chunks associated with its previous version.
Keep these values with each indexed record:
- A content hash for change detection
- The parser and embedding model versions
- The chunking configuration
- The indexing timestamp
- The source document version
This information makes it possible to answer operational questions such as why a result changed, which documents were indexed with an older embedding model, and whether a retrieved policy is still current.
8. Validate retrieval before adding generation
Do not evaluate the system only by asking whether the final assistant response sounds plausible. First test retrieval independently. Create a question set based on real agency work, including questions about refunds, shipping, plugin configuration, product attributes, and troubleshooting.
For each question, record the expected source section and measure whether it appears in the top results. Also test failure cases:
- Two documents contain conflicting policy versions.
- The query uses a SKU or error code that must match exactly.
- The answer is located in a table.
- The relevant procedure crosses a page boundary.
- A user asks about a store they are not authorized to access.
If the right source is not retrieved, changing the prompt will not solve the underlying problem. Review parsing quality, section context, chunk boundaries, metadata filters, embedding coverage, and lexical matching first.
9. A practical pipeline contract
Whether the indexing workflow is implemented with an Undefined integration, a custom service, or a combination of managed components, define a clear contract between stages. The parser should produce structured source blocks. The chunker should produce self-contained records. The indexer should accept text and metadata without needing to understand PDF-specific details.
parsed blocks → normalized blocks → semantic chunks → enriched records → searchable indexes → filtered retrieval
That separation allows an agency to replace a parser, embedding model, or vector store without rewriting the entire knowledge system. It also makes errors easier to isolate: extraction problems belong to parsing, missing context belongs to chunking, and irrelevant results belong to indexing or retrieval.
10. Use citations as part of the data model
A searchable result should retain enough information to cite its source. Store a stable document identifier, page number, section path, and source URL or file reference with every chunk. When a WooCommerce professional searches for a configuration instruction or merchant policy, the result should point back to the exact source rather than presenting an unsupported paraphrase.
The path from parsed document to searchable knowledge is therefore not a single transformation. It is a sequence of controlled representations, each preserving the information required by the next stage. LlamaParse can provide a strong extraction layer, while careful normalization, semantic chunking, metadata design, hybrid indexing, and retrieval evaluation turn that extracted content into knowledge that an agency can search, audit, and maintain.