Chapter 11: Leveraging AI Assistance
Accelerating mapping work with a locally-deployed AI model that knows your project.
Bridger's AI features are built around Ollama, a tool for running large language models locally. The integration is opt-in and disabled by default — none of the AI menus or options appear until you enable it. When configured well, it can meaningfully accelerate the column mapping phase by suggesting source matches for target columns based on a model that has been loaded with the full context of your project.
Enabling AI Features
Open Settings and enable the AI features toggle. Once enabled, the AI menu appears in the menu bar and AI-related context menu items become visible in the project panels. Disabling the toggle removes them again.
Configuring the Connection
From the AI menu, choose Configure AI Settings…. The configuration dialog lets you set the Ollama server URL, the model name you intend to deploy, the temperature, and the confidence threshold below which suggestions will be rejected rather than applied. Use Test Connection to verify Bridger can reach the Ollama instance before proceeding.
The Modelfile
The core of Bridger's AI integration is the modelfile — a configuration package that tells Ollama everything it needs to know to make useful suggestions for your project. This is not a generic language model prompt; it embeds the actual content of your workbook: source and target table schemas, library history notations, logic templates, exception codes, and past mapping patterns. All of that context is loaded into the model at deployment time rather than sent piecemeal with every request.
To generate the modelfile, choose AI → Generate Modelfile…. Bridger builds the modelfile from the current state of the workbook and saves it to a location you specify. Once generated, deploy it to Ollama using AI → Deploy Model…, which loads the modelfile into the running Ollama instance and makes it available for mapping requests.
Depending on Ollama's timeout settings, a loaded model may be unloaded from memory after a period of inactivity. If suggestions stop working after idle time, redeploying will reload it. Ollama's keep-alive behavior is configurable via an environment variable in the Ollama engine — consult Ollama's documentation if you need the model to persist across longer sessions.
Running AI Mapping
AI mapping works on target columns. Select one or more target columns using standard multi-select, right-click, and choose AI Map Selected Columns. The model is given the target column's context and asked to find the best matching source column from what it was loaded with. Bridger processes each selected column in sequence.
A progress dialog shows which column is currently being processed and how far through the selection you are. An initial warm-up phase loads the model before processing begins — this may take a few seconds on the first request. You can cancel the run at any point; mappings already created before cancellation are kept.
Reviewing the Results
When the run completes, a summary dialog lists every column that was processed. Successful mappings show the suggested source column, the confidence score, elapsed time, and the model's reasoning. Failed columns — those where the model's confidence fell below your threshold, or where no suitable match was found — are listed separately with the reason.
Click View Mappings to filter the mappings tree to just the mappings created in this run, making them easy to review one by one.
AI Generated Status
Mappings created by the AI are assigned AI Generated status, shown in purple. This status is locked — the notation content and properties of an AI-generated mapping cannot be edited until the status is moved to something else. This is intentional: it forces a deliberate human review step before any AI suggestion becomes part of the authoritative map.
To work with an AI-generated mapping, change its status to an appropriate working status first. If the suggestion is wrong, delete the mapping entirely. You cannot manually assign AI Generated status to a mapping — it is only set by the AI mapping process itself.
AI Context Export for Validation
Once a mapping exists, Bridger can build an AI-ready context prompt for generating validation SQL. This is intended for use with external AI tools — Claude, Copilot, ChatGPT, or any similar assistant — rather than through Ollama.
Right-click a mapping and choose Export AI Context…. A dialog displays a structured markdown prompt containing the mapping's full context: source and target columns, data types, transformation logic, exception codes, status, and default value. Review and edit the prompt if needed, then click Copy to Clipboard and paste it into the AI tool of your choice to generate validation queries.
This is a per-mapping operation. Bulk context export is not supported, as the resulting prompt would be too large to be useful in most AI tools.