> ## Documentation Index
> Fetch the complete documentation index at: https://developers.lighton.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tutorials

> Step-by-step guides for building common document intelligence workflows.

Each tutorial walks through one endpoint end to end, with copy-pasteable examples. New to retrieval-augmented generation? Start with [From documents to answers](/tutorials/from-documents-to-answers) to learn the concepts and pick the right endpoint. Otherwise, jump straight to [Uploading & managing files](/tutorials/files), then [Searching documents](/tutorials/search).

## Build a searchable knowledge base

Ingest documents once, then query them. A persistent, indexed corpus you can search or ask questions over.

<Columns cols={3}>
  <Card title="Uploading & managing files" icon="cloud-arrow-up" href="/tutorials/files">
    Upload documents into LightOn so they become searchable in seconds, plus tagging, metadata, listing, and filtering.
  </Card>

  <Card title="Searching documents" icon="magnifying-glass" href="/tutorials/search">
    Find the most relevant passages with a natural-language query, with scoping, reranking, and vision-mode search.
  </Card>

  <Card title="Asking questions" icon="comments" href="/tutorials/ask">
    Get a grounded, LLM-generated answer with the sources it used, returned synchronously or streamed token by token.
  </Card>
</Columns>

## Classify and organise documents

Three layers that compose: partition files into workspaces, group them with tags, and enrich them with structured facets. Pick the simplest one that solves your problem.

### Workspaces

Hard containers that isolate a team's, customer's, or tenant's documents. The only layer that's also a permission boundary, via workspace-scoped API keys.

<Columns cols={1}>
  <Card title="Partitioning documents into workspaces" icon="box-archive" href="/tutorials/workspaces">
    Isolate documents per team, customer, or tenant, and scope API keys for permission-level segmentation.
  </Card>
</Columns>

### Tags

Flat, reusable labels that group documents into collections, even across workspaces.

<Columns cols={1}>
  <Card title="Grouping documents with tags" icon="tags" href="/tutorials/tags">
    Build reusable collections that cut across workspaces, then scope search and ask to a collection.
  </Card>
</Columns>

### Facets

Typed, hierarchical metadata for precise structured queries: classify by content type and filter by attribute values.

<Columns cols={3}>
  <Card title="Organizing documents with metadata" icon="layer-group" href="/tutorials/facets/overview">
    Understand content types, attributes, and how facets enrich search.
  </Card>

  <Card title="Defining content types" icon="sitemap" href="/tutorials/facets/define">
    Build classification trees with custom attributes, from starter templates or from scratch.
  </Card>

  <Card title="Classifying files" icon="file-circle-check" href="/tutorials/facets/apply">
    Assign content types to files, set attribute values, and read back structured metadata.
  </Card>

  <Card title="Filtering by facets" icon="filter" href="/tutorials/facets/filter">
    Scope search and ask queries by content type and attribute values.
  </Card>
</Columns>

## Process documents on the fly

Convert or extract from a document in a single call. Nothing is stored, useful for feeding your own pipeline.

<Columns cols={2}>
  <Card title="Parsing documents" icon="file-lines" href="/tutorials/parse">
    Convert any document to clean Markdown, synchronously for quick jobs or async for large documents.
  </Card>

  <Card title="Extracting structured data" icon="wand-magic-sparkles" href="/tutorials/extract">
    Pull typed fields out of documents using a JSON Schema you provide, in sync or async mode.
  </Card>
</Columns>
