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:
Faça login no Snowsight.
In the navigation menu, select AI & ML » AI Studio. The Document Processing Playground appears among the other Studio functions.
To open the Document Processing Playground, select Open.
Carregar seus documentos a partir de uma área de preparação¶
Selecione Add from stage.
Uma caixa de diálogo será exibida.
Selecione o banco de dados, o esquema e a área de preparação que contém seus documentos.
Selecione os arquivos de documento que você deseja adicionar ao Playground.
Nota
Você pode selecionar até dez documentos.
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.
Selecione a guia Extraction.
Select the extraction type:
To ask a question, select Ask.
To extract a list, select List.
To extract a table, select Extract table.
Crie pares de chave e pergunta, por exemplo:
Chave:
companyPergunta:
What is the name of the company?
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:
No canto superior direito da interface, selecione Code Snippets.
Selecione a linguagem do trecho de código: SQL ou Python.
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) |
|
Microsoft Azure |
|
Google Cloud |
|
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.