Concepts / Unstructured and Semistructured Data

Unstructured and Semistructured Data

Photos, videos, logs, and PDFs are unstructured or semistructured, so their contents need organizing before a search tool can use them effectively.

  • Programming

A Phone Full of Photos Nobody Can Search

Imagine a phone that has collected ten thousand photos and several hundred short videos over the years. Each file has a timestamp, but none of them say what is in the picture. Scroll through the library and you will find beaches, receipts, pets, and street signs, yet nothing in the files themselves tells a search tool which is which.

What do you think happens?

The phone holds ten thousand photos, each with a timestamp. Can a search tool find the photo of a red bicycle just by querying the file contents?

  • Yes, the search tool reads the pixels of every photo directly

  • No, the contents are not labeled in a form that a search tool can directly query

Reveal answer
Answer:

No, the contents are not labeled in a form that a search tool can directly query.

A timestamp tells you when a file was made, not what it shows. The information in the picture is real and useful, but it is not organized in a way a search tool can query directly, so it has to be organized first.

The same problem grows as the amount of data grows. The source points out that the volume of data that people and organizations produce keeps rising, and that most of it does not arrive in neat rows and columns. Multiply the phone's library by every company, every customer record, every system log, and every signed contract, and the challenge becomes organizing a very large body of material that a search tool cannot read in its raw form. This article follows how AI helps turn that raw material into something that can be found later.

Following One File Through the Pipeline

The source describes a general direction for the process. Content that has no fixed structure goes in. AI produces either a description or a set of extracted fields. The result is stored so that a later search can reach it. The diagram below traces that path for a single file, from upload to the moment a query can find it.

Raw photo, video,log, or PDFunstructured orsemistructuredAI generatesdescription orextracted fieldsorganizing stepStored as searchabletextcan be searched with thesame tools used for wordsSearch queryfinds the stored materialinput with no fixed fieldsdescription or fieldslater search reaches it
What happens to a raw photo, log, or PDF between upload and search, and which stages must run before a query can find it?

Read the diagram from left to right. The raw file on the left has no fixed fields, so a search tool has nothing to match against. The AI step in the middle is where the file gains searchable form. Its output, whether a text description or structured fields, is what gets stored. Only that stored output is available when a query arrives at the right-hand end.

Unstructured and Semistructured Data Defined

Definition

Unstructured or semistructured data is material such as photos, videos, logs, and PDF documents whose contents are real and useful, but which is not labeled in a form that a search tool can directly query. The source names these four examples directly.

The two words describe different degrees of organization. Unstructured content, such as a photo or a video, has no fixed set of fields. The meaning lives inside the material itself, and a search tool cannot read that meaning without help. Semistructured content carries some organization, such as labeled parts or tagged fields, but the full meaning still is not presented as clean rows and columns. The source groups logs and PDF documents together as examples of unstructured or semistructured data, so the boundary between the two terms is not sharp for every file type.

To make the difference concrete, consider a generated illustration that is not taken from the source. A photo of a beach has no labeled parts at all. A log entry that records a login event might contain a tagged timestamp, a user field, and a message field. A search tool can look at the labeled parts of the log entry directly, but it cannot look inside the beach photo the same way.

Photopixels with no labeledpartsLog entry with taggedfieldssome fields can be readdirectlyVideoframes with no labeledparts
How does a semistructured log entry, with tagged fields, differ from a free-form photo or video in what a search tool can read directly?

Matching a Text Query to a Visual

The source describes two related jobs that AI performs for organizing data. The first is generating text descriptions for images and videos automatically. Instead of a person typing a caption for every file, a model produces a written account of what the file contains. Because that description is text, it can be stored and searched with the same tools used for words.

The second job is matching text queries with visuals. A person types a phrase, such as a description of a scene or an object, and the system returns images that fit that phrase. Together these two jobs turn visual content, which is hard to search directly, into something that behaves like a searchable index.

Text query: redbicycletyped by a personMatching stepcompares the query with theindexImages that fit thephrasereturned to the userStored textdescriptionsgenerated by AI for eachimage or videophrasesearchable textfitting images
How does a text query such as 'red bicycle' get matched to the image that contains one, when the image itself is only pixels?

The diagram shows the core idea. The image never gets compared with the query as raw pixels. Instead, the image has been turned into text beforehand, and the query is matched against that text. The source does not describe the matching method itself, so the learner's takeaway is the flow: the query meets stored text, and the image is returned because of the description that was generated for it.

The source gives two real-world illustrations. Google Photos uses AI to surface images that match a search query, so a user who types a phrase finds pictures without having labeled them by hand. Google Image Search goes a step further. If there is no existing image that matches what a user needs, it can generate one.

Extracting Structured Fields From Documents

Definition

Extraction is the process of pulling structured information out of unstructured sources. It moves information from a source with free layout into labeled fields that can be stored and queried.

The following example is an original illustration rather than a case from the source. A company receives scanned receipts as images. Each receipt is unstructured: the store name, date, items, and total are all present, but they sit in a free layout with no fixed fields. Extraction aims to read those four kinds of information off each image and place them into labeled fields.

Worked example

Turning One Scanned Receipt Into a Record

A company receives a scanned receipt image with no fixed fields. Show how its contents can become structured, searchable information.

  1. 1
    Identify the target fields

    Decide which facts the company needs from each receipt. In this example they are the store name, the date, the items, and the total.

  2. 2
    Read the free layout

    The receipt has no fixed fields, so the extraction step has to locate each fact wherever it appears on the image.

  3. 3
    Place each fact in a labeled field

    Each located fact is written into a named field, which is the move from unstructured content to structured fields that the source describes.

  4. 4
    Store the record

    The labeled fields are stored, so a later search or analysis can query them the way it would query any organized table.

Result

One unorganized receipt image becomes one structured record with a store name, date, items, and total that can be searched.

Simple Versus Complex Extraction in Intelligent Data Processing

The source groups extraction tasks by difficulty. Simple use cases include automatically extracting information from credit cards, driver's licenses, receipts, tickets, and contact information found in email footers. These documents tend to have recognizable patterns, which makes the extraction task comparatively contained.

More complex use cases include extracting data from contracts, reports, and charts. These sources carry more varied layouts and richer meaning, so the extraction task is harder. The source uses the term Intelligent Data Processing, abbreviated IDP, for the industry built around this kind of AI-driven extraction.

AspectSimple extraction use casesComplex extraction use cases
Typical sourcesCredit cards, driver's licenses, receipts, tickets, contact information in email footersContracts, reports, charts
LayoutRecognizable patternsMore varied layouts
MeaningComparatively containedRicher meaning
DifficultyComparatively contained taskHarder task

Simple and complex extraction use cases in Intelligent Data Processing, as grouped by the source

Where AI Supports Data Analysis

Organizing data and analyzing it are closely connected. The source notes that AI is very good with data analysis and that it can write programs that generate data visualizations, identify outliers, and make predictions such as revenue forecasts. Each of these tasks takes data that has already been gathered and asks a question of it.

  • Generating data visualizations, which turn gathered data into a picture a person can read.
  • Identifying outliers, which flags values that sit far from the rest of a dataset.
  • Making predictions such as revenue forecasts, which use past figures to estimate future ones.

An outlier is a value that sits far from the rest of a dataset. Spotting outliers helps a team notice errors or unusual events in their records. A revenue forecast uses past figures to estimate future ones. The source names these as examples of what AI can do, and it does not describe the specific methods used, so this article keeps to the tasks themselves.

Extraction, description, and search therefore form one chain. Extraction and description make raw material organized, search lets people reach that organized material, and analysis asks questions of the data once it has been gathered. Organizing comes first in the chain because none of the later questions can be answered until the material is in a usable form.

Mistakes Learners Make With Organized Data

  • Common mistake

    Assuming a search tool can read the contents of a photo or video directly

    What it looks like

    Expecting a search for 'red bicycle' to find a photo that has never been described or indexed

    Why it fails

    The source says the contents are not labeled in a form a search tool can directly query, so the material must be organized first.

    Do this instead

    Remember that AI generates text descriptions that are stored and searched, and the image is found through that text.

  • Common mistake

    Treating a timestamp as a description of what a file contains

    What it looks like

    Believing that a photo's timestamp tells you it shows a beach

    Why it fails

    A timestamp records when a file was made. The source states that none of the files say what is in the picture.

    Do this instead

    Keep time information and content information separate when you think about how a file can be found.

  • Common mistake

    Assuming all extraction tasks are equally difficult

    What it looks like

    Thinking that pulling a total from a receipt is the same task as extracting facts from a contract

    Why it fails

    The source groups receipts with simple use cases and contracts with complex ones, because layouts and meaning vary far more in the complex group.

    Do this instead

    Judge a task by how predictable the source's patterns are and how rich its meaning is.

  • Common mistake

    Confusing the search step with the organizing step, when search can only work after the content has been organized

Tracing a Scanned Contract Archive

MEDIUM

A records office has ten thousand scanned contracts, each an image with no fixed fields. Staff want to find every contract that mentions a specific payment date. Using the pipeline from earlier, name the stages that must run before a query can find those contracts, and say which stage the contracts will need to pass through first. Then classify this extraction task as simple or complex and justify your answer using the source's grouping.

Hints
  • Start with the raw file on the left of the pipeline and follow it to the search query on the right.
  • Ask what must exist in the stored index before a search for a payment date can succeed.
  • Compare contracts with the source's simple examples such as receipts, and with its complex examples such as contracts, reports, and charts.

Key Takeaways

  • Photos, videos, logs, and PDF documents are unstructured or semistructured, so their contents are not labeled in a form a search tool can query directly and must be organized first.
  • AI can generate text descriptions for images and videos, and that text can be stored and searched; it can also match a text query with visuals that fit the phrase.
  • Extraction pulls structured fields out of unstructured sources, with simple use cases such as receipts and credit cards and complex use cases such as contracts, reports, and charts within Intelligent Data Processing.
  • AI supports data analysis tasks such as generating visualizations, identifying outliers, and making predictions such as revenue forecasts, and these tasks come after the data has been gathered and organized.

More concepts starting with U