liveBook · Manning

Preprocessing

As explained in Effective Conversational AI

Data preparation is the process of transforming collected data into a suitable form for testing or model training.

Raw data can be irrelevant, sensitive, or difficult to search. Preprocessing turns it into data suited to testing, training, or retrieval. section 4.4 section 6.3.2

A practical workflow may include these steps:

  • For test data, sort utterances into usable and irrelevant groups, scrub personal information when needed, annotate them, and convert them into sets for a testing tool. section 4.4
  • For RAG, convert documents such as PDFs or tables into processable text, add metadata if useful, divide content into coherent chunks, generate embeddings, and store them in a vector database. section 6.3.2
Figure 4.7 Once you obtain some data, each utterance should first be sorted into buckets to identify potential candidates; this will separate the good, usable test data from the bad or irrelevant user inputs. The data may also need to be scrubbed to fix problems like personal identifiable information (PII). After that, the data will need to be annotated (for classifiers, it will need to be labeled with the correct intent; for generative AI, it will need to be associated with an ideal output response). Finally, the data will need to be converted into one or more sets that can be consumed by your testing tool.
figure

Shows how utterances are filtered, scrubbed, annotated, and converted into test sets. section 4.4

How Effective Conversational AI covers it

How deep it goes
Outlines filtering, scrubbing, annotation, chunking, embedding, and storage without detailing each step’s implementation.
Examples
Uses logged utterances, PDFs, tables, semantic chunks, intent labels, and ideal response annotations as examples.
What it assumes
Assumes access to production logs for the testing workflow and raw documents for the RAG workflow.
What you can do after
Apply it to prepare test sets from logs or searchable document data for RAG.
How it connects
Connects preprocessing with testing, training, retrieval-augmented generation, embeddings, and vector databases.

Also explained in

Compare how 22 books explain preprocessing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Conversational AI. The section links point to the parts of the book it draws on.