liveBook · Manning

Ai service

As explained in Grokking Software Architecture

AI as a service (AIaaS) provides access to AI capabilities through managed cloud services or APIs.

AIaaS lets an application send a prompt and data to a managed API, which returns a result from a pre-trained model. Think of serverless as a taxi where you give turn-by-turn directions; AIaaS is a self-driving taxi—you give it a destination and let it work out the route. section 9.4.5

The provider manages the hardware and model, so you can add capabilities such as language processing or computer vision without building the core logic. The tradeoff: responses can vary or be wrong, and calls cost more than standard database queries. Use AIaaS for messy, unstructured data—not strict mathematical business rules. section 9.4.5

A practical fit

Send a chaotic user-uploaded document with a prompt to extract names, dates, and invoice totals. That kind of unstructured-data parsing suits AIaaS better than a calculation that must return the same exact answer every time. section 9.4.5

Figure 9.3 AI models are probability engines, not databases. Without RAG guardrails, they will confidently improvise the wrong answer. RAG turns the AI from an "improv actor" into an "open-book test taker”.

Use the figure to see why a model can improvise an answer, and how retrieval-augmented generation (RAG) can provide guardrails. section 9.4.5

How Grokking Software Architecture covers it

How deep it goes
Explains managed models, API inputs and outputs, benefits, costs, and response variability.
Examples
Uses a self-driving taxi analogy and document parsing to extract names, dates, and invoice totals.
What you can do after
Evaluate AIaaS for unstructured-data tasks while avoiding strict mathematical business logic.
How it connects
Contrasts AIaaS with serverless and connects it to machine learning, computer vision, and natural language processing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.