Linguistic-Informed Approach to Production LLM Systems

mastercard · Finance · 2023 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: production LLM prompting and representation

Mastercard's talk argues that teams building LLM systems often optimize metrics without clear goals and miss linguistic failure modes in tokenization, pragmatics, phonetics, and model longevity.

Constraints:

Architecture

The proposed operating model is a linguistically informed LLM development framework. Teams set explicit goals first, then reason about five linguistic dimensions: syntax, morphology/tokenization, semantics, pragmatics/context, and phonetics/speech. The talk demonstrates that pragmatic instruction with Guidance and Falcon 7B Instruct can improve a biology-question task from 7/20 to 17/20 while reducing runtime from about one minute to about two seconds, and it frames multilingual tokenization and phonetic input as ways to preserve language information that plain text can lose.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  Goal_definition["Goal definition"] --> Linguistic_analysis_framework["Linguistic analysis framework"]
  Linguistic_analysis_framework --> Tokenization_strategy["Tokenization strategy"]
  Linguistic_analysis_framework --> Pragmatic_instruction_layer["Pragmatic instruction layer"]
  Linguistic_analysis_framework --> Phonetic_representation_layer["Phonetic representation layer"]
  Tokenization_strategy --> Model_runtime["Model runtime"]
  Pragmatic_instruction_layer --> Model_runtime
  Model_runtime --> Retrieval_tools["Retrieval tools"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Goal definition Up-front target for what the LLM system should achieve and how long it should remain useful. Linguistic analysis framework
Linguistic analysis framework Five-part lens covering syntax, morphology, semantics, pragmatics, and phonetics. Goal definition, Tokenization strategy, Pragmatic instruction layer, Phonetic representation layer
Tokenization strategy Morphology-sensitive representation choice intended to avoid frequency-based tokenization mistakes. Linguistic analysis framework, Model runtime
Pragmatic instruction layer Guidance, chain-of-thought, system prompts, and contextual rules that coax task knowledge from the model. Linguistic analysis framework, Model runtime
Model runtime Local or hosted LLM such as Falcon 7B Instruct that executes the task with the selected linguistic scaffolding. Tokenization strategy, Pragmatic instruction layer, Retrieval tools
Retrieval tools Optional LangChain/vector-database style context sources for document retrieval. Model runtime
Phonetic representation layer Speech/text representation that can preserve emphasis and melody information lost in plain text. Linguistic analysis framework

Data flow

A production team starts by defining the use-case goal and required lifetime. The team then chooses how much linguistic structure to preserve: tokenization for morphology, embeddings for meaning, prompt/context rules for pragmatics, retrieval or LangChain-style tools for external context, and phonetic/audio representations for speech tasks. For the biology demo, Guidance wraps Falcon 7B Instruct with pragmatic instructions and repeated prompting so the local model answers a 20-question set faster and more accurately than a vanilla ChatGPT-style query.

3 supporting quotes
“LLMs are solving for language, right? They're large language models. They're not large mathematical models.”transcript, stated
“we have number one, syntax. We have number two, morphology, semantics, pragmatics, phonetics.”transcript, stated
“doing it locally with Falcon 7B Instruct how long it took on average using Guidance, which provided pragmatic instruction for chain of thought”transcript, stated

Why this architecture

The talk argues that language structure should drive LLM design decisions because raw metric optimization and statistical tokenization miss important meaning. Pragmatic instruction can improve both accuracy and speed, multilingual exposure can improve tokenization, and phonetic representations matter for speech meanings that text alone cannot express.

3 supporting quotes
“one of the mistakes that I've seen when people are growing beards, in this case LLMs when they're training LLMs, is they don't have a goal in mind”transcript, stated
“We don't determine morphemes based on frequency, and so they ran into problems with numbers”transcript, stated
“pragmatics being uh giving the model context, whether that's in training or in inference, we found that it works really really well”transcript, stated

Models used: Falcon 7B Instruct · Guidance · ChatGPT / OpenAI framework · Goat 7B · GPT-4 · LangChain · vector databases · Tortoise · ElevenLabs · SVC · phonetic plus model

Scale

Alternatives considered (roads not taken)

Optimize only for metrics

Rejected because: The speaker says KPIs are not goals unless the team is already late-stage or lacks direction.

“they end up solving for metrics, right? They're solving for precision. They're solving for recall. They're solving for an F1 score.”transcript, stated
“If your KPI is your goal, you're either number one uh late stage, which that's fine, that's really good, or number two, you don't know where you're going.”transcript, stated

Use purely frequency-based tokenization

Rejected because: The talk argues that morphemes are not frequency-defined and arithmetic can fail when numbers are grouped statistically.

“popular methodologies for tokenization, like byte pair encoding, or like sentence piece, or even the chat GPT encoding”transcript, stated
“GPT-4 used statistical uh tokenization methodologies that had to do with frequency.”transcript, stated

Represent speech meaning as text only

Rejected because: The speaker says emphasis changes the meaning of the sentence and is lost when reduced to text.

“I never said I loved you is a sentence that's impossible to accurately understand through text because you can put emphasis on every single word”transcript, stated
“that is information that is immediately lost when we reduce it to text”transcript, stated

Patterns

prompt-chaining (prompting)

Guidance is used to provide pragmatic instruction, chain-of-thought, repeated prompts, and system prompts around the model.

“Guidance, which provided pragmatic instruction for chain of thought, allowing it to prompt itself multiple times allowing it to do system prompts”transcript, stated

latency-optimization (serving)

The talk claims the local Guidance/Falcon setup completed the 20-question biology task in about two seconds rather than about a minute.

“it took about 2 seconds to play. Or to go through all 20 questions”transcript, stated
“increased in speed like almost a hundredfold just from using some pragmatic uh instruction on the inference side”transcript, stated

rag-retrieval (retrieval)

Retrieval tools such as LangChain and vector databases are named as additional ways to add context and document retrieval to pragmatic instruction.

“There are other tools like LangChain. There are other tools like vector databases that can add even more to this like document retrieval.”transcript, stated

model-routing (architecture)

The talk compares when model maintenance needs differ by domain, such as slow-changing financial language at Mastercard.

“maybe it's a financial one, like the ones that we work with at MasterCard, where we're working with language that doesn't really change all that fast”transcript, stated

Tradeoffs

Production maintenance strategy

Chose Domain-specific longevity planning over Treating all LLMs as equally perishable public-language snapshots.

Rationale: The speaker notes that financial language at Mastercard may change more slowly, so model-longevity choices depend on domain language drift.

“How long can you stay there? Is your LLM going to just be a period piece for 2023, or is it going to go further?”transcript, stated
“financial one, like the ones that we work with at MasterCard, where we're working with language that doesn't really change all that fast”transcript, stated

Instruction style for the biology task

Chose Pragmatic Guidance around Falcon 7B Instruct over Vanilla ChatGPT query through the OpenAI framework.

Rationale: The speaker reports much better accuracy and speed for the same 20-question task using local pragmatic instruction.

“when I did this vanilla with ChatGPT using the OpenAI framework, it got seven out of 20”transcript, stated
“17 out of 20 instead of seven out of 20”transcript, stated

Gotchas (what bit them)

Metric-only optimization can send an LLM project in the wrong direction.

Root cause: Precision, recall, and F1 are treated as goals before the team defines the desired system behavior.

Resolution: Define the production goal and desired model lifetime before optimizing KPIs.

“If your KPI is your goal, you're either number one uh late stage, which that's fine, that's really good, or number two, you don't know where you're going.”transcript, stated
“with LLMs as opposed to hairstyles, this is a lot harder to do.”transcript, stated

Frequency-based tokenization can make arithmetic harder.

Root cause: Commonly grouped numbers become tokens that prevent the model from seeing the mathematical structure.

Resolution: Consider morphology and tokenization strategy explicitly instead of assuming frequent token groups are semantically right.

“it's grouping commonly grouped numbers together. And so when you ask it to do math problems, sometimes it can't adequately see the problem”transcript, stated

Borrowed words can be split into misleading morphemes.

Root cause: A monolingual tokenizer may identify familiar English pieces inside a borrowed word with different morphological structure.

Resolution: Use multilingual exposure or linguistic knowledge to improve tokenization and word-boundary handling.

“A kimono is a borrowed word in English”transcript, stated
“This is one of the reasons that multilingual models tend to outperform monolingual models on the exact same tasks.”transcript, stated

Text-only speech representation loses meaning carried by emphasis.

Root cause: The same words can mean different things depending on which word is emphasized.

Resolution: For speech tasks, consider phonetic and audio-reference representations in addition to text.

“you can put emphasis on every single word in order and it will change the entire meaning of the sentence”transcript, stated
“this ingests both text in the form of it the International Phonetic Alphabet and the uh and phonetics it ingests an actual audio clip as a reference”transcript, stated

Evaluation

The talk uses a 20-question biology demo as its concrete evaluation: vanilla ChatGPT via OpenAI framework versus Falcon 7B Instruct with Guidance-style pragmatic instruction.

Metrics: questions answered correctly out of 20 · runtime before and after API warm-up · local runtime with Guidance · reported accuracy and speed improvement

4 supporting quotes
“it queries it for 20 college-level biology questions.”transcript, stated
“using the OpenAI framework, it got seven out of 20, which is pretty remarkable, but it's not where they wanted it to be.”transcript, stated
“it ended up getting 17 out of 20 instead of seven out of 20. So it increased by by which increased by 50% accuracy”transcript, stated
“increased in speed like almost a hundredfold”transcript, stated

Outcomes

The source is a conference talk with one 20-question demo and qualitative Mastercard financial-language context; it is not a production case study with deployment volume.

3 supporting quotes
“it ended up getting 17 out of 20 instead of seven out of 20.”transcript, stated
“increased in speed like almost a hundredfold just from using some pragmatic uh instruction on the inference side”transcript, stated
“We're going to be talking about linguistically informed LLMs”transcript, stated