LLM Concepts

LLM concept는 agent와 wiki-style knowledge base를 지탱하는 language model, context, retrieval, workflow pattern을 설명합니다.

LLM note는 “모델이 텍스트를 생성한다”에서 멈추지 않고, 어떤 context와 constraint 아래에서 어떤 output을 만들고 어떻게 검증하는지 봅니다.

where is instruction, is context, is optional tool or retrieval evidence, and is output format or constraint.

LLM Contract

LLM note는 prompt trick이 아니라, 입력과 증거와 출력 제약을 분리한 contract로 써야 합니다.

PartMeaningTypical question
instruction무엇을 하라고 했는가?
context모델이 볼 수 있는 user data, files, history, examples는 무엇인가?
retrieved evidence검색된 문서는 어떤 query, chunk, ranking으로 왔는가?
decoding policytemperature, top-p, beam, sampling budget은 무엇인가?
output formatfree text, markdown, JSON schema, citation, tool call 중 무엇인가?
verifier출력이 맞다는 외부 증거는 무엇인가?

This makes a useful separation:

Route Map

QuestionStartMain Risk
What is the model optimizing?Language model, Autoregressive modellikelihood treated as truth
What can fit in context?Context window, Token budget, Context packingmissing or stale evidence
How should I ask?Prompting, In-context learningprompt style confused with verification
How is output sampled?Decodingtemperature and sampling budget hidden
How is output constrained?Structured output, Tool callingvalid syntax but wrong semantics
How is evidence retrieved?Retrieval-augmented generation, Embedding retrieval, Hybrid retrievalretrieved text treated as instruction
How are claims grounded?Hallucination and grounding, Evidence-grounded generation, Citation groundingcitation does not support exact claim
When does this become an agent?Tool calling, Agents, Agent loopside effects without verification

Core Concepts

LLM vs Agent Boundary

If the note is aboutPut it under
probability of text, decoding, context, prompt, retrieval, groundingLLM concepts
tool contract, action loop, memory, planning, workflow completionAgents
serving, latency, model card, inference contractAI Systems
output metric, hallucination audit, claim evidenceEvaluation or Agents verification

The boundary is action. A model that proposes a tool call is still an LLM concept; a workflow that executes tools, observes results, updates state, and verifies completion belongs under Agents.

Context-Evidence Pipeline

For LLM Wiki writing, the important path is not only token generation. It is evidence selection and claim verification.

StageNoteFailure mode
Source[[concepts/llm/retrieval-augmented-generationRetrieval-augmented generation]]
Chunk[[concepts/llm/chunkingChunking]]
Retrieve[[concepts/llm/embedding-retrievalEmbedding retrieval]], [[concepts/llm/hybrid-retrieval
Rewrite[[concepts/llm/query-rewritingQuery rewriting]]
Pack[[concepts/llm/context-packingContext packing]], [[concepts/llm/token-budget
Generate[[concepts/llm/decodingDecoding]], [[concepts/llm/prompting
Verify[[concepts/llm/evidence-grounded-generationEvidence-grounded generation]], [[concepts/llm/citation-grounding

RAG and Grounding Template

RAG note should preserve enough detail to debug retrieval and generation separately.

FieldWrite
Questionexact information need or task
Source setdocument collection, freshness, public/private boundary
Unitpage, paragraph, section, chunk, table, code block
Retrievalsparse, dense, hybrid, reranking, query rewrite
Context packingwhat was included, truncated, summarized, or excluded
Generationoutput format, citation style, decoding policy
Verificationevidence supports exact claim, not just related topic
Failure slicesmissing source, stale source, conflicting source, unsupported citation

Claim Types

ClaimEvidence
model can answer from contextcontext contains the evidence and answer cites it correctly
RAG improves factualityretrieval evaluation plus answer-level grounding check
prompt improves behaviorfixed task set, baseline prompt, output rubric
structured output is reliableschema validity and semantic validation
tool calling workstool result handling, side-effect boundary, completion audit
agent workflow succeedsstate/action trace and external verification

Common Failure Modes

FailureWhy it matters
treating context as truthprovided text can be stale, wrong, or adversarial
treating retrieved text as instructionretrieval content can override the intended task if not bounded
citing a related sourcecitation may not support the exact claim
hiding decoding settingssampling variance makes behavior hard to compare
using prompt examples as evaluationprompt demonstration is not a held-out test
confusing product feature with model conceptUI behavior, memory, tools, and model capability are different layers
moving side effects into an LLM-only noteonce tools execute, the topic belongs closer to Agents

Checks

  • Is the model being used for generation, classification, extraction, retrieval, or tool orchestration?
  • What context is provided, and what evidence is missing?
  • How is token budget allocated?
  • What decoding and output constraints are used?
  • Are retrieved documents trusted as data, not instructions?
  • Is retrieval unit, query rewriting, and reranking behavior visible enough to debug?
  • Are generated claims grounded in evidence or marked to verify?
  • Is the output verified outside the model?
  • Is the task actually LLM-only, or does it need an agent/tool/workflow note?
  • Does the claim distinguish language-model behavior from product feature behavior?
  • Does the note specify context source, output format, and verification boundary?