## Lesson — Implement strict validation for text length and tag counts

**Tags:** llm, validation, parsing

Implement strict validation for text length and tag counts when parsing LLM outputs to prevent hallucinations or malformed data from polluting the knowledge base. This acts as a final gate before untrusted AI output is persisted to version-controlled surfaces.
