Single source of truth for Weaviate prompt templates. Used throughout Weaviate to power copy-paste coding experiences, quick-start plugins, and documentation pages.
prompts/
{feature}/
{use-case}/
{environment}/
prompt.{language}.md
- feature — Weaviate feature area or page context (e.g.
quickstart,hybrid-search,rag) - use-case — Specific task the prompt builds (e.g.
build-movie-search-app) - environment —
cloudorlocal - language —
python,typescript,go,java,csharp, etc.
Paths are deterministic. A consumer that knows the four dimensions can construct the raw URL directly:
https://raw.githubusercontent.com/weaviate/weaviate-prompts/main/prompts/{feature}/{use-case}/{environment}/prompt.{language}.md
Each prompt file uses YAML frontmatter followed by the prompt body in markdown:
---
id: build-movie-search-app
title: Build a Weaviate Web App with FastAPI
feature: quickstart
environment: cloud
language: python
framework: FastAPI + Uvicorn
estimated_time_minutes: 10
---
# Build a Weaviate Web App with FastAPI
Prompt content here...| Field | Required | Description |
|---|---|---|
id |
Yes | Unique identifier for the use-case (shared across languages) |
title |
Yes | Human-readable title |
feature |
Yes | Feature area (must match directory) |
environment |
Yes | cloud or local (must match directory) |
language |
Yes | Programming language (must match filename) |
framework |
Yes | Framework used (e.g. FastAPI + Uvicorn, Next.js (App Router) + Tailwind CSS) |
estimated_time_minutes |
No | Estimated time for the user to complete |
Requires pre-commit and Node.js.
pip install pre-commit # if not already installed
make install # installs git hooksOn every commit, pre-commit will automatically:
- Validate frontmatter (required fields, path consistency)
- Regenerate
index.jsonif any prompt files changed - Fix trailing whitespace and missing final newlines
- Validate
index.jsonis well-formed JSON - Check for merge conflict markers
| Command | Description |
|---|---|
make install |
Install pre-commit hooks |
make check |
Run all pre-commit checks against all files |
make index |
Regenerate index.json from prompt frontmatter |
make validate |
Validate all prompt files (frontmatter, path consistency) |
make clean |
Auto-fix whitespace and newline issues |
make list |
List all prompt files |
make help |
Show available commands |
The root index.json provides a grouped listing of all prompts with metadata:
{
"version": "1.0.0",
"prompts": {
"quickstart": {
"id": "build-movie-search-app",
"description": "...",
"features": ["..."],
"languages": {
"python": { "path": "prompts/quickstart/...", "title": "...", "framework": "..." }
}
}
}
}Top-level fields (description, detailedDescription, features) are hand-authored. Per-language fields (path, title, framework) are generated from frontmatter. Run make index to regenerate; the script preserves hand-authored fields.
- Create the file at
prompts/{feature}/{use-case}/{environment}/prompt.{language}.md - Add frontmatter with all required fields
- Write the prompt body
- If this is a new feature, add
description,detailedDescription, andfeaturesto the feature entry inindex.json - Run
make checkto validate and update the index - Commit — the pre-commit hook will catch any issues
See index.json for the full listing of available prompts, languages, and metadata.