Shadowing Practice: Top 5 AI Gateway Use Cases | Solo.io - Learn English Speaking with Video

Choose a practice mode

Each mode opens a full-screen practice room.

159 sentences
If sentences are too short or too long, click Edit to adjust them.
1
Continuing on the theme of AI related connectivity, let's talk about AI gateways.
2
A really common question we get is, why do I need an AI gateway?
3
And maybe I'll just build one myself or use my existing API gateway for that functionality.
4
So let's examine the top five use cases we see in customers adopting an AI gateway.
5
The first one involves credential management.
6
So without an AI gateway, a very common pattern you see is I'll create a key here in my LLM provider,
7
and then I'll go ahead and take that key and distribute it to the application teams,
8
the teams writing agents, and anyone maybe that they're using an agentic IDE and they need an API key there as well, and you can distribute it in all those locations.
9
Functionally this works.
10
The problem is when any one of these developers that has seen
11
that key maybe leaves the company or accidentally checks it into a public GitHub repository,
12
the blast radius of that is this entire infrastructure, including your account in the ALM provider.
13
One thing that an AI gateway helps out with immediately is
14
that I can have safe and secure storage for my API keys that only my AI gateway has access to.
15
The AI gateway then can, if we want, go ahead and issue individual keys for specific use cases for specific user groups.
16
Or I can also integrate with existing authentication mechanisms I have in my organization.
17
Like if an agent is presenting a JWT, I can use that and map it to the API key I'm providing to the provider.
18
This is critical just in terms of the blast radius limitation of like, hey, a key is exfiltrated,
19
or someone has hacked a certain piece of code and gained access to a certain piece of code.
20
I know exactly how to contain that threat.
21
And by containing it, I'm not impacting any of the use cases I have for that LLM provider.
22
I would say that credential management also plays a key role in the other use cases we're about to talk about now.
23
So let's talk about rate limiting.
24
Why is rate limiting important?
25
So maybe you've already seen this in your existing applications where let's say you have,
26
this app is sending five requests with a token size of let's just say 20K tokens, right?
27
And over here, this IDE is sending 20 requests with a token size, like a 45k token window,
28
like every minute or so, right?
29
Now you end up with turning an agent on and the agent goes bananas.
30
And all of a sudden it sends, you know, 20,000 requests and a massive context window that it's dumping in.
31
And it's got like a million tokens, let's say, just in a very short period of time, like in less than a minute.
32
Now in
33
that scenario, what's going to happen is the LLM provider is going to rate limit not only based on request count, but also by token count.
34
So those are both variables in that equation and evaluation.
35
And when you get shut off, you're going to get shut off, not just for the use case that's abusing it, but account wide, and you're going to get a backoff.
36
That means maybe this agent, I'm just testing around or it's an evaluation,
37
but I brought my entire account down and that's all API keys for that account across all the other use cases.
38
It's impacting developers, it's impacting my production apps that may be customer facing as well.
39
We have to find a better way to deal with this problem.
40
And the answer is with an AI gateway to actually support rate limiting
41
and token rate and rate limiting in particular directly in the gateway.
42
And that means when I have this same traffic here where I'm coming over and this is the bad actor.
43
I have our IDE friends over here.
44
This agent, since it's interacting with the AI gateway first,
45
the AI gateway can shut off that agent directly while allowing traffic from all other consumers to continue.
46
That means I have no production or service interruptions from the app or the IDE, and the agent gets really gentle back pressure
47
and gets turned off for a period of time and then gets opened up again.
48
It'll be very obvious to that team that they're getting rate limited locally, and then they can fix that problem and address it and come back online.
49
Or maybe it was a periodic or ephemeral issue with flooding a bunch of traffic, and as soon as they exceed the rate limiting window, then they'll come back online.
50
But the key thing in any gateway and why API gateways, traditional API gateways are not sufficient to handle this requirement is you need both request rate limiting,
51
but also token weighted rate limiting.
52
So I can compute the amount of tokens that are allowed given a certain time window in seconds, minutes, hours or days.
53
All right.
54
Use case number three, usage reporting.
55
So maybe this is familiar to you as you're consuming more and more of provider services.
56
end of the day you get a nice bill from your provide your LLM provider
57
and it's a million dollars okay okay who has actually spending
58
that money okay you may be lucky enough to have multiple API keys
59
so you get maybe some subdivision of that but again
60
if you're sharing API keys across the clients
61
that are using it then you're gonna that's gonna get washed
62
out more importantly you're not gonna have the very specific details of the identities the groups that are consuming it, the model and the provider used in
63
that internal detail of how you're actually going to show chargeback or showback to the teams consuming.
64
So what we want is the ability that we'll get the same million dollar bill over here.
65
Okay.
66
But in this scenario, every request that's going through the AI gateway is actually earmarked
67
or watermarked with the client actually consuming it.
68
That's how we're doing rate limiting.
69
And that's why we implement credential management in this layer as well, which means that when I get this $1 million bill,
70
the access logging and reporting here can actually tell me that this particular app is actually responsible for 50K
71
and this IDE is responsible for 50K.
72
Or in like, you know, the token count, it'll report the token counts and you can extrapolate the value there.
73
And then our friend, the agent that was acting up in terms of rate limiting, their token contribution was around 900K, right?
74
This is a very, very key attribute to like once you're trying to justify
75
that AI budget and who's consuming you're trying to even
76
if you're not charging back those teams you're trying to show
77
who's consuming consumption reporting in the gateway is a key feature
78
you'd certainly don't want to you don't have the right details in a traditional API management solution
79
or API gateway to basically track providers and clients
80
and token counts to show that charge back
81
but then also you won't have the granularity to isolate it to given teams all right number four for guardrails.
82
So for guardrails, what we're going to protect against is a number of things.
83
The request that's going in, this can be a hijack request, it could be a phishing prompt, it can be anything.
84
This is your attack surface area of what's going in via natural language prompt.
85
And they're going to be a common attack vectors that you're going to want to protect against.
86
Certain prompts that if they contain keywords or they're structured in a certain way, you always want to prevent.
87
Or perhaps you want to append a system prompt to every request that goes through.
88
So you can use some semantic guardrails there in line with the request.
89
Likewise, even if it wasn't a malicious request on the response path, I always have a danger here of data exfiltration, right?
90
So if I'm asking a very innocent question that's not a phishing attack or trying to be a Trojan horse, I still might get back some customer data,
91
account information, social security number, this type of thing that I don't want to expose to clients.
92
And in that case, I have no way of protecting against either of these.
93
The only thing I can rely on is the actual LLM providers' moderation services, which are definitely valuable but on the request path, I'm never limited.
94
Like any data can go all the way to the LLM provider here.
95
So that's actually leaving my network and is out on like open internet and available to the provider.
96
And I might not want that data even escaping my network, right?
97
Likewise, there could be very specific requirements I have where maybe the obvious things like credit card numbers and social security numbers,
98
you can pattern match on those and the provider services can filter those.
99
But what if I have very unique constraints of what I consider PII for my customer base, or I have intellectual property that I don't want to escape my network,
100
I don't want developers accidentally putting in key bits of code
101
or other IP materials that actually might throw to an LLM provider, that I need to be able to instrument for advanced guardrails as well.
102
So let's look at how an API or an AI gateway solves for that.
103
In the AI gateway, you actually have three controls available.
104
So you have basic guardrails.
105
And what basic guardrails do is the first use case I said, that acting directly on the prompt and the response, it can introspect the request, it can identify keywords, identify patterns,
106
and reject those and reject that request to not allow it to flow through to the upstream LLM provider.
107
Likewise, in the response path, it can inspect the data and it can either reject
108
that outright or it can mask that data as it comes back to the client.
109
The key value there is that I don't have to implement it all of the client apps, these guardrails.
110
I have a centralized point of control.
111
This becomes very important if after going to production, you discover that some key data is being exfiltrated, or you're open to some attack vector.
112
What is the fastest path to remediating that exposure?
113
And it's not rolling out new updates to all the apps you've deployed, and it's not working with your upstream LLM provider to add that to their moderation endpoint.
114
that's actually implementing that in the AI gateway and getting it pushed to production in minutes.
115
The next feature I'll mention is moderation endpoint integration.
116
So again, this is a key feature that the upstream LLM providers all offer, but why would I want to wait necessarily for the full request to go to the LLM
117
and then catch that in the processing path?
118
What I really want to do is inside my network, basically contact the moderation point, and if there's any problem with that request,
119
I want that to actually be cut off in my network and not go farther downstream.
120
A key principle here is trying to eliminate any threats or any potential data exfiltration as soon as you can detect it.
121
And this is a key aspect of that.
122
And then finally, we support what we call advanced guardrails.
123
And really what that is, as an example, is if you wanted to train a small language model, maybe you take like an 8 billion parameter model
124
and you fine-tune it with maybe 500 examples of various types of data
125
that you don't want to see in a request or different types of prompts that you don't want to see,
126
that can be very, very useful to execute inline in the request path as more of a semantic guardrail.
127
So you're not even matching on specific data patterns or data signatures.
128
you're doing semantic controls of, is this suggestive of this, or is this like these other things?
129
And that can be done with a small language model that can be integrated directly with the AI gateway.
130
The last point I want to make is around abstraction.
131
So in this case, we have individual apps, agents, and IDEs going directly against the LLM provider.
132
The impact of that means that they are binding to the very specific API of that provider and also they are actually,
133
if you look behind the scenes, most customers, while they may be consuming the public endpoint,
134
the generalized endpoint for OpenAI, for example, that we all use when we use it, but it's quite likely for sensitive information or for their enterprise use cases,
135
you're consuming a private endpoint there.
136
So you've isolated that LLM in specific infrastructure for your company, and you need to access that endpoint or a specific model.
137
And in that scenario, now the app is going to go to that specific endpoint.
138
There are definitely cases where there can be endpoint availability issues
139
there for a very specific endpoint where it's unavailable for a certain period of time.
140
Now in that case, if that's tied to a production experience, so like a chat bot or any customer facing functionality,
141
then that customer channel is down in that period.
142
Another potential exposure here is if you get rate limited in a given model, or even availability of a given model is down,
143
then you might want to fall back or fail over to another model.
144
But it is very hard to instrument for this.
145
You actually have to build that logic directly into each application agent
146
and you're hoping your IDE supports it that you're using up here, but with an AI gateway we can do that seamlessly.
147
If a given endpoint, private endpoint is down, the LLM will seamlessly fall over based on your configuration to a backup endpoint
148
and this can cascade down to multiple end points, multiple models, and even multiple providers.
149
When we talk about abstraction, if your AI gateway supports a canonical API as we do in Agent gateway,
150
all of your clients can just talk OpenAI's API, and that can be mapped to any provider underneath the cover,
151
whether that's Claude or Vertex or Bedrock or OpenAI itself.
152
It can scale to all of these models while presenting a single canonical and consistent API to the consumers, which makes it much easier as you start to exchange models,
153
whether it's hosted providers or you're starting to run LAMA or another model, open source model internally.
154
you still don't impact the consumers of that because you're keeping that API abstraction the same.
155
So hopefully this was useful in terms of discussing the key use cases
156
and the key value we see with customers in adopting an AI gateway
157
and gives you a good idea of how daunting this task is
158
if you were gonna embark on the path of implementing it on your own.
159
Check out Agent Gateway today.

Download App

Everything you need to speak fluently

AI PronunciationScore every sentence
IPA PracticeMaster every sound
VocabularyBuild your word bank
Vocab GameLearn while playing

Vocabulary and speaking notes for this lesson

This C1 speaking lesson is built on the video “Top 5 AI Gateway Use Cases”. The speaker keeps coming back to these words: gateway, key, provider, request, Api. This video has 159 sentences and 2518 words to shadow. The speech runs for 13:37. The speaker talks fast, about 185 words per minute, so expect linked and reduced sounds. Only 80% of the words are among the 3,000 most common in English, so the vocabulary is demanding.

Key vocabulary in this video

The 15 most advanced words in the video, with pronunciation and meaning:

WordPronunciationMeaning
gateway noun/ˈɡeɪtˌweɪ/A passage that can be closed by use of a gate.
token noun/ˈtoʊkən/Something serving as an expression of something else.
endpoint nounEither of the two points at the ends of a line segment.
guardrail noun/ˈɡɑɹdˌɹeɪl/A rail set alongside a dangerous place as a barrier, to improve safety.
consume verb/kənˈsum/To use up.
prompt verb/pɹɑmpt/To lead (someone) toward what they should say or do.
moderation noun/ˌmɑdəˈɹeɪʃən/The state or quality of being moderate; avoidance of extremes.
abstraction noun/æbˈstɹæk.ʃn̩/The act of abstracting, separating, withdrawing, or taking away; withdrawal; the state of being taken away.
credential noun/kɹɪˈdɛnʃəl/documentary or electronic evidence that a person has certain status or privileges
semantic adjective/sɪˈmæntɪk/Of or relating to semantics or the meanings of words.
upstream adjective/ʌpˈstɹiːm/In a direction against the flow of a current or stream of fluid (typically water); upriver.
likewise adverb/ˈlaɪkˌwaɪz/In a similar manner.
canonical adjective/kəˈnɒn.ɪ.kəl/Present in a canon, religious or otherwise.
exfiltrate verb/ˈɛksfɪltɹeɪt/To withdraw (troops, operatives, etc.) surreptitiously from a dangerous position.
exfiltration nounThe process of exiting an area (usually behind enemy lines or in enemy territory).

Phrasal verbs you will hear

WordPronunciationMeaning
shut off verbTo stop or turn off by closing something, such as a valve.
come back verbTo return to a place.
go ahead verb/ˌɡoʊ əˈhɛd/To proceed with; to begin.
go through verbTo travel from one end of something to the other.
check out verbTo record the departure or withdrawal of someone or something (such as guests, employees, books, etc.).
come over verbTo affect in a sudden, unprecedented or surprising manner; to overwhelm a person's ordinarily contrary impulse.
fall back verbTo retreat.
fall over verbTo fall from an upright or standing position to a horizontal or prone position.

Grammar in this video

The structures the speaker uses most, with the exact words from the video:

StructureIn the video
Passive voice be + past participle — the focus is on what happens, not who does itis exfiltrated · are allowed · is actually earmarked
Present perfect have/has + past participle — a past action that still matters nowhas seen · has hacked · you've already seen
Relative clauses who / which + clause — extra information about a person or thingwell, which means · services, which are · consumers, which makes

Pronunciation to watch

The speaker uses 60 contractions and reduced forms, such as you're, don't, I'm. Say them the short way, as you hear them.

  • The “th” sounds: authentication /ɔːˌθɛntɪˈkeɪʃn̩/, underneath /ˌʌndɚˈniθ/
  • The “sh” and “zh” sounds: moderation /ˌmɑdəˈɹeɪʃən/, abstraction /æbˈstɹæk.ʃn̩/, credential /kɹɪˈdɛnʃəl/, phishing /ˈfɪʃɪŋ/, authentication /ɔːˌθɛntɪˈkeɪʃn̩/
  • Long words — get the stress right: moderation /ˌmɑdəˈɹeɪʃən/, canonical /kəˈnɒn.ɪ.kəl/, authentication /ɔːˌθɛntɪˈkeɪʃn̩/, ephemeral /ɛˈfɛ.mə.ɹəl/, extrapolate /ɛkˈstɹæp.əˌleɪt/

How to practise with this video

  1. Listen to the whole video once without speaking and note the words you do not know.
  2. Start at 0.75× speed, shadow it sentence by sentence, then go back to normal speed once it feels easy.
  3. Record yourself and compare with the original, paying attention to words like gateway, token, endpoint.

What is the Shadowing Technique?

Shadowing is a science-backed language learning technique originally developed for professional interpreter training and popularized by polyglot Dr. Alexander Arguelles. The method is simple but powerful: you listen to native English audio and immediately repeat it out loud — like a shadow following the speaker with just a 1–2 second delay. Unlike passive listening or grammar drills, shadowing forces your brain and mouth muscles to simultaneously process and reproduce real speech patterns. Research shows it significantly improves pronunciation accuracy, intonation, rhythm, connected speech, listening comprehension, and speaking fluency — making it one of the most effective methods for IELTS Speaking preparation and real-world English communication.

Shadowing technique: read the full step-by-step guide →