Blocks
In Vom, Blocks are the core building units of every decision policy. Each block represents a specific decision-making step—whether it’s evaluating conditions, defining variables, or leveraging AI models. By combining different types of blocks, you can design policies capable of handling various scenarios.
Generative AI
Generative AI Blocks integrate Large Language Models (LLMs) into your decision policies. You can write a prompt that uses variables, including documents. Then at decision time that prompt is ran against an LLM of your choice from the available models (Gemini 2.0, Gemini 2.5, GPT-4.1, and GPT-5) to compute output variables. Those outputs can then be used on successive blocks.
For example you can use the following configuration to extract gross income from
a proof_of_income document variable:
Prompt: Check {{proof_of_income}} to make sure it's an authentic proof of income for a US person.
Ouput variables:
authentic(True/False): True if the document looks authentic. False if there are signs it's a forgery.income(Number) : The gross income shown in the document. 0 if it's not authentic.
Using GenAi blocks in tests and backtests
In tests and backtests Vom will not call external services. This makes decisions fail when a Generative AI block is used, since calling an external LLM is needed to compute the block outputs.
To still be able to run tests and backtests, the block output variables can be included in the input, either in the "Test screen" or in a column in the backtest CSV input file.
Best practices for backtests
When running a backtest from decision history, the Generative AI block will return the same outputs as in the original decision, even if the prompt has changed in the version that is being tested. This behavior can lead to misleading results if not properly accounted for.
To ensure more accurate and realistic backtests, we recommend the following:
-
Separate extraction and logic: When making decisions based on GenAI generated outputs, avoid embedding decision logic directly in the prompt (e.g., “Extract the gross income from {{paycheck}} and verify if it is above {{threshold}}”). Instead, use the Generative AI block to extract the necessary data (e.g., gross income), then use a Condition block to evaluate it against your criteria;
-
Don't run backtests for prompt changes using decision history: Since the outputs of the block will be read from history, backtest decisions will not take any prompt change into account. The same is true for changes to in the logic to compute variables used in the prompt. Instead, run the backtest using a CSV file and precompute the desired outputs as needed to reflect the updated inputs and prompts.