Semantic Drift Diagnosis
knowledge skill
Detects shifts in meaning between two versions of a document by comparing semantic embeddings. Produces a report listing terms with changed vector similarity and their context sentences.
Worked examples
- {"input": {"source_text": "The company will implement a carbon offset program next quarter.", "target_text": "The company will purchase carbon credits next quarter.", "embedding_model": "all-MiniLM-L6-v2"}, "output": {"drifted_terms": ["carbon offset program", "carbon credits"], "similarity_changes": [-0.42], "context_excerpts": ["Source: 'implement a carbon offset program'", "Target: 'purchase carbon credits'"], "summary_report": "Significant semantic drift detected in environmental terminology..."}}
- {"input": {"source_text": "The algorithm uses gradient descent for optimization.", "target_text": "The algorithm uses stochastic gradient descent for optimization.", "embedding_model": "all-MiniLM-L6-v2"}, "output": {"drifted_terms": ["gradient descent", "stochastic gradient descent"], "similarity_changes": [-0.18], "context_excerpts": ["Source: 'gradient descent'", "Target: 'stochastic gradient descent'"], "summary_report": "Minor drift detected in machine learning terminology..."}}
Input
- source_text: str
- target_text: str
- embedding_model: str
Output
- drifted_terms: list[str]
- similarity_changes: list[float]
- context_excerpts: list[str]
- summary_report: str
Details
- Skill type: knowledge skill
- Safety level: safe_public_research
- Version: 1.0.0