Priority System
Context42 uses a priority system to rank search results. This lets you ensure your personal coding standards always outrank general reference documentation.
How priorities work
Each source has a priority value between 0.1 and 1.0:
- 0.8–1.0 — Your personal standards and rules (highest importance)
- 0.5–0.7 — Team conventions and guidelines
- 0.1–0.4 — Reference documentation, examples
When Context42 searches for relevant content, it combines semantic similarity with priority to produce a final score. Higher-priority sources are boosted in the rankings.
Setting priorities
Set the priority when adding a source:
c42 add ./my-rules --name rules --priority 0.95
c42 add ./team-docs --name team --priority 0.6
c42 add ./reference --name ref --priority 0.3
Updating priorities
Change the priority of an existing source:
c42 set-priority rules 1.0
Example scenario
You have a personal rule: “Always use snake_case for Python variables.” Your reference docs use camelCase in examples. With priorities, your rule ranks higher — so your AI assistant follows your convention, not the examples.