Prompt #140

Back to prompts
AP11 Contradiction Detection Query
Analysis Β· openai/gpt-4.1
5/5
Variables
topic
Tags
stack-aware,rag-stack,ap11,contradiction-detector,lessons,governance
Source
research-2026-05-01-stack-aware
Use count
0
Created
2026-05-01T18:30:48.776731+00:00
Updated
2026-05-01T18:30:48.776731+00:00

Content

Investigate a contradiction signal in glug_lessons using the AP11 contradiction-detector.

Context:
- rag.db at /persistent/rag-stack/rag.db
- Tables: glug_lessons, glug_lessons_fts (FTS5), glug_lessons_embeddings_v2
- Contradiction detector flags lessons with conflicting claims on topic `{topic}`

Investigation steps:
1. Query FTS: `SELECT id, title, body FROM glug_lessons_fts WHERE body MATCH '{topic}'`
2. Fetch embeddings for flagged lessons and compute cosine similarity β€” high sim + opposing claims = contradiction
3. Check status field: proposed/active/deprecated (deprecated = resolved contradiction)
4. Use agent-quality-supervisor: `bin/agent-quality-supervisor --check contradiction --topic "{topic}"`
5. Review at https://orchestrator.joelduss.xyz/governance/knowledge/ β€” contradiction signals appear in review queue

Resolution: deprecate the superseded lesson, update winner lesson's confidence to `high`.