FRGet In Touch
← Tech stack

AI / LLMs

Large language models read and write text, and can turn messy notes, documents and questions into structured, useful data.

Type
Large language models, used through an API or self-hosted
Providers
Anthropic, Google, Mistral, OpenAI and open-weight models
Good at
Extracting, summarising, classifying, drafting, answering from documents
In my stack
AI features inside business applications

What they are

A large language model (LLM) is trained on huge amounts of text to predict what comes next, and in doing so it learns to follow instructions, summarise, translate, classify and write. Through an API, an application can send it text, documents or images with instructions, and get an answer back in seconds, including structured JSON that code can use.

Models don’t know your company’s data unless you give it to them. Retrieval-augmented generation (RAG) searches your own documents, for example with vector search in PostgreSQL, and passes the relevant passages to the model so it answers from them. Models can also call tools, such as looking up a record, which lets them take part in workflows rather than just chat.

Why I use them

Free text becomes data. A field note, an email or a scanned form can be turned into fields a system can store, filter and report on.

Less typing for users. Drafting a report, suggesting a corrective action or summarising a long history saves real time, especially on a phone.

Answers from your own documents. Procedures, standards and past reports become searchable by asking a question in plain language.

Language stops being a barrier. Content can be translated or summarised across languages, which helps teams that mix French, Arabic and English.

Where I use them

I add AI where it saves time on a real task, not as a gimmick: extracting structured data from free text and documents, summarising long histories, classifying incoming requests, and assistants that answer from a company’s own procedures. The model never has the last word on business data: its output is validated against a schema, shown to a person as a suggestion, and recorded in the audit trail like any other change.

Best use cases

  • Document and data extraction: invoices, forms, reports and notes turned into structured records.
  • Summaries and drafts of reports, incidents and long discussion threads.
  • Search and Q&A over internal documents, such as procedures and standards.
  • Triage and classification of tickets, emails and observations.

When I’d use something else

When the rule is clear, such as a calculation, a validation or a permission check, ordinary code is cheaper, faster and always right. LLMs can be confidently wrong, so they don’t belong where an unchecked answer could cause harm. And when data can’t leave a company or a country, a cloud API may be ruled out, which means a self-hosted open-weight model, or no AI for that feature.

A small example

The safe pattern, in TypeScript: ask the model for JSON, check it against a schema with Zod, and treat the result as a suggestion a person confirms. askModel is a small wrapper around whichever provider the project uses.

import { z } from "zod";

const Finding = z.object({
  hazard: z.string(),
  severity: z.enum(["low", "medium", "high"]),
  location: z.string(),
});

async function suggestFinding(note: string) {
  const answer = await askModel({
    system: "Extract the hazard, its severity and its location " +
            "from the inspector's note. Reply with JSON only.",
    user: note,
  });

  try {
    return Finding.parse(JSON.parse(answer)); // a draft the inspector confirms
  } catch {
    return null; // invalid answer: fall back to manual entry
  }
}

Often used with

Want to add AI to your app where it actually saves time?

Get in touch and tell me about your project.