Search an embedding store

Perform a semantic search using a query string.

yaml
type: "io.kestra.plugin.ai.rag.Search"

Search an embedding store

yaml
id: search_embeddings_flow
namespace: company.ai

tasks:
  - id: ingest
    type: io.kestra.plugin.ai.rag.IngestDocument
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      modelName: gemini-embedding-exp-03-07
      apiKey: "{{ kv('GEMINI_API_KEY') }}"
    embeddings:
      type: io.kestra.plugin.ai.embeddings.KestraKVStore
    drop: true
    fromExternalURLs:
      - https://raw.githubusercontent.com/kestra-io/docs/refs/heads/main/content/blogs/release-0-22.md

  - id: search
    type: io.kestra.plugin.ai.rag.Search
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      modelName: gemini-embedding-exp-03-07
      apiKey: "{{ kv('GEMINI_API_KEY') }}"
    embeddings:
      type: io.kestra.plugin.ai.embeddings.KestraKVStore
    query: "Feature Highlights"
    maxResults: 5
    minScore: 0.5
    fetchType: FETCH
Properties

Embedding store provider

Maximum number of results

Minimum similarity score

Embedding model provider

Query string

Default NONE
Possible Values
STOREFETCHFETCH_ONENONE
SubType string

List of matching text results

Count of fetched or stored items

Format uri

Output file URI in Kestra’s internal storage

Only available when fetchType is set to STORE

API endpoint

The Azure OpenAI endpoint in the format: https://{resource}.openai.azure.com/

Model name

API Key

Client ID

Client secret

API version

Tenant ID

The database name

The database server host

The database password

The database server port

The table to store embeddings in

The database user

Default false

Whether to use use an IVFFlat index

An IVFFlat index divides vectors into lists, and then searches a subset of those lists closest to the query vector. It has faster build times and uses less memory than HNSW but has lower query performance (in terms of speed-recall tradeoff).

The API key

The collection name

The database server host

The database server port

Endpoint URL

Project location

Model name

Project ID

API Key

Model name

The collection name

The host

The index name

The scheme (e.g., mongodb+srv)

Create the index

The database

SubType string

The metadata field names

The connection string options

The password

The username

API Key

Model name

API base URL

Default {{flow.id}}-embedding-store

The name of the KV pair to use

The database base URL

The collection name

The database server host

The database server port

Default embedding-index

The index name

Basic authorization password

Basic authorization username

Token

Milvus auth token. Required if authentication is enabled; omit for local deployments without auth.

Auto flush on delete

If true, flush after delete operations.

Auto flush on insert

If true, flush after insert operations. Setting it to false can improve throughput.

Collection name

Target collection. Created automatically if it does not exist. Default: "default".

Consistency level

Read/write consistency level. Common values include STRONG, BOUNDED, or EVENTUALLY (depends on client/version).

Database name

Logical database to use. If not provided, the default database is used.

Host

Milvus host name (used when uri is not set). Default: "localhost".

ID field name

Field name for document IDs. Default depends on collection schema.

Index type

Vector index type (e.g., IVF_FLAT, IVF_SQ8, HNSW). Depends on Milvus deployment and dataset.

Metadata field name

Field name for metadata. Default depends on collection schema.

Metric type

Similarity metric (e.g., L2, IP, COSINE). Should match the embedding provider’s expected metric.

Password

Required when authentication/TLS is enabled. See https://milvus.io/docs/authenticate.md

Port

Milvus port (used when uri is not set). Typical: 19530 (gRPC) or 9091 (HTTP). Default: 19530.

Retrieve embeddings on search

If true, return stored embeddings along with matches. Default: false.

Text field name

Field name for original text. Default depends on collection schema.

URI

Connection URI. Use either uri OR host/port (not both). Examples:

  • gRPC (typical): "milvus://host: 19530"
  • HTTP: "http://host: 9091"

Username

Required when authentication/TLS is enabled. See https://milvus.io/docs/authenticate.md

Vector field name

Field name for the embedding vector. Must match the index definition and embedding dimensionality.

API Key

Model name

Default https://api.deepseek.com/v1

API base URL

The API key

The cloud provider

The index

The cloud provider region

The namespace (default will be used if not provided)

API Key

Model name

API key

Weaviate API key. Omit for local deployments without auth.

Host

Cluster host name without protocol, e.g., "abc123.weaviate.network".

Avoid duplicates

If true (default), a hash-based ID is derived from each text segment to prevent duplicates. If false, a random ID is used.

Possible Values
ONEQUORUMALL

Consistency level

Write consistency: ONE, QUORUM (default), or ALL.

gRPC port

Port for gRPC if enabled (e.g., 50051).

Metadata field name

Field used to store metadata. Defaults to "_metadata" if not set.

SubType string

Metadata keys

The list of metadata keys to store - if not provided, it will default to an empty list.

Object class

Weaviate class to store objects in (must start with an uppercase letter). Defaults to "Default" if not set.

Port

Optional port (e.g., 443 for https, 80 for http). Leave unset to use provider defaults.

Scheme

Cluster scheme: "https" (recommended) or "http".

Secure gRPC

Whether the gRPC connection is secured (TLS).

Use gRPC for batch inserts

If true, use gRPC for batch inserts. HTTP remains required for search operations.

Model endpoint

Model name

API Key

Model name

API base URL

SubType string
Min items 1

List of HTTP Elasticsearch servers

Must be a URI like https://example.com: 9200 with scheme and port

Basic authorization configuration

SubType string

List of HTTP headers to be sent with every request

Each item is a key: value string, e.g., Authorization: Token XYZ

Path prefix for all HTTP requests

If set to /my/path, each client request becomes /my/path/ + endpoint. Useful when Elasticsearch is behind a proxy providing a base path; do not use otherwise.

Treat responses with deprecation warnings as failures

Trust all SSL CA certificates

Use this if the server uses a self-signed SSL certificate

The name of the index to store embeddings

AWS Access Key ID

Model name

AWS Secret Access Key

Default COHERE
Possible Values
COHERETITAN

Amazon Bedrock Embedding Model Type