ChoralSoft Book Guides

Short guides from our AI books

Read worked examples from our books on AI and algorithms. Start with 15 new guides from Next-Generation AI, Explained and Evaluated, or explore the other collections below.

Next-Generation AI, Explained and Evaluated

Explore practical ways to evaluate agent reliability, inference budgets, model internals and long-term memory.

View book details

2 min read

Write the benchmark contract before collecting scores

A leaderboard score only answers the question implied by its sampling and scoring rules.

Read the guide

2 min read

Can an agent succeed twice in a row?

A retry can improve the chance of seeing at least one success, while a repeated-use requirement asks whether every attempt succeeds.

Read the guide

2 min read

Use the same tasks to compare two agents

A paired benchmark lets task difficulty affect both systems, so the comparison can focus on the cases where the outcomes differ.

Read the guide

2 min read

Turn an agent failure log into engineering priorities

An end-to-end failure rate says how often the workflow breaks.

Read the guide

2 min read

Measure what a retry policy buys

An agent can retry a failed step, restart the whole task, or escalate to a human.

Read the guide

2 min read

Separate candidate coverage from verifier quality

Generating more candidates only helps if the candidate set contains a usable answer and the selection procedure can find it.

Read the guide

2 min read

Extra search can amplify verifier mistakes

Selecting the highest-scoring output among more candidates puts pressure on the scoring function.

Read the guide

2 min read

Compare reasoning budgets by cost per success

Cost per attempted request can favor a system that cheaply fails.

Read the guide

2 min read

A good linear probe needs a control

A probe tests whether information can be decoded from a representation under a particular split and probe class.

Read the guide

2 min read

What an activation patch actually measures

Activation patching replaces an internal value from one run with a corresponding value from another run.

Read the guide

2 min read

What makes a sparse feature credible?

A sparse autoencoder can produce a feature that is easy to label from its strongest examples.

Read the guide

2 min read

Find which stage lost the memory

Agent memory is a pipeline.

Read the guide

2 min read

Measure memory retention when follow-up ends

A retention experiment can end before some memories fail.

Read the guide

2 min read

Read the accuracy matrix before reporting forgetting

A single average can conceal which tasks a model improved on and which it lost.

Read the guide

2 min read

Preregister the decisions that change your conclusion

A short evaluation plan can prevent decisions about metrics, slices and stopping from being made after the answers are visible.

Read the guide

Statistical Foundations for LLM Development and Evaluation

Twenty chapters of statistical methods for LLM development and evaluation, with worked derivations, exercises and a companion Python library.

View book detailsApple Books

4 min read

Zero Failures in 30 Trials Does Not Mean a Zero Failure Rate

What a clean pilot actually proves, the “rule of three”, and how many trials you need before a one-sided bound is worth reporting.

Read the guide

5 min read

Resample Accounts, Not Rows: Bootstrap for Clustered Evaluation Data

When conversations come grouped by customer, treating every row as independent makes your interval too narrow. Here is how to resample the right unit.

Read the guide

5 min read

You Picked the Worst Slice After Looking: Why Its Interval Is Too Optimistic

Choosing the lowest-scoring category and then reporting an ordinary interval overstates the evidence. A simultaneous bound fixes it.

Read the guide

5 min read

Pass@k Without the Bias: The Estimator Behind Code Benchmarks

How to estimate the chance that at least one of k samples passes, using n completions per problem, and why you cannot treat the subsets as independent.

Read the guide

5 min read

Conformal Prediction in Plain Terms: Sets With a Coverage Guarantee

How split conformal prediction turns any classifier’s scores into prediction sets that contain the true label at a rate you choose.

Read the guide

5 min read

Prediction-Powered Estimates: Using an LLM Judge Without Trusting It Blindly

A cheap judge scores everything and a small human audit corrects it. How to combine them and why the combination can beat either alone.

Read the guide

4 min read

Measuring Human Agreement: Why Raw Percent Agreement Can Mislead

Cohen’s kappa corrects for chance agreement. Two worked examples show how high agreement can still hide a weak rubric.

Read the guide

4 min read

One Training Run Is Not a Result: Budgeting for Seed Variance

Random seeds change fine-tuning outcomes. How to estimate seed spread and decide how many runs a comparison needs.

Read the guide

5 min read

Drift Monitoring That Does Not Cry Wolf

Checking a metric every day with a 5% test guarantees false alarms. Sequential monitors give you a controlled alarm rate.

Read the guide

5 min read

Fewer Runs, Honest Ablations: Fractional Factorial Design

Testing four on/off changes takes 16 runs. A half fraction uses 8, at the cost of aliasing. Here is how to see what you gave up.

Read the guide

RL for LLM Agents and Reasoning Models

Reinforcement learning is how modern language models are taught to reason, use tools and act over many steps. The book builds the subject from first principles, with the mathematics worked out and the code written from scratch.

View book detailsApple Books

5 min read

The RLHF Pipeline End to End: SFT, Reward Model, Policy Optimization

The three stages that turn a pretrained model into an assistant, and the failure modes to watch at each one.

Read the guide

5 min read

Verifiable Rewards: Training Reasoning Models Without a Learned Reward Model

How rule-based checks on answers and code replace a learned scorer, and where weak verifiers still leak.

Read the guide

4 min read

Outcome Rewards vs Process Rewards for Reasoning Models

Reward the final answer, reward each step, or both? The trade-offs in cost, signal density and hackability.

Read the guide

4 min read

Entropy Collapse: When RL Training Stops Exploring

Why policy entropy falls during RL fine-tuning, how to see it, and what helps preserve diversity.

Read the guide

5 min read

Credit Assignment in Multi-Turn Agents: Which Action Earned the Reward?

Token, turn and episode-level credit, and the tools that make sparse agent rewards learnable.

Read the guide

5 min read

Off-Policy Drift in Asynchronous RL Rollouts

Why stale rollouts break policy-gradient assumptions, how importance ratios and clipping help, and what to monitor.

Read the guide

5 min read

Best-of-n Sampling vs Reinforcement Learning: A Fair Comparison

A training-free baseline with a clean KL bound, rejection-sampling fine-tuning, and when RL is worth its cost.

Read the guide

5 min read

Does RL Expand a Model’s Capability or Just Sharpen It?

Using pass-at-k curves to tell whether RL-trained reasoning models solve new problems or choose better among old answers.

Read the guide

4 min read

Reward Hacking in Practice: Length Padding and Format Gaming

Two common ways policies exploit proxy rewards, and countermeasures you can apply today.

Read the guide

5 min read

Designing Rewards for Tool-Using Agents Without Inviting Cheating

Verifiable outcomes, partial credit, penalties and how to test a reward before you train against it.

Read the guide

Applied AI Under Uncertainty (Volume 1)

Learn to measure uncertainty and evaluate decisions using calibration, conformal prediction, causal inference, grounded retrieval and off-policy evaluation.

View book detailsApple Books

5 min read

Reading a Reliability Diagram: Is “80% Confident” Right 80% of the Time?

How to check whether a model’s probabilities mean what they say, and what expected calibration error can and cannot tell you.

Read the guide

4 min read

Temperature Scaling: A One-Parameter Fix for Overconfident Models

Divide the logits by a single number fitted on held-out data. It leaves predictions unchanged and often improves calibration.

Read the guide

4 min read

Aleatoric vs Epistemic Uncertainty: Noise You Cannot Remove and Ignorance You Can

Two kinds of “I’m not sure” call for different responses: collect more data, or accept irreducible noise.

Read the guide

5 min read

Prediction Intervals That Adapt: Conformalized Quantile Regression

Plain conformal intervals have a fixed width. Combining quantile regression with a conformal correction gives intervals that widen where the data are noisy.

Read the guide

5 min read

Confounding and the Backdoor Path: Why Correlation Misleads Decisions

A common cause can make a treatment look helpful or harmful. Here is how adjusting for the right variable fixes it, and how adjusting for the wrong one breaks it.

Read the guide

5 min read

Propensity Scores and Inverse-Probability Weighting, Step by Step

Reweighting observational data so treated and untreated groups look alike, and the positivity check that keeps it honest.

Read the guide

5 min read

Measuring Retrieval Quality: Recall@k, MRR and nDCG in Plain Language

Three standard ways to score a retriever, what each rewards, and how to pick one for a question-answering pipeline.

Read the guide

5 min read

Grounded Answers and When to Abstain

A retrieval system should answer only when the evidence supports it. How to measure support and set an abstention rule.

Read the guide

5 min read

Off-Policy Evaluation: Judging a New Policy From Old Logs

Inverse propensity scoring estimates how a new decision policy would have performed using data collected by a different one.

Read the guide

5 min read

Doubly Robust Estimates and Weight Clipping for Off-Policy Evaluation

Two ways to tame the variance of importance-weighted estimates: add a reward model, and cap extreme weights.

Read the guide

Applied AI for Generation and Control (Volume 2)

Study diffusion and flow models, equivariance, Bayesian optimization, reinforcement learning and the evaluation of generative systems.

View book detailsApple Books

5 min read

The Diffusion Forward Process: Turning Data Into Noise on Purpose

How a fixed noising schedule works, and the one-line formula that lets you jump to any noise level directly.

Read the guide

5 min read

What a Diffusion Network Actually Predicts: Noise, Score or Clean Image

Three equivalent-looking targets for the same model, how they relate, and why the choice affects training.

Read the guide

4 min read

Classifier-Free Guidance: Steering a Diffusion Model Without a Classifier

A single extra knob trades diversity for prompt adherence. Here is the formula and its failure modes.

Read the guide

5 min read

Flow Matching and Rectified Flow: Straighter Paths From Noise to Data

Instead of learning to reverse a noising process, learn a velocity field that carries noise to data along near-straight lines.

Read the guide

4 min read

Equivariance vs Invariance: Building Symmetry Into a Model

If shifting the input shifts the output, the model is equivariant. If the output ignores the shift, it is invariant. Knowing which you need changes the architecture.

Read the guide

5 min read

Gaussian Process Surrogates: Modeling an Expensive Function With Uncertainty

The surrogate model at the heart of Bayesian optimization: what a Gaussian process gives you and what its kernel assumes.

Read the guide

5 min read

Choosing the Next Point: Expected Improvement vs Upper Confidence Bound

Acquisition functions turn a surrogate model’s mean and uncertainty into a decision about what to evaluate next.

Read the guide

4 min read

Reward Shaping Without Changing the Goal: Potential-Based Rewards

Sparse rewards make learning slow. Potential-based shaping adds guidance while provably leaving the best policy unchanged.

Read the guide

5 min read

FID and Its Limits: What an Image-Quality Score Does and Does Not Measure

The Fréchet Inception Distance compares feature statistics of real and generated images. It is useful, and easy to misuse.

Read the guide

5 min read

Fidelity and Diversity: Precision and Recall for Generative Models

A single score hides whether a generator makes realistic samples, covers the data, or neither. Precision and recall for distributions separate the two.

Read the guide

Algorithms Made Simple

A visual, plain-language guide to algorithms spanning data structures, searching, sorting, graphs, machine learning and generative AI, with a two-page learning spread for every concept.

View book detailsApple BooksAmazon Kindle

4 min read

Trees and Hierarchies: How Computers Handle Parts of Parts

Roots, leaves, depth and traversal orders: the structure behind folders, web pages and org charts.

Read the guide

5 min read

Binary Search Trees: Why Balance Is the Whole Story

The ordering rule that makes lookups fast, how sorted input can wreck it, and how self-balancing trees fix it.

Read the guide

4 min read

Graphs and How to Store Them: Matrix or List?

Nodes, edges and weights, and why most real networks are best stored as adjacency lists.

Read the guide

5 min read

Shortest Paths vs Spanning Trees: Two Problems That Look Alike

Dijkstra, A* and minimum spanning trees, and why “cheapest route” and “cheapest network” are different questions.

Read the guide

5 min read

Merge Sort vs Quicksort: Trading Memory, Speed and Stability

Why n log n beats n squared, and what each fast sorting method gives up to get there.

Read the guide

4 min read

Memoization: Stop Solving the Same Subproblem Twice

How remembering answers turns a 300-million-call recursion into about 40 computations.

Read the guide

5 min read

Train, Test, Overfit: How to Tell if a Model Really Learned

Why you test on unseen data, what overfitting looks like, and the mistakes that quietly ruin evaluations.

Read the guide

5 min read

Decision Trees and Ensembles: From One Tree to a Forest

Why single trees overfit, and how random forests and boosting turn many weak trees into a strong model.

Read the guide

5 min read

Nearest Neighbors and k-Means: Learning From Similarity

Classify by looking at the closest examples, group data with k-means, and know where each breaks.

Read the guide

5 min read

How Recommendation Systems Work, in Plain Language

Collaborative filtering, content-based methods, cold start and feedback loops.

Read the guide

Les algorithmes en clair

Un guide visuel et accessible des algorithmes : structures de données, recherche, tri, graphes, apprentissage automatique et IA générative, avec une double page d’apprentissage pour chaque concept.

View book detailsApple BooksAmazon Kindle

4 min de lecture

Arbres et hiérarchies : comment l’ordinateur gère des parties de parties

Racine, feuilles, profondeur et parcours : la structure derrière les dossiers, les pages web et les organigrammes.

Lire le guide

5 min de lecture

Arbres binaires de recherche : tout est dans l’équilibre

La règle d’ordre qui accélère les recherches, ce qui la ruine avec des données triées, et comment les arbres auto-équilibrés y remédient.

Lire le guide

4 min de lecture

Les graphes et la façon de les stocker : matrice ou liste ?

Nœuds, arêtes et poids, et pourquoi la plupart des réseaux réels se stockent en listes d’adjacence.

Lire le guide

5 min de lecture

Plus courts chemins et arbres couvrants : deux problèmes qui se ressemblent

Dijkstra, A* et arbres couvrants minimaux : pourquoi « l’itinéraire le moins cher » et « le réseau le moins cher » sont deux questions différentes.

Lire le guide

5 min de lecture

Tri fusion ou tri rapide : mémoire, vitesse et stabilité

Pourquoi n log n bat n au carré, et ce que chaque tri rapide sacrifie pour y arriver.

Lire le guide

4 min de lecture

La mémoïsation : ne plus résoudre deux fois le même sous-problème

Comment mémoriser les réponses fait passer une récursion de 300 millions d’appels à environ 40 calculs.

Lire le guide

5 min de lecture

Entraînement, test, surapprentissage : un modèle a-t-il vraiment appris ?

Pourquoi tester sur des données inédites, à quoi ressemble le surapprentissage et les erreurs qui faussent discrètement une évaluation.

Lire le guide

5 min de lecture

Arbres de décision et ensembles : d’un arbre à une forêt

Pourquoi un arbre seul surapprend, et comment forêts aléatoires et boosting font d’arbres faibles un modèle solide.

Lire le guide

5 min de lecture

Plus proches voisins et k-moyennes : apprendre par similarité

Classer en regardant les exemples les plus proches, regrouper avec les k-moyennes et connaître les limites de chaque méthode.

Lire le guide

5 min de lecture

Comment fonctionnent les systèmes de recommandation, en langage clair

Filtrage collaboratif, méthodes fondées sur le contenu, démarrage à froid et boucles de rétroaction.

Lire le guide

Algoritmos explicados con claridad

Una guía visual y en lenguaje sencillo sobre los algoritmos: estructuras de datos, búsqueda, ordenamiento, grafos, aprendizaje automático e IA generativa, con una doble página de aprendizaje para cada concepto.

View book detailsApple BooksAmazon Kindle

4 min de lectura

Árboles y jerarquías: cómo manejan las computadoras las partes de partes

Raíz, hojas, profundidad y recorridos: la estructura detrás de las carpetas, las páginas web y los organigramas.

Leer la guía

5 min de lectura

Árboles binarios de búsqueda: todo depende del equilibrio

La regla de orden que acelera las búsquedas, cómo la arruinan los datos ordenados y cómo la arreglan los árboles autoequilibrados.

Leer la guía

4 min de lectura

Grafos y cómo guardarlos: ¿matriz o lista?

Nodos, aristas y pesos, y por qué la mayoría de las redes reales se guardan como listas de adyacencia.

Leer la guía

5 min de lectura

Caminos más cortos y árboles de expansión: dos problemas parecidos

Dijkstra, A* y árboles de expansión mínima: por qué «la ruta más barata» y «la red más barata» son preguntas distintas.

Leer la guía

5 min de lectura

Ordenamiento por mezcla o quicksort: memoria, velocidad y estabilidad

Por qué n log n supera a n al cuadrado y a qué renuncia cada método rápido para lograrlo.

Leer la guía

4 min de lectura

Memoización: no resuelva dos veces el mismo subproblema

Cómo recordar las respuestas reduce una recursión de 300 millones de llamadas a unos 40 cálculos.

Leer la guía

5 min de lectura

Entrenar, probar, sobreajustar: ¿aprendió de verdad el modelo?

Por qué se prueba con datos nuevos, cómo se ve el sobreajuste y los errores que arruinan en silencio una evaluación.

Leer la guía

5 min de lectura

Árboles de decisión y ensambles: de un árbol a un bosque

Por qué un árbol solo se sobreajusta y cómo los bosques aleatorios y el boosting convierten muchos árboles débiles en un modelo sólido.

Leer la guía

5 min de lectura

Vecinos más cercanos y k-medias: aprender por similitud

Clasificar mirando los ejemplos más cercanos, agrupar con k-medias y saber dónde falla cada método.

Leer la guía

5 min de lectura

Cómo funcionan los sistemas de recomendación, en lenguaje sencillo

Filtrado colaborativo, métodos basados en el contenido, arranque en frío y bucles de retroalimentación.

Leer la guía

AI Made Simple

A visual, jargon-free guide to modern AI: how machines learn, what is inside a language model, generative AI, AI that writes code, agents and using AI responsibly.

View book detailsApple BooksAmazon Kindle

4 min read

What Is a Token? How Language Models Actually Read Text

Why models see pieces instead of words, and how that explains odd spellings, counting slips and usage limits.

Read the guide

4 min read

The Context Window: Why Your AI Assistant Forgets

A model can only consider a limited amount of text at once. How that shapes long chats and what to do about it.

Read the guide

4 min read

Fluent Is Not Conscious: Thinking Clearly About AI That Sounds Human

Capability and awareness are different. How to trust an assistant the right amount.

Read the guide

4 min read

Multimodal Models: When AI Reads Images, Audio and Text Together

How one model handles photos, speech and text, and where each kind of input goes wrong.

Read the guide

4 min read

Prompts That Separate Instructions From Source Material

Label the task, the audience and the source text, and show the format with a short example.

Read the guide

4 min read

Ask for Structured Output, Then Check It

Tables, fixed fields and “not found” rules make AI mistakes visible instead of hidden in smooth prose.

Read the guide

4 min read

When AI Writes Your Code, Tests Are Your Expectations

Turn your requirements into tests before the code exists, and avoid letting the AI mark its own homework.

Read the guide

4 min read

Deepfakes and Provenance: Ask Where It Came From

Why “does it look fake?” is the wrong question, and what to ask about a suspicious image, voice or video.

Read the guide

4 min read

Where a Human Should Approve: Approval Points for AI Workflows

Which actions can run automatically, which need a yes from a person, and how to plan the stop.

Read the guide

4 min read

Match Oversight to Risk: How Much Checking Does AI Need?

Scale the checks to the cost of a mistake, write down the purpose and limits, and keep watching after launch.

Read the guide

L’IA expliquée simplement

Un guide visuel et sans jargon de l’IA moderne : comment les machines apprennent, ce qu’il y a dans un modèle de langage, l’IA générative, l’IA qui écrit du code, les agents et l’usage responsable.

View book detailsApple BooksAmazon Kindle

4 min de lecture

Qu’est-ce qu’un jeton ? Comment les modèles de langage lisent le texte

Pourquoi les modèles voient des morceaux et non des mots, et ce que cela explique des fautes d’orthographe et des limites d’utilisation.

Lire le guide

4 min de lecture

La fenêtre de contexte : pourquoi votre assistant IA oublie

Un modèle ne peut considérer qu’une quantité limitée de texte à la fois. Ce que cela change pour les longues conversations.

Lire le guide

4 min de lecture

Fluide ne veut pas dire conscient : bien penser une IA qui parle comme un humain

Capacité et conscience sont deux choses différentes. Comment accorder la bonne dose de confiance à un assistant.

Lire le guide

4 min de lecture

Les modèles multimodaux : quand l’IA lit images, sons et texte ensemble

Comment un même modèle traite photos, parole et texte, et où chaque type d’entrée peut mal tourner.

Lire le guide

4 min de lecture

Séparer les consignes de la matière source dans vos requêtes

Nommez la tâche, le public et le texte source, et montrez le format par un court exemple.

Lire le guide

4 min de lecture

Demander une sortie structurée, puis la vérifier

Tableaux, champs fixes et règle « introuvable » rendent les erreurs de l’IA visibles au lieu de les cacher dans une prose lisse.

Lire le guide

4 min de lecture

Quand l’IA écrit votre code, les tests sont vos attentes

Transformez vos exigences en tests avant que le code existe, et ne laissez pas l’IA corriger sa propre copie.

Lire le guide

4 min de lecture

Hypertrucages et provenance : demandez d’où cela vient

Pourquoi « est-ce que ça a l’air faux ? » est la mauvaise question, et que demander à propos d’une image, d’une voix ou d’une vidéo suspecte.

Lire le guide

4 min de lecture

Où un humain doit approuver : les points d’approbation d’un flux de travail IA

Quelles actions peuvent s’exécuter seules, lesquelles exigent un oui d’une personne, et comment prévoir l’arrêt.

Lire le guide

4 min de lecture

Adapter la surveillance au risque : combien de contrôle pour l’IA ?

Graduez les contrôles selon le coût d’une erreur, écrivez l’objectif et les limites, et continuez à surveiller après le lancement.

Lire le guide

La IA explicada de forma sencilla

Una guía visual y sin jerga de la IA moderna: cómo aprenden las máquinas, qué hay dentro de un modelo de lenguaje, la IA generativa, la IA que escribe código, los agentes y el uso responsable.

View book detailsApple BooksAmazon Kindle

4 min de lectura

¿Qué es un token? Cómo leen el texto los modelos de lenguaje

Por qué los modelos ven piezas en lugar de palabras y qué explica eso sobre faltas de ortografía y límites de uso.

Leer la guía

4 min de lectura

La ventana de contexto: por qué su asistente de IA olvida

Un modelo solo puede considerar una cantidad limitada de texto a la vez. Cómo afecta eso a los chats largos.

Leer la guía

4 min de lectura

Fluido no significa consciente: pensar con claridad sobre una IA que suena humana

Capacidad y conciencia son cosas distintas. Cómo confiar en un asistente en su justa medida.

Leer la guía

4 min de lectura

Modelos multimodales: cuando la IA lee imágenes, audio y texto a la vez

Cómo un mismo modelo maneja fotos, voz y texto, y dónde falla cada tipo de entrada.

Leer la guía

4 min de lectura

Indicaciones que separan las instrucciones del material fuente

Ponga nombre a la tarea, el público y el texto fuente, y muestre el formato con un ejemplo breve.

Leer la guía

4 min de lectura

Pida una salida estructurada y luego compruébela

Tablas, campos fijos y la regla «no encontrado» hacen visibles los errores de la IA en lugar de esconderlos en prosa fluida.

Leer la guía

4 min de lectura

Cuando la IA escribe su código, las pruebas son sus expectativas

Convierta sus requisitos en pruebas antes de que exista el código y no deje que la IA corrija su propio examen.

Leer la guía

4 min de lectura

Deepfakes y procedencia: pregunte de dónde viene

Por qué «¿parece falso?» es la pregunta equivocada y qué preguntar ante una imagen, voz o video sospechosos.

Leer la guía

4 min de lectura

Dónde debe aprobar una persona: puntos de aprobación en flujos de trabajo con IA

Qué acciones pueden ejecutarse solas, cuáles requieren el sí de una persona y cómo planificar la parada.

Leer la guía

4 min de lectura

Ajustar la supervisión al riesgo: ¿cuánta revisión necesita la IA?

Gradúe los controles según el costo de un error, escriba el propósito y los límites, y siga vigilando tras el lanzamiento.

Leer la guía