Building in Public: Powering Contract Review with Bad Cases & Dify

Why am I doing this? Most contract-review tools today lean on rigid rule engines that miss edge cases and demand constant upkeep. So over the past few weeks, I prototyped a Dify workflow that marries general checks with a library of “Bad Cases.” Here’s the 4-step pipeline:
Preprocess & OCR the contract text
LLM-based initial risk scan
Retrieve similar Bad Cases from our case bank
Deep-dive analysis & structured report generation
I’ve just run a demo on 3 sample contracts and 5 Bad Cases—it flags key issues and spits out actionable rewrite suggestions. Along the way, I wrestled with prompt length limits, list-vs-string type bugs, and context-window headaches… Turns out I’m a pretty decent prompt-engineer after all 😂.
Next up:
• Add a loop node for per-case correlation analysis
• Generate clause-level amendment suggestions directly
• Build an interactive feedback loop for deeper dives
What do you think? Any tips on better retrieval strategies or prompt hacks? Let’s co-create—drop your ideas below!
p/classroomio
p/teaserkit
p/meridian-16
p/runevr
p/reso
p/dots-7
p/pushary
p/citable
p/producthunt
p/kodlo
p/many-displays
p/faraday-4
p/clipjack
p/temp-mail-370
p/leantake
p/neoagent
p/iphotron
p/comcent
p/relai-agent-eval-loop
p/htmldrag
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.