AI, LLMs & agents

AYX / KNOWLEDGE BASE

Algorithms, language models and AI agents.

Source research checked: 2026-10-14

19

AI, algorithms and machine learning

AI-001

What is artificial intelligence, in practical terms?

Artificial intelligence is a broad field concerned with systems that perform tasks such as recognising patterns, making predictions or producing language. It is not one product or a single algorithm. Some systems use explicit rules, others learn from data, and many applications combine the two.

Explanation, examples & sources

Identify the actual function before evaluating an “AI-powered” product. Does it classify defects, estimate demand, generate text or choose an action? Each task needs different inputs and tests. Useful intelligence in one narrow task does not establish competence elsewhere. For a practical comparison, write down what enters the system, what result is expected and what a wrong result costs. This makes AI claims easier to evaluate without relying on vague descriptions such as “human-like understanding.”

References

Explore next

AI-002

What is an algorithm, and is every algorithm AI?

An algorithm is a defined procedure for solving a problem or carrying out a task. Sorting a list, calculating a price and following a control sequence all use algorithms; none automatically makes a system AI. AI systems also rely on algorithms, including procedures for training models and using their predictions.

Explanation, examples & sources

A rule such as “reject a part when its measured diameter exceeds the limit” is an explicit decision procedure. A learned classifier instead estimates a decision from patterns in examples. Both require correct inputs, tested assumptions and defined failure behaviour. Calling a process an algorithm says little about whether it learns, how complex it is or whether it is trustworthy. Ask which decisions are fixed in code and which depend on trained parameters.

References

Explore next

AI-003

How do machine learning, deep learning and neural networks differ?

Machine learning develops models whose behaviour is fitted from data. Neural networks are one family of such models, built from connected computational layers. Deep learning generally uses neural networks with multiple layers. These terms overlap, but machine learning also includes methods that are not neural networks.

Explanation, examples & sources

Model choice should follow the task and available evidence. A small structured dataset may be well served by a simpler statistical model; image or language tasks may justify more complex architectures. Complexity adds training, evaluation and deployment requirements rather than guaranteeing better results. Compare against a baseline using held-out examples, relevant error costs and the hardware that will actually run the system. Do not infer biological awareness from the word “neural.”

References

Explore next

AI-004

What is the difference between training and inference?

Training adjusts a model using data and an objective. Inference uses the resulting model to produce an output from new inputs. A deployed model does not necessarily keep learning from every interaction; additional learning, memory storage and retrieval are separate mechanisms that depend on the application.

Explanation, examples & sources

Keep training data, validation data and final test data appropriately separated. Otherwise, a system can appear accurate because it has already encountered information from the test. Record the model version, data preparation and decision thresholds with each evaluation. For production, consider processing time, memory, monitoring and rollback as well as accuracy. An application that stores a conversation for later retrieval has not necessarily updated the underlying model's parameters.

References

Explore next

AI-005

How do I know whether an AI model is good enough for my task?

Test it on representative examples that were not used to tune it, using metrics that reflect the consequences of mistakes. Overall accuracy alone can hide serious failures, especially when important events are rare. Include a baseline and define what the system should do when it cannot make a reliable decision.

Explanation, examples & sources

For defect detection, measure missed defects and unnecessary rejects separately. For document extraction, check each critical field and whether the cited evidence supports it. Split results by product variant, language, lighting or other conditions that can expose weaknesses. Compare confidence scores with actual correctness, and monitor whether production data changes. Acceptance should specify thresholds and escalation rules before results are inspected, rather than selecting a flattering metric afterwards.

References

Explore next

20

Language models and applications

LLM-001

What is an LLM, and how is it different from a chatbot?

A large language model, or LLM, is a learned model that processes and generates language-related representations and outputs. A chatbot is an application that may use an LLM together with search, memory, tools, permissions and an interface. The same model can behave differently inside different products or workflows.

Explanation, examples & sources

When comparing assistants, separate the underlying model from the surrounding application. Internet access, file handling, code execution, conversation storage and integration permissions are product features, not automatic properties of every LLM. Conversely, a model can be used behind the scenes for extraction or classification without any chat interface. Specify the task and required tools before choosing a product; otherwise, a model comparison can accidentally become a comparison of unrelated application features.

References

Explore next

LLM-003

Why can an LLM give a confident but incorrect answer?

Fluent language and correct formatting are not proof that an answer is true. A model can produce unsupported details, misread evidence or apply the wrong rule. Retrieval and structured outputs can reduce particular failure modes, but neither turns generated content into automatically verified knowledge.

Explanation, examples & sources

Match the checking method to the claim. Verify a legal date against the operative text, a part number against the correct manual and a calculation with explicit inputs. Require accessible sources where evidence matters, then inspect whether they support the statement. A citation can also be irrelevant or wrong. For business automation, use deterministic validation for required fields and rules, with human review for consequential uncertainty. Do not equate an asserted confidence score with calibrated reliability.

References

Explore next

LLM-002

What are tokens and context windows?

Tokens are the units a model uses to represent input and output; they may be words, parts of words or other encoded elements. The context window limits the material processed together in a request. A larger window allows more material, but does not guarantee that every detail will be used correctly.

Explanation, examples & sources

Count the instructions, conversation, retrieved passages, tool responses and requested output budget, not just the latest message. Token counts differ across languages and content, so use the relevant tokenizer or provider usage data rather than a universal words-to-tokens rule. Keep authoritative facts in concise, structured context and remove stale contradictions. Long-term application memory is a separate mechanism from the current context window; a previous conversation is not automatically available to every request.

References

Explore next

LLM-004

When should I use RAG, fine-tuning or ordinary rules?

Retrieval-augmented generation, or RAG, supplies relevant external material during inference. Fine-tuning adjusts model behaviour using training examples. Ordinary rules enforce explicit conditions in code. Use retrieval for accessible changing knowledge, training for demonstrated behavioural gaps, and rules for requirements that should not depend on a probabilistic guess.

Explanation, examples & sources

For a support assistant, retrieving current manuals is different from teaching a preferred response format. Start with a tested prompt and retrieval baseline before funding fine-tuning. Evaluate retrieval quality, source versions and unsupported claims separately from writing quality. Fine-tuning is not a reliable substitute for an up-to-date document store. A hybrid can work well: retrieve the relevant policy, extract structured fields and apply fixed eligibility rules outside the model. Validate the complete pipeline on real examples.

References

Explore next

LLM-005

Should I run a language model locally or use a cloud service?

Choose based on data handling, quality, latency, availability, operational effort and total cost. Local execution can reduce dependence on an external inference service, but requires compatible hardware and maintenance. Cloud services can simplify operation, while introducing provider, network, contractual and data-governance dependencies.

Explanation, examples & sources

Test the same workload on both options, including long inputs and peak concurrency. Account for memory, model loading, updates, monitoring, electricity and staff time locally; account for usage charges, rate limits and outages remotely. Check exactly what leaves the device and what is retained. “Runs locally” does not establish that telemetry, model downloads or connected tools are offline. For sensitive workflows, document permissions and information flows rather than relying on a marketing label.

References

Explore next

LLM-006

Does open-weight mean open-source, free and unrestricted?

No. Open-weight means model parameters are available under specified terms; it does not by itself establish access to training data, full development code or unrestricted use. Different models, runtimes and datasets have different licences. Downloadability, zero price and permission for a commercial deployment are separate questions.

Explanation, examples & sources

Inspect the licence attached to the exact checkpoint and version, together with code, dependencies and any usage restrictions. Record attribution, redistribution and modification requirements. Also assess whether the release includes enough documentation to reproduce its stated capabilities. Compare hosted and self-hosted options on supportability and evidence, not simply the word “open.” This FAQ does not grant a licence or replace a review of the actual terms governing the planned use.

A licence claim for one component must not be applied to an entire AI stack.

References

Explore next

30

AI agents, coding tools and software workflows

AGENT-001

What is the difference between an AI assistant, an agent and a workflow?

An assistant is the user-facing role; a workflow follows a defined sequence; an agent can use a model to choose steps or tools within an assigned objective. These can overlap in one product. Calling something an agent does not establish how independently, reliably or safely it operates.

Explanation, examples & sources

Start with a bounded task, such as classifying incoming requests and proposing a response. A fixed workflow may be simpler to test than an agent that chooses arbitrary actions. Add model-directed planning only where it solves a real variability problem, and define permissions, stopping conditions and escalation. Evaluate completed tasks and unwanted actions, not merely whether the conversation sounds capable. A system that drafts an email is materially different from one authorised to send it or alter a customer record.

References

Explore next

AGENT-002

What should a useful prompt for a coding agent contain?

Give the agent a specific outcome, verified context, boundaries and a way to prove completion. Include relevant files or interfaces, the intended design, tests, acceptance criteria and what must not change. A narrow, evidence-based assignment is easier to review than an instruction to improve an entire application without constraints.

Explanation, examples & sources

A practical handoff can state: current behaviour; desired change; affected paths and data contracts; edge cases; validation commands; prohibited production actions; and expected diff, test results and remaining risks. Distinguish facts already established from assumptions the agent must verify. Avoid dumping unrelated repository history into every task. When the required design is still uncertain, resolve that uncertainty before requesting a broad implementation. This is an editorial workflow template, not a vendor-prescribed prompt or a guarantee that any agent will follow every instruction.

References

Explore next

AGENT-003

How should I limit an AI agent's access to files, accounts and tools?

Give the agent only the access needed for the task, and separate reading information from taking consequential actions. Retrieved pages, documents and tool outputs can contain untrusted instructions. Treat them as data rather than as authority to change the task, expose secrets or grant additional permissions.

Explanation, examples & sources

Define an allowlist of tools and destinations, keep secrets outside ordinary prompts, and require approval for sensitive actions such as publishing, sending messages, spending money or modifying production data. Use a test environment and reversible changes where practical. Log actions without unnecessarily copying confidential content. Evaluate malicious or misleading inputs alongside normal tasks. Model-level instructions help describe boundaries, but technical permission controls should enforce them. These controls are a risk-reduction design, not proof that prompt injection or erroneous actions are impossible.

References

Explore next

AGENT-004

How can I reduce AI coding costs without weakening review and testing?

Reduce avoidable work rather than removing essential checks. Keep tasks small, reuse verified findings, supply relevant context and ask for focused changes. Token usage, tool execution, retries and review effort can all contribute to cost, so a cheaper model or shorter initial prompt is not automatically the cheapest completed task.

Explanation, examples & sources

Record a compact project state with the current revision, unresolved decisions and next task. Use targeted searches instead of repeatedly reading the entire repository, and preserve useful test evidence between milestones. Stop repeated repair attempts when the failure needs a new diagnosis. Compare representative completed tasks, including human review time and regression risk. No provider prices or savings percentages are assumed here; measure your actual usage and confirm current billing terms before setting a budget.

References

Explore next

AGENT-005

Can an AI code review replace tests or a human reviewer?

No. An AI review can identify issues or propose checks, but a plausible explanation is not execution evidence. Tests, static checks, security review and human judgement address different failure modes. The appropriate release gate depends on the change and the consequences of getting it wrong.

Explanation, examples & sources

Review the actual diff against the requested behaviour, then run relevant checks on the same revision. Verify interface changes, migrations, error handling, permissions and negative cases. Ask the agent to distinguish tests it executed from tests it merely recommends. A passing suite does not prove that an untested requirement works; a second model agreeing with the first is not an independent runtime test. For sensitive changes, retain an accountable reviewer and a rollback or recovery plan.

References

Explore next

← Back to all subjects