AI Solutions

LLM integration that holds up in production.

We connect a language model to your site, app or workflow to classify, extract, draft, summarize or answer. The work around the model decides if it holds up.

What is LLM integration?

LLM integration connects an application to a large language model (LLM) through the API of a provider. A feature can then classify, extract, draft, summarize or answer. Prompts, context, keys, limits, output checks and a fallback live in server code between your app and the model, not in the page.

01/WHAT YOU GET

What you get.

  • A feature design, including what happens on failure
  • Server code holding keys, prompts, limits and logs
  • Output schemas and validation code
  • Retry, timeout and fallback handling
  • Test set run on two or more models
  • Documentation of provider, data settings and measured cost

A good fit for

  • Product teams adding a language feature to their app
  • Companies whose AI demo works but not with real users
  • Teams calling a model API from browser code
02/HOW IT WORKS

How the work runs.

  1. Define the task

    We write down the input, the output, the cost of a wrong result and who checks it.

  2. Build the evaluation set

    We collect real examples with expected results before writing any prompt, so every choice can be measured.

  3. Choose and test models

    Candidate models run against the set and are compared on results, speed and cost per request.

  4. Build the service layer

    Keys, prompts, validation, limits, retries, fallback and logging are built on the server.

  5. Test the failure paths

    We simulate timeouts, rate limits, bad output, provider errors and hostile input before launch.

  6. Launch and monitor

    We monitor errors, speed and cost, and rerun the test set before any model or prompt change.

03/PROBLEMS

What we fix.

  • Problem

    The feature breaks when the provider fails

    What we do

    Every call has a timeout, limited retries and a defined fallback instead of a blank screen.

  • Problem

    Hidden instructions inside documents or emails

    What we do

    Content is kept apart from instructions and screened, and a person approves risky actions.

  • Problem

    Stuck with one model

    What we do

    Prompts and provider calls live in one layer, so another model can be tested without a rewrite.

04/COMPARISON

Single call, grounded, tool calling or agent: which?

Four ways a feature can use a language model. A feature should use the simplest pattern that does the job.
PatternWhat the model doesWhat it needs
Single requestClassifies, extracts, drafts or summarizes one input.A prompt, an output schema and validation before use.
Retrieval-groundedAnswers from passages of your content found per question.A maintained knowledge base, with permissions on what users retrieve.
Tool callingAsks the app to act, like looking up a record.Allowed actions only, least privilege, approval for anything risky.
Agent loopTakes several steps toward a goal, choosing tools.Step limits, logging, checkpoints and a person approving consequential actions.
05/QUESTIONS

Frequently asked questions

Can AI be added to a SaaS application?

Yes. A language feature is added to an existing SaaS application as a service on the server that the product calls, with its own limits, logging and permissions, so the rest of the application does not change. Tenant separation applies to prompts, retrieved content and logs, just as it applies to the database.

Can we switch to a different AI model provider later?

Yes, if the feature is built for it. Prompts, schemas and provider calls sit in one service layer, and the evaluation set shows whether another model performs as well before anything changes. Some provider features have no exact equivalent elsewhere, so a switch is tested rather than assumed. The provider account and keys sit with your business by default.

What happens to the data sent to an AI model provider?

It depends on the provider and the plan. Some providers do not use prompts or responses from paid API services to improve their products, while content submitted to unpaid services can be used to improve them. API data can also be retained for a limited period to monitor for abuse. The terms of the chosen plan are checked, and only the data a feature needs is sent.

Do you fine-tune or train custom AI models?

No. Fine-tuning a model, training a custom model and hosting open-weight models on your own infrastructure are not offered. The features built here use provider model APIs, with your own content supplied at request time through retrieval where a task needs it, which changes what the model answers from without changing the model itself.

What are structured outputs?

Structured outputs make a model return data in a defined format, such as a JSON object with named fields, instead of free text. Some providers offer a structured outputs feature that ensures responses adhere to a JSON Schema the application supplies. Matching a schema does not make the values correct, so they are still validated before the application acts on them.

06/THE FULL DETAIL

The full detail.

Short answers are above. Open a panel below for the specifics: how we decide, what is included and the deeper questions.

Is this the right choice?

  • Choose an LLM integration when a feature must read or write language.

    Classifying messages, extracting fields from documents, drafting text and answering from content are what a language model adds to an application.

  • Choose an ordinary integration when the data is already structured.

    When fields already arrive in a known format, a rule or an API integration is cheaper, faster and fully predictable, and no model is needed.

  • Choose a chatbot integration when the feature is a conversation.

    A public assistant needs a scope, approved content, a handoff and conversation logging, which the AI chatbot integration service covers.

  • Choose an agent only when several steps and tools are genuinely needed.

    An agent adds planning, tool access and more ways to fail. When one model call or a fixed workflow does the job, that simpler design is the better one.

How does tool calling let a language model take actions?

Tool calling lets a language model ask the application to do something, such as look up an order or create a ticket, by returning a structured request that names a tool and its arguments. The application checks the request, performs the action if it is allowed and returns the result to the model.

The mechanism is similar across several providers. Tool calling, also known as function calling or tool use, gives a model a way to interface with external systems and access data outside its training data. For tools the application defines, the model returns a structured call that the application executes, and some providers also offer server tools that run on the infrastructure of the provider instead.

Whichever provider is used, each tool is described precisely, receives only the arguments it needs and runs with the permissions of the user it acts for. A model that asks for the wrong thing is refused by the application rather than obeyed, and every call is logged.

What does the AI service layer between an app and a model do?

The AI service layer is server code between the feature and the model provider. It holds the API keys, builds the prompt and context, limits input size and request rate, calls the model, validates the response, retries or falls back when the call fails and logs what happened, so none of that is repeated in each feature.

Rate limits are part of the provider contract. A request over a temporary rate limit typically returns an HTTP 429 error, which can include a Retry-After header indicating how long to wait. That header is treated as a minimum wait, exponential backoff with jitter is used when the header is missing, and quota and billing errors are not retried at all.

Long answers can be streamed. Streaming lets an application start showing or processing the beginning of a response while the model is still generating it, although streamed content is harder to moderate. A streamed response is commonly delivered incrementally using server-sent events. Every call also has a timeout, so a slow provider cannot hold a page open.

The contents of a system prompt should not be treated as a secret or used as a security control, and credentials should not be placed in the prompt at all. Keys live in server configuration, and anything a user must not see is enforced in code rather than in the prompt.

How are prompt injection and untrusted content handled?

Prompt injection is handled by assuming it will be attempted. Instructions and untrusted content, such as documents, emails and web pages, are kept apart and screened; the model gets only the tools and data the task needs; its output is validated before anything acts on it; and actions with real consequences need a person to approve them.

Prompt injection is the name for prompts that alter the behavior or output of a model in unintended ways, whether a user types them directly into the feature or they are carried in indirectly by external content such as websites or files.

Defenses are layered: screening user input, filtering it for known injection patterns, limiting the access the model has to sensitive data and actions, screening tool outputs before the model acts on them, and red-teaming the feature. The model is treated as any other user, with a zero-trust approach, and its responses are validated before they reach backend functions.

Can prompt injection be fully prevented?

Not with certainty. Because of the stochastic way language models work, it is unclear whether fool-proof methods of preventing prompt injection exist, so the design limits what a successful injection could reach: least privilege, output validation and a person approving high-risk actions.

How are the running costs of an LLM feature kept under control?

Running costs are kept under control by measuring them per request during development, sending only the context a task needs, choosing the smallest model that passes the evaluation set, caching repeated work, batching tasks that can wait, and setting limits and alerts on usage, so an unexpected rise is noticed early.

Several providers offer both prompt caching and batch processing. Prompt caching reuses work when requests share the same prompt prefix, so a long, stable block of instructions is placed first and reused. Batch APIs handle asynchronous requests whose results are returned later rather than at once, suited to work that does not need an immediate response, such as classifying a backlog of tickets.

Input is validated strictly, so no request exceeds reasonable size limits, and rate limiting with user quotas caps the number of requests that a single source can make in a given period. On a public feature, those limits protect the budget as much as the service.

Prices and discounts change, so none is quoted here. The cost per request is measured on the chosen model during testing and recorded with the design.

How do you choose which language model a feature should use?

A model is chosen by running the same evaluation set, real examples with expected results, against candidate models and comparing their results, latency and measured cost per request. The cheapest and fastest model that passes is preferred, and because the set is kept, a newer model can be compared the same way later.

Model names, prices and context limits change often, so they are checked on the day a decision is made and recorded in the documentation rather than fixed in the design. Where data must not be used to improve a provider product, the plan and terms of each candidate are part of the comparison.

The evaluation set also protects the feature after launch. A prompt change or a model update runs against it first, and a drop in results stops the change before users see it.

Everything included

  • LLM integrations
  • AI model API integrations
  • Model selection and fallback
  • Prompt design and evaluation
  • Cost, latency and rate-limit controls

From a request to a validated response.

Every model call in a feature takes the same path, so limits, logging and validation are applied in one place.

  1. 01

    Feature request

    The feature sends its task to the service layer, never straight to the model.

  2. 02

    Service layer

    Keys, prompt, context, limits and logging are applied before the provider is called.

  3. 03

    Model API

    The model returns text, a structured result or a request to use a tool.

  4. 04

    Checked response

    The output is validated, and only a response that passes reaches the feature.

A simplified model. Retrieval, tool calls and fallbacks add steps inside the service layer, and which of them apply is decided for each feature.

Why it matters

  • Output the application can check

    Validated, structured results mean the feature acts on data it has checked, not on free text.

  • Failures that degrade gracefully

    When the provider is slow or unavailable, the feature falls back to a defined behavior instead of breaking.

  • Costs measured before launch

    The cost per request is known from testing, so a budget can be set against real volumes.

  • Room to change models

    Prompts, schemas and provider calls live in one layer, so another model can be evaluated without rewriting the feature.

Where it applies

  • Support triage

    Incoming tickets are classified by topic and urgency into a validated schema, and the helpdesk routes them by the result.

  • Document extraction

    Fields are extracted from uploaded forms into a schema, checked against rules and sent to review when a check fails.

  • In-product writing help

    A SaaS application drafts a reply or a summary that the user edits before anything is sent.

Technology and approach

  • The provider and model are chosen for each feature against an evaluation set, and the choice is documented.
  • Model output is treated as untrusted input: validated against a schema, and encoded or parameterized before it reaches a page or a database.
  • Tools run with the minimum permissions the feature needs, and actions that change records or spend money can require approval.
  • Content from documents, emails and web pages is kept apart from instructions and screened before the model sees it.
  • Rate limits are handled by honoring the wait the provider signals, backing off with jitter, capping retries and falling back.
  • Context is kept to what each task needs, and caching or batch processing is used where the task allows it.
  • API keys stay on the server, scoped and rotated, and never appear in browser code, prompts or logs.
07/RELATED

Related services

Talk to us about LLM & AI API Integrations.

Tell us what you need and when you need it. We reply with a clear scope and the next steps.