AI Roles

Managing Model Complexity Through Abstraction

In the previous articles, we introduced AI data modeling and explored how to visualize AI-augmented workflows. We discussed AI capabilities, prompts, and integration patterns. But there's a related challenge we haven't yet addressed: how do you manage the complexity of choosing the right AI model for each task, especially as your organization scales AI adoption?

The Model Selection Problem

When working with AI, abstractions help humans to organize features and capabilities. Because abstractions are based on language, modern AI models work very well with them too.

At a minimum, every AI interaction requires answers to these questions:

  • Which vendor
  • Which model
  • Which model host/provider
  • Which prompt

These choices have significant consequences:

Cost varies dramatically. Converting a PDF to text might cost $0.01 per page with Claude Sonnet, $0.001 with Mistral Medium, or $0.0001 with Google Gemini Flash. That's a 100x difference.

Capability varies significantly. Some models excel at structured data extraction from complex documents with dozens of fields and cross-references. Others handle simple classification well but struggle with nuanced interpretation. Some understand table layouts perfectly while others mangle multi-column text.

Security requirements differ. Protected health information or personally identifiable information may require zero data retention policies, which means using a secure host/provider. Unprotected data can use standard AI vendor access with your own API keys.

If every team member needs to remember which model works best for which task, you create several problems:

  • Inconsistency. Multiple people solving the same problem using different models, some likely paying more than necessary.
  • Suboptimal choices. Using an expensive model for a simple task, or a basic model for a complex one that requires human correction.
  • Difficult migration. When a new model offers better capability or pricing, there's no systematic way to identify which workflows should be updated.
  • Lost institutional knowledge. The person who figured out that Mistral handles your permit applications perfectly leaves the company. Six months later, someone switches to a model that costs more and works worse.

This is where AI Roles provide a better approach.

What Are AI Roles?

AI Roles are named abstractions that group related tasks and associate them with specific model configurations. They answer the question: "For this type of work, what's our standard model choice?"

Rather than choosing vendor, model, and routing for each individual task, you define roles that represent categories of work. Then each feature or workflow references the appropriate role.

Think of roles as templates or profiles. They capture organizational decisions about which AI capabilities work best for which purposes, based on your specific requirements, data types, and constraints.

This isn't a new concept. IT has used similar abstractions for decades:

  • Server roles (web server, database server, application server) define standard configurations
  • User roles (admin, editor, viewer) define permission sets
  • Network zones (DMZ, internal, restricted) define security policies

AI Roles apply the same principle to AI model selection and configuration.

How nSymbol Tag Implements AI Roles

nSymbol Tag demonstrates one implementation of this pattern. The application includes several ways to invoke AI models:

  • Running autofill on forms (extracting data from source documents to populate structured fields)
  • Filling individual form fields (targeted extraction)
  • Assisting with data import (interpreting CSV or spreadsheet data)
  • Converting PDF to text (OCR and layout interpretation)
  • Generating content or data (creating documents, summaries, or structured output)
  • AI assistant (conversational help with building solutions)

Each feature requires the same configuration decisions: vendor, model, routing method, and prompt template. Early versions of the software required users to specify these settings every time. This became tedious and error-prone.

Tag now defines three AI Roles that apply to different categories of work:

1. Default AI Model

This role is used when no other specific role applies. Primarily, it provides default model settings in AI-Chains (Tag's workflow automation feature) and the AI Assistant.

Recommended model: Claude Sonnet

Rationale: You don't want mistakes made prematurely. If a less capable model is used, and you apply it to a problem with mixed success, you may not realize that a more capable model can do much better. Starting with a highly capable model establishes a quality baseline.

Sonnet excels at complex reasoning, structured output generation, and following detailed instructions. For building workflows or creating content, these capabilities matter.

However, this is just a default. Users can always change settings for individual requests. If a task is simpler and another model makes more sense, you can customize an AI-Chain and save it with different settings. The Default AI Model role provides a sensible starting point that prevents capability-limited models from becoming the accidental standard.

2. Autofill

This is one of Tag's most frequently used features. It asks the AI model to scan source documents (sometimes many documents simultaneously) and extract data to fill form fields.

Recommended model: Varies by document complexity and security requirements

Rationale: While Claude Sonnet is great at data extraction, other models have closed the capability gap considerably and offer substantial cost savings.

Google Gemini performs quite well at extraction tasks and costs significantly less than Sonnet. If it does a good job on the kinds of documents you work with, it may be the better choice for this role.

Mistral is also a strong option, and this is where routing becomes important. Tag's Managed AI plan (which uses AWS Bedrock and guarantees zero data retention) currently supports Anthropic and Mistral but not Google. If your source documents contain protected personal information, data retention procedures vary significantly between managed plans and the BYOK (bring your own key) plan.

NOTE: Google can securely handle private data, but only if you set up a business associate agreement within their business admin console. Other vendors can offer other data retention options for larger customers..

The point is: the choice of model and routing is important for cost, capability, and security. Tag defaults to Claude Sonnet for this role, but some users change it to Mistral or Google after testing with their specific document types. What works best depends on your specific inputs.

3. PDF to Text

This is a specialized skill that not all models support. The range of PDF complexity is wider than many people realize, and different models process specific documents quite differently.

Recommended model: Mistral Medium

Rationale: PDF-to-text conversion involves challenges like:

  • Physical and visual impediments: Low resolution, poor contrast, distortion, scanning artifacts
  • Complex layouts: Multi-column layouts, tables with spanning cells, intermingled graphics, annotations, sidebars, footnotes
  • Font and language issues: Handwritten notes, unusual fonts, lookalike characters (O and 0, l and I), multiple languages on the same page, mixed character encodings

Different models handle these challenges with varying effectiveness, and it depends heavily on what your source documents look like.

Tag uses Mistral as the default for this role. It offers an excellent price-to-capability ratio and works in both Managed AI and BYOK subscriptions. For organizations dealing with high volumes of PDF processing, the cost difference is substantial.

However, organizations should test with their actual documents. Some PDF types (scanned historical records with poor image quality, engineering drawings, medical imaging reports) may require more capable models. The role abstraction makes it easy to change the configuration once and have it apply everywhere PDF conversion is used.

Defining AI Roles in Practice

In Tag, users access a Preferences page showing all role settings with options to edit and test. Preferences are stored locally for each desktop computer. Tag's planned Team subscription will support sharing and merging team preferences across an organization.

The edit-and-test dialog defines all settings for each role:

Vendor selection: Choose from any available vendor. In the Managed AI plan, you can use Anthropic or Mistral. In the BYOK plan, you can select any vendor for which you have an API key.

Model specification: You can specify models by name or by tier. Most vendors currently offer three tiers, which Tag describes as small, medium, and large.

As of this writing in the BYOK plan:

Vendor Small Tier Medium Tier Large Tier
Anthropic Haiku Sonnet Opus
Cohere Command-R-7B Command-R Command-A
Google Gemini Flash Lite Gemini Flash Gemini Pro
Mistral Mistral Small Mistral Medium Mistral Large
OpenAI GPT 5.4 Mini GPT 5.4 GPT-5.5

Most tasks in Tag perform well with medium or small tier models. Specifying models by tier rather than by specific version makes it easier to handle vendor model upgrades. If you hard-code a model name, eventually it becomes obsolete and must be changed everywhere it's used. Vendor tiers change less frequently and map automatically to the latest model in each category.

Testing interface: The edit-and-test dialog lets you test some roles in place. For example, you can select Vendor A, choose a sample PDF file, convert it to text within the dialog, and optionally save the result. Then change to Vendor B and convert the same file to text. This provides a simple way to compare how different vendor/model combinations work with your specific source documents.

Role-Level Prompts

AI Roles can also attach custom prompts that apply every time the role is invoked. This provides another layer of organizational knowledge capture.

For example, in the Autofill role, a custom prompt could include:

  • Common definitions or acronyms specific to your organization or industry
  • Instructions to ignore certain document sections (headers, footers, disclaimers)
  • Formatting preferences for extracted data
  • Rules for handling ambiguous cases

For the PDF-to-Text role, custom prompts might include:

  • Instructions to preserve table structures using specific delimiters
  • Guidelines for handling multi-column layouts
  • Rules for interpreting handwritten annotations
  • Language detection hints for multilingual documents

Tag creates full prompts by combining several inputs:

  1. Source documents (the data being processed)
  2. System prompt for that feature (managed by Tag and not user-editable by default)
  3. AI Role custom prompt (defined once, applied automatically)
  4. Runtime custom prompt (optional - entered manually or selected from the user's prompt library)
  5. Writing sample if available (very useful for content generation tasks)

This layered approach allows generic instructions (system prompts) to be enhanced with organizational knowledge (role prompts) and further customized for specific situations (runtime prompts).

The custom prompt feature transforms AI Roles from simple configuration templates into knowledge assets that capture institutional expertise about what works.

While this article uses nSymbol Tag as a concrete example, the AI Role pattern applies broadly:

  • Custom solutions can implement roles through configuration files, database, or application code. Development teams then reference roles rather than hard-coding model selections.
  • Other purchased software may offer comparable mechanisms.

Other Useful AI Roles for Organizations

While Tag's three roles serve its specific use cases, other organizations will benefit from additional role definitions based on their workflows. Here are some examples of other potentially useful AI Roles.

Content Generation Generating email responses, writing summaries, producing documentation
Classification and Routing Categorizing incoming emails, triaging customer support tickets, sorting documents by type, routing workflows based on content
Data Validation and Quality Assurance Checking extracted data for errors, identifying anomalies, verifying consistency across fields, flagging incomplete records
Language Translation Translating customer communications, creating multilingual documentation, interpreting international correspondence
Code and Query Generation Generating SQL queries from natural language, creating data transformation scripts, building automation workflows, writing configuration files
Image and Document Analysis Analyzing photos or scans, interpreting charts and diagrams, reading handwritten forms, extracting information from visual content
Summarization Condensing long documents, creating executive summaries, extracting key points from meetings, digesting research papers
Research and Information Gathering Answering questions using document repositories, gathering background information, comparing options, fact-checking claims

Organizations should define AI Roles based on their specific workflows and requirements. The roles listed above are starting points, not prescriptions. The key principle: when multiple workflows use AI for similar purposes, create a role that captures the best configuration and institutional knowledge for that category of work.

Private Model Deployment

AI Roles also facilitate migration to privately-deployed open-source models. This is becoming increasingly viable, particularly for roles with specific requirements:

  • The PDF-to-Text role is an excellent candidate for private deployment. Many organizations process sensitive documents where sending content to external APIs creates compliance concerns. Deploying an open-source vision model on internal infrastructure keeps data secure while potentially reducing costs.
  • Classification roles often work well with smaller, specialized models that can be fine-tuned on organization-specific categories and deployed cost-effectively.
  • Data validation roles may benefit from models trained on your specific data patterns and business rules.

The role abstraction makes private deployment straightforward: deploy the model on internal infrastructure (on-premises servers, private cloud), and update the role configuration to point to the internal endpoint.

From a workflow perspective, nothing changes except the role configuration. The same prompts, the same inputs, the same output format - just a different model serving the requests.

Getting Started with Private Models

These tools make experimenting with locally-hosted models straightforward:

  • LM Studio provides a user-friendly interface for downloading and running open-source models. It handles model management and server configuration (using an OpenAI-compatible API), making it ideal for teams new to local deployment.
  • Ollama offers a command-line focused approach with great performance optimization. It manages model downloads, runs a local API server, and supports easy model switching. Ollama is popular for production deployments.
  • vLLM and llama.cpp provide more control for teams with specific performance requirements, supporting advanced features like quantization and GPU offloading.

Practical Recommendations for Experimentation

  • Start with Apple Silicon Macs if available - M1-M4 Macs significantly outperform typical Windows/Linux machines for local inference due to unified memory architecture and optimized ML hardware. A Mac laptop can often match or exceed a desktop with a mid-range GPU.
  • Use quantized models which can provide 70-90% of full model quality while using 1/4 the memory. Start with 7B or 13B parameter models rather than jumping to 70B+ models that require specialized hardware.
  • Test with your actual prompts - model performance varies significantly by task. A smaller, fine-tuned model may outperform a larger general model for your specific use case.

The key insight: experimentation is now accessible to any development team with modest hardware, making it practical to validate whether private deployment serves your needs before significant infrastructure investment.

As open-source models continue improving, we expect private deployment to become more common for cost-sensitive, high-volume, or security-critical roles.

Making AI Manageable

AI Roles make AI adoption more manageable by reducing cognitive load, improving consistency, enabling systematic testing and migration, capturing institutional knowledge, and controlling costs.

They represent a maturation of AI integration practices. Early AI adoption often involves experimentation: trying different models for different tasks, seeing what works, iterating based on results. This exploration is valuable and necessary.

But as organizations scale AI usage, ad-hoc experimentation must give way to systematic practice. AI Roles provide structure without rigidity - standard configurations that represent current best practices, while remaining flexible enough to accommodate new models and requirements.

The organizations that will extract the most value from AI aren't necessarily those with the most advanced models or the largest AI budgets. They're the organizations that develop systematic practices for deploying AI effectively: documenting what works, sharing knowledge across teams, optimizing based on data, and managing AI capabilities as enterprise assets rather than individual experiments.

AI Roles are one piece of that systematic practice. Combined with AI data flows, prompt libraries, capability taxonomies, and the other concepts in this series, they form a methodology for making AI integration deliberate, documented, and sustainable.

Next
Next

AI Data Modeling - Intro