Search⌘ K
AI Features

Building LLM-Powered Solutions

Choose the simplest LLM workflow that meets the requirements, whether through direct prompting, retrieval, or limited tool use. Make retrieved evidence traceable, validate model-generated output against a defined schema, and enforce tool-call permissions and execution limits in application code to build LLM features that produce verifiable, evidence-grounded responses.

“How long can I borrow a projector, and what is the status of repair ticket T41?”

An equipment-helpdesk assistant needs two sources of information: the equipment-loan policy and the current record for ticket T41. The model can combine both sources into a response, but generating a plausible answer does not establish its accuracy or authorize a ticket lookup.

Application code controls which evidence is provided to the model, which tool calls are authorized and executed, and which model outputs pass validation.

Choosing the simplest workflow

Use ordinary code for identifier validation, document indexing, ticket lookup, and date arithmetic. The useful generative work is interpreting the question and composing a readable response from supplied evidence.

Choose the smallest workflow that supplies that evidence:

  • Direct prompting: Put one relevant passage directly into the request. This works when all necessary information fits there.

  • Retrieval-augmented generation (RAG): Retrieve relevant passages from a collection and supply them with the question. A standard pipeline fixes the retrieval sequence at design time.

  • Bounded tool use: Let the model propose a narrowly defined operation, then let application code validate and execute it.

For this request, choose fixed RAG plus one optional read-only ticket lookup. Dynamic source selection or runtime query decomposition could justify additional agentic behavior; this small collection needs neither.

Preparing traceable chunks

A chunk is a retrievable unit of source content. Its boundary should preserve the context needed to interpret its rule.

Create equipment_policies.json with these three section-level records:

  • equipment-policy:projector-loans, source equipment-policy, version 3, section projector-loans: “Projectors may be borrowed for 3 calendar days. Extensions require desk approval.”

  • ...