PERSONAL KNOWLEDGE BASE / VOL. 01

Learn. Visualize. Connect.

A visual collection of technical concepts, handwritten ideas and learning maps.

01 / 09 AUG

Eval Harness ↗

22 concepts, practical examples and the complete evaluation architecture.

02 / ENGINEERING

AI Engineering ↗

Seven competencies for building AI systems.

03

Fundamental AI Terms ↗

Six visible terms from a page titled “7 Basic AI Terms”.

04

Model Collapse ↗

Reality has not changed; the model’s representation of reality has.

05

LLM vs LRM vs LDM ↗

Language, reasoning and structured-data tasks are different emphases, not mutually exclusive model families.

06

Vector Databases & Embeddings ↗

Embeddings help bridge the semantic gap between raw data and similarity search.

07

Vector Indexing: HNSW & IVF ↗

Indexes trade search accuracy, memory and latency for faster retrieval.

08

AI Agent Architecture & Security ↗

Separate the agent’s reasoning and actions from the policy boundary that controls external communication.

09 / AGENTS

AI Agent Engineering ↗

Nine modules, practical concepts and architecture diagrams.

01 / EVALUATION · 09 AUG

Eval Harness

An eval harness is the infrastructure that runs evaluation cases, captures results, grades outputs and reports performance.

Expanded from your handwritten notes. All examples and numerical results are illustrative.

Scientific validity applies across every stage.

01 — Data

What are we evaluating?

Eval Case

One scenario with an input and expected behavior.

EXAMPLE

Question: How many annual leave days? Expected: 25 days, per a fictional handbook.

Common mistake / clarification

A case may include context, tools and expected actions, not just an answer.

Eval Set

A collection of evaluation cases.

EXAMPLE

100 HR questions about leave, expenses and remote work.

Common mistake / clarification

An eval set need not be a benchmark.

Golden Set

Curated cases with trusted reference answers or behaviors.

EXAMPLE

50 HR questions verified by HR experts.

Common mistake / clarification

Version it deliberately; golden does not mean permanently frozen.

Benchmark

A standardized task set and evaluation protocol for comparison.

EXAMPLE

Run agents A and B on the same 100 questions with identical scoring rules.

Common mistake / clarification

A dataset alone is not a complete benchmark.

Holdout Set

Cases reserved for assessment rather than optimization.

EXAMPLE

70 development cases; 30 untouched holdout cases.

Common mistake / clarification

Repeated tuning against holdout results compromises independence.

02 — Execution

How do we run evaluations?

System Under Test (SUT)

The system or component being evaluated.

EXAMPLE

HR Agent v2, including its retrieval and generation components.

Common mistake / clarification

Specify the boundary: model alone or entire application.

Eval Runner

Executes cases against the system and captures results.

EXAMPLE

Send 100 questions to the HR agent and record responses.

Common mistake / clarification

Handle errors and timeouts explicitly.

Eval Run

One execution of a configured evaluation.

EXAMPLE

100 cases × 3 repetitions = 300 executions.

Common mistake / clarification

Record configuration and versions.

Trace

A record of observable events during execution.

EXAMPLE

Question received → search → three documents retrieved → answer returned.

Common mistake / clarification

A trace is not private model reasoning.

03 — Grading

How do we judge outputs?

Assertion

A condition evaluated as true or false.

EXAMPLE

Does the response contain valid JSON? PASS or FAIL.

Common mistake / clarification

Valid JSON does not guarantee a correct answer.

Rubric

Criteria and scoring rules defining output quality.

EXAMPLE

Accuracy: 0 = incorrect; 1 = partly correct; 2 = fully correct.

ScoreAccuracy
0Incorrect
1Partly correct
2Fully correct
Common mistake / clarification

Define score anchors, not only a numeric scale.

Judge

A human or model that assesses an output.

EXAMPLE

An LLM compares the answer against the handbook and rubric.

Common mistake / clarification

Judges can be biased or inconsistent.

Grader

A mechanism returning a score, label or pass/fail result.

EXAMPLE

Code checks JSON; a model grades accuracy; an expert rates usefulness.

Common mistake / clarification

Judge and grader overlap in some frameworks.

04 — Measurement

How well did it perform?

Metric

A quantitative measure of performance.

EXAMPLE

92% accuracy; 1.8 s latency; €0.003 per query.

Accuracy92%
Latency1.8 s
Cost/query€0.003
Common mistake / clarification

Define the denominator and aggregation method.

Baseline

A reference system or configuration for comparison.

EXAMPLE

Old agent: 78% accuracy; new agent: 92%; +14 percentage points.

Baseline 78%

New agent 92%

Common mistake / clarification

Compare under equivalent conditions.

Regression

Deterioration relative to a previous version or baseline.

EXAMPLE

Accuracy drops from 95% in v3 to 75% in v4.

80%95%75%v1v4
Common mistake / clarification

Check uncertainty before interpreting small changes.

Evaluation Gate

Requirements that must be met before proceeding.

EXAMPLE

Accuracy ≥90%, latency ≤3 s, no critical security failures.

✓ Accuracy passed
✓ Latency passed
✕ Security failed

Release blocked

Common mistake / clarification

A critical failure can block release despite a good average.

05 — Scientific validity

Can we trust the results?

Repeated Trials

Repeat cases to estimate variability.

EXAMPLE

Five runs: pass, pass, fail, pass, pass = 80% success.

Common mistake / clarification

Five trials are illustrative, not a precise estimate.

Judge Calibration

Compare judge assessments with trusted judgments.

EXAMPLE

Expert scores an answer 2/5; AI judge gives 4/5.

ExpertAI judge
2/54/5
Common mistake / clarification

Use representative examples and measure agreement.

Data Contamination

Evaluation information leaks into training or optimization.

EXAMPLE

A developer tunes prompts using hidden holdout answers.

Common mistake / clarification

High scores may reflect leakage rather than generalization.

Reproducibility

Repeat an evaluation under documented conditions for comparable results.

EXAMPLE

Record model, prompt, dataset, grader, configuration and seed if supported.

□ Model version
□ Prompt version
□ Dataset version
□ Grader version
□ Configuration and environment

Common mistake / clarification

Exact outputs may vary even with identical settings.

Meta-Evaluation

Evaluate the evaluation mechanism itself.

EXAMPLE

Experts review 100 LLM judgments for reliability and bias.

Common mistake / clarification

Agreement alone does not prove correctness.

Back to contents ↑

02 / SKILL MAP

Prompt Engineer / AI Systems Engineer

Remember: building reliable AI systems requires more than prompt writing.

Foundations: Distributed systems · API design · MLOps · Security engineering · Product management.

0 / 7 reviewed

Definition: Design the components and their interactions.

Example: An HR agent uses an LLM, document search and a leave API.

Common mistake: Start with one agent; add subagents only when justified.

System design
Human↔LLM / Agent
Tools / APIsDatabaseSubagents

Definition: Define typed inputs, outputs and failure contracts.

Example: getLeaveBalance(employeeId) returns remainingDays or a typed error.

Common mistake: Valid JSON does not guarantee a valid business action.

Tools & contract design
Input schema→Tool→Output schema

Define interfaces and expected behavior.

Definition: Design evidence retrieval for generation.

Example: Retrieve handbook passages, rerank them and supply the best passages to the model.

Common mistake: Measure retrieval separately from answer quality.

Retrieval engineering (RAG)
Documents→Chunks→Embeddings→Retrieval→Reranking→Context

Definition: Handle failures and uncertain execution.

Example: Retry a timed-out read twice, then return a clear error.

Common mistake: Do not blindly retry a payment or other side-effecting operation.

Reliability engineeringAgent calls APISuccess?YesNoContinueBounded retryor fallback

If yes: continue. If no: bounded retry, timeout or fallback.

Definition: Protect data, permissions and execution boundaries.

Example: A handbook document instructs the agent to send payroll data; the tool policy blocks it.

Common mistake: Prompt instructions alone are not access control.

Security & safety

Prompt injection protection · Input validation · Output filters · Permission boundaries

Definition: Measure behavior and capture observable execution events.

Example: Trace a failed answer to a missing retrieved document.

Common mistake: A trace is not a quality score.

Evaluation & observability
Tracing→Evaluation→Metrics

Related: Eval Harness. Open chapter →

Definition: Design for human goals, usability and oversight.

Example: Show sources and let the employee escalate an uncertain answer to HR.

Common mistake: An impressive demo is not evidence of user value.

Product thinking
AI Agent↔Human

UX design · Interaction · Feedback

Checkboxes track reviewed topics, not verified competency. Diagrams and brief explanations are editorial additions.

Related chapter: Eval Harness →

03 / NEW NOTES

Fundamental AI Terms

Six visible terms from a page titled “7 Basic AI Terms”.

AI agents

Definition: An agent selects actions toward a goal using observations.

Example: A robot detects an obstacle, turns and checks its path.

Common mistake: An LLM alone is not necessarily an agent.

Original notes: Perceive environment → reason → act → observe.

Understand / Explore

An agent uses observations to choose actions toward a goal; repeat until a stopping condition.

Large reasoning models

Definition: A reasoning-oriented model is optimized for complex problem solving.

Example: Compare several schedules under staffing constraints.

Common mistake: Verify the result; more computation does not guarantee correctness.

Original notes: Thinking step by step.

Understand / Explore

Reasoning-oriented models may allocate more computation to difficult tasks. Their answers are not guaranteed correct.

Vector databases

Definition: A vector database stores and searches numerical representations.

Example: Find documents similar to a question about annual leave.

Common mistake: Similarity is not factual correctness.

Original notes: Text and images → embedding model → numeric vector.

Understand / Explore

See Vector databases for storage and search.

RAG

Definition: Retrieval-augmented generation supplies external evidence to a generator.

Example: Retrieve the current leave policy before answering.

Common mistake: Retrieved text can be stale or malicious.

Original notes: Prompt, retriever, embedding model, vector DB.

Understand / Explore

Retrieved evidence is supplied to the generator. Retrieval can also use keyword search.

MCP

Definition: Model Context Protocol standardizes host-to-server interactions.

Example: An AI host connects to a server exposing a calendar tool.

Common mistake: MCP is not itself a permission or security guarantee.

Original notes: LLM connected to an MCP server with database, code and mail.

Understand / Explore

Model Context Protocol connects a host application through MCP clients to servers exposing tools, resources or prompts.

MoE — Mixture of Experts

Definition: Mixture of Experts routes tokens to selected internal neural networks.

Example: A router activates two of eight experts for a token in a hypothetical model.

Common mistake: Experts are not separate conversational agents.

Original notes: Experts merge output into a single representation.

Understand / Explore

A router typically selects a subset of internal expert networks per token; their weighted outputs combine. Not the same as independent agents.

Back to contents ↑

07 — Suggested addition: Embeddings

Editorial addition: The seventh term is not visible in the source page. Embeddings are a useful proposed addition, not a recovered note.

Definition: A numerical representation learned or computed from data.

Example: Encode a sentence as a vector for semantic search.

Common mistake: An embedding is not a database.

Related: Vector databases

Related chapter: Vector Databases & Embeddings →

04 / NEW NOTES

Model Collapse

Reality has not changed; the model’s representation of reality has.

Recursive training

Definition: Recursive training can distort a distribution when generated data replaces representative real data.

Example: Rare dialect examples disappear from successive training datasets.

Common mistake: Synthetic data is not inherently harmful.

Original notes: Synthetic outputs become training data; early collapse → late collapse.

Understand / Explore

Rare events may disappear early; later generations may distort the distribution further. This is a risk, not an inevitable outcome of all synthetic training.

Distribution shift

Definition: Distribution shift means the learned distribution differs from the reference.

Example: A model increasingly generates common phrases while rare phrases disappear.

Common mistake: The curve is illustrative, not measured evidence.

Original notes: Loss of tails in the bell curve.

RareCommonRareOriginal (solid)Later (dashed)
Understand / Explore

Illustrative curves only; not experimental data. Early loss of rare outcomes can precede broader degradation.

Risks

Definition: Loss of diversity and bias amplification can harm underrepresented groups.

Example: A minority language loses uncommon vocabulary.

Common mistake: Aggregate accuracy can hide subgroup degradation.

Original notes: Loss of diversity, model collapse, bias amplification, AI ecosystem feedback loop; minority languages and specialized domains.

Understand / Explore

Monitor rare groups and domain-specific performance separately.

Strategies

Definition: Preserve representative data and independently validate generated examples.

Example: Track data origin and evaluate rare-language performance on real held-out examples.

Common mistake: RAG helps inference; it does not repair training collapse by itself.

Original notes: Human in the loop; data provenance; high-quality generated data; RAG; multi-agent verification.

Understand / Explore

Preserve representative real data and validate synthetic data against independent evidence. RAG and multi-agent verification can help inference quality but do not by themselves prevent training collapse.

Back to contents ↑

Related chapter: Eval Harness →

05 / NEW NOTES

LLM vs LRM vs LDM

Language, reasoning and structured-data tasks are different emphases, not mutually exclusive model families.

Three model labels

Definition: Language, reasoning and structured-data modeling describe different capabilities.

Example: Explain interest, optimize a constrained plan, or retrieve similar customer records.

Common mistake: LDM is not a universally standardized category.

Original notes: LLM: talker; LRM: problem solver; LDM: database pattern engine.

LabelExample from notes
LLMExplain compound interest
LRMFind an optimal strategy given constraints
LDMFind 100 similar customers
Understand / Explore

LDM (Large Database Model) is the terminology in your notes, not a universally standardized model class. Reasoning models are often LLMs.

Structured-data representation

Definition: Encode typed records into representations suitable for a task.

Example: Encode city, age, spending and category while retaining the record ID.

Common mistake: Do not treat arbitrary identifiers as meaningful numeric distances.

Original notes: Columns: categorical, numerical, key. Embeddings; each row becomes a bag of words; training; back to DB.

Understand / Explore

One possible approach serializes rows with field names; other approaches encode typed features directly. IDs need careful handling. Training is optional when using pretrained encoders. Store vectors with record IDs for retrieval.

Example row

Definition: A record contains fields with different semantics.

Example: City: New York; age: 17; spend: 82; category: beauty.

Common mistake: Normalize numeric features when appropriate; protect personal data.

Original notes: City: New York; age: 17; spend: 82; category: beauty.

Understand / Explore

Illustrative record from your notes. Similarity, analogy, clustering and dissimilarity are possible analyses, depending on representation and validation.

Use cases

Definition: Structured representations can support retrieval and prediction.

Example: Flag unusual transaction patterns for human review.

Common mistake: Similarity or anomaly is not proof of fraud.

Original notes: Insurance, fraud detection, contracts, food and retail.

Understand / Explore

Similarity is not proof of fraud or suitability; evaluate domain-specific errors.

Back to contents ↑

Related chapter: Vector Databases & Embeddings →

06 / NEW NOTES

Vector Databases & Embeddings

Embeddings help bridge the semantic gap between raw data and similarity search.

Semantic gap

Definition: Embeddings represent content as vectors to support learned similarity.

Example: Search for mountain photos without relying on exact tags.

Common mistake: The encoder creates vectors; the database indexes and searches them.

Original notes: Relational storage: binary data, tags, metadata.

Understand / Explore

A conventional database can store raw content and metadata; vector search adds learned similarity. Relational databases can also support vector indexes.

Vector representation

Definition: A similarity metric compares compatible vectors.

Example: Rank three document vectors by cosine similarity to a query.

Common mistake: Do not compare unrelated embedding spaces.

Original notes: Mountain [0.81, 0.21, 15…]; beach [0.60, 0.10, 19…].

Understand / Explore

Illustrative numbers, not actual model outputs. Individual dimensions need not have interpretable meanings. Compare vectors using a compatible model and metric.

Embedding models

Definition: An embedding model maps inputs to numerical representations.

Example: CLIP can map text and images into a shared space.

Common mistake: Not all encoders support multiple modalities.

Original notes: CLIP, GloVe, audio model (handwriting unclear); edges / words → objects / meaning.

Understand / Explore

CLIP aligns images and text; GloVe represents words; audio encoders represent audio. Different embedding spaces are not automatically comparable.

Back to contents ↑

Related chapter: Vector Indexing: HNSW & IVF →

07 / NEW NOTES

Vector Indexing: HNSW & IVF

Indexes trade search accuracy, memory and latency for faster retrieval.

HNSW

Definition: HNSW searches a layered proximity graph.

Example: Navigate sparse upper layers, then refine nearby candidates below.

Common mistake: Higher search effort often improves recall at a latency cost.

Original notes: Hierarchical Navigable Small World.

Understand / Explore

Graph-based approximate nearest-neighbor search navigates sparse upper layers and refines candidates at lower layers.

IVF

Definition: IVF groups vectors into partitions and probes selected groups.

Example: Search the nearest three clusters rather than every vector.

Common mistake: Too few probed clusters can miss relevant neighbors.

Original notes: IVF (listed without details).

Understand / Explore

Inverted File index partitions vectors into clusters and searches selected clusters near the query.

Comparison (editorial)

Definition: Index choice depends on workload and resource constraints.

Example: Compare recall@10, p95 latency, memory and build time on identical queries.

Common mistake: Neither index is universally best.

HNSWIVF
Graph traversalCluster probing
Often higher graph memoryRequires coarse index training

Benchmark recall, latency, memory and build time on your own dataset. Eval Harness

Back to contents ↑

Related chapter: Eval Harness →

08 / NEW NOTES

AI Agent Architecture & Security

Separate the agent’s reasoning and actions from the policy boundary that controls external communication.

Original decomposition

Definition: An agent combines a model, controller, tools and task state.

Example: A book-search agent records search results and checks availability.

Common mistake: Observable activity summaries are not private chain-of-thought.

Original notes: Computer use; LLM with NLP, multimodal capabilities and reasoning element; CoT; cylinder C; example book search.

Understand / Explore

C is not defined in the sketch. The example statements are better treated as observable activity summaries, not proof of private chain-of-thought.

Your revised gateway design

Definition: A policy gateway mediates external actions and data exchange.

Example: Block an unauthorized email request before it reaches the mail API.

Common mistake: A gateway is only effective if bypass paths are prevented.

Original notes: Every communication passes through a firewall/gateway. Agent connects to CoT and preference stores; gateway examines web traffic and re-examines agent requests.

UserFirewall / gatewayAgent ↔ gatewayWebState / tracesPreferences
Understand / Explore

This is your proposed architecture, not a validated security guarantee. Store task state and action traces rather than relying on private reasoning. Enforce least privilege, input/output checks, tool permissions and approval for consequential actions.

Open questions

Definition: Threat modeling identifies assumptions and tests controls.

Example: Try a malicious web page requesting a secret, then verify no secret leaves the system.

Common mistake: A proposed architecture is not a validated security guarantee.

Original notes: The earlier architecture is marked BAD; the next sketch is marked NEW.

Understand / Explore

What must the gateway block? How are permissions enforced outside the model? Can the agent bypass it? How are preferences protected? Test with evaluation harnesses.

Back to contents ↑

Related chapter: Prompt Engineer / AI Systems Engineer →

09 / AGENT ENGINEERING

AI Agent Engineering

Model intelligence + controlled execution + evidence of performance.

Expanded from three handwritten pages. Attribution to Justin Schroeder is unverified. Examples and taxonomy are editorial synthesis.

Related: Eval Harness · Original agent security sketches

Chapter contents

01 — Fundamentals & harness

02 — Domain-specific agents

03 — Context & memory

04 — Tools, skills, rules & hooks

05 — MCP, A2A & interoperability

06 — Composition & multi-agent architectures

07 — Durable execution & reliability

08 — Agent evaluation & observability

09 — Decision-making & uncertainty

01 — Fundamentals & harness

Agent

A system that selects actions toward a goal using feedback.

Example: Find a failing test, inspect code, fix it and rerun tests.

Common mistake: A single model call need not be an agent.

Autonomy

The extent to which a system selects its own actions.

Example: Choose which tests to run within a fixed budget.

Common mistake: More autonomy is not inherently better.

Workflow

A predefined sequence or graph of operations.

Example: Lint, test, then publish a report.

Common mistake: A workflow can contain agents.

Agent harness

Software that manages model-driven execution.

Example: Build context, validate tool calls and record results.

Common mistake: The model is not the entire harness.

Runtime

The machinery and environment executing an agent.

Example: A worker process with a tool dispatcher.

Common mistake: Runtime and harness overlap; terminology varies.

Agent loop

Repeated decision, action and observation until termination.

Example: Inspect a test failure and revise a patch.

Common mistake: Always bound the loop.

Orchestration

Coordination of steps, tools and agents.

Example: Run review after implementation.

Common mistake: It can be deterministic.

Provider abstraction

A common interface for model providers.

Example: Swap model adapters while keeping task logic.

Common mistake: Capabilities and behavior are not interchangeable.

02 — Domain-specific agents

Domain specialization

Configure knowledge, capabilities and constraints for a field.

Example: A Vue repository assistant knows local conventions.

Common mistake: Fine-tuning is optional.

Data

Information available to the agent.

Example: Repository files and approved documentation.

Common mistake: Access does not imply correctness.

Domain evals

Cases and criteria tailored to the domain.

Example: Check that patches pass tests and follow conventions.

Common mistake: Generic benchmarks cannot establish local usefulness.

Schedules

Time-based triggers for execution.

Example: Run dependency review each Monday.

Common mistake: A schedule is not an agent loop.

Channels

Interfaces for interacting with an agent.

Example: Web, Slack or Discord.

Common mistake: Channels are not model providers.

Connections

Configured access to external services.

Example: An authenticated issue tracker integration.

Common mistake: A connection must have scoped credentials.

03 — Context & memory

Context

Information supplied to the model for a particular call.

Example: Current issue, selected files and tool schemas.

Common mistake: Not all stored information is in context.

Context engineering

Select, structure and prioritize context.

Example: Retrieve only relevant repository conventions.

Common mistake: More context can reduce quality.

State

Current execution information.

Example: Task ID, pending tests and remaining budget.

Common mistake: State is not necessarily long-term memory.

Working memory

Temporary information used during a task.

Example: A list of files already inspected.

Common mistake: May live outside the context window.

Episodic memory

Records of prior events or experiences.

Example: A previous failed migration and its outcome.

Common mistake: Past success does not guarantee future success.

Semantic memory

Stored facts or generalized knowledge.

Example: The project uses Vue 3.

Common mistake: Facts can become stale.

Progressive disclosure

Load details only when relevant.

Example: Read skill metadata first, then its instructions.

Common mistake: Do not assume every framework loads skills identically.

Context inheritance

Passing selected parent context to another execution.

Example: Give a reviewer the patch and requirements.

Common mistake: Do not blindly copy all parent messages or secrets.

04 — Tools, skills, rules & hooks

Tool

Callable operation with an input/output contract.

Example: read_file(path) returns file content.

Common mistake: A tool is not a procedure.

Function calling

Structured model request to invoke a callable operation.

Example: Request run_tests with a suite name.

Common mistake: The runtime executes it, not the model itself.

Skill

Reusable task guidance and supporting resources.

Example: A code-review procedure with scripts and references.

Common mistake: A skill is not necessarily executable.

Project instructions

Repository-specific guidance, often in AGENTS.md or framework-specific files.

Example: Use TypeScript and run lint before review.

Common mistake: File names and precedence vary.

System prompt

High-priority model instructions.

Example: Act as a repository assistant.

Common mistake: Not a hard security boundary.

Rules & policies

Constraints on permitted behavior.

Example: Deny writes outside the workspace.

Common mistake: Enforce hard rules in software.

Hook

Callback triggered at a lifecycle event.

Example: Validate arguments before a tool call.

Common mistake: Function, prompt and agent hooks are framework-specific.

Sandbox

Restricted execution environment.

Example: Run tests without access to production credentials.

Common mistake: Isolation requires explicit configuration.

Computer use

Interaction through graphical interfaces.

Example: Inspect a rendered application in a browser.

Common mistake: Treat page content as untrusted.

Skill directory

code-review/
  SKILL.md
  scripts/
  references/
  assets/

Skill directory: code-review/SKILL.md (metadata and instructions), scripts/ (helpers), references/ (supporting knowledge), assets/ (templates). Optional folders; load relevant resources progressively.

05 — MCP, A2A & interoperability

MCP

Model Context Protocol: standardized interaction between hosts/clients and servers.

Example: Discover and call an issue tracker tool.

Common mistake: MCP is not an agent runtime.

MCP server primitives

Tools, resources and prompts exposed by a server.

Example: Read a document resource or invoke search.

Common mistake: These have distinct semantics.

MCP client capabilities

Client-side capabilities can include sampling and roots, depending on negotiation.

Example: A server requests model sampling from a supporting client.

Common mistake: Roots are not a security sandbox.

Discovery

Discover supported capabilities and available operations.

Example: List server tools before selecting one.

Common mistake: Discovery does not grant permission.

A2A

Agent-to-Agent protocol for interoperable agent communication.

Example: Send a task to a separately deployed reviewer.

Common mistake: Not required for local delegation.

Agent Card

Machine-readable agent discovery and capability metadata.

Example: Advertise review skills, endpoint and authentication.

Common mistake: Metadata is not proof of competence.

Protocol boundary

Separate service integration from agent coordination.

Example: Use MCP for repository access and A2A for remote review.

Common mistake: They can coexist.

A2A versus local delegation

Agent A
↔
Agent B

A2A connects independent agent services; local subagents can use ordinary function calls or queues.

06 — Composition & multi-agent architectures

Composition

Assemble independent modules with defined responsibilities.

Example: Combine retrieval, testing and review modules.

Common mistake: Can occur within one agent.

Inheritance

Reuse or extend configuration or behavior from a base.

Example: A reviewer inherits shared coding conventions.

Common mistake: Context accumulation is not identical to software inheritance.

Subagent

Delegated agent with a scoped task.

Example: Review only security-sensitive changes.

Common mistake: Delegation need not use A2A.

Routing

Select a suitable model, tool or agent.

Example: Route database questions to a SQL specialist.

Common mistake: Routing errors need evaluation.

Planning

Choose or revise a sequence of actions.

Example: Inspect, patch, test, review.

Common mistake: Plans may fail and need revision.

ReAct

Pattern interleaving reasoning and actions with observations.

Example: Search, inspect evidence, then search again.

Common mistake: Does not require exposing private reasoning.

Reflection

Review an output and propose improvements.

Example: Inspect a patch against requirements.

Common mistake: Self-review is not independent evidence.

Consensus

Combine multiple agent judgments under a decision rule.

Example: Vote on whether a patch is acceptable.

Common mistake: Agreement is not proof of correctness.

Handoff contract

Structured input and output for delegation.

Example: Pass patch, scope, budget and expected report schema.

Common mistake: Avoid unrestricted context sharing.

07 — Durable execution & reliability

Durable execution

Persist progress so work can recover after interruption.

Example: Resume a review after worker restart.

Common mistake: Persistence alone does not prevent duplicate effects.

Checkpoint

Saved recoverable execution state.

Example: Record completed tests and pending actions.

Common mistake: Checkpoint before consequential transitions.

Idempotency

Repeated operation has the same intended effect.

Example: Use an idempotency key when creating a ticket.

Common mistake: Retries are not automatically safe.

Retry

Bounded repeat after a recoverable failure.

Example: Retry a temporary API timeout with backoff.

Common mistake: Do not blindly retry irreversible actions.

Fallback

Alternative when the preferred operation fails.

Example: Use cached documentation and disclose its age.

Common mistake: Fallback may reduce quality.

Budget

Limits on cost, tokens, time or actions.

Example: Stop after 20 tool calls or a fixed spend.

Common mistake: Budget exhaustion is not task success.

Termination

Explicit success, failure or stop conditions.

Example: Return when tests pass or report unresolved failures.

Common mistake: Never equate a final message with completion.

Human approval

Explicit authorization before consequential actions.

Example: Ask before merging a patch.

Common mistake: Approval should bind to the specific action.

Least privilege

Grant only necessary access.

Example: Read-only production credentials for diagnosis.

Common mistake: Prompt instructions cannot replace permissions.

08 — Agent evaluation & observability

Trace

Recorded execution events and relationships.

Example: Tool calls, timings and outcomes.

Common mistake: Not a transcript of hidden reasoning.

Observability

Ability to understand system behavior from telemetry.

Example: Locate a slow retrieval call.

Common mistake: Logs alone do not establish quality.

Task success

Whether the requested outcome was achieved.

Example: Patch passes acceptance tests.

Common mistake: Fluent answers can still fail.

Trajectory evaluation

Assess the sequence of observable actions.

Example: Check that no unauthorized tool was called.

Common mistake: A valid final result can hide unsafe actions.

Cost and latency

Resources and elapsed time consumed.

Example: Measure tokens, API charges and wall-clock time.

Common mistake: Compare under equivalent conditions.

Regression evaluation

Detect degradation against prior behavior.

Example: Rerun a frozen golden set after a skill change.

Common mistake: Avoid tuning on the holdout.

Failure analysis

Classify failures to identify improvements.

Example: Distinguish retrieval failure from reasoning failure.

Common mistake: Do not blame the model by default.

09 — Decision-making & uncertainty

Epistemic action

Action intended to improve knowledge or reduce uncertainty.

Example: Inspect test results before claiming a fix.

Common mistake: Not every action is epistemic.

COMPUTE

Further internal computation or reasoning.

Example: Compare two candidate fixes.

Common mistake: Reasoning cannot create independent evidence.

RETRIEVE

Acquire existing information.

Example: Read API documentation.

Common mistake: Retrieved sources may be stale.

OBSERVE

Measure the current environment.

Example: Inspect actual test output.

Common mistake: Observations can be noisy.

INTERVENE

Change a controlled condition to learn its effect.

Example: Run an isolated experiment with a feature flag.

Common mistake: Requires authorization and safe isolation.

PREFERENCE

Elicit user priorities or constraints.

Example: Ask whether speed or compatibility matters more.

Common mistake: Preferences are not factual evidence.

ACT

Execute an outcome-directed action.

Example: Apply an approved patch.

Common mistake: Separate learning from consequential execution.

Stopping criterion

Decide when further information is not worth its cost or risk.

Example: Stop when acceptance criteria pass and residual risk is acceptable.

Common mistake: Confidence alone is insufficient.

Value of information

Expected decision improvement from acquiring evidence.

Example: Run a cheap test before an expensive deployment.

Common mistake: Estimates are uncertain; this is a research framing.

Quotes & Key Insights

Harnesses are deterministic software that harnesses the non-deterministic results produced by models in pursuit of a desired objective.

Handwritten quotation; attribution unverified.

Specialize the system, not necessarily the model.

Synthesized principle.

Do not assume a model failure until you have investigated the harness.

Synthesized principle.

End-to-end example: repository agent

Receive issue → load project instructions and relevant skill → inspect repository through scoped tools → propose patch → run sandboxed tests → delegate review if useful → request approval before merge → record trace and evaluate outcome.

Example acceptance criteria: tests pass, no unauthorized writes, requirements met, cost within budget. If evidence is insufficient, report the unresolved issue instead of claiming success.

Back to contents ↑

Notebook rules

  • Preserve source meaning and dates; label additions.
  • Prefer short bullets, tables and one concept per diagram.
  • Use colors consistently: yellow concepts, blue engineering, green validation, orange distinctions, pink risks, purple research.
  • Default to high-contrast dark mode, large adjustable text, clear labels and mobile-first diagrams. Never rely on color alone.
  • Connect related notes; keep Markdown as a portable source.
  • Use thin borders, no offset shadows, and high-contrast glass-inspired surfaces. Each glossary concept has a definition, example and clarification.
100%