Skip to main content
SeekrFlow is deprecating context-grounded fine-tuning and will remove it on July 17, 2026. You can keep using it until then. For new projects, choose another fine-tuning method.
Context-grounded data jobs ground model responses in an existing knowledge source. Two job types are available:
  • context_grounded_files — aligns against uploaded and ingested documents. Follows the same file preparation and ingestion steps as principle_files, but no system prompt is required.
  • context_grounded_vector_db — aligns against a pre-built SeekrFlow vector database. No file upload or ingestion is needed.
Neither type requires a system prompt to start. Not sure which approach fits your use case? See Fine-tuning.

context_grounded_files

Step 1: Create the job

Endpoint: POST /v1/flow/data-jobs

Step 2: Upload and attach files

Upload your source files using the Files API, then attach them to the job. Ingestion runs automatically for non-Markdown files. Markdown files are alignment-ready immediately. Endpoint: POST /v1/flow/data-jobs/{id}/add-files
Poll GET /v1/flow/data-jobs/{id} until status is ready_to_start. See Monitor ingestion for details on job states and error handling.

Step 3: Start alignment

No system prompt is required. Call /start once status is ready_to_start. Endpoint: POST /v1/flow/data-jobs/{id}/start
Prerequisites:
  • status must be ready_to_start
  • At least one processed Markdown file attached (ingested or uploaded)

Step 4: Monitor alignment

status_message gives a human-readable description of the alignment job’s current state, including the reason if the job fails. Once status shows completed, retrieve the output files using the endpoint in Step 5.

Step 5: Retrieve output files

Endpoint: GET /v1/flow/alignment/{job_id}/outputs
The output file with "purpose": "fine-tune" (the .parquet) is the file ID to use when creating a fine-tuning job.

context_grounded_vector_db

Use this job type when your knowledge source is already indexed in a SeekrFlow vector database. No file upload or ingestion is needed — attach the vector database ID and start.

Step 1: Create the job and attach the vector database

Endpoints: POST /v1/flow/data-jobs Submit data job · PATCH /v1/flow/data-jobs/{id} Update data job Create the job and set vector_database_id before starting. No file upload or ingestion is needed.

Step 2: Start alignment

Endpoint: POST /v1/flow/data-jobs/{id}/start
Prerequisites:
  • status must be ready_to_start
  • vector_database_id must be set
  • No system prompt required

Step 3: Monitor alignment

Once status shows completed, retrieve the output files using the endpoint in Step 4.

Step 4: Retrieve output files

Endpoint: GET /v1/flow/alignment/{job_id}/outputs
The output file with "purpose": "fine-tune" (the .parquet) is the file ID to use when creating a fine-tuning job.
Last modified on July 16, 2026