Skip to content

ramble-extract-fields

by official

Text

Parse unstructured ramble text into structured JSON fields using AI

ramble extraction structured-data
# ramble-extract-fields

Parse unstructured ramble text into structured JSON fields using AI

## Installation

This is a CmdForge tool. Install it via the CmdForge registry or GUI, and use it like any Unix command.

## Usage

```bash
# Extract specific fields from rambling text
echo "I'm thinking of building a web app... maybe using React? Not sure about the backend yet, probably Node.js or Python. Target users would be students and teachers." | ramble-extract-fields --fields '["technology", "target_audience", "uncertainties"]'

# Provide extraction criteria for specific fields
echo "The project should cost around $5000, take 3 months, and involve 2 developers" | ramble-extract-fields \
  --fields '["budget", "timeline", "team_size"]' \
  --criteria '{"budget": "Extract as numeric value in USD", "timeline": "Express in months"}'

# Lock known fields as ground truth
echo "We're definitely using PostgreSQL for the database. Still deciding on the frontend framework." | ramble-extract-fields \
  --fields '["database", "frontend", "backend"]' \
  --locked '{"database": "PostgreSQL"}'

# Custom prompt and character limit
cat long_brainstorm.txt | ramble-extract-fields \
  --fields '["main_idea", "concerns", "next_steps"]' \
  --prompt "Extract key information from this brainstorming session" \
  --tail-chars 4000
```

## Arguments

| Flag | Default | Description |
|------|---------|-------------|
| `--fields` | *(required)* | JSON array of field names to extract |
| `--criteria` | `{}` | JSON object mapping field names to criteria strings |
| `--locked` | `{}` | JSON object of locked field name → value pairs (ground truth) |
| `--prompt` | `Explain your idea` | User-facing prompt/instruction |
| `--tail-chars` | `6000` | Max characters of ramble text to include (from tail) |

## How It Works

1. **Build extraction prompt** - Constructs an AI prompt incorporating field definitions, criteria, locked values, and the ramble text (limited to tail-chars)
2. **Call AI for field extraction** - Sends the prompt to the claude-sonnet provider for intelligent field extraction
3. **Parse and validate JSON response** - Validates and formats the AI response as clean JSON output

## Dependencies

None

No reviews yet.

Issues

No issues reported for this tool.