One application, a model per intent
One invoice arrives from a supplier. Five people want something different from it. The application wants its fields. The person who keeps the catalog wants each line in the house's own terms. An analyst wants to know what it says about this customer's buying. A marketer wants to know whether something new is emerging. A manager wants three sentences.
I would not try to serve all five with one general prompt. Reading the fields is easy for any model. The other four depend on things only this business knows: the names its suppliers bill under, what this customer usually orders, which labels its analysts use, and how its briefs sound. That is where I bring in a specialist.
To your code, a specialist is just another model. You call it the way you call any model. The difference is that it is made for one task and one intent, by whoever provides it. IntentSharp.Specialist, new in IntentSharp 1.1.0, requests it, checks it, keeps it and uses it; it never trains, tunes or changes a model.
A specialist of your own
You do not need an outside provider to start. A specialist is a name, an intent tuned for one task, and the model it runs on. A small service of your own can hand those back for each task, using models the application already has configured, and the records the business already keeps:
/// <summary>What the business keeps in its own records, which the specialists are given and held to.</summary>
public static class HouseRecords
{
// Every name a supplier bills under, and the supplier it is in our books.
public static readonly Dictionary<string, string> SupplierAliases = new(StringComparer.OrdinalIgnoreCase)
{
["HPC Distribution"] = "Harbor Paper",
["Harbor Paper Co."] = "Harbor Paper",
["HarborPak"] = "Harbor Paper",
["Harbor Eco"] = "Harbor Paper",
["NB Foods"] = "Northbay Foods",
["Coastline"] = "Coastline Packaging",
};
// What each customer usually orders in a month, from our order history.
public static readonly Dictionary<string, string[]> UsualOrders = new(StringComparer.OrdinalIgnoreCase)
{
["Lantern Cafe"] = ["6 cs 16oz hot cup PLA, Harbor Eco", "2 cs sip lid 16oz, Coastline", "4 cs oat milk barista 1L, NB Foods"],
};
}Those records are what a general model lacks: what normal looks like for this customer, private vocabulary, and one supplier under many names. The fourth thing, a consistent lens, is the house voice of the brief. Not every task needs a specialist. Some do, and a larger task can be a chain of smaller ones, each with its own intent and, where it helps, its own specialist.
One function, five steps
BuildInvoiceInsight takes one invoice and returns one InvoiceInsight. Inside it, five steps run in order, each with its own catalog intent, each feeding the next. The caller sees one function and one result.
| Step | Who asks | The question | Runs on |
|---|---|---|---|
| 1 | The application | What does the invoice say? | The general model. No specialist. |
| 2 | The catalog keeper | What is each line in our terms? | A vocabulary specialist, once per invoice line. |
| 3 | The analyst | What does this say about the customer's buying? | An analyst specialist. |
| 4 | The marketer | Is something new emerging? | A marketing specialist. |
| 5 | The manager | What should I know in three sentences? | A brief specialist that writes in the house voice. |
Each step is an intent file. Step 2 names the house's families and suppliers, and a validator holds it to the supplier names on record:
name: Invoice.LineInOurTerms
version: 1
intent: >
Name this invoice line in our own terms. Return the line exactly as written,
its product family, one of Hot cups, Cold cups, Lids, Cutlery, Milk
alternatives or Other, and its supplier, one of Harbor Paper, Northbay Foods,
Coastline Packaging or Other.
shape:
kind: schema
schema:
type: object
properties:
line: { type: string }
family: { type: string }
supplier: { type: string }
required: [line, family, supplier]
additionalProperties: false
rules:
properties:
family: { enum: [Hot cups, Cold cups, Lids, Cutlery, Milk alternatives, Other] }
supplier: { enum: [Harbor Paper, Northbay Foods, Coastline Packaging, Other] }
validators:
- Invoice.KnownSupplier
attempts: 2Step 3 judges the invoice against the customer's usual order. Its labels are rules, and its evidence must quote real lines. Step 4 has the same form with the marketer's labels.
name: Invoice.BuyingSignals
version: 1
intent: >
Say what this invoice shows about the customer's buying, judged against the
customer's usual order. Give each signal one of our labels: Stocking up,
Brand switch, Trading down or First in category. As evidence, quote the lines
it rests on exactly as written, from the invoice or the usual order, and add
a short note. Return no signal you cannot support with a line.
shape:
kind: schema
schema:
type: object
properties:
signals:
type: array
items:
type: object
properties:
label: { type: string }
evidence: { type: array, items: { type: string } }
note: { type: string }
required: [label, evidence, note]
additionalProperties: false
required: [signals]
additionalProperties: false
rules:
properties:
signals:
items:
required: [label, evidence]
properties:
label: { enum: [Stocking up, Brand switch, Trading down, First in category] }
evidence: { minItems: 1 }
validators:
- Invoice.EvidenceQuoted
attempts: 2The function is plain C#. Step 1 runs on the catalog's IntentRuntime. Steps 2 to 5 run on a SpecialistRuntime, and step 2 uses RunManyAsync, which runs one intent over many inputs, here one call per invoice line. The application passes the customer's usual order, from its own records, with the lines:
public async Task<InvoiceInsight> BuildInvoiceInsight(string invoice)
{
var checks = new List<AIResultBase>();
// 1. What does the invoice say? Any model can read an invoice: the general model, no specialist.
JsonNode read = Accept(await _general.RunAsync("Invoice.Read", invoice), checks);
var vendor = (string?)read["vendorAsBilled"];
var lines = read["lines"]!.AsArray().Select(line => (string?)line).ToList();
var usual = HouseRecords.UsualOrders.GetValueOrDefault((string?)read["customer"] ?? "") ?? [];
_record.Value = (invoice, usual);
// 2. What is each line in our terms? The vocabulary specialist, once per line.
var inOurTerms = (await Specialists.RunManyAsync("Invoice.LineInOurTerms", lines.Select(line => (object?)new { vendor, line })))
.Select(result => Accept(result, checks)).ToList();
var facts = new
{
customer = (string?)read["customer"],
city = (string?)read["city"],
usualOrder = usual,
lines = inOurTerms.Select(terms => new { line = (string?)terms["line"], family = (string?)terms["family"], supplier = (string?)terms["supplier"] }).ToList()
};
// 3. What does this say about the customer's buying, against the usual order? The analyst specialist.
JsonNode signals = Accept(await Specialists.RunAsync("Invoice.BuyingSignals", facts), checks);
// 4. Is something new emerging? The marketing specialist.
JsonNode trends = Accept(await Specialists.RunAsync("Invoice.EmergingTrends", facts), checks);
// 5. What should a manager know in three sentences? The brief specialist, from the answers of steps 2 to 4.
string brief = Accept(await Specialists.RunAsync<string>("Invoice.ManagerBrief",
new { facts.customer, facts.city, facts.lines, signals = signals["signals"], trends = trends["trends"] }), checks);
return new InvoiceInsight(read, usual, inOurTerms, signals, trends, brief, checks);
}
private static T Accept<T>(AIResult<T> result, List<AIResultBase> checks)
{
checks.Add(result);
return result.Success ? result.Value! : throw new InvalidOperationException($"No checked answer: {result.FailureSummary}");
}I keep the order of the steps in code here. In a larger report the orchestrator could itself be a specialist.
The service
For each of the four intents, the service returns the requested intent with the house's knowledge stated outright, a specialist name, and the name of a provider the application already has configured. Any other intent gets no offer.
/// <summary>
/// The house's own specialist service. For four tasks it hands back the requested intent with what this business knows
/// added, a specialist name, and a provider the application already has configured. Any other intent gets no offer.
/// </summary>
public sealed class HouseSpecialists : ISpecialistService
{
private static readonly Dictionary<string, (string Specialist, string Provider, string Knowledge)> Tasks = new()
{
["Invoice.LineInOurTerms"] = ("house-vocabulary", "vocabulary",
"Our suppliers bill under these names: " + string.Join("; ", HouseRecords.SupplierAliases.Select(a => $"{a.Key} is {a.Value}")) +
". A brand or name on the line decides its supplier, whoever sent the invoice. Hot cups of any size or material are Hot cups; " +
"sip and dome lids are Lids; oat, almond and soy milk are Milk alternatives; cutlery kits are Cutlery. cs is a case."),
["Invoice.BuyingSignals"] = ("house-analyst", "analyst",
"Judge each line against the customer's usual order. Twice the usual cases or more is Stocking up, quoting the usual line and the new one. The same item from " +
"another brand than the usual line is a Brand switch, quoting the usual line and the new one. A cheaper or smaller item in " +
"place of the usual one is Trading down, quoting both. A family missing from the usual order is First in category."),
["Invoice.EmergingTrends"] = ("house-marketing", "marketing",
"Portland cafes buy cups, lids and milk alternatives. Items bought together that point to one use are Bought together; " +
"a family outside the usual order that points to a new use, such as cutlery at a cafe meaning food to go, is New use."),
["Invoice.ManagerBrief"] = ("house-brief", "brief",
"Write in our house voice: exactly three plain sentences. The first says who the customer is and what changed, the second " +
"what it points to, the third one thing to do this week. No dashes, no exclamation marks, no lists."),
};
private readonly ConcurrentDictionary<string, SpecialistRequest> _requests = new();
public string Name => "house-specialists";
public int RequestCount => _requests.Count;
public Task<SpecialistTicket> RequestAsync(SpecialistRequest request, CancellationToken cancellationToken)
{
var ticket = new SpecialistTicket { Id = Guid.NewGuid().ToString("N"), ServiceName = Name, RequestHash = request.RequestHash, RequestedAt = DateTimeOffset.UtcNow };
_requests[ticket.Id] = request;
return Task.FromResult(ticket);
}
public Task<SpecialistOffer?> WaitAsync(SpecialistTicket ticket, TimeSpan timeout, CancellationToken cancellationToken)
{
var request = _requests[ticket.Id];
if (!Tasks.TryGetValue(request.IntentName, out var task)) return Task.FromResult<SpecialistOffer?>(null);
// A copy of the requested intent: the same name, shape, rules and validators, with what this business knows added.
var tuned = IntentFile.Read(IntentFile.Write(request.Definition), "tuned.intent.json").Definitions[0];
tuned.Intent = tuned.Intent.TrimEnd() + "\n" + task.Knowledge;
return Task.FromResult<SpecialistOffer?>(new SpecialistOffer
{
Definition = tuned,
ProviderName = task.Provider, // a provider the application already has
Info = new SpecialistInfo { Name = task.Specialist, RequestHash = request.RequestHash }
});
}
public Task ReportFitAsync(SpecialistTicket ticket, FitReport report, CancellationToken cancellationToken) => Task.CompletedTask;
public Task RetireAsync(SpecialistTicket ticket, CancellationToken cancellationToken) => Task.CompletedTask;
}The library does the rest. Before it runs a returned intent, it checks that the intent still fits the one requested: the same name and result shape, and no rule or validator dropped or weakened. It keeps the specialist's name and the returned intent, reuses them on later calls, and asks again when the requested intent changes. If the service offers nothing, the call waits and then throws; it does not fall back to another model.
Holding them to it
Telling a model what the house knows is half of it. The other half is refusing an answer that ignores it. The validators the intent files name are registered in code, and both runtimes take them:
private readonly IntentRuntime _general;
private readonly AsyncLocal<(string Invoice, string[] Usual)> _record = new(); // what the checks compare with
public InvoiceInsights(IntentClient client, IIntentCatalog catalog, ISpecialistService service, ISpecialistStore? store = null)
{
// The validators the intent files name, registered in code. Both runtimes run with them.
var validators = new IntentValidatorRegistry()
.Add("Invoice.KnownSupplier", KnownSupplier)
.Add("Invoice.EvidenceQuoted", EvidenceQuoted)
.Add("Brief.HouseVoice", HouseVoice);
_general = new IntentRuntime(client, catalog, validators);
Specialists = new SpecialistRuntime(client, catalog, service, store: store, validators: validators);
}
public SpecialistRuntime Specialists { get; }Each one checks a piece of the house's knowledge: a line billed under a name on record goes to that name's supplier; evidence quotes the invoice or the usual order; a signal that compares with the usual order quotes one line of each, and stocking up means at least twice the usual cases; the brief is exactly three plain sentences with no dashes.
// Invoice.KnownSupplier: a line billed under a name in our records is filed under that name's supplier.
private IEnumerable<string> KnownSupplier(object? value)
{
var line = (string?)(value as JsonObject)?["line"] ?? "";
var supplier = (string?)(value as JsonObject)?["supplier"] ?? "";
if (!OnInvoice(line)) yield return $"\"{line}\" is not on the invoice; return the line exactly as written.";
foreach (var (alias, ours) in HouseRecords.SupplierAliases)
if (line.Contains(alias, StringComparison.OrdinalIgnoreCase) && !supplier.Equals(ours, StringComparison.OrdinalIgnoreCase))
yield return $"\"{line}\" is billed under {alias}, which is {ours}; the supplier must be {ours}.";
}
// Invoice.EvidenceQuoted: evidence quotes the invoice or the usual order; a signal that compares with the usual order
// quotes one line of each, and stocking up means at least twice the usual cases.
private IEnumerable<string> EvidenceQuoted(object? value)
{
var items = (value as JsonObject)?.Select(p => p.Value).OfType<JsonArray>().SelectMany(a => a).OfType<JsonObject>() ?? [];
foreach (var item in items)
{
var evidence = (item["evidence"] as JsonArray ?? []).Select(e => (string?)e ?? "").ToList();
foreach (var quote in evidence.Where(q => !OnInvoice(q) && !InUsualOrder(q)))
yield return $"\"{quote}\" is neither on the invoice nor in the usual order; quote a line exactly as written.";
var label = (string?)item["label"];
if (label is "Brand switch" or "Trading down" or "Stocking up" && !(evidence.Any(InUsualOrder) && evidence.Any(OnInvoice)))
yield return $"A {label} signal quotes both the usual order's line and the invoice's new line.";
else if (label == "Stocking up" &&
evidence.Where(OnInvoice).Max(Cases) < 2 * evidence.Where(InUsualOrder).Max(Cases))
yield return "Stocking up means at least twice the usual cases; this line is not.";
}
}
private static int Cases(string line) => Regex.Match(line, @"^\s*(\d+)\s*cs\b") is { Success: true } m ? int.Parse(m.Groups[1].Value, System.Globalization.CultureInfo.InvariantCulture) : 0;
// Brief.HouseVoice: exactly three plain sentences, with no dashes and no exclamation marks.
private static IEnumerable<string> HouseVoice(object? value)
{
var text = (value as string ?? "").Trim();
var sentences = Regex.Split(text, @"(?<=[.?!])\s+").Count(s => s.Length > 0);
if (sentences != 3) yield return $"The brief has {sentences} sentences; write exactly three.";
if (text.Contains('—') || text.Contains('–') || text.Contains(" - ", StringComparison.Ordinal))
yield return "The brief uses a dash; write plain sentences without dashes.";
if (text.Contains('!')) yield return "The brief uses an exclamation mark; write plain sentences.";
}
private bool OnInvoice(string quote) => Quotes(_record.Value.Invoice ?? "", quote);
private bool InUsualOrder(string quote) => (_record.Value.Usual ?? []).Any(line => Quotes(line, quote));
private static bool Quotes(string text, string quote)
=> quote.Trim().Length > 0 && Squeeze(text).Contains(Squeeze(quote), StringComparison.OrdinalIgnoreCase);
private static string Squeeze(string text) => string.Join(' ', text.Split((char[]?)null, StringSplitOptions.RemoveEmptyEntries));Run it on scripted models
The website runs this sample with every build. Five scripted providers stand in for the five configured ones, under the same names, so no model is called:
// Scripted stand-ins for the five providers the application has configured, under the same names.
var general = new ScriptedProvider(Replies.General) { Name = "general" };
var vocabulary = new ScriptedProvider(Replies.Vocabulary) { Name = "vocabulary" };
var analyst = new ScriptedProvider(Replies.Analyst) { Name = "analyst" };
var marketing = new ScriptedProvider(Replies.Marketing) { Name = "marketing" };
var brief = new ScriptedProvider(Replies.Brief) { Name = "brief" };
using var client = new IntentClientBuilder()
.UseProvider(general) // the usual model
.AddProvider(vocabulary) // the other four are reachable by name only
.AddProvider(analyst)
.AddProvider(marketing)
.AddProvider(brief)
.WithMemory(null)
.Build();
using var catalog = new FileIntentCatalog(folder, new FileIntentCatalogOptions { WatchForChanges = false });
var service = new HouseSpecialists();
var state = new InMemoryDocumentStore(); // where held specialists are kept
var insights = new InvoiceInsights(client, catalog, service, new DocumentSpecialistStore(state));
InvoiceInsight insight = await insights.BuildInvoiceInsight(Lantern);Invoice HPC-20417 from HPC Distribution, for Lantern Cafe (Portland)Usual order: 6 cs 16oz hot cup PLA, Harbor Eco; 2 cs sip lid 16oz, Coastline; 4 cs oat milk barista 1L, NB Foods1 Invoice.Read on general: 4 lines, total 908.002 Invoice.LineInOurTerms on vocabulary (specialist house-vocabulary), once per line: 12 cs 16oz hot cup PLA, Harbor Eco 540.00 -> Hot cups, Harbor Paper 4 cs sip lid 16oz, HarborPak 96.00 -> Lids, Harbor Paper 6 cs oat milk barista 1L, NB Foods 198.00 -> Milk alternatives, Northbay Foods, passed on attempt 2 attempt 1 refused: "6 cs oat milk barista 1L, NB Foods 198.00" is billed under NB Foods, which is Northbay Foods; the supplier must be Northbay Foods. 2 cs compostable cutlery kit, HarborPak 74.00 -> Cutlery, Harbor Paper3 Invoice.BuyingSignals on analyst (specialist house-analyst), passed on attempt 2: attempt 1 refused: "12 cases of 16oz PLA hot cups" is neither on the invoice nor in the usual order; quote a line exactly as written. attempt 1 refused: A Stocking up signal quotes both the usual order's line and the invoice's new line. attempt 1 refused: A Brand switch signal quotes both the usual order's line and the invoice's new line. Stocking up: "6 cs 16oz hot cup PLA, Harbor Eco" / "12 cs 16oz hot cup PLA, Harbor Eco" (twice the usual 6 cases) Brand switch: "2 cs sip lid 16oz, Coastline" / "4 cs sip lid 16oz, HarborPak" (lids from Harbor Paper in place of Coastline) First in category: "2 cs compostable cutlery kit, HarborPak" (no cutlery in the usual order)4 Invoice.EmergingTrends on marketing (specialist house-marketing): New use: "2 cs compostable cutlery kit, HarborPak" (food to go at a cafe) Bought together: "12 cs 16oz hot cup PLA, Harbor Eco" / "2 cs compostable cutlery kit, HarborPak" (cups with cutlery: drinks and food to go)5 Invoice.ManagerBrief on brief (specialist house-brief): Lantern Cafe in Portland ordered twice its usual hot cups, moved its lids to Harbor Paper and bought cutlery for the first time. The cutlery with the cups points to drinks and food to go. Offer them a bundle of cups, lids and cutlery for takeaway this week. Two scripted answers ignore what the house knows, and the checks catch both. Step 2's first answer filed the NB Foods oat milk under the invoice's vendor; the supplier check refused it and the retry named Northbay Foods. Step 3's first answer paraphrased a line and called a brand switch and a stock-up without the usual lines to compare against; the retry quoted both sides. The replies are scripted, so this shows what the application does with answers, not how well any model reads an invoice.
Kept and used again
The runtime keeps a record of each specialist it put in use: the name the service gave and the intent it returned. In a document store those records can outlast the process; here an in-memory store stands in, and a second runtime over the same store stands in for a restart and reads a second invoice:
// What the runtime keeps for each specialist: the name the service gave and the intent it returned.
foreach (var name in new[] { "Invoice.LineInOurTerms", "Invoice.BuyingSignals", "Invoice.EmergingTrends", "Invoice.ManagerBrief" })
{
HeldSpecialist held = (await insights.Specialists.GetHeldAsync(name))!;
IntentDefinition returned = held.ReadDefinition();
output.WriteLine($"Held {held.Name} for {held.IntentName} on {held.ProviderName}, " +
$"returned intent version {returned.Version}: \"{Opening(LastLine(returned.Intent))}\"");
}
// After a restart: a new runtime over the same store puts each held specialist back in use, with no new request.
var later = new InvoiceInsights(client, catalog, service, new DocumentSpecialistStore(state));
InvoiceInsight next = await later.BuildInvoiceInsight(LanternAgain);Held house-vocabulary for Invoice.LineInOurTerms on vocabulary, returned intent version 1: "Our suppliers bill under these names: HPC Distribution is Harbor Paper; ..."Held house-analyst for Invoice.BuyingSignals on analyst, returned intent version 1: "Judge each line against the customer's usual order. Twice the usual ..."Held house-marketing for Invoice.EmergingTrends on marketing, returned intent version 1: "Portland cafes buy cups, lids and milk alternatives. Items bought ..."Held house-brief for Invoice.ManagerBrief on brief, returned intent version 1: "Write in our house voice: exactly three plain sentences. The first says ..." After a restart, invoice HP-20488 from Harbor Paper Co.: 4 of 4 specialists back in use from what was held; requests the service has received: 4 In our terms: Hot cups, Harbor Paper; Lids, Harbor Paper Signals: Trading down: "6 cs 16oz hot cup PLA, Harbor Eco" / "6 cs 12oz hot cup paper, Harbor Eco"; Brand switch: "2 cs sip lid 16oz, Coastline" / "2 cs dome lid 12oz, HarborPak" Brief: Lantern Cafe moved from its usual 16oz PLA cups to cheaper 12oz paper cups and took its lids from Harbor Paper. Nothing else new is emerging. Ask them this week whether price or size made the change.All four specialists came back from what was held, and the service received no new request: four in all, one per intent. The second invoice came from Harbor Paper Co., and its lines still landed under Harbor Paper.
Against live models
The same function runs against real models when the client reads a provider file instead. Its five entries are named general, vocabulary, analyst, marketing and brief: a small model for the first two, a larger one for the analyst and the marketer, and a third model for the brief.
// The provider file names general, vocabulary, analyst, marketing and brief: each one's kind, model and key reference.
using var store = new FolderDocumentStore(providerFolder);
using var client = new IntentClientBuilder()
.UseProviderOptions(store)
.Build();
var insights = new InvoiceInsights(client, catalog, new HouseSpecialists());
InvoiceInsight insight = await insights.BuildInvoiceInsight(invoice);Invoice HPC-20417 from HPC Distribution, for Lantern Cafe (Portland)Usual order: 6 cs 16oz hot cup PLA, Harbor Eco; 2 cs sip lid 16oz, Coastline; 4 cs oat milk barista 1L, NB Foods1 Invoice.Read on general: 4 lines, total 9082 Invoice.LineInOurTerms on vocabulary (specialist house-vocabulary), once per line: 12 cs 16oz hot cup PLA, Harbor Eco 540.00 -> Hot cups, Harbor Paper 4 cs sip lid 16oz, HarborPak 96.00 -> Lids, Harbor Paper 6 cs oat milk barista 1L, NB Foods 198.00 -> Milk alternatives, Northbay Foods, passed on attempt 2 attempt 1 refused: "6 cs oat milk barista 1L, NB Foods 198.00" is billed under NB Foods, which is Northbay Foods; the supplier must be Northbay Foods. 2 cs compostable cutlery kit, HarborPak 74.00 -> Cutlery, Harbor Paper3 Invoice.BuyingSignals on analyst (specialist house-analyst), passed on attempt 2: attempt 1 refused: Stocking up means at least twice the usual cases; this line is not. Stocking up: "6 cs 16oz hot cup PLA, Harbor Eco" / "12 cs 16oz hot cup PLA, Harbor Eco 540.00" (Hot cups are ordered at twice the usual quantity.) Brand switch: "2 cs sip lid 16oz, Coastline" / "4 cs sip lid 16oz, HarborPak 96.00" (The lid item is the same size and type, but the brand changed from Coastline to HarborPak.) First in category: "2 cs compostable cutlery kit, HarborPak 74.00" (Cutlery does not appear in the usual order.)4 Invoice.EmergingTrends on marketing (specialist house-marketing), passed on attempt 2: attempt 1 refused: ""12 cs 16oz hot cup PLA, Harbor Eco 540.00"" is neither on the invoice nor in the usual order; quote a line exactly as written. attempt 1 refused: ""4 cs sip lid 16oz, HarborPak 96.00"" is neither on the invoice nor in the usual order; quote a line exactly as written. attempt 1 refused: ""6 cs oat milk barista 1L, NB Foods 198.00"" is neither on the invoice nor in the usual order; quote a line exactly as written. attempt 1 refused: ""2 cs compostable cutlery kit, HarborPak 74.00"" is neither on the invoice nor in the usual order; quote a line exactly as written. Bought together: "6 cs 16oz hot cup PLA, Harbor Eco" / "2 cs sip lid 16oz, Coastline" / "4 cs oat milk barista 1L, NB Foods" / "12 cs 16oz hot cup PLA, Harbor Eco 540.00" / "4 cs sip lid 16oz, HarborPak 96.00" / "6 cs oat milk barista 1L, NB Foods 198.00" (The invoice keeps the same cafe drink bundle from the usual order: cups, lids, and oat milk together.) New use: "2 cs compostable cutlery kit, HarborPak 74.00" (Cutlery is not in the usual order, so it suggests a new use beyond the regular cafe drink purchase.)5 Invoice.ManagerBrief on brief (specialist house-brief): Lantern Cafe in Portland doubled its usual 16oz hot cup order, switched its 16oz lids from Coastline to HarborPak, and added compostable cutlery for the first time. The cups, lids, and oat milk still point to its regular cafe drink bundle, while the cutlery suggests a new use. This week, confirm whether the lid switch and cutlery addition are intentional.The application got its four lines and the total from the general model. The catalog keeper got every line in the house's terms; the oat milk first went to the invoice's vendor, and the supplier check sent it back until it named Northbay Foods. The analyst got the doubled hot cups, the lids moved from Coastline to HarborPak, and the first cutlery, after the stocking-up check refused a signal below twice the usual cases. The marketer got cutlery as a new use, after its first answer was refused for quotes that were not written as on the invoice. The manager got three plain sentences on all of it.
One answer was weak: the marketer's "bought together" restates the customer's usual cups, lids and oat milk rather than anything new. A pass means the configured checks passed, not that an answer is right.
When a provider offers a model made for the task
The service is the only part that knows where a specialist comes from. When a provider later offers a model made for one of these tasks, an adapter to that provider takes the place of HouseSpecialists, and BuildInvoiceInsight does not change. Its intents, its checks and its result stay the same.
The same pattern stretches further. A market report could run one specialist per stock, an orchestrator that decides what to ask, an executive brief over their answers, and one more specialist that makes the result look good. Each one is a name, an intent and a model, and each answer is checked before the next step reads it.
The Models per intent guide lists the options and their defaults. The sample uses IntentSharp, IntentSharp.Catalog and IntentSharp.Specialist at version 1.1.0; see installation. IntentSharp is commercial software from C2Consultants LLC; see pricing and evaluation terms before using it in a business project.