Overview of FastGPT Dataset Import Files
FastGPT enables importing custom dataset entries via a structured text file with a standardized header row. This specification defines the required and optional fields for the file, ensuring the platform correctly parses and indexes all submitted dataset content without errors.
Standard Field Specification Table
The following table lists all supported headers, their requirement status, allowed count per row, and purpose:
| Header | Required | Count | Description |
|---|---|---|---|
q | Yes | Exactly 1 | Content or a question |
a | Yes | Exactly 1 | The answer; it can be empty when importing standalone content |
index | No | Repeatable | A custom index. A row can contain multiple indexes |
metadata | No | At most 1 | A JSON object for custom information such as source or category |
Mandatory Validation Rules
All rows in the import file must follow these core rules:
- Only the headers listed in the table are permitted; no unsupported headers may be added to the file.
- Header order does not impact platform parsing.
- Each individual row represents exactly one dataset entry.
- The
qandafields cannot both be empty for any row. - Every row must contain exactly one instance of the required
qandafields.
For optional fields: the index field may be repeated multiple times per row to assign multiple custom identifiers, while the metadata field may appear at most once per row, and must be a valid JSON object when used to store custom metadata such as content source or content category.
Valid Entry Examples
Two valid row examples demonstrate proper usage:
- A standard question-and-answer entry:
q="How to configure API access", a="Follow the steps in the admin panel", index="api_001", metadata={"source":"admin_guide"} - A standalone content entry with empty answer field:
q="Official FastGPT release notes v2.4", a="", index="rel_024", metadata={"category":"release_updates"}
Source: FastGPT official source
Applicability and version scope
Use this page for the documented Tutorials scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.
Safety guardrails
Use [REDACTED_CREDENTIAL] for credentials and private data. Confirm the documented environment and version before review.
Rollback guidance
Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.