L LLM AGENTGUIDE
Home / LLM & Agent Knowledge

Agents

Tool Calling, MCP and APIs

How it works

User
agent host
MCP client
server
business API

Tool calling

The model proposes a tool name and structured arguments. The application checks the arguments, calls the API, and sends the result to the model. The model itself does not necessarily execute the tool.

MCP

Model Context Protocol standardizes how hosts and servers connect tools, resources and prompts. Model capabilities, the host’s MCP implementation and server support are separate things.

MCP and APIs

A REST API is an interface to a business service. An MCP server can expose the same capabilities as tools that agents can use. There is no need to replace existing APIs.

Security design

Implement authentication, scoped permissions, input schemas, secret management and per-tool audit logs. Separate read-only operations from changes; require approval for risky actions.

Continue learning

How LLMs Work

An LLM estimates the probability distribution for the next token from the context of the input tokens. It selects tokens one at a time to produce an answer. Being good at generating text does not guarantee that a model can check facts or perform a task.

Tokens, Context and Inference Costs

A token is a unit the model processes. Tokens do not map exactly to characters or words; they vary by language and tokenizer. The context can include system instructions, user input, earlier conversation, search results and tool outputs.

Transformers, MoE and Parameters

Attention computes relationships between tokens. Multiple layers form contextual representations, and generative models generally produce the next token conditioned on preceding tokens.

How AI Agents Work

An LLM is an engine for reasoning and generation. An agent is a system that combines a model with a goal, state, tools, an execution environment, permissions and exit conditions.

Harnesses, Skills and Memory

A harness handles model calls, tool schemas, prompt construction, file and terminal access, tests, recovery and execution state. Harness design can change the results even when the model stays the same.

RAG, Embeddings and Vector Search

Retrieval-augmented generation gives a model relevant documents as evidence for an answer. If the retrieved documents are wrong or outdated, the answer can be wrong too.

Prompts, RAG and Fine-tuning

Give the model a clear task definition, response schema, examples and a policy for handling failure. Keep a change history and an evaluation set.

Security, Hallucinations and Enterprise Adoption

Models can generate plausible but incorrect claims. Combine evidence retrieval, structured-response validation, external system lookups and human review according to the task’s risk. Hallucination rates measure results on a specific dataset.

LLM Service Architecture and LLMOps

The gateway handles authentication, tenant-level limits and quotas. The orchestrator handles prompts, retrieval, routing across models, tool execution and sessions. Isolate model calls behind adapters.

Reasoning Models and General-purpose Models

Some models use extra computation before answering. Reasoning effort can change cost and latency; the same setting name across models does not imply the same computation.

Multimodal Models: Images, Video and Audio

Distinguish understanding an input from generating image, audio or video output. OCR, image understanding, image generation and video generation are different tasks.

Open Weights, Open Source and Licensing

Access to weights does not mean the training data or code is public or that commercial use is unrestricted. Check each license and usage policy.

Local LLMs, GPUs and Quantization

The theoretical weight size is the parameter count × bits per parameter ÷ 8. Four-bit weights for an 8B model alone take about 4 GB in decimal units; actual operation also needs metadata, KV cache and runtime memory.

Designing and Running Agent Skills

Package decision criteria, procedures and examples for recurring tasks. For example, a deployment-check skill takes the service and commit, then compares build output with the running version.

Multi-agent Systems and Workflows

Use explicit workflows when a fixed sequence fits. When the next action requires judgment, use a bounded agent loop.

How to Interpret Benchmarks

Arena reflects human preference, GPQA covers difficult science questions, and MMMU-Pro tests multimodal understanding. Their scales and purposes differ, so do not add the scores.

A Task-based Model Selection Checklist

Clarify modalities such as text, images and audio, input length, speed, data security, local operation and budget.

More articles in Korean