---
name: extract-structured-records-from-unstructured-text
description: "Extracts structured records from unstructured notes, papers, and document excerpts by mapping entities to a target schema and validating required fields. Use when a person needs clean, schema-aligned data staged for review before database insertion."
license: CC-BY-4.0
compatibility: "Needs access to: Notes, Database, Chat."
metadata:
  author: "BotBento Editorial"
  version: "2026-10-16"
  source: "https://botbento.com/usecases/extract-structured-records-from-unstructured-text/"
  kind: skill
  hermes:
    tags: ["parsing", "database", "schema", "research"]
    category: research
---
# Extract structured records from unstructured text

Parse messy documents and notes into schema-compliant records for your database.

## When to use

Turn unstructured notes, research papers, and document excerpts into clean, schema-aligned data objects. The bot extracts target attributes, verifies format adherence, and stages the structured records for review before inserting them into your knowledge base or database.

## Inputs

- `raw_document_text`: Unstructured document text, notes, or excerpts to analyze and convert into a structured record.
- `target_schema`: Schema or field list that the extracted record must match, including required properties and relations.

## Steps

1. When you ask: Receive raw document text (A person provides raw document text or excerpts in chat and requests schema-aligned structured records.)
2. Map entities to schema
3. Confirm before saving record

## Instructions

When raw text or document excerpts are provided, analyze the material and extract entity names, descriptions, metadata, and relations matching the target schema. Validate that all required properties are populated and highlight any ambiguous values. Format the final output as a clean data record. Always ask for user confirmation before inserting, updating, or deleting any records in the database.

## Approvals

- Saving the structured record after user review
- Inserting extracted records into the database
- Updating existing records in the database
- Deleting records from the database

## Output

Clean, schema-aligned structured data record with extracted entities, metadata, relations, and highlighted ambiguous values. (format: json)

## Source

Summarized in our own words from [llama-cpp-agent: The llama-cpp-agent framework is a tool designed for easy interaction with Large Language Models (LLMs). Allowing users to ](https://github.com/Maximilian-Winter/llama-cpp-agent) (GitHub, checked 2026-10-16). Any results described there are the authors’ own.

From the BotBento use-case directory: https://botbento.com/usecases/extract-structured-records-from-unstructured-text/. Licence: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
