regex-vs-llm-structured-text

Parse structured text into data using regex with selective LLM validation.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Maelwalser/claude-config --skill regex-vs-llm-structured-text-maelwalser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: regex-vs-llm-structured-text
Source: https://github.com/Maelwalser/claude-config/tree/main/skills/regex-vs-llm-structured-text
Command: npx skills add https://github.com/Maelwalser/claude-config --skill regex-vs-llm-structured-text-maelwalser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables reliable, cost-effective extraction of structured data from repeating patterns in text (quizzes, forms, invoices) by using deterministic regex for the bulk of work and reserving LLM validation for edge cases to avoid unnecessary cost and latency.

Core Features & Use Cases

  • Deterministic extraction: Use regex patterns to parse repeating structures like numbered questions, form fields, and table rows.
  • Confidence-driven validation: Score extractions and automatically route low-confidence items to an LLM validator only when needed.
  • Hybrid pipeline: Combine regex parsing, text cleaning, confidence scoring, and selective LLM calls to maximize accuracy while minimizing cost.
  • Use Case: Parse a 400-item quiz or a batch of invoices, automatically flag ambiguous entries, and correct them with minimal LLM calls.

Quick Start

Use the skill to parse the document and return structured items while only calling the LLM for entries flagged below the confidence threshold.

Frequently Asked Questions about regex-vs-llm-structured-text

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract structured data from invoices without high LLM costs?

Use a hybrid regex and LLM pipeline to extract structured data from invoices by applying deterministic regex for the bulk of parsing and reserving LLM validation only for low-confidence edge cases to minimize cost and latency.

What is confidence scoring in structured text extraction?

Confidence scoring in structured text extraction evaluates the reliability of parsed items, automatically flagging low-confidence entries so an LLM validator is invoked only when needed to correct ambiguous data.

How do I parse repeating patterns in quiz forms accurately?

Parse repeating patterns in quiz forms by defining regex patterns to extract numbered questions and form fields deterministically, then routing ambiguous entries to an LLM validator to ensure high accuracy.

Can I use regex and LLM together for batch document processing?

Yes, you can use regex and LLM together for batch document processing by combining deterministic regex parsing with selective LLM calls, allowing you to process hundreds of items while controlling costs.

What is the best way to handle edge cases in form extraction?

The best way to handle edge cases in form extraction is to score extraction confidence and automatically route only low-confidence items to an LLM validator, avoiding unnecessary processing for clean data.

When should I not use a hybrid regex and LLM pipeline?

You should not use a hybrid regex and LLM pipeline when your documents lack repeating patterns for deterministic regex extraction, as the pipeline relies on consistent structures to parse the bulk of data before LLM validation.