Question library
Explained questions for the decisions developers make.
Hybrid workflows and state machines
A hybrid workflow combines deterministic control with model-driven interpretation or planning. A state machine defines named states and permitted transitions. The state machine constrains what can happen even when a model proposes something else.
Schema validation: Zod and Pydantic
Schema validation verifies data shape, types, required fields, and declared constraints at runtime. Zod is commonly used in TypeScript; Pydantic serves a similar role in Python. These validators check structure, not whether facts are true or actions are…
Moderation and PII detection
Content moderation categorizes content that may violate a product policy. PII detection identifies potentially private identity-linked information for masking, routing, or restricted handling. Both can use rules and models, and neither is perfectly accurate.
Hallucination mitigation, business rules, and approval
Hallucination mitigation reduces unsupported model claims using evidence, constraints, validation, and abstention. Business-rule validation checks authoritative domain requirements. Human approval permits a specific action after a person reviews its concrete…
Golden datasets, test cases, and regression testing
A golden dataset is a curated set of representative inputs with expected outcomes, reference evidence, and scoring criteria. Regression testing reruns these cases after changes. AI tests often allow multiple acceptable phrasings while requiring the same…
Token optimization, prompt compression, and context trimming
Token optimization removes unnecessary model input/output while preserving task information. Prompt compression shortens instructions or evidence; context trimming selects only relevant history and sources. Shorter is useful only if important conditions…
PDFs, OCR, and document AI
Document AI combines text extraction, OCR, layout/table understanding, and field extraction. A PDF may already contain usable text or require image interpretation. OCR reads characters; document understanding connects them to fields and structure.
Speech-to-text, text-to-speech, and audio understanding
Speech-to-text converts spoken words into text. Text-to-speech produces spoken output from text. Audio understanding can also process nontext information in audio, depending on the model, but reliable interpretation of emotions or identity should not be…
Ollama, Hugging Face, and Transformers
Ollama simplifies running supported models locally through a runtime and API. Hugging Face hosts models, datasets, and libraries; Transformers is its widely used library for loading and using supported model architectures. A model repository is a distribution…
Tools and their safe contracts
Never accept a model's customerId as proof of the current customer. Never let the model supply an unrestricted email URL, SQL query, database filter, or role field.
Project 1 — Basic LLM chatbot
Build in this order. Each project extends a capability, not necessarily a separate repository. These are future learning projects; the notes remain in this one file. Move forward when you can explain the trade-offs and demonstrate the acceptance criteria,…
Project 5 — Tool-calling agent
Requirements: Read claim status, lookup policy, retrieve instructions, ask for missing IDs, and escalate. Start read-only.
Project 9 — Deterministic plus agentic workflow
Requirements: Interpret input, prepare a draft, validate required fields, wait for review, execute once, and notify reliably.
LangChain
Beginner — What does LangChain provide?
LangGraph
Beginner — What are nodes, edges, and state?
Workflows
Beginner — Deterministic versus agentic workflow?
Evaluation
Beginner — Why isn't normal unit testing enough?
Observability
Beginner — What do you trace in an AI request?
Difficulty is an editorial estimate. Completion means you chose to mark a question as understood.