> For the complete documentation index, see [llms.txt](https://ailyze.gitbook.io/ailyze-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ailyze.gitbook.io/ailyze-docs/analyze-data/build-a-codebook.md).

# Build a Codebook

This page shows you how to build the set of themes and codes Evidano uses to label your data, then refine and validate it.

{% hint style="info" %}
**What you need:** a document or spreadsheet project — the codebook is created during analysis setup. Editing and validation are Pro features.

**What you will have at the end:** a clean, well-defined codebook, plus a reliability check on the coding.
{% endhint %}

A [codebook](/ailyze-docs/reference/glossary.md#codebook) is the spine of qualitative rigor: [themes](/ailyze-docs/reference/glossary.md#theme) organized into sub-themes/codes, each with a clear definition. Evidano can draft one for you, but the best codebooks are *curated* by a human.

## Where codebooks come from

You set the initial codebook during analysis setup — Evidano can generate one, you can type or paste your own, or you can reuse one from a past project. For the full walkthrough, see [Discover themes and patterns](/ailyze-docs/analyze-data/discover-themes-and-patterns.md).

After results exist, you refine it with the codebook editor.

## Editing the codebook

On the results page **Action** bar, click **"Edit Codebook"** *(Pro)*. The editor is a drag-and-drop structure of **Themes → Sub-themes/Codes** where you can:

* **Rename** themes and codes (use consistent, concrete language).
* **Merge** near-duplicate codes into one.
* **Split** a code that's doing two jobs into two codes.
* **Move** a sub-theme to a different theme.
* **Add** missing themes or codes.

Changes are tracked with statuses (original, new, modified, merged, split, removed) so you can see what you changed before applying.

<figure><img src="/files/8F9WntkfNKn7epSTn6rh" alt="The drag-and-drop codebook editor"><figcaption></figcaption></figure>

{% hint style="info" %}
**Tip:** Add a one-line **description** to every code — *"Mentions of price, cost, or value for money"* — so coding stays consistent and others can apply it the same way.
{% endhint %}

## A good codebook checklist

* [ ] **Mutually distinct** — minimal overlap between codes.
* [ ] **Clearly defined** — each code has a description and an example.
* [ ] **Right granularity** — specific enough to be useful, broad enough to recur.
* [ ] **Hierarchy makes sense** — sub-themes genuinely belong to their theme.
* [ ] **Named in your study's language** — not generic AI phrasing.
* [ ] **Within limits** — a document analysis has a combined limit of 150 items (themes + sub-themes + questions), so keep the codebook focused.

## Validate the coding: Calculate AI Accuracy

Once a codebook exists, the Action bar offers **"Calculate AI Accuracy"** *(Pro)*. It checks how reliably the codes were applied and shows an accuracy view, so you can trust (or correct) the labeling before reporting.

In spreadsheet projects, you can also audit at the row level on the **"AI Labels as Checklist (with code justifications)"** tab, and use **"Find Similar Quotes"** to catch responses that should share a code.

<figure><img src="/files/Tyk6YDXkb8ijPuCfpaPq" alt="The AI accuracy view for a codebook"><figcaption></figcaption></figure>

## Reuse your codebook across studies

When you reach the themes step in a new project, choose **"Use Previous"** to apply a codebook from an earlier project. This keeps coding consistent across waves, sites, or time periods — essential for longitudinal and comparative work.

## A realistic example

> **Scenario:** A multi-wave study. In wave 1 you let Evidano generate themes, then curate them into a tight 6-theme codebook with descriptions. In waves 2 and 3 you select **"Use Previous"** so every wave is coded identically — then run **"Calculate AI Accuracy"** each time to confirm consistency before comparing across waves.

## Next steps

* [Discover themes and patterns](/ailyze-docs/analyze-data/discover-themes-and-patterns.md) — where your first codebook comes from.
* [Categorize responses](/ailyze-docs/analyze-data/categorize-responses.md) — apply the codebook to survey data.
* [How to read your results](/ailyze-docs/analyze-data/how-to-read-your-results.md) — see the codebook table in context.
* [Qualitative research best practices](/ailyze-docs/methods-and-best-practices/qualitative-research-best-practices.md) — the methods behind good coding.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ailyze.gitbook.io/ailyze-docs/analyze-data/build-a-codebook.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
