---
name: "vespa-realtime-search-and-rank"
description: "Serve structured search, tensor computations, and machine-learned ranking models with Vespa."
metadata:
  author: "Vespa Engine"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "deploy vespa application"
  - "configure vespa rank profile"
  - "query vespa tensor search"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Vespa Real-Time Big Data Search & ML Ranking

Configures Vespa applications: writing schemas with document types and tensor fields, configuring phased ranking expressions (first-phase and second-phase), and deploying Vespa services with Docker.

## When to Invoke
Invoke this skill whenever you need to:
- deploy vespa application
- configure vespa rank profile
- query vespa tensor search

## Execution SOP & Rules
1. Define schema in services.xml and schemas/item.sd specifying document fields and tensors.
2. Define rank-profile with first-phase expression: bm25(title) + closeness(field, embedding).
3. Package application directory and deploy: vespa deploy --wait 300.
4. Execute queries via HTTP POST to /search/ with JSON body specifying yql and input tensors.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
