跪拜 Guibai
← All articles
AI Programming · Java

The 12 AI Terms That Keep Tripping Up Backend Devs (and the Architecture That Ties Them Together)

By T_Wizard ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Backend engineers with Java/Spring experience can now bolt AI onto existing services without learning a new paradigm; the architecture map directly shortens the trial-and-error loop of wiring RAG, memory, and tool calling in Spring AI 1.0, where starter renames and integration quirks already trip up most newcomers.

Summary

Spring Boot developers moving into AI app development get a cognitive reordering of the buzzwords: the article sets a five-layer architecture where Advisor acts as AOP for cross-cutting concerns, and the four capability blocks (Tools, MCP, RAG, Memory) each trigger differently — only the model decides for tools and MCP, while the framework proactively injects RAG and memory. The key distinction is offline vs. online: ETL runs once at build time, retrieval runs per request, and mixing them turns a 1-second response into an 8-second one.

The guide clarifies the three most confused pairs: 2 routes / 3 methods / 4 call types are different dimensions, Bailian is a visual platform while DashScope is the API you actually code against, and Tool Calling handles how a model invokes a function whereas MCP standardizes where functions come from (USB-C analogy). It also provides a minimal Spring AI 1.0 code skeleton, noting that all starters were renamed and InMemoryChatMemory is replaced by MessageWindowChatMemory.

Five real pitfalls are cataloged: starter renames, tool calling naturally producing two model round-trips (with a maxSteps guard needed for agents), accidentally running ETL in request paths, a misread of Spring AI's capability table (DeepSeek's ❌ means the integration lacks support, not the model), and the Tongyi base-URL ending at /compatible-mode without /v1. Model selection is reduced to four dimensions — accuracy, feature support, performance/cost, data compliance — and the 12-term glossary with engineering concepts (Advisor, ChatMemory, SSE) gives a condensed reference.

Takeaways
— AI applications share a five-layer skeleton: Advisor, Tools/MCP/RAG/Memory capability blocks, model, and external dependencies like vector stores and file systems.
— Advisor in Spring AI behaves like AOP: pre-advisors run before the model request, post-advisors after, ordered with @Order.
— RAG's ETL (Reader, Transformer, Writer) is offline and runs once; retrieval (Retriever, Augmenter) runs on every request.
— Vector recall and conditional filtering are parallel paths in hybrid search, not sequential steps.
— The 2 routes (cloud vs. self-host), 3 methods (platform, client, code), and 4 call types (SDK, HTTP, Spring AI, LangChain4j) answer different questions.
— Bailian is a visual platform; DashScope is the model API. Write code against DashScope via spring.ai.dashscope.
— Tool Calling solves how a model invokes a function; MCP standardizes where tools come from, like USB-C.
— Spring AI 1.0 renamed starters: spring-ai-openai-spring-boot-starter → spring-ai-starter-model-openai, and InMemoryChatMemory is replaced by MessageWindowChatMemory.
— Tool calling is a two-round trip: model requests tool, tool returns, model gets called again with the result; agents need a maxSteps guard.
— Tongyi's OpenAI-compatible base URL ends at /compatible-mode, not /v1 or /compatible-mode/v1.
— DeepSeek's ❌ in Spring AI's capability table means the integration lacks tool-calling support, not the model itself; verify with a natively integrated model first.
— Model selection should consider accuracy tolerance, feature support (multimodal, tool calling, context window), unit price × call volume, and data compliance.
— The anti-hallucination prompt template tells the model to rely only on provided context, include history, and explicitly say when it cannot answer.
— For demos use the strongest model to save time; for production calculate cost first.
Conclusions

The article correctly diagnoses that AI term confusion isn't technical depth but concept layering: the same capability has different names depending on deployment, access method, and code API, which is why the 2/3/4 framework maps cleanly to real decisions.

The observer that offline ETL vs. online retrieval is a common bug source is a practical rule: any code that re-reads, re-chunks, or re-embeds on every request is misplaced, and spotting it is as simple as asking whether the operation is per-request.

The DeepSeek example exposes a subtle integration trap: a model's inherent capability (function calling) can be missing in a framework's implementation, so capability tables should be read as integration status, not model ability.

The emphasis on @Tool description quality as the dominant factor in tool-call accuracy shifts debugging focus from model behavior to prompt/interface design for AI-facing code.

By mapping AI concepts to familiar backend patterns (Advisor≈AOP, RAG≈open-book exam, MCP≈USB-C, Agent≈intern), the guide makes the learning curve a matter of renaming existing knowledge rather than acquiring new paradigms.

Concepts & terms
RAG (Retrieval-Augmented Generation)
A technique that retrieves relevant documents from a vector store before asking the model to answer, forcing the model to base its reply on provided context rather than its internal knowledge. The article calls it an 'open-book exam'.
Tool Calling
The model's ability to decide it needs to invoke a specific function you've defined (e.g., getWeather). The model outputs a structured request, your code executes the function, and the result is fed back to the model for the final answer.
MCP (Model Context Protocol)
An open standard that lets tools and data sources be plugged into AI applications via a uniform interface, like USB-C. It solves where tools come from, whereas Tool Calling solves how they're called.
Advisor
Spring AI's aspect-oriented concept. Pre-advisors run before the model request (e.g., sensitive-word filtering, RAG injection), post-advisors run after (memory persistence, logging). Multiple advisors are ordered with @Order, enabling cross-cutting logic without touching business code.
ChatMemory
Stores conversation history per conversationId so the model can continue context across turns. In Spring AI 1.0, MessageWindowChatMemory replaces InMemoryChatMemory, using a configurable sliding window of maxMessages.
SSE (Server-Sent Events)
A server-push protocol for streaming text one-way to the client. It powers the 'typewriter effect' in chat UIs, as shown in the article's .stream() call.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗