Document Processing Playground

The Document Processing Playground provides a user interface for exploring the AI_EXTRACT and AI_PARSE_DOCUMENT functions. You can upload your own documents from stage, ask questions to extract information using AI_EXTRACT, and preview both the layout and OCR results generated by AI_PARSE_DOCUMENT. The playground lets you explore how the functions process your documents, and copy the corresponding code snippets for further use.

Para obter mais informações, consulte AI_EXTRACT e Parsing documents with AI_PARSE_DOCUMENT.

Privilégios obrigatórios

Os usuários devem usar uma função que tenha a função do banco de dados SNOWFLAKE.CORTEX_USER. Para obter mais informações sobre como conceder esse privilégio, consulte Cortex LLM privileges.

Introdução ao Document Processing Playground

Para acessar o Document Processing Playground:

  1. Faça login no Snowsight.

  2. In the navigation menu, select AI & ML » AI Studio. The Document Processing Playground appears among the other Studio functions.

  3. To open the Document Processing Playground, select Open.

Carregar seus documentos a partir de uma área de preparação

  1. Selecione Add from stage.

    Uma caixa de diálogo será exibida.

  2. Selecione o banco de dados, o esquema e a área de preparação que contém seus documentos.

  3. Selecione os arquivos de documento que você deseja adicionar ao Playground.

    Nota

    Você pode selecionar até dez documentos.

  4. Selecione Open playground.

    O Playground é exibido.

A interface do Document Processing Playground exibe uma versão preliminar de um documento à direita e uma área à esquerda em que você pode inserir prompts.

Dica

Para alterar o documento que você está visualizando, selecione o nome do documento e, em seguida, outro documento na lista.

A interface do Document Processing Playground consiste nas seguintes guias:

  • Extraction: a exibição em que você pode fazer perguntas para extrair informações do documento.

  • Markdown: a exibição em que você pode ver a representação em Markdown do documento. É a saída do modo LAYOUT de AI_PARSE_DOCUMENT.

  • Text: a exibição em que você pode ver a representação em texto do documento. É a saída do modo OCR de AI_PARSE_DOCUMENT.

Extrair informações fazendo perguntas

Você pode fazer perguntas para extrair informações do documento.

  1. Selecione a guia Extraction.

  2. Select the extraction type:

    • To ask a question, select Ask.

    • To extract a list, select List.

    • To extract a table, select Extract table.

  3. Crie pares de chave e pergunta, por exemplo:

    • Chave: company

    • Pergunta: What is the name of the company?

  4. Para confirmar, selecione Add Prompt.

Visualizar as versões em Markdown e texto do documento

As guias Markdown e Text exibem os resultados da função AI_PARSE_DOCUMENT.

  • Para ver os resultados do modo Layout, selecione a guia Markdown.

  • Para ver os resultados do modo OCR, selecione a guia Text.

Get the code snippets for further use

After you ask at least one question, the playground creates code snippets that use the AI_EXTRACT and AI_PARSE_DOCUMENT functions to process your documents. To preview and copy the code snippets:

  1. No canto superior direito da interface, selecione Code Snippets.

  2. Selecione a linguagem do trecho de código: SQL ou Python.

  3. To open the snippet in workspaces, select Open in Workspaces.

    A new workspace opens with the code snippet.

Disponibilidade regional

The Document Processing Playground is available in the following regions:

Plataforma de nuvem

Região da nuvem

Amazon Web Services (AWS)

  • US East (N. Virginia)

  • US East (Ohio)

  • US West (Oregon)

  • Canada (Central)

  • South America (Sao Paulo)

  • Europe (London)

  • EU (Stockholm)

  • EU (Irlanda)

  • EU (Frankfurt)

  • Asia Pacific (Mumbai)

  • Asia Pacific (Tokyo)

  • Asia Pacific (Seoul)

  • Asia Pacific (Sydney)

  • Ásia Pacífico (Jakarta)

Microsoft Azure

  • East US 2 (Virginia)

  • West US 2 (Washington)

  • South Central US (Texas)

  • Canada Central (Toronto)

  • UK Sul (Londres)

  • North Europe (Ireland)

  • West Europe (Netherlands)

  • Southeast Asia (Singapore)

  • Norte dos UAE (Dubai)

  • Australia East (New South Wales)

  • Central India (Pune)

  • Japan East (Tokyo)

Google Cloud

  • US East4 (N. Virginia)

  • US Central1 (Iowa)

  • Europe West2 (London)

  • Europe West3 (Frankfurt)

  • Europe West4 (Netherlands)

Limitações

As limitações das funções AI_EXTRACT e AI_PARSE_DOCUMENT se aplicam ao Document Processing Playground. Para obter mais informações, consulte AI_EXTRACT e Parsing documents with AI_PARSE_DOCUMENT.