CKL Explained
Deep dive into the Compliance Knowledge Layer -- how it works, why it matters, and how to configure it.
What is CKL?
The Compliance Knowledge Layer (CKL) is a separate retrieval system that enriches Planara's responses with industry standards, regulations, and safety best practices. It exists alongside the main document index but serves a different purpose.
Main document index: "Here is how to do the procedure" CKL: "Here are the safety standards and regulations relevant to this procedure"
Architecture
Main Index CKL Index
├── Service manual content ├── ABYC E-11 (electrical)
├── Owner's manual content ├── ABYC H-2 (ventilation)
├── Parts catalog content ├── Corrosion best practices
└── TSB content └── Custom safety rulesBoth indexes are searched, but CKL is only activated when trigger terms match.
Trigger mechanism
CKL activation follows this decision tree:
- Query arrives (e.g., "How do I check the sacrificial anodes?")
- Main retrieval runs normally
- Query text and retrieved documentation are scanned for trigger terms
- If any trigger matches (e.g., "anode" matches trigger "anode"), CKL search runs
- CKL sources above the relevance threshold are included as generation context
- The AI generates the response with CKL citations
Trigger terms
Comma-separated keywords configured on the CKL page. Examples:
corrosion, galvanic, anode, zincABYC, electrical, grounding, bondingfuel system, ventilation, blower
Thresholds
| Threshold | Description | Default |
|---|---|---|
| Confidence | CKL activates when main retrieval confidence is below this | 0.7 |
| Relevance | Minimum score for a CKL source to be included | 0.55 |
| Max sources | Maximum CKL sources per response | 5 |
Sources
CKL sources come from two places:
1. Manual entries
Text-based knowledge added directly on the CKL page. Each source has:
- A name and standard ID
- The actual content (indexed for semantic search)
- Topic tags
- An optional source URL
2. Ingested CKL documents
PDFs uploaded with the "CKL" document type. These are processed by the ingestion pipeline but stored in the CKL index instead of the main index.
How CKL appears in responses
Technician frontend
CKL citations appear as blue chips on procedure steps:
Step 3: Replace the sacrificial anodes
[ABYC E-11] [CORR-BP-001]Tapping a chip shows the source standard, relevant excerpt, and link.
API response
CKL references appear in the response schema as ckl_refs on procedure steps:
{
"procedure": [
{
"step": "Replace the sacrificial anodes",
"ckl_refs": [0, 2]
}
]
}Per-tenant isolation
Each namespace has its own CKL configuration:
- A marine tenant gets ABYC standards
- A factory tenant gets ISO/OSHA standards
- An HVAC tenant gets EPA and building code references
There is no cross-contamination between namespaces.
When to use CKL vs. main documents
| Content | Where to put it |
|---|---|
| OEM service procedures | Main document index (as service_manual) |
| Industry standards (ABYC, ISO, OSHA) | CKL |
| Manufacturer safety warnings | Main document index (parsed as safety_warning content) |
| Regulatory compliance requirements | CKL |
| Best practices not in any manual | CKL |
| Technical service bulletins | Main document index (as tsb) |
Examples: trigger configs that work, and ones that don't
Triggers decide when CKL fires. Too narrow and the standard never surfaces. Too broad and every query drags in irrelevant standards and bloats the generation context.
Good configs
Specific terms, narrow scope, real synonyms a tech would actually type or that show up in the manual.
Standard: ABYC E-11 (DC electrical systems)
Triggers: battery, ground, bonding, ABYC E-11, DC wiring, shore power, GFCIStandard: ABYC H-24 (gasoline fuel systems)
Triggers: fuel hose, fuel tank, fuel pump, vent, fill, USCG Type A1, anti-siphonStandard: Corrosion best practices
Triggers: anode, zinc, sacrificial, galvanic, MGPS, bonding wire, stray currentNote: include both the formal term (galvanic) and what a tech actually writes (zinc). Include the standard ID (ABYC E-11) so direct lookups hit.
Common mistakes
Standard: ABYC E-11
Triggers: safety, electrical, wire ← BADFires on almost every procedure. Pollutes the generation context with E-11 even when the query is about a fuel filter. Use specific nouns from the standard's actual scope.
Standard: ABYC E-11
Triggers: battery, ground, bonding
Standard: Corrosion best practices
Triggers: battery, ground, bonding ← BAD (duplicate)Two standards on the same triggers means every battery query loads both. Pick the primary owner of each term, or split — e.g., E-11 owns battery, ground, bonding, corrosion owns anode, zinc, galvanic.
Standard: ABYC H-24
Triggers: fuel system ← BAD (missing synonyms)Misses gas, gasoline, fuel hose, fuel pump, vent. Real queries use those words, not the formal phrase.
Validate before you ship
The /[ns]/knowledge page doesn't run test queries directly — it edits trigger config, thresholds (confidence_threshold, relevance_threshold, top_k), and the standards list. To verify triggers fire correctly, you have to query the system end-to-end:
- Save the trigger config on
/[ns]/knowledge. - Run 5–10 real tech queries from the namespace — either through the technician app, or by hitting
POST /v1/querydirectly withskip_cache=true. - Inspect each response's
ckl_sourcesarray. Anything firing on every query is too broad — narrow the triggers. Anything that doesn't fire when it should — add the missing synonym. - If you need a single-query check while iterating, the same
POST /v1/querycall with one trigger term in the query body will tell you whether the standard reaches generation at all.
Triggers are silent failures: nothing breaks, the answer just quietly stops citing the standard. Re-validate after every trigger or threshold change.