DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to answer contract questions with cited passages with Carrel

Index a folder of contracts and let an agent pull the clauses it needs before it answers.

Short answer: Run ./deploy.sh from the cloned Carrel folder and wait for the first startup to finish downloading parser models; then copy the contract files into runtime/mirror/<contracts-folder>/ and enable that folder in the console at http://127.0.0.1:9800; check service health and task progress in the console before your first query. All steps.

  • Research
  • Intermediate
  • 90 minutes
  • From the README
  • Any agent

Credentials. If you enable LAN access, set both KB_WEB_HOST and KB_WEB_TOKEN and set KB_SEARCH_TOKEN before using protected search endpoints remotely, since contracts are confidential.

Who it is forA legal, procurement, or operations person who needs quick answers about delivery, acceptance, or payment terms across many contract files.

The problemFinding the right clause across many PDFs and Word files is slow, and an agent without the files will invent terms.

The outcomeThe agent returns answers grounded in retrieved contract passages, with the source text available for review.

What you need first

  • Linux, macOS with Docker Desktop, or Windows through WSL2 (native Windows is not supported)
  • Python 3.12+ and Docker 25+ with Compose v2
  • A text embedding endpoint and a vision-language endpoint, either local or hosted
  • A chat model if you want knowledge graphs
  • Optional: an NVIDIA GPU with NVIDIA Container Toolkit for the local model stack

Steps

  1. Run ./deploy.sh from the cloned Carrel folder and wait for the first startup to finish downloading parser models.
  2. Copy the contract files into runtime/mirror/<contracts-folder>/ and enable that folder in the console at http://127.0.0.1:9800.
  3. Check service health and task progress in the console before your first query.
  4. Run curl -sS http://127.0.0.1:9810/search -H 'Content-Type: application/json' -d '{"question": "What are the delivery and acceptance requirements?", "top_k": 8}' to test retrieval. (inferred, check the README)

Prompt for your agent

Use the Carrel search API in the FengZhenfei/carrel repo at http://127.0.0.1:9810/search to find the clauses about <contract term> across the enabled contract folder. Report each answer with the source passage it came from. Verify that every claim in the answer appears in a returned passage.

Caveat. Carrel does not state that its answers are legally reliable, so a person should check any clause before relying on it.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for FengZhenfei/carrel and "Answer contract questions with cited passages"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer