Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 1.84 KB

File metadata and controls

79 lines (52 loc) · 1.84 KB

duh batch

Run consensus on multiple questions from a file.

Synopsis

duh batch [OPTIONS] FILE

Description

Processes multiple questions sequentially from a file. Supports plain text (one question per line) and JSONL (one JSON object per line with a question field). The format is auto-detected.

Each question runs through the consensus (or voting) protocol independently. Results are displayed as they complete.

See Batch Mode for input format details and examples.

Arguments

Argument Required Description
FILE Yes Path to a text or JSONL file containing questions

Options

Option Type Default Description
--protocol choice consensus Default protocol: consensus, voting, or auto. JSONL entries can override per-question.
--rounds int From config (3) Max consensus rounds
--format choice text Output format: text (human-readable) or json (structured)

Examples

Basic batch run:

duh batch questions.txt

JSON output for scripting:

duh batch questions.txt --format json > results.json

Use voting protocol:

duh batch questions.txt --protocol voting

Fewer rounds for faster processing:

duh batch questions.txt --rounds 1

Input file formats

Plain text -- one question per line, # comments and blank lines skipped:

What database should I use for SaaS?
# This line is a comment
REST vs GraphQL for mobile apps?

JSONL -- each line is a JSON object:

{"question": "What database should I use?"}
{"question": "REST vs GraphQL?", "protocol": "voting"}

Related

  • Batch Mode -- Full guide with output examples
  • ask -- Run a single consensus query