Qalcwise introduces a new feature that enables direct integration with artificial intelligence (AI) technology, opening up new possibilities in process automation and intelligent data processing. One of the key elements of this solution is integration with AI OCR technology – a modern tool based on artificial intelligence that allows for automatic recognition and processing of text from various types of documents.
Thanks to this feature, users can easily analyze and extract data from invoices, bills, contracts, as well as documents such as service orders, acceptance reports, and application forms.
In addition, the system allows users to ask specific text queries (so-called prompts), which enable flexible and contextual interaction with the content of documents. For example, a user can enter a question such as: “What are the most important terms of this contract?” or “What are the projected costs for the next quarter based on this invoice?”, and the artificial intelligence will analyze the document and generate a response in a clear, structured form.
Data security and privacy
All document processing operations are completely secure. The AI technology built into the platform does not learn from the data you send and does not store it outside the user's system. This ensures that your information remains confidential and your privacy is fully protected.
For more information on security and data protection, please visit the following links:
https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/concept-data-privacy
Enabling integration with AI
To activate the AI service, go to:
Administration panel -> External data sources
Then expand the “Select which data source you want to configure” list and select AI.
AI configuration
Parameters:
Identifier - a unique name for the data source. It will be used in action steps as a reference to the data source.
Provider - specifies the source of AI data that will be used to process documents or data. Depending on the selected provider, the system will use appropriate models and technologies to analyse and extract information. Available options:
- Chatgpt
- AzureFoundry
- Mistal
- AzureFoundryWithMistralOcr
- OpenAI
FileProcessingGuidColumn - this is the name of the column in the table that stores GUIDs, i.e., unique identifiers. It does not have to be a key – it is used to track which record was created from which file.
If 5 files are uploaded, the action step will return 5 unique GUIDs. There may be more than 5 records in the list, e.g., when one file contains data for several invoices. Therefore, the lookup in the invoice tables should be based on the file processing GUID, not the invoice GUID itself.
Mode - integration mode. Currently available option: StandaloneLIm, OcrAndLlm
Note: Depending on the Mode setting, parameters may change.
ProcessingModel - specifies which AI model to use for data analysis and processing. These models differ in terms of speed and accuracy of read values.
ConvertPdfToImgResolution - parameter responsible for converting from pdf to img and changing the resolution. Depending on the mode and provider, not all of them support this functionality.
OcrModel - specifies the specific OCR model used to recognise text in documents. OCR models differ depending on the quality of the scans and the type of documents being processed. OCR models:
- Mistral-ocr-2503 - OCR model from Mistral, designed for processing standard quality documents such as invoices
- Mistral-ocr-2505 - another OCR model from Mistral, designed for more complex documents with more text, low scan quality or complex structure (e.g. receipts)
Available models:
gpt-4, gpt-4o, gpt-4.1, gtp-4.1-mini, gpt-4.1-nano, gtp-35-turbo
ProcessingModelUrl – this parameter is used to indicate which specific model from the Azure AI Foundry catalog (e.g., OCR, chat) should be used for data processing. In the context of OCR, it can specify the model responsible for text and structure recognition.
https://qalcwise-ai-foundry-sweden.openai.azure.com/
ProcessingModelApiKey – this is the API key used to authorize access to the data processing model in the Azure AI Foundry service. It enables authentication of requests sent to the model endpoint (e.g., OCR, GPT), ensuring that only authorized applications have access to resources.
MaxToken – specifies the maximum number of tokens (words, characters, and symbols) in the response generated by the language model. A value of 1500 means that the model's response will not exceed 1500 tokens, or approximately 1000-1200 words (depending on the content)
This setting allows you to control the length of the response and processing costs (the more tokens, the greater the resource consumption).
Recommended: 1500
KeepRepeatability – Specifies whether the model's behavior should be repeatable with the same input data:
- yes – results will be repeatable (recommended for testing, comparisons)
- no – the model may return different results for the same files (useful when the result was previously inaccurate and we want to try again).
FirstLevelName – name of the main table where the processing results will be stored
FirstLevelList – specifies the type or category of documents that will be processed and returned by AI - e.g., for invoices and receipts
FileColumn - name of the column containing the attachment (file to be processed)
FileNameColumn - column in which the name of the attachment (source file) from which the record was generated will be entered
InputTokenUsedColumn - name of the column in which the number of tokens used at the input (by the model) will be stored
OutTokenUsedColumn – the name of the column in which the number of tokens used at the output (in the model's response) will be saved.
StatusColumn – the name of the column in which AI will return the document processing status (e.g., Success or ParsingFailed).
PagesUsedColumn - the name of the column (of type number) in which AI will return the number of pages read.
OcrResultColumn - the name of the column (text type) in which the results of OCR processing, known as markdown, will be stored.
SecondLevelTable – name of the second table where detailed items will be stored, e.g., items from invoices.
SecondLevelName – name of the category that represents detailed items related to main records, e.g., invoice item
Prompt – text of a query or command sent to OCR / AI model (e.g., instructions or processing context).
Example prompt for reading data from invoices and receipts
Your goal is to extract specific data fields from an image of invoice or receipt.
There may be none, single or multiple instances of some kind of invoice or receipt in the given image (e.g. 2 invoices next to each other). If a given value is not present on the receipt or invoice, leave the field empty. Do not fill in data based on assumptions or calculations.
<<<GENERATED_PROMPT>>>
IMPORTANT:
- return only generated output without any comments or additional tests
- be precise with numbers and identifiers do not miss any letters or digits
- return all numbers with . (dot) as decimal separator
- if a value cannot be found for a given field, leave it empty.
<<GENERATED_PROMPT>> - this is an automatically completed fragment of the prompt, which during system operation is automatically replaced with a specific instruction containing a list of fields to be extracted from the document (e.g., invoice, receipt, contract).
After entering the data, checking the checkbox - enabled, and saving the configuration. Two additional action steps will appear in the workflow:
- Extract data from text - https://qalcwise.zendesk.com/hc/en-us/articles/22064332875420-ActionStep-Extract-data-from-text
- Extract data from documents - https://qalcwise.zendesk.com/hc/en-us/articles/22064087183644-ActionStep-Extract-data-from-documents
Example list A1_INVOICE and table A2_ITEMS
We create a list - A1_INVOICE and A2_ITEMS.
A1_Invoice contains columns:
Technical columns are data returned by the AI system during document processing. They do not come directly from the document content, but are used to identify the record, control processing, and monitor the operation of the OCR mechanism.
- FILE_GUID - (type: text) is the identifier of the file from which the data was loaded. If one file contains several invoices, all these invoices will have the same FILE_GUID.
- GUID - (type: text) is a unique identifier of a single record, e.g., a single invoice. Each invoice has its own unique GUID.
- INPUT_TOKENS_USED (type: number) - the number of tokens used during input processing.
- OUT_TOKENS_USED (type: number) - the number of tokens generated at the output.
- STATUS (type: text) - the technical status of text reading by AI.
The data columns contain data obtained directly from the document content:
- ISSUE_DATE (type: date)
- SELLER_NAME (type: text)
- SELLER_ADDRESS (type: text)
- SELLER_TAX_ID (type: text)
- BUYER_NAME (type: text)
- BUYER_ADDRESS (type: text)
- BUYER_TAX_ID (type: text)
- SUBTOTAL (type: number)
- TOTAL_TAX_AMOUNT (type: number)
- TOTAL (type: number)
A2_ITEMS contains columns:
Technical columns are data returned by the AI system during document processing. They do not come directly from the document content, but are used to identify the record, control processing, and monitor the operation of the OCR mechanism.
- INVOICE_GUID - (type: list) is used to link each item in the A2_Items table to the corresponding invoice in the A1_Invoice table. It contains the identifier (GUID) of the invoice to which the item belongs – this is exactly the same value that appears in the GUID column in the invoice table. This makes it possible to unambiguously assign items (e.g., products, services) to a specific invoice and logically link detailed data (level 2) with the main invoice data (level 1).
- ORDINAL_NUMBER - (type: text) the ordinal number of the item on the invoice. It specifies the order in which a given item appears on the document. For example, the value 1 means the first item, 2 means the second, etc. It facilitates compliance with the layout of the original document and the correct display of data.
If you select a table or list when configuring an external data sourse AI, additional AI options for each column will automatically appear in the column settings:
Ignore - Technical columns, such as InputTokenUsed, OutputTokenUsed, or Status, do not contain business data from the document but are used to monitor and manage the processing workflow. Selecting the Ignore option causes the column to be skipped during the AI’s analysis of the document. This allows the system to distinguish technical columns from those containing actual business data and exclude them during information extraction.
Instructions - a separate field for additional instructions for the AI. This field allows you to provide information that helps the AI correctly recognize and interpret the data in a given column. You can add alternative field names, specific labels found on documents, or additional business context. For example, for the TOTAL_TAX_AMOUNT column, you can specify that on Polish receipts, this value often appears as “SUMA PTU.” Thanks to such instructions, the system matches data more effectively, increases extraction accuracy, and reduces the number of errors during document processing.
Remark: The Ignore and Instructions options are available only for users with Owner or Designer permissions for tables and lists.
0 Comments