Talks

Talks

Talk-sized explainers on retrieval-augmented generation, AI text detection, sampling bias in credit scoring and ML practice.

Talk-sized explainers on retrieval-augmented generation, AI text detection, sampling bias in credit scoring and ML practice.


Talk notes are short explainers, each sized for a 20–30 minute presentation. They are grouped by theme:



Generative AI

Building chatbots that know your business: retrieval-augmented generation

Large language models are fluent but know nothing about a company's internal documents, and fine-tuning them on every policy update is impractical. Retrieval-augmented generation (RAG) solves this by retrieving relevant passages from a document store at query time and passing them to the model as context. A RAG system has three main parts: an ingestion pipeline that splits documents into chunks and embeds them, a retriever that finds the most relevant chunks for a question, and a generator that writes an answer grounded in those chunks. Quality depends on all three, and evaluation should look separately at retrieval (did we find the right passages?) and generation (is the answer faithful to them?).

Five techniques for improving RAG retrieval

When a RAG assistant gives a wrong answer, the cause is usually retrieval rather than the language model. Five techniques address this:

  • Better chunking – split by document structure and keep overlaps, so that answers are not cut in half.
  • Hybrid search – combine dense embeddings with keyword search such as BM25 to catch exact terms, codes and names.
  • Query rewriting – let the model reformulate vague or multi-part questions before searching.
  • Re-ranking – retrieve many candidates cheaply, then order them with a cross-encoder.
  • Metadata filtering – restrict the search by date, product or document type when the question implies it.

Detecting AI-generated texts

As generated text becomes indistinguishable from human writing to the naked eye, detection matters for fake news, product reviews and student assignments. Detectors fall into three groups. Watermarking embeds a statistical signal during generation by nudging token choices, which works only if the model provider cooperates. Supervised detectors are classifiers trained on human and machine text; they perform well in-domain but degrade on new models and topics. Zero-shot methods use a language model's own likelihoods – for example, generated text tends to sit near local maxima of log-probability. All approaches can be weakened by paraphrasing, so detection results should be treated as evidence, not proof.



ML for credit risk

Fighting sampling bias in credit scoring models

Scorecards are trained on applicants who were accepted in the past, because only their repayment is observed. The model is then used to screen everyone, including the kind of applicants it has never seen with a label. This sampling bias makes models look better in validation than they are in production and can steer them towards overly conservative decisions. The talk illustrates the effect on synthetic data, then compares remedies: reject inference methods that assign labels to rejected cases, re-weighting approaches, and bias-aware evaluation that estimates how the model would perform on the full applicant population. More background is available in the research notes.

Active learning for reject inference

Instead of guessing the labels of rejected applicants, a lender can buy real ones by approving a few carefully selected rejects. Active learning picks the applications whose outcome would improve the scorecard most. Each such loan carries a risk of default, so the method is framed as a trade-off between labelling costs and future performance gains, and simulations on synthetic and real data help find a sensible budget.

Profit-oriented feature selection

Feature selection for scorecards usually optimises statistical criteria, while lenders care about profit and data costs. Using the Expected Maximum Profit measure as a fitness function, and treating the number of features and their acquisition costs as additional objectives, produces a set of Pareto-optimal models from which a business can pick the one that fits its budget.



ML practice

Lessons for industry from Kaggle competitions

Kaggle is sometimes seen as a sandbox with little relevance to real projects. Several competition habits are, however, directly useful at work: designing a validation scheme that mirrors the deployment setting, tracking every experiment, building diverse ensembles, investing in fast data pipelines, and reading the community's shared solutions after every competition. The Kaggle notes expand on these points.

Using Conda for package and environment management

"It works on my machine" is a common way for a data science project to fail. Conda creates isolated environments with pinned versions of Python, libraries and even non-Python dependencies such as CUDA toolkits. A practical workflow is short: create one environment per project, install packages from a consistent channel, export the environment to an environment.yml file, and recreate it on any other machine with a single command. Mixing pip and conda is possible, but installing Conda packages first avoids most dependency conflicts.