Skip to main content
This guide covers setting up the vector database, processing your documents, creating embeddings, and monitoring ingestion jobs. A complete example is available following the step-by-step guide, along with guidance for managing your vector databases.

Step 1: Set up a vector database

Seekr’s Vector Database SDK provides advanced semantic search capabilities by transforming text into vector embeddings, making it possible to perform semantic searches that focus on meaning and context. This approach provides a smarter and more intuitive way to retrieve documents compared to traditional keyword-based methods. First, choose an embedding model: Supported embedding models Avoid inputs longer than a model’s maximum input tokens.
Bedrock embedding models are available for self-hosted AWS/EKS deployments only. See Use AWS Bedrock for ingestion and inference for setup instructions.

Create an empty vector database

Create the vector database with your chosen model:
Sample response:

Step 2: Upload files

Upload your source documents to get the file_ids for ingestion. Files can be up to 4GB each. For supported file types and file-preparation guidance, see Prepare and ingest files.
If you already have file_ids from a separate upload, skip this step and reuse them.
To upload several files at once, or to list and delete uploaded files, see Prepare and ingest files.

Step 3: Start a vector database ingestion job

Next, create a job to ingest documents into your vector database. This step converts the files and creates embeddings from them. Choose an ingestion method and a chunking method, set the chunk size, then start the job.

Choose an ingestion method

Accuracy-optimized (default) When you use method="accuracy-optimized" or omit the method parameter, the system prioritizes accuracy. Depending on what data is available in your PDF document (bookmarks, tables, text layers), the system combines multiple extraction techniques for best results. Key features:
  • Uses both OCR and direct text extraction, then blends them together
  • Employs LLM agents to correct and enhance document hierarchy
  • Applies advanced table detection algorithms for accurate table formatting
Documents over 100 pages can take up to 30 minutes to process.
Speed-optimized When you use method="speed-optimized", the system balances quality with processing speed. It automatically selects faster methods based on document size while maintaining reasonable accuracy for smaller documents. Key features:
  • Small documents still use high-accuracy methods
  • Larger documents use speed optimized algorithms to meet time constraints
Optimized to complete in approximately 3 minutes regardless of document size.
Once ingestion is complete, you’ll receive a Markdown file that you can use for fine-tuning.
Ingestion mode and the UIWhen ingesting files through the SeekrFlow UI, speed-optimized mode is always used. The SDK lets you choose between speed-optimized and accuracy-optimized.

Choose a chunking method

Set chunking_method to control how SeekrFlow segments content into chunks. The default is markdown; semantic and sliding are also available. See Choose a chunking method for how each method works and how to attach per-chunk metadata.

Set chunk size and overlap

The token_count parameter specifies the target size of each chunk, ensuring each chunk is neither too large (risking truncation by model limits) nor too small (losing semantic coherence). Best practices:
  • Common ranges: For embedding and retrieval, 200–500 tokens per chunk is a widely used range, balancing context and efficiency. The example here uses a token count of 512.
  • Adjust for document type: If your documents are dense or have complex structure (e.g., legal, technical), consider slightly larger chunks; for conversational or highly variable content, smaller chunks may work better.
The overlap_tokens parameter creates overlapping regions between adjacent chunks at chunk boundaries, reducing the risk of missing relevant information that spans two chunks. Adjust chunking parameters based on document characteristics:

Create the ingestion job

Sample response:

Attach metadata at ingestion

To attach user-defined metadata to the chunks created by an ingestion job, include an optional metadata object in the request. The metadata is job-level: it is copied onto every chunk produced from every file in the job. You can later filter or edit it with the chunk metadata methods (see Manage chunk metadata).
The metadata object must follow a few constraints (flat object, typed values, 20 keys maximum); see Metadata rules for the full list. To set different metadata on different chunks within one job, use the per-chunk metadata blocks described under Add per-chunk metadata.

Step 4: Monitor ingestion status (optional)

After starting an ingestion job, you can track job progress, view per-file statuses, and diagnose any failures. See Monitor ingestion for details on checking job states, interpreting file_records, and resolving errors. Once status shows completed, your vector database is ready to query. Every ingested chunk also captures provenance metadata (source page, line ranges, heading path) automatically. To trace query results back to their source, see Source tracing.

Complete example

This example demonstrates the entire workflow for creating a vector database, adding files, and kicking off an ingestion job:
Last modified on July 16, 2026