Documents
Documents allow you to analyze your own data using Alfa workplans. This guide explains how to upload documents, list them, and reference them in your workplan prompts.
Uploading documents
You can upload your own documents (PDFs, Word files, Excel spreadsheets, etc.) to be processed and made available to your workplans.
Example: Uploading quarterly reports
For large documents, the upload process may take some time as the system processes and indexes the content for searching.
Listing documents
To view all documents that you’ve uploaded:
Creating workplans with documents
You can reference documents in your workplan prompts using a special syntax. The workplan will then be able to read and analyze these documents.
The {doc} placeholder in your prompt will be replaced with the actual document content when the workplan processes it.
Understanding the document reference format
The payload for creating an workplan with a document reference follows this structure:
- prompt: Your instruction with the
{doc}placeholder - args: A dictionary mapping placeholders to their values
- doc: The placeholder name that matches what you used in the prompt
- id: The unique ID of the document (obtained when uploading or listing documents)
- type: Must be “custom_document” to indicate you’re referencing a document
