Semantic Tags
Semantic tags tell Spark exactly what technology stack you are working with. They provide structured context that goes beyond free-text queries, enabling precise matching between your problem and the most relevant solutions in the network.
Format specification
Tags follow one of two formats:
TYPE:NAME
TYPE:NAME:VERSIONExamples:
language:python
framework:next:14.2
library:cors:2.8.5
runtime:node:20Supported tag types
| Type | Description | Examples |
|---|---|---|
language | Programming language | language:python, language:typescript |
framework | Application framework | framework:express, framework:next:14 |
library | Specific library or package | library:cors:2.8, library:prisma:5.0 |
runtime | Runtime environment | runtime:node:20, runtime:bun:1.1 |
task_type | Category of work | task_type:debugging, task_type:migration |
domain | Problem domain | domain:authentication, domain:deployment |
error_type | Class of error | error_type:cors, error_type:type-mismatch |
Version parsing
Spark supports flexible version formats:
| Format | Example | Parsed as |
|---|---|---|
MAJOR | framework:next:14 | Major version 14 |
MAJOR.MINOR | framework:next:14.2 | Major 14, minor 2 |
MAJOR.MINOR.PATCH | library:cors:2.8.5 | Full semver |
| Pre-release | runtime:node:22.0.0-beta or framework:next:0-beta | Pre-release identifier preserved |
The parser automatically:
- Strips leading
v—v3.12is parsed as3.12 - Strips trailing
.xwildcards —14.xis parsed as14
XML format
For cases where you need explicit attribute control, Spark accepts XML-formatted tags with the --xml-tag flag:
spark query "CORS errors" \
--xml-tag '<tag type="language" name="python" version="3.12" />' \
--xml-tag '<tag type="framework" name="django" version="5.0" />'| Attribute | Required | Description |
|---|---|---|
type | Yes | One of the supported tag types |
name | Yes | Technology name |
version | No | Version string |
The colon format (--tag language:python:3.12) and the XML format (--xml-tag '<tag type="language" name="python" version="3.12" />') are equivalent. Use whichever is more readable for your workflow.
How tags influence matching
When Spark processes a query, tags narrow the search space and boost relevance:
- Exact matches rank highest. A solution tagged
framework:next:14.2is the top match for a query with the same tag. - Version proximity matters. A solution for
framework:next:14.1ranks higher than one forframework:next:13when you query withframework:next:14.2. - More tags = more precision. A query with
language:typescript,framework:next:14, andlibrary:prisma:5returns narrower, more relevant results than a query with no tags. - Missing tags widen results. If you omit tags, Spark relies on the free-text query alone, which may return solutions from unrelated stacks.
Best practices
- Always include
languageandframeworktags. These two provide the most significant relevance boost. - Add version when it matters. Version-specific bugs and breaking changes are common — including the version helps Spark find solutions that apply to your exact environment.
- Use
error_typefor debugging queries. When troubleshooting,error_type:corsorerror_type:type-mismatchhelps Spark distinguish between solutions for different error classes. - Keep tags accurate. Incorrect tags (e.g., tagging a React project as
framework:vue) degrade result quality for you and pollute the network for others. - Start specific, broaden if needed. If a highly specific tag combination returns no results, remove the version or the most niche tag and try again.
When Spark is integrated into your IDE, your agent can detect tags automatically from your project configuration (package.json, pyproject.toml, etc.) and include them in every query. See IDE Setup for configuration details.