← All articles

Building

From a file to useful context.

Parsing, chunking, indexing, retrieval: a plain-language guide to the journey behind a grounded answer.

First, make the file readable

Uploading a file and making it searchable are different steps. A successful upload means the system received the input. It does not, by itself, mean that its contents are ready for search.

Parsing extracts usable text and structure. A PDF with a text layer differs from a scanned image. OCR can help recover text from images, but recognition errors can change names, dates, and amounts. Inspect a representative passage before trusting downstream answers.

A useful interface makes progress visible. Queued, processing, failed, and published states tell a reader what happened more clearly than an upload confirmation alone.

Give search passages it can work with

Chunking divides a document into smaller searchable passages. The passage should preserve enough surrounding material to remain understandable. Splitting in the middle of a sentence or table can hide the relationship a question needs.

An embedding turns text into a numeric representation for similarity search. Keyword indexing offers another route through the same content, particularly for exact terms. Both should preserve a path back to the original document version.

Access information belongs in that path as well. A passage should not become visible merely because a search engine found it. The reader’s current permissions still matter.

Start with a question you can check

For a first test, use a small source with an unambiguous answer. The following is an illustrative question request, not an authenticated request ready to send. A real new question needs its own request key; retries of that same request reuse it.

Illustrative request
{
  "question": "When is the support team available?",
  "requestKey": "example-support-question-001"
}

Inspect the result, then expand

Compare the answer with the source passage. Then ask something the source does not say. This pair of checks helps distinguish useful retrieval from a system that answers every question indiscriminately.

ContextPier’s quickstart follows this path: add a source, inspect its jobs, ask a question, and open the references. Use the documentation for current endpoint contracts and supported inputs.

Once this small loop works, expand the collection and the test questions. Good context is an observable chain from source to answer, not just a successful file upload.

Explore the current product contracts in the ContextPier documentation ↗.