L LLM AGENTGUIDE
Home / LLM & Agent Knowledge

Development

Prompts, RAG and Fine-tuning

How it works

Define requirements
improve prompts
add retrieval or train
evaluate

Prompts

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

RAG and training

A retrieval system makes frequently changing knowledge easier to update. Fine-tuning may improve consistency in output format or work patterns, but does not guarantee that new knowledge is stored accurately.

LoRA

This approach trains additional low-rank adapters for a subset of weights. It can require fewer resources than full fine-tuning, but still depends on data quality and validation.

Decision order

Group failures by type. Determine whether the problem is missing knowledge, following instructions or a tool error. Try the least costly remedy first.

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.

Tool Calling, MCP and APIs

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.

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.

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