QType AI DSL
A DSL for rapid prototyping of AI applications
| Type | Document |
|---|---|
| File match |
qtype.config.yaml
*.qtype.yaml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/qtype-ai-dsl/latest.json |
| Source | https://raw.githubusercontent.com/bazaarvoice/qtype/refs/heads/main/schema/qtype.schema.json |
Validate with Lintel
npx @lintel/lintel check
Definitions
API key-based authentication provider.
Unique ID of the authorization configuration.
API key for authentication.
Base URL or domain of the provider.
Tool that invokes an API endpoint.
Unique ID of this component.
Name of the tool function.
Description of what the tool does.
API endpoint URL to call.
Input parameters required by this tool.
Output parameters produced by this tool.
HTTP method to use (GET, POST, PUT, DELETE, etc.).
Optional AuthorizationProvider for API authentication.
Optional HTTP headers to include in the request.
Path and query parameters for the API call.
AWS authentication provider supporting multiple credential methods.
Unique ID of the authorization configuration.
AWS access key ID.
AWS secret access key.
AWS session token for temporary credentials.
AWS profile name from credentials file.
ARN of the role to assume.
Session name for role assumption.
External ID for role assumption.
AWS region.
Configuration for AWS Secrets Manager.
Unique ID for this secret manager configuration.
AuthorizationProvider used to access this secret manager.
Defines an agent that can perform tasks and make decisions based on user input and context.
Unique ID of this component.
The model to use for inference.
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
A reference to a Memory object to retain context across interactions.
Optional system message to set the context for the model.
List of tools available to the agent.
A step that, after all messages have been processed, returns a single message containing the counts of successful and failed messages. Other messages are passed through unchanged.
Unique ID of this component.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Defines a complete QType application specification.
An Application is the top-level container of the entire program in a QType YAML file. It serves as the blueprint for your AI-powered application, containing all the models, flows, tools, data sources, and configuration needed to run your program. Think of it as the main entry point that ties together all components into a cohesive, executable system.
Unique ID of the application.
Optional description of the application.
List of memory definitions used in this application.
List of models used in this application.
List of custom types defined in this application.
List of flows defined in this application.
List of authorization providers used for API access.
List of tools available in this application.
List of indexes available for search operations.
Optional secret manager configuration for the application.
Optional telemetry sink for observability.
List of other q-type documents you may use. This allows modular composition and reuse of components across applications.
Schema for a standalone list of authorization providers.
Configuration for batch execution.
Attributes: num_workers: Number of async workers for batch operations.
Max number of rows to send to a step at a time
Bearer token authentication provider.
Unique ID of the authorization configuration.
Bearer token for authentication.
Reranks documents using an AWS Bedrock model.
Unique ID of this component.
Bedrock model ID to use for reranking. See https://docs.aws.amazon.com/bedrock/latest/userguide/rerank-supported.html
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
AWS authorization provider for Bedrock access.
Return this many results.
Base cache directory.
Logical namespace for cache keys.
Bump to invalidate old cache.
Compress stored data.
Optional time-to-live in seconds.
Categorical feedback with predefined tags.
List of category labels users can select from.
Whether to enable optional text explanation field.
Whether users can select multiple categories.
A step that collects all inputs and creates a single list to return.
Unique ID of this component.
Configuration for batch execution.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Max number of rows to send to a step at a time
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
Number of async workers for batch operations
A constant Fsspec URI.
A step that converts variables into an instance of a Custom or Domain Type
Unique ID of this component.
Mapping from type field names to flow variable names.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
A simple declaration of a custom data type by the user.
Defines a step that decodes string data into structured outputs.
If parsing fails, the step will raise an error and halt execution. Use conditional logic in your flow to handle potential parsing errors.
Unique ID of this component.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Defines the format in which the decoder step processes data.
Defines the format in which the decoder step processes data.
Defines a step to convert raw documents (e.g., PDF, DOCX) loaded by a DocumentSource into plain text using an external tool like Docling or LlamaParse for pre-processing before chunking. The input and output are both RAGDocument, but the output after processing with have content of type markdown.
Unique ID of this component.
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Schema for any valid QType document structure.
This allows validation of standalone lists of components, individual components, or full QType application specs. Supports modular composition and reuse.
Embeds document chunks using a specified embedding model.
Unique ID of this component.
Embedding model to use for vectorization.
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Document search index for text-based search (e.g., Elasticsearch, OpenSearch).
Unique ID of the index.
Name of the index/collection/table.
URL endpoint for the search cluster (e.g., https://my-cluster.es.amazonaws.com).
Index-specific configuration and connection parameters.
AuthorizationProvider for accessing the index.
Field name to use as document ID. If not specified, auto-detects from: _id, id, doc_id, document_id, or uuid. If all are missing, a UUID is generated.
Performs document search against a document index.
Unique ID of this component.
Index to search against (object or ID reference).
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Optional filters to apply during search.
Number of top results to retrieve if not provided in the inputs.
The arguments (other than 'query') to specify to the query shape (see https://docs.opensearch.org/latest/query-dsl/full-text/multi-match/).
{
"type": "best_fields",
"fields": [
"*"
]
}
A source of documents that will be used in retrieval augmented generation. It uses LlamaIndex readers to load one or more raw Documents from a specified path or system (e.g., Google Drive, web page). See https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers
Unique ID of the data source.
Module path of the LlamaIndex Reader).
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Reader-specific arguments to pass to the Reader constructor.
Loader-specific arguments to pass to the load_data method.
AuthorizationProvider for accessing the source.
Configuration for chunking/splitting documents into embeddable nodes/chunks.
Unique ID of this component.
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Name of the LlamaIndex TextSplitter class.
Size of each chunk.
Overlap between consecutive chunks.
Additional arguments specific to the chosen splitter class.
Defines a step that echoes its inputs as outputs.
Useful for debugging flows by inspecting variable values at a specific point in the execution pipeline. The step simply passes through all input variables as outputs without modification.
Unique ID of this component.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Describes an embedding model configuration, extending the base Model class.
Unique ID for the model.
Name of the provider, e.g., openai or anthropic.
Dimensionality of the embedding vectors produced by this model.
AuthorizationProvider used for model access.
Optional inference parameters like temperature or max_tokens.
The specific model name or ID for the provider. If None, id is used
A step that takes a list input and produces multiple outputs, one per item in the list.
Unique ID of this component.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Extracts specific fields from input data using JSONPath expressions.
This step uses JSONPath syntax to extract data from structured inputs (Pydantic models, dicts, lists). The input is first converted to a dict using model_dump() if it's a Pydantic model, then the JSONPath expression is evaluated.
If the JSONPath matches multiple values, the step yields multiple output messages (1-to-many cardinality). If it matches a single value, it yields one output message. If it matches nothing, it raises an error.
The extracted data is used to construct the output variable by passing it as keyword arguments to the output type's constructor.
If there is no match and the output variable is optional, it is set to None. If there is no match and the output variable is required, an error is raised.
Example JSONPath expressions:
$.field_name- Extract a single field$.items[*]- Extract all items from a list$.items[?(@.price > 10)]- Filter items by condition
Unique ID of this component.
JSONPath expression to extract data from the input. Uses jsonpath-ng syntax.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
File source that reads data from a file using fsspec-compatible URIs.
Unique ID of the data source.
Reference to a variable with an fsspec-compatible URI to read from, or the uri itself.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
The mime type(s) to accept in the file upload.
File writer that writes data to a file using fsspec-compatible URIs.
Unique ID of the data writer.
Reference to a variable with an fsspec-compatible URI to read from, or the uri itself.
Configuration for batch execution.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Max number of rows to send to a step at a time
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Defines a flow of steps that can be executed in sequence or parallel. If input or output variables are not specified, they are inferred from the first and last step, respectively.
Unique ID of the flow.
Optional description of the flow.
List of steps or references to steps
Optional feedback configuration for collecting user ratings on flow outputs.
List of variables available at the application scope.
Input variables required by this step.
Resulting variables
Defines the public-facing contract for a Flow, guiding the UI and session management.
A list of input variable IDs that are set once and then persisted across a session.
Unique ID of the data writer.
Index to upsert into (object or ID reference).
Configuration for batch execution.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Max number of rows to send to a step at a time
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Defines a step that generates embeddings using an embedding model. It takes input variables and produces output variables containing the embeddings.
Unique ID of this component.
The embedding model to use.
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Invokes a flow with input and output bindings.
Unique ID of this component.
Flow to invoke.
Mapping from flow input variable IDs to step variable names.
Mapping from flow output variable IDs to step variable names.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Invokes a tool with input and output bindings.
Unique ID of this component.
Tool to invoke.
Mapping from tool parameter names to flow variable names.
Mapping from tool output names to flow variable names.
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Defines a step that performs inference using a language model. It can take input variables and produce output variables based on the model's response.
Unique ID of this component.
The model to use for inference.
Configuration for concurrent processing.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Number of async workers for batch operations
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
A reference to a Memory object to retain context across interactions.
Optional system message to set the context for the model.
Represents a list type with a specific element type.
Type of elements in the list (primitive type or custom type reference)
Session or persistent memory used to store relevant conversation or state data across steps or turns.
Unique ID of the memory block.
Maximum number of tokens to store in memory.
Ratio of chat history tokens to total memory tokens.
Size of memory to flush when it exceeds the token limit.
Describes a generative model configuration, including provider and model ID.
Unique ID for the model.
Name of the provider, e.g., openai or anthropic.
AuthorizationProvider used for model access.
Optional inference parameters like temperature or max_tokens.
The specific model name or ID for the provider. If None, id is used
Schema for a standalone list of models.
OAuth2 authentication provider.
Unique ID of the authorization configuration.
OAuth2 client ID.
OAuth2 client secret.
Token endpoint URL.
OAuth2 scopes required.
Represents the type of data a user or system input can accept within the DSL.
Defines a prompt template with a string format and variable bindings. This is used to generate prompts dynamically based on input variables.
Unique ID of this component.
String template for the prompt with variable placeholders.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Tool that calls a Python function.
Unique ID of this component.
Name of the tool function.
Description of what the tool does.
Name of the Python function to call.
Optional module path where the function is defined.
Input parameters required by this tool.
Output parameters produced by this tool.
Numerical rating feedback (1-5 or 1-10 scale).
Whether to enable optional text explanation field.
Maximum value for rating scale (2-10).
SQL database source that executes queries and emits rows.
Unique ID of the data source.
SQL query to execute. Inputs are injected as params.
Database connection string or reference to auth provider. Typically in SQLAlchemy format.
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Optional AuthorizationProvider for database authentication.
A reference to a secret in the application's configured SecretManager. This value is resolved at runtime by the interpreter.
The name, ID, or ARN of the secret to fetch (e.g., 'my-project/db-password').
Optional key if the secret is a JSON blob or map (e.g., a specific key in a K8s secret).
Defines an observability endpoint for collecting telemetry data from the QType runtime.
Unique ID of the telemetry sink configuration.
URL endpoint where telemetry data will be sent.
AuthorizationProvider used to authenticate telemetry data transmission.
Additional configuration arguments specific to the telemetry sink type.
Binary thumbs up/down feedback.
Whether to enable optional text explanation field.
Schema for a standalone list of tools.
Schema for a standalone list of type definitions.
Schema for a variable that can serve as input, output, or parameter within the DSL.
Unique ID of the variable. Referenced in prompts or steps.
Type of data expected or produced. Either a CustomType or domain specific type.
Whether this variable can be unset or None. Use '?' suffix in type string as shorthand (e.g., 'text?').
Hints for the UI if needed.
Schema for a standalone list of variables.
Vector database index for similarity search using embeddings.
Unique ID of the index.
Name of the index/collection/table.
Python module path for the vector store implementation (e.g., 'llama_index.vector_stores.qdrant.QdrantVectorStore').
Embedding model used to vectorize queries and documents.
Index-specific configuration and connection parameters.
AuthorizationProvider for accessing the index.
Performs vector similarity search against a vector index.
Unique ID of this component.
Index to search against (object or ID reference).
Configuration for batch execution.
Attributes: num_workers: Number of async workers for batch operations.
1 nested properties
Max number of rows to send to a step at a time
Configuration for caching step outputs. If omitted, caching is disabled.
References to the variables required by this step.
References to the variables where output is stored.
Optional filters to apply during search.
Number of top results to retrieve if not provided in the inputs.
Google Vertex authentication provider supporting gcloud profile or service account.
Unique ID of the authorization configuration.
Local gcloud profile name (if using existing CLI credentials).
Explicit GCP project ID override (if different from profile).
Path to a service account JSON key file.
Vertex region (e.g., us-central1).
Include external YAML file using QType's !include tag
Include raw text file using QType's !include_raw tag
String with environment variable substitution using ${VAR_NAME} or ${VAR_NAME:-default} syntax