spice-embeddings
Spice Embedding Models
Embedding models transform text into vectors for similarity search and RAG applications.
Basic Configuration
embeddings:
- from: <provider>:<model_id>
name: <embedding_name>
params:
<provider>_api_key: ${ secrets:API_KEY }
Provider Prefixes
| Provider | From Format | Example |
|---|---|---|
openai |
openai:<model_id> |
openai:text-embedding-3-large |
huggingface |
huggingface:huggingface.co/... |
huggingface:huggingface.co/sentence-transformers/all-MiniLM-L6-v2 |
azure |
azure:<deployment> |
azure:my-embedding-deployment |
bedrock |
bedrock:<model_id> |
bedrock:amazon.titan-embed-text-v1 |
google |
google:<model_id> |
google:text-embedding-004 |
file |
file:<path> |
file:./models/embed.safetensors |
Embedding Columns on Datasets
Add vector embeddings to dataset columns for search:
embeddings:
- from: openai:text-embedding-3-small
name: embed_model
params:
openai_api_key: ${ secrets:OPENAI_API_KEY }
datasets:
- from: postgres:documents
name: docs
acceleration:
enabled: true
columns:
- name: content
embeddings:
- from: embed_model
row_id: id
chunking:
enabled: true
target_chunk_size: 512
Chunking Configuration
For long text, enable chunking to split into smaller segments:
columns:
- name: body
embeddings:
- from: embed_model
chunking:
enabled: true
target_chunk_size: 512 # tokens per chunk
overlap_size: 64 # overlap between chunks
Search API
Query embeddings via the search endpoint:
curl http://localhost:8090/v1/search \
-H "Content-Type: application/json" \
-d '{"datasets": ["docs"], "text": "search query", "limit": 10}'
Documentation
More from spiceai/skills
spice-data-connector
Configure individual data source connectors in Spice — PostgreSQL, MySQL, S3, Databricks, Snowflake, DuckDB, GitHub, Kafka, and 25+ more. Use this skill whenever the user wants to add a dataset, connect to a specific database or data source, load data from S3 or files, configure connector-specific parameters, understand file formats (Parquet, CSV, PDF, DOCX), or set up hive partitioning. This skill is the reference for the `from:` and `params:` fields in dataset configuration. For cross-source federation, views, and catalogs, see spice-connect-data.
22spice-models
Configure AI/LLM model providers and connections in Spice — OpenAI, Anthropic, Azure, Google, xAI, Bedrock, Perplexity, Databricks, HuggingFace, and local GGUF models. Use this skill whenever the user wants to add a model, configure a specific LLM provider, set up an OpenAI-compatible endpoint (e.g. Groq, Ollama), serve a local model, configure system prompts, set parameter overrides (temperature, response format), or understand which providers are available. This skill is the model connector reference. For AI features like tools, memory, workers, and NSQL, see spice-ai.
16spicepod-config
Create and configure Spicepod manifests (spicepod.yaml) — the central configuration file for Spice applications. Use this skill whenever the user wants to create a new spicepod.yaml from scratch, understand the overall spicepod structure and available sections, configure runtime settings (ports, caching, telemetry/observability), set up a complete Spice application combining datasets + models + search, or understand deployment models and use cases. This is the "glue" skill that shows how all Spice components fit together in one manifest. For details on specific sections (datasets, models, search, etc.), see the dedicated skills.
16spice-accelerators
Choose and configure the right acceleration engine — Arrow, DuckDB, SQLite, Cayenne, PostgreSQL, or Turso. Use this skill whenever the user needs to pick an accelerator engine, compare engines (e.g. "should I use DuckDB or Cayenne?"), configure engine-specific parameters (duckdb_file, sqlite_file), tune memory vs file mode, or understand engine capabilities and limitations. This skill is the engine selection and tuning guide. For the broader acceleration feature (refresh modes, retention, snapshots, indexes), see spice-acceleration.
15spice-secrets
Configure secret stores in Spice — environment variables, Kubernetes, AWS Secrets Manager, and OS keyring. Use this skill whenever the user needs to manage credentials, API keys, passwords, or tokens in Spice, reference secrets in spicepod.yaml params with ${ store:KEY } syntax, set up .env files, configure secret store precedence, or understand how the `secrets:` section works. Also use when the user asks how to pass database passwords or API keys securely to Spice datasets or models.
12spice-caching
Configure Spice.ai in-memory result caching for SQL queries, search results, and embeddings. Use this skill whenever the user asks about caching configuration, tuning cache TTL or max size, choosing eviction policies (LRU vs TinyLFU), enabling stale-while-revalidate, setting up cache-control headers, using custom cache keys (Spice-Cache-Key), monitoring cache metrics, choosing between plan vs SQL cache key types, or enabling zstd compression for cached results. Also use when the user asks why they're getting MISS/STALE responses or wants to optimize cache hit rates.
7