Skip to main content
This guide walks you through creating your first extraction template and processing a document to extract structured data.

Prerequisites

Before you begin, make sure you have:
  • A Raydocs account with access to a workspace
  • A document to process (PDF, Word, or image format)

Step 1: Create an Extraction Template

Extraction templates define what data you want to extract from your documents. They use a JSON schema format with groups and fields.
1

Navigate to Templates

In your workspace, click on Extraction Templates in the sidebar.
2

Create New Template

Click New Template and give it a descriptive name (e.g., “Invoice Extraction”).
3

Define Your Schema

Use the visual editor or JSON editor to define your extraction schema. Here’s a simple example:
{
  "config": {
    "reasoning_enabled": true
  },
  "groups": {
    "invoice_details": {
      "search_query": "invoice number, date, total amount",
      "fields": {
        "invoice_number": {
          "type": "string",
          "extraction_prompt": "Extract the invoice number"
        },
        "date": {
          "type": "string",
          "extraction_prompt": "Extract the invoice date in YYYY-MM-DD format"
        },
        "total_amount": {
          "type": "number",
          "extraction_prompt": "Extract the total amount due"
        }
      }
    }
  }
}
4

Save Template

Click Save to store your template.

Step 2: Create an Extraction Session

An extraction session ties a template to one or more documents for processing.
1

Open Your Template

From the templates list, click on the template you just created.
2

Create Session

Click New Session to create an extraction session.
3

Upload Documents

Drag and drop your document(s) or click to browse and upload.

Step 3: Run the Extraction

1

Wait for Processing

Documents are automatically processed through the RAG pipeline. This includes parsing, chunking, and embedding generation.
2

Execute Extraction

Once processing completes, click Run Extraction to start the AI extraction process.
3

Review Results

View your extracted data with full reasoning and source references. Click on any field to see:
  • The extracted value
  • AI reasoning explaining the extraction
  • Source text from the document

Step 4: Export Your Data

Export your extraction results for use in other systems:
Click Export to Excel to download your data with full audit trails included.

Next Steps